Commit fa6a8e73 authored by Sylvain Schmitz's avatar Sylvain Schmitz

improved LaTeX rendering

parent ab9a2efd
...@@ -22,9 +22,9 @@ done ...@@ -22,9 +22,9 @@ done
# Total queries # Total queries
total=$(($total_xslt+$total_xquery)) total=$(($total_xslt+$total_xquery))
printf '\\begin{tabular}{lrrr}\n' printf '\\begin{tabular}{lr@{\\hspace{1pt}}rr@{\\hspace{1pt}}rr@{\\hspace{1pt}}r}\n'
printf '\\toprule\n' printf '\\toprule\n'
printf 'Axis & XSLT & XQuery & Total \\\\\n' printf 'Axis & \\multicolumn{2}{c}{XSLT} & \\multicolumn{2}{c}{XQuery} & \\multicolumn{2}{c}{Total} \\\\\n'
printf '\\midrule\n' printf '\\midrule\n'
axis_list=("ancestor" "attribute" "child" "descendant" "following" "following-sibling" "namespace" "parent" "preceding" "preceding-sibling" "self") axis_list=("ancestor" "attribute" "child" "descendant" "following" "following-sibling" "namespace" "parent" "preceding" "preceding-sibling" "self")
...@@ -46,7 +46,7 @@ do ...@@ -46,7 +46,7 @@ do
count_xslt=$(($count_xslt+$count)) count_xslt=$(($count_xslt+$count))
done done
percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc` percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc`
printf $count_xslt' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xslt $percent
printf ' & ' printf ' & '
# XQuery files # XQuery files
count_xquery=0 count_xquery=0
...@@ -56,15 +56,15 @@ do ...@@ -56,15 +56,15 @@ do
count_xquery=$(($count_xquery+$count)) count_xquery=$(($count_xquery+$count))
done done
percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc` percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc`
printf $count_xquery' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xquery $percent
printf ' & ' printf ' & '
count_total=$(($count_xslt+$count_xquery)) count_total=$(($count_xslt+$count_xquery))
percent=`echo "scale=1; 100*$count_total/$total" | bc` percent=`echo "scale=1; 100*$count_total/$total" | bc`
printf $count_total' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_total $percent
printf ' \\\\\n' printf ' \\\\\n'
done done
printf '\\midrule\n' printf '\\midrule\n'
printf 'Any axis & ' printf 'All axes & '
# XSLT files # XSLT files
count_xslt=0 count_xslt=0
for file in $xslt for file in $xslt
...@@ -73,7 +73,7 @@ do ...@@ -73,7 +73,7 @@ do
count_xslt=$(($count_xslt+$count)) count_xslt=$(($count_xslt+$count))
done done
percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc` percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc`
printf $count_xslt' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xslt $percent
printf ' & ' printf ' & '
# XQuery files # XQuery files
count_xquery=0 count_xquery=0
...@@ -83,11 +83,11 @@ do ...@@ -83,11 +83,11 @@ do
count_xquery=$(($count_xquery+$count)) count_xquery=$(($count_xquery+$count))
done done
percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc` percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc`
printf $count_xquery' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xquery $percent
printf ' & ' printf ' & '
count_total=$(($count_xslt+$count_xquery)) count_total=$(($count_xslt+$count_xquery))
percent=`echo "scale=1; 100*$count_total/$total" | bc` percent=`echo "scale=1; 100*$count_total/$total" | bc`
printf $count_total' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_total $percent
printf ' \\\\\n' printf ' \\\\\n'
printf '\\bottomrule\n' printf '\\bottomrule\n'
printf '\\end{tabular}\n' printf '\\end{tabular}\n'
...@@ -22,9 +22,9 @@ done ...@@ -22,9 +22,9 @@ done
# Total queries # Total queries
total=$(($total_xslt+$total_xquery)) total=$(($total_xslt+$total_xquery))
printf '\\begin{tabular}{lrrr}\n' printf '\\begin{tabular}{lr@{\\hspace{1pt}}rr@{\\hspace{1pt}}rr@{\\hspace{1pt}}r}\n'
printf '\\toprule\n' printf '\\toprule\n'
printf 'Grammar construct & XSLT & XQuery & Total \\\\\n' printf 'Grammar construct & \\multicolumn{2}{c}{XSLT} & \\multicolumn{2}{c}{XQuery} & \\multicolumn{2}{c}{Total} \\\\\n'
printf '\\midrule\n' printf '\\midrule\n'
list=(xpathAxis rootExpr stepExpr predicates unionOp functionCallExpr varRef letExpr forExpr orOp isOp data datap) list=(xpathAxis rootExpr stepExpr predicates unionOp functionCallExpr varRef letExpr forExpr orOp isOp data datap)
...@@ -56,7 +56,7 @@ do ...@@ -56,7 +56,7 @@ do
count_xslt=$(($count_xslt+$count)) count_xslt=$(($count_xslt+$count))
done done
percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc` percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc`
printf $count_xslt' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xslt $percent
printf ' & ' printf ' & '
# XQuery files # XQuery files
count_xquery=0 count_xquery=0
...@@ -78,11 +78,11 @@ do ...@@ -78,11 +78,11 @@ do
count_xquery=$(($count_xquery+$count)) count_xquery=$(($count_xquery+$count))
done done
percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc` percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc`
printf $count_xquery' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xquery $percent
printf ' & ' printf ' & '
count_total=$(($count_xslt+$count_xquery)) count_total=$(($count_xslt+$count_xquery))
percent=`echo "scale=1; 100*$count_total/$total" | bc` percent=`echo "scale=1; 100*$count_total/$total" | bc`
printf $count_total' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_total $percent
printf ' \\\\\n' printf ' \\\\\n'
done done
printf '\\bottomrule\n' printf '\\bottomrule\n'
......
...@@ -22,9 +22,9 @@ done ...@@ -22,9 +22,9 @@ done
# Total queries # Total queries
total=$(($total_xslt+$total_xquery)) total=$(($total_xslt+$total_xquery))
printf '\\begin{tabular}{lrrr}\n' printf '\\begin{tabular}{lr@{\\hspace{1pt}}rr@{\\hspace{1pt}}rr@{\\hspace{1pt}}r}\n'
printf '\\toprule\n' printf '\\toprule\n'
printf 'Operator & XSLT & XQuery & Total \\\\\n' printf 'Unsupported construct & \\multicolumn{2}{c}{XSLT} & \\multicolumn{2}{c}{XQuery} & \\multicolumn{2}{c}{Total} \\\\\n'
printf '\\midrule\n' printf '\\midrule\n'
list=(ifThenElseExpr simpleMapExpr dynamicFunctionInvocationExpr inlineFunctionExpr namedFunctionRef rangeSequenceExpr instanceOfExpr piTest castExpr) list=(ifThenElseExpr simpleMapExpr dynamicFunctionInvocationExpr inlineFunctionExpr namedFunctionRef rangeSequenceExpr instanceOfExpr piTest castExpr)
...@@ -48,7 +48,7 @@ do ...@@ -48,7 +48,7 @@ do
count_xslt=$(($count_xslt+$count)) count_xslt=$(($count_xslt+$count))
done done
percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc` percent=`echo "scale=1; 100*$count_xslt/$total_xslt" | bc`
printf $count_xslt' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xslt $percent
printf ' & ' printf ' & '
# XQuery files # XQuery files
count_xquery=0 count_xquery=0
...@@ -62,11 +62,11 @@ do ...@@ -62,11 +62,11 @@ do
count_xquery=$(($count_xquery+$count)) count_xquery=$(($count_xquery+$count))
done done
percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc` percent=`echo "scale=1; 100*$count_xquery/$total_xquery" | bc`
printf $count_xquery' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_xquery $percent
printf ' & ' printf ' & '
count_total=$(($count_xslt+$count_xquery)) count_total=$(($count_xslt+$count_xquery))
percent=`echo "scale=1; 100*$count_total/$total" | bc` percent=`echo "scale=1; 100*$count_total/$total" | bc`
printf $count_total' ('%.1f'\\%%)' $percent printf "%'.0f & (%.1f\\%%)" $count_total $percent
printf ' \\\\\n' printf ' \\\\\n'
done done
printf '\\bottomrule\n' printf '\\bottomrule\n'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment