Posts tagged ‘define’

Define macros in Latex

The \def command provides macro definition in Latex. These definitions are quite useful if you need to repeat some text across the document. For instance you can define a macro containing your document’s title and then use it in the document this way:

% macro definition in the preamble
\def \doctitle {This is my document's title}
% Using the previously defined macro in the document
This document, titled \doctitle , deals with ...