So.. I was just wondering, what does \relax command do? For example, I'm rewriting \maketitle command, and there is a bunch of \let\thanks\relax, \let\maketitle\relax etc. Why?
And what does \null\vfil do?

Thanks!!
\relax
effectively does nothing.\let\thanks\relax
in a way undefines \thanks
. Now \newcommand*\thanks{<whatever>}
wouldn't raise any errors.\relax
can also be used to stop some scanning process like in \ifx\mynum=1\relax
(the 1 could just as well be the beginning of a larger number but \relax
stops the \ifx
from looking).\null
inserts an empty box (it is defined to \hbox{}
). \vfil
is a vertical space that can have an arbitrary length (it fills the available vertical space, like \vspace{\fil}
).\relax
does nothing. However, it is unexpandable. In some situations TeX expands commands until it reaches an unexpandable command, that's why \relax
can be used to stop expansion or to indicate the end of a command.\let\thanks\relax
causes that a possibly previously defined \thanks
command now does nothing.\null
is just an empty (horizontal) box. For example, since some commands have no effect at the beginning of a page, you could insert such an empty box just to have something before such a command, like \vfil
or \vfill
. Instead of this, you could simply use \vspace*{\fil}
or \vspace*{\fill}
.Users browsing this forum: No registered users and 13 guests