Deyan Ginev added section_Basic_Macros_As_mentioned__.tex  almost 9 years ago

Commit id: 1e88cc8e5f48b7977c5f58a56b5fa6273b3d1a0f

deletions | additions      

         

\section{Basic Macros}  As mentioned above, only definitions placed in \verb|header.tex| are global for your entire article. You can use all flavors of \TeX's definitions (\verb|\def|, \verb|\edef|, \verb|\xdef|, \verb|\gdef|, \verb|\newcommand|, \verb|\rewnewcommand|, ...) to your liking.  If you want to discuss a notable entity, such as \latexml, you may want to define a handy macro which:  \begin{enumerate}  \item Links to the entity's Wikipedia page  \item Is available in your entire document (define it in \verb|header.tex|)  \item Flexibly figures out if it needs a trailing space or not\footnote{one of \TeX's original weaknesses with its macros}  \item Is easier to write than the entity's full name  \end{enumerate}  Here is one way you can achieve that, with the entities used in this tutorial:  \begin{lstlisting}  \def\authorea{\href{http://en.wikipedia.org/wiki/Authorea}{Authorea}\xspace}  \def\latexml{\href{https://en.wikipedia.org/wiki/LaTeXML}{LaTeXML}\xspace}  \def\latex{\href{https://en.wikipedia.org/wiki/LaTeX}{\LaTeX}\xspace}  \end{lstlisting}