Tag Info

Hot answers tagged


TeX is based on macros and macro expansion. When you type something like \mbox{abc}, you're telling TeX to perform a possibly very complicated sequence of commands. The case of \mbox is not really so complicated, because the definition is % latex.ltx, line 4573: \long\def\mbox#1{\leavevmode\hbox{#1}} which basically means When you find \mbox, look for ...


\documentclass{memoir} \newwrite\testaux \immediate\openout\testaux=\jobname.myaux \begin{document} \makeatletter \immediate\write\testaux{\string\dont@want@spaces@after@this words} \immediate\write\testaux{\string\dont@want@spaces@after@this@either words} \makeatother Here is a body. \end{document}


If you just use \insertdate and \inserttitle, you don't need \expandafter, because \MakeUppercase does full (protected) expansion on its argument. However, \inserttitle is quite different from the other two macros. Indeed, \insertdate expands to \today (in general to the argument given to \date) and, similarly, \inserttitle expands to the argument given to ...

Only top voted, non community-wiki answers of a minimum length are eligible