examples/TrigTable2.tex in erbtex-0.2.0 vs examples/TrigTable2.tex in erbtex-0.3.0

- old
+ new

@@ -7,14 +7,14 @@ %% Set up indexing headers and footer for fast lookup while %% flipping pages. \usepackage{fancyhdr} \pagestyle{fancy} +\setlength{\headheight}{14.0pt} \renewcommand{\headrulewidth}{0pt} -\rhead{\large\mathversion{bold}\firstmark} -\rfoot{\large\mathversion{bold}\botmark} -\lhead{} +\lhead{\large\mathversion{bold}\firstmark} +\rhead{\large\mathversion{bold}\botmark} \begin{document} %% This function is a utility to help the sprintf %% function keep the number of digits after the decimal @@ -28,10 +28,12 @@ end return(0) end :} +\def\tstrut{\rule[-1pt]{0pt}{11pt}} + %% Set up the longtable environment by specifying the header for %% each page and the footer. \begin{longtable}[c]{c|llllll} \hline\hline \multicolumn{1}{c|}{\mathversion{bold}$x$}& @@ -61,11 +63,11 @@ d90 = DMS.new(90) -:} %% Treat the first line of the table, for an x value of 0 specially %% by giving exact answers in symbolic form. -{:= "\\multicolumn{1}{c|}{{\\mathversion{bold}\\mark{%s}$0$}}" % d0.to_tex :}& +{:= "\\multicolumn{1}{c|}{\\tstrut{\\mathversion{bold}\\mark{%s}$0$}}" % d0.to_tex :}& {:= "\\multicolumn{1}{c}{{$0$}}" :}& {:= "\\multicolumn{1}{c}{{$1$}}" :}& {:= "\\multicolumn{1}{c}{{$0$}}" :}& {:= "\\multicolumn{1}{c}{{$\\infty$}}" :}& {:= "\\multicolumn{1}{c}{{$1$}}" :}& @@ -82,21 +84,21 @@ :} {: ## Here is where each line of the main body of the table is set. ## We use the digs function defined above to make sure that every -## column as the same number of significant digits for the functions +## column has the same number of significant digits for the functions ## that tend toward infinity. ## ## NB: I could write this comment as a LaTeX comment outside a code ## segment, but then it would end up in the generated LaTeX file, ## TrigTable.etx. Doing so made that file about 6MB in size; by ## putting the comments inside this ruby code block, the size was ## around 2MB. -:} \mark{{:= x.to_tex :}} -{:= "\\mathversion{bold}#{x.to_tex}" :}& +\tstrut{:= "\\mathversion{bold}#{x.to_tex}" :}& {:= "$%0.8f$" % x.sin :}& {:= "$%0.8f$" % x.cos :}& {:= "$%0.*f$" % [ digs(tanx), tanx ] :}& {:= "$%0.*f$" % [ digs(cotx), cotx ] :}& {:= "$%0.*f$" % [ digs(secx), secx ] :}& @@ -125,5 +127,7 @@ {:= "\\multicolumn{1}{c}{$1$}" :}\\ %% End the table and document---this version comes to 649 pages! \end{longtable} \end{document} + +% Take /that/ Charles Babbage! \ No newline at end of file