According to TeXbook TeX does preprocess files of .tex-input line per line (converting all characters of the line to TeX's internal character-representation-scheme (ASCII or Unicode), truncating sequences of space-characters at ends of lines, appending a character specified by \endlinechar).
So questions arise:
- What is the maximum amount of characters per line in .tex-input files?
- How does TeX behave when encountering at reading-time a line that is too long?
You can use TeX for writing external text files.
- How does TeX behave when attempting to write a line to external text file that is too long/that has more characters than TeX can place into a single line of an external text file?
The \write-primitive always writes an entire line to external text-file.
- Are there means for
- just beginning a new line of an external text-file?
- appending characters to the current line of an external text-file?
\caption, including cross-references, equations,\labeland a lot of edits highlighted using thechangespackage; I tend to write one sentence per line) – Chris H Jun 15 '21 at 09:47zfollowed by\bye– David Carlisle Jun 15 '21 at 09:51\writequestions, you can write a newline by writing the\newlinechar(^^Jin laTeX) try\typeout{aaa^^Jbbb}– David Carlisle Jun 15 '21 at 10:03pdflatexon a file starting with199989times the letterz, I get an! Emergency stoperror for some reason... – Phelype Oleinik Jun 15 '21 at 10:30Emergency stopright after the everypar error (add a line with\tracingallbefore the 199989zs), so I think it's something else internal (seems like an off-by-one error somewhere) – Phelype Oleinik Jun 15 '21 at 10:54\tracingalldon't all tex files have that?) I was using pdftex cygwin tl2021 with 199989z and \bye on the same line – David Carlisle Jun 15 '21 at 11:01