norvell@csri.toronto.edu (Theo Norvell) (09/26/90)
Here is an opportunity for local LaTeXperts to strut their stuff. I have a homebrew environment for setting proofs. Right now I have to write \begin{aproof} \pline{blah}{blah}{blah} \\ \pline{blah}{blah}{blah} \\ \pline{blah}{blah}{blah} \end{aproof} I would like to not have to write the \\'s. Part one: How should I change this style file -------------start-style-file--------------------- \newenvironment{aproof}% {\begin{tabbing}% \hspace{5 em}\=\hspace{2em}\=\kill}% {\end{tabbing}} \newcommand{\pline}[3]{% \settowidth{\formula}{$\displaystyle #2$}% \settowidth{\explanation}{#3}% \addtolength{\formula}{\explanation}% \addtolength{\formula}{10em}% \ifdim\formula<\linewidth% \>{$\displaystyle #1$}\>{$\displaystyle #2$}\`{#3}% \else% \>{$\displaystyle #1$}\>{$\displaystyle #2$}\\\>\>{#3}% \fi% } \newlength{\formula} \newlength{\explanation} --------------end-style-file----------------------- Part 2: Why does the following not work --------------begin-style-file-------------------- \newenvironment{aproof}% {\def\proofnewline{\def\proofnewline{\noexpand\\}}% \begin{tabbing}% \hspace{5 em}\=\hspace{2em}\=\kill}% {\end{tabbing}} \newcommand{\pline}[3]{\proofnewline \settowidth{\formula}{$\displaystyle #2$}% \settowidth{\explanation}{#3}% \addtolength{\formula}{\explanation}% \addtolength{\formula}{10em}% \ifdim\formula<\linewidth% \>{$\displaystyle #1$}\>{$\displaystyle #2$}\`{#3}% \else% \>{$\displaystyle #1$}\>{$\displaystyle #2$}\\\>\>{#3}% \fi% } \newlength{\formula} \newlength{\explanation} -------------end-style-file------------------------ Theo