# [texhax] TeX to text?

Arno Trautmann Arno.Trautmann at gmx.de
Tue Apr 13 23:49:34 CEST 2010

Hi all!

Writing an article for a magazine, I need to have a text-only file. The
guys want no markup at all, so I cannt send LaTeX code, for proofreading
whatsoever. But I still want to read my document as a nicely formatted
pdf. As I am quite lazy, I don’t want to write two versions, so I tought
of some TeX hackery giving me either text only or the pdf. I am doing
this with the following code in the header:

\immediate\openout13=\jobname.textonly

\let\ifREINTEXT
\iffalse    %% change this (true/false) to toggle text/TeX

\ifREINTEXT{
\def\TeX{TeX}
\def\LaTeX{LaTeX}
}
\fi
\begin{document}
\ifREINTEXT\def\par{^^J}\immediate\write13{\fi

And at the end of the document

\ifREINTEXT}}\fi

That works fine and gives me everything I need. But as this doesn’t look
like the best solution I wondered wether there is a package doing this
in a nice way. If not so, would it be a good investment of time to write
one myself, i.e. does anybody know wether this would be usefull?

cheers
Arno

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://tug.org/pipermail/texhax/attachments/20100413/0cfb19b8/attachment.bin>