Thread View: ut.software.tex
1 messages
1 total messages
Started by Theo Norvell
Wed, 26 Sep 1990 04:02
LaTeX challenge.
Author: Theo Norvell
Date: Wed, 26 Sep 1990 04:02
Date: Wed, 26 Sep 1990 04:02
62 lines
2007 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads