🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ut.software.tex
Article #4

LaTeX challenge.

#4
From: Theo Norvell
Date: Wed, 26 Sep 1990 04:02
62 lines
2007 bytes
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
Technical Details
Message-ID: <1990Sep26.000212.6333@jarvis.csri.toronto.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!csri.toronto.edu!norvell

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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