I have a document that contains formatting macros. That document includes a document that contains the content.
I'd like to be able to create a second document that redefines the formatting macros so that the resulting PDF can be converted to plain text very successfully. I'm using PDFMiner's pdf2text.py (python), but the document itself needs to be properly suited for conversion (no columns, drawing marks, typeface changes, etc.).
The only problem I'm having is with line wrapping. Is there a way to turn off wrapping for (every) paragraph? I think this would solve my problem.
If there's another way to convert a LaTeX document to text (without me having to code the tool to do it), I'm willing to consider alternatives to my current plan.
pandocto convert toLaTeXrather than the other way around (thoughpandocdoes work in the direction you're talking about, too). Also line wrapping sounds like an editor 'problem', not a*TeXproblem..? – jon Jul 25 '13 at 05:05-in the latter case just add\raggedright– David Carlisle Jul 25 '13 at 07:06.texfile, which is what things likepandocdo (also see programdetex). However, you could usetex4htand neutralize your your custom macros with boolean switches:\newif\ifplaintext...\ifplaintext <neutralize custom macros> \else <your current macros> \fi; then issue\plaintexttrue(and render withtex4ht) or\plaintextfalseas needed. If you want more advanced control, check out the packageetoolbox. – jon Jul 25 '13 at 15:21