QQ68@LIVERPOOL.AC.UK (08/14/90)
Can anyone offer advice on this problem please: I'm constructing a table using \halign and I would like to put math formulae (integrals, in fact) as entries in the table. In-line math mode doesn't look too good, since TeX uses very small integral symbols and it tries to compress everything vertically. Something like $\int {{\\sin x}\over{x^2+5}} \>d\!x$ is pretty difficult to read! I'd prefer to use display math mode so that this sort of formula looks better. But how do I put display math stuff into a box in an \halign structure ? This is an example of what I've got so far: -------------------------- tabxmpl.tex (cut here) ------------------------ % some macros for convenience \def\tabentry#1#2#3#4#5#6{\vtabskip{4pt} &\quad #1&&&&&&\cr} \def\tabline#1{&\qquad #1&&\omit&&\omit&&\omit&&\omit&&\omit&\cr} \def\vtabskip#1{height#1&\omit&&\omit&&\omit&&\omit&&\omit&&\omit&\cr} \def\tablehead#1{\vtabskip{3pt} \noalign{\hrule} \vtabskip{3pt} &\enskip \bf #1&&\omit&&\omit&&\omit&&\omit&&\omit&\cr \vtabskip{2pt}} % % a more convincing dx for integrals \def\dx{\>d\!x} % % Here is the table % \vbox{\offinterlineskip \halign{ % % This is the template for the table \vrule#& \strut\hbox to 11pc{# \hfill}& % the remainder of the template is repeated &\vrule#&\hbox to 3pc{\hfil # \hfil}\cr % End of the template % \noalign{\hrule} \vtabskip{2pt} \tabline{Example table} \tablehead{Integration} \tabline{{\it Indefinite integrals}} \tabentry{$\int (1+x)^6 \dx$}YYYYY \vtabskip{3pt} \tabentry{$\int {{1}\over{\sqrt{1-x+x^2}}} \dx$}YYYNY \vtabskip{3pt} \tabentry{$\int \sin^8x \dx$}YYYYY \vtabskip{3pt} \tabentry{$\int {{\sin x}\over{x^2+5}} \dx$}NYYNY \vtabskip{3pt} \noalign{\hrule} } % end of table } % end of vbox \end ---------------------------- end of file (cut here) ------------------------- but when I change the '$' delimiters to '$$', TeX complains. Has anybody done this kind of thing ... and if you have, could you tell me how ? I'll be very grateful for any advice. Email me and I'll summarise replies. Adv{thanx}ance :-) -- David Harper (soon to be a real astronomer again) -- Computer Laboratory JANET: D.Harper@uk.ac.liverpool University of Liverpool INTERNET etc.: D.Harper@liverpool.ac.uk Liverpool, England UUCP: ...!mcvax!ukc!liverpool.ac.uk!D.Harper
tli@phakt.usc.edu (Tony Li) (08/16/90)
You want \displaystyle. See pg. 54 of the LaTeX book. -- Tony Li - USC Computer Science Department Internet: tli@usc.edu Uucp: usc!tli Thus spake the master programmer: "A well written program is its own heaven; a poorly-written program its own hell."