I'm writing a macro to write some commands into a text file. This text file is supposed to be read later to execute some macros.
The macro :
\documentclass{article}
\begin{document}%
\newwrite\tmpfile%
\immediate\openout\tmpfile=output.tex%
\immediate\write\tmpfile{some text and a percent sign}%
\immediate\closeout\tmpfile%
\end{document}%
The exported text
some text and a percent sign
To avoid boring blanks, I need to finish my lines with a percent sign : %
I tried this line
\immediate\write\tmpfile{some text and a percent sign\%}%
which gave :
some text and a percent sign\%
and it's not want I want. I would like to have :
some text and a percent sign%
Is it possible to write a single percent sign (%) to a file and how to do ?
\@percentcharusage – Jan 19 '17 at 20:44\write18. As the system does not let me do otherwise now, I added another answer to that other question. – Ulrich Diez Jan 19 '17 at 23:16