# [texhax] problem with a defined command

Fri Jan 17 11:21:58 CET 2014

I do not see it as santioning its use, but rather means of getting aolder docs to run withpout replacing in the body

Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University

________________________________________
From: Philip Taylor [P.Taylor at Rhul.Ac.Uk]
Sent: 17 January 2014 11:14
To: Lars Madsen; A Emery; texhax at tug.org
Subject: Re: [texhax] problem with a defined command

> With more technical details
>
> http://tex.stackexchange.com/questions/112558/some-newcommand-instructions-not-working

Interesting, but still does not document /exactly/ for what
\begin {align} is seeking as its terminating delimiter.

> And I still stand on the my comment about deferinging structures like
> \begin{eqaution} etc, the logic is no longer visible in the code and
> it becomes very hard for others to read.

"This one could run and run".  Yes, \beq/\eeq will be less familiar
to others, but in general LaTeX documents are read by a computer,
not by any human other than the author, so "very hard for others
to read" is not really a reason for eschewing custom markup unless
one is working on a collaborative project.

>From a syntactic perspective, the following will work --

\documentclass {minimal}
\usepackage {amsmath}
\def \beq#1\eeq {\begin {equation}#1\end {equation}}
\begin {document}
\beq
x=sin(y)
\eeq
\end {document}

However, the caveats noted at http://tinyurl.com/beqeeq, and in
particular :

> This has to do with unfortunately nontrivial technical complications:
> the given environments must read their contents as a delimited macro
> argument because they do multipass pro- cessing of the contents using
> algorithms inherited from Spivak's amstex.tex.

suggest that this approach may fail for more complex examples, although
even MJD appears to sanction its use [1]

Philip Taylor
--------
[1]
http://ctan.mirrorcatalogs.com/macros/latex/required/amslatex/math/technote.pdf