TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to know if renaming a command is possible in LaTeX. For instance, could I change the \section by \sec ?

I read that some people used something called "alias".

share|improve this question
\let\sec\section and then use \sec. That way you don't loose \section you just copy its definition to \sec. – Manuel Jul 26 '14 at 15:00
Thanks !en.wikibooks.org/wiki/TeX/let – TexisHard Jul 26 '14 at 15:01
The most natural way is \newcommand{\sec}{\section}. But the best way is not doing it. Using an alias for a command might confuse your editor (code folding features, for instance). – egreg Jul 26 '14 at 17:04

There are a number of ways, depending on what you're after:

enter image description here

\setlength{\parindent}{0pt}% Just for this example
\let\TextBF\textbf% Copy definition of \textbf into \TextBF


\let\textbf\texttt% Change original \textbf to now be equivalent to \texttt

\TextBF{TextBF}% \TextBF remains unchanged


\newcommand{\TextIT}{\textit}% \TextIT will be replaced with \textit


\let\textit\texttt% Change original \textit to now be equivalent to \texttt

\TextIT{TextIT}% \TextIT changes with \textit

  • \let<csnameA><csnameB> makes a copy of the definition of <csnameB> and places it into <csnameA> (like a regular copy-and-paste). It has the advantage that you can now redefine <csnameB> without affecting the copy you just made (<csnameA>).

  • \newcommand{<csnameA>}{<csnameB>} merely points <csnameA> to <csnameB>. To that end, updates to <csnameB> will still be reflected in <csnameA>.

Related questions:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.