B. Older Syntax and Modern Alternatives #
LaTeX preserves substantial compatibility with old documents. Code can still compile even when a newer interface is clearer or gives better output. The table below compares common older constructs with alternatives for new documents.
These choices assume the XeLaTeX or LuaLaTeX setup used in this guide; they do not mean every older construct is invalid. A publisher’s class may require a traditional interface.
| Topic | Older construct | Preferred approach in this course |
|---|---|---|
| Display maths | $$ ... $$ |
\[ ... \] or equation* with amsmath/mathtools. |
| Inline maths | $ ... $ |
\( ... \), with explicit opening and closing commands. |
| Fractions | \over, \choose, related TeX primitives |
\frac, \binom, and \genfrac. |
| Definitions | \newcommand, \renewcommand, \def |
The \NewDocumentCommand family for richer argument specifications. |
| Copying commands | \let |
\NewCommandCopy and related checked variants. |
| Alignment | eqnarray |
align or IEEEeqnarray. |
| Fonts | \bf, \it, \rm, and similar old switches |
\textbf, \textit, \bfseries, \itshape, and the other modern family/shape commands. |
| Text alignment | Standard ragged environments | FlushLeft, FlushRight, and Center from ragged2e when improved hyphenation is needed. |
| Quotations | Manually entered quote ligatures | \enquote from csquotes. |
| Verbatim | Core verbatim for larger listings |
Load the verbatim package, or use a code-highlighting package. |
| Bibliographies | Traditional BibTeX-based workflows | biblatex with Biber when the template permits it. |
| Decorated symbols | \stackrel and fixed-class constructions |
\overset or \underset, preserving the underlying mathematical role. |
| Math alphabets | Using text-oriented font commands for math symbols | The \sym... family with unicode-math. |
| Manual spacing | TeX primitives such as \hskip and \vskip |
\hspace, \vspace, and \mspace. |
Important distinctions #
Inline dollar signs remain valid. The beginner’s guide uses them because they are common and compact. This detailed guide uses \( ... \) to make the opening and closing commands explicit. The stronger warning concerns $$ ... $$, whose display behaviour is less well integrated with LaTeX.
A change of interface can change prerequisites. \symbb needs unicode-math and a suitable engine. It is not a drop-in replacement inside an unmodified pdfLaTeX template.
BibTeX and Biber are different workflows. A publisher may require a .bst style or natbib. Those files are not directly usable as biblatex styles; keep the required workflow instead of replacing isolated commands.
Standard alignment environments still have uses. In floats, the declaration \centering is often appropriate because an enclosing centring environment adds vertical space. Choose the tool for the context.
Do not change working definitions mechanically. For example, this traditional definition has one optional and three required arguments:
\newcommand{\example}[4][default]{#1: #2, #3, #4}
Its corresponding modern definition is:
\NewDocumentCommand{\example}{O{default}mmm}{#1: #2, #3, #4}
These are alternatives, not two definitions to load together. Count the arguments and check the output after a migration.