I would like to be able to have some kind of logging command that is able to log text to the default pdflatex logfile (<input-base-filename>.log). Is this possible, and if so, how?

In particular, I'd like to be able to use this command inside the document (i.e. between \begin{document} and \end{document}).

  • welcome to tex.sx. Note that you can use back-ticks ` to mark inline code. Then you don't need to handle < > any special as well. – Martin Scharrer Feb 28 '11 at 13:21

You can use \wlog{<log text line>} to write a text line to the log. It will not appear in the console output but only in the log file.

If you want to write text to the log file and the console output you can use
\typeout{<log text line>}.

| improve this answer | |


\typeout{===This appears in the log and the terminal===}%
\wlog{===This only in the log file===}%

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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