# Is there a (standard) font with a literal end-of-line character in it?

For ... complicated ... reasons (which I'll explain in a moment), I want to be able to put a literal end-of-line character in my document. Simply putting ^^J results in an Ω. Looking at the font tables in TeX by Topic, that seems quite reasonable as the slot occupied by character 10 - corresponding to the inputted eol - is, indeed, Ω. Looking further at the font tables, I can't see an eol symbol in the standard TeX fonts (why would it be there?). So I went searching in other fonts and of course they have the symbol, but I can't figure how to get it in to the document. So:

How do I get a literal end-of-line character in to a document?

(The rest isn't necessary to understand the question, just the background)

My reason for wanting this is strange, but hopefully comprehensible. I'm coercing TeX into being a pre-processor. A step in this is to use pdftotext to convert the output from TeX into an ordinary text file (suitable for feeding back into another system). Now for my desired next step, line endings seem to be significant. So I want to control where they end up. However, unless I have a sheet of (virtual) paper 20m wide, I also need to let TeX break lines where it will (since either TeX or PDF or pdftotext truncate long lines). I thought that I could get around this by using the fact that there are different systems for line-breaks on different computers, and pdftotext is nice enough to work with all of them. So I can tell pdftotext to convert the linebreaks in the PDF to, say, character 13 whilst putting character 10 where I actually want them. But that strategy hinges on being able to put some sort of actual eol character in the output, which I don't seem to be able to do.

• What output format are you targeting? I'm asking because one of my long term ideas is to program a DocbookXML class which outputs the XML code (but also allows normal LaTeX compilation) :-) Jul 22 '11 at 14:40
• @Martin: I want plain-old ASCII text. This is only a step in a chain. What I want is to be able to distinguish linebreaks put in by TeX's linebreaking mechanism from linebreaks that I've declared should be there. A bit like "hard" linebreaks and "soft" linebreaks in Emacs. Jul 22 '11 at 14:45
• You could select a very large textwidth so that TeX never breaks lines by itself. (Edit: Just read Ulrike's answer which says the same :-) ) Jul 22 '11 at 15:07
• I have seen fonts that include an EOL character (generally, three tiny letters in a diagonal descending from the top left), but can't actually name any of them.
– user45120
Jan 30 '14 at 21:05

I think you are confusing the coding of end-of-lines in a textfile with the coding of end-of-lines in a format like pdf which is orientated toward a page description. E.g. if I insert Hello\\World in a tex document the resulting pdf then contains this:
/F16 9.9626 Tf 133.768 707.125 Td [(Hello)]TJ 0 -11.955 Td [(W)80(orld)]TJ