[Tex/LaTex] List of higher-level LaTeX commands corresponding to TeX commands

best practicesbig-listmacros

Since LaTeX is a format built on top of TeX, it surely has several high level abstractions that perform similarly to TeX commands, with some added error-handling functionality, for example. I always find scattered advice saying

Instead of \def, use \newcommand

…which I'm sure also applies to other commands.

Is there a document compiling such matches? If not, how about we compile them here? So far, I can think of the following. I may or may not be right with some of them, but I hope it illustrates my point.

\def --> \newcommand, \renewcommand
\hskip --> \hspace
\vskip --> \vspace

The objective is to avoid using low-level TeX commands unless absolutely necessary. And even if it were necessary, confine them inside macro definitions.

I imagine this to be community wiki. So one matchup per answer. A big-list community wiki answer has been started below, categorized according to problem domains. Feel free to edit and/or add problem domains and matchups.

A TeX --> LaTeX matchup means that they tackle the same problem domain, so one or more TeX commands may match one or more LaTeX commands. Also include with your answer the reasons (or a link) explaining why the LaTeX alternative is better as a high-level implementation.

Best Answer

On the left are TeX commands, on the right are LaTeX commands with similar functionality.

Macro definitions

  • \def, \gdef --> \newcommand*, \providecommand*, \renewcommand*
  • \long\def, \long\gdef --> \newcommand, \providecommand, \renewcommand

    For commands with a scope, i.e. including grouping, LaTeX provides \newenvironment and \renewenvironment.



  • \cr, \crcr --> \\, \tabularnewline


  • \kern, \hskip --> \hspace
  • \vskip --> \vspace


  • \centerline --> \centering or the center environment
  • \raise --> \raisebox


  • \uppercase --> \MakeUppercase