[texhax] problem with a defined command

Lars Madsen daleif at imf.au.dk
Fri Jan 17 10:33:34 CET 2014


With more technical details

http://tex.stackexchange.com/questions/112558/some-newcommand-instructions-not-working

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.




/Lars Madsen
Institut for Matematik / Department of Mathematics
Aarhus Universitet / Aarhus University
Mere info: http://au.dk/daleif@imf / More information: http://au.dk/en/daleif@imf


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

Lars Madsen wrote:

> Please do not do things like this, it really annoys editors and makes
> the code a lot less readable. If you find it annoying to write
> \begin{align} then consider finding a better editor that can help you
> insert these

"Please do not use LaTeX as a programmable markup language" ?
Surely not.  If users were not intended to extend LaTeX by
defining their own commands, Lamport would never have provided
\newcommand and \renewcommand, and Mittelbach et al would not
have carried these across to LaTeX2e.  If editors require authors
to use only a specific subset of LaTeX, then their style/class files
should disable \newcommand and friends.

> The way align is constructed it explicitly looks for the string
> \end{align} to end the environment

That cannot be true, since the following works :

\documentclass {minimal}
\usepackage {amsmath}
\begin {document}
        \begin {align}
        \end {align}
\end {document}

Note that here the environment is ended with "\end {align}"
(with space) and not "\end{align}" (without space).  Thus
the actual sequence for which the alignment environment
is must be more complex than as stated above.

Philip Taylor




More information about the texhax mailing list