Xref: utzoo ut.software.tex:62 comp.text.tex:3092 Path: utzoo!utgpu!news-server.csri.toronto.edu!csri.toronto.edu!norvell Newsgroups: ut.software.tex,comp.text.tex From: norvell@csri.toronto.edu (Theo Norvell) Subject: LaTeX challenge. Message-ID: <1990Sep26.000212.6333@jarvis.csri.toronto.edu> Organization: CSRI, University of Toronto Distribution: ut Date: 26 Sep 90 04:02:12 GMT Lines: 62 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