This is a follow-up question to
I am using the results of pdf text extraction to generate source files for reproducing a (poublic domain) book from its pdf, while trying to retain as much of the original layout as possible, especially linebreaks. Latex has worked fine for this so far, but I'm looking into ConTeXt as an alternative, partly out of curiousity.
So far I've manually inserted
\linebreak (in LaTeX) or
\break (in ConTeXt) to force the line-breaking algorithm to adhere to the original line breaks, but reading through the documentation I've come across
which suggest I don't have to litter the text with so much cruft.
The documentation describes the inbetween argument as:
command that is expanded and then placed between each line and the next
But the following MWE doesn't behave as expected:
\starttext \setuplines[inbetween=\break] \startlines First line --- should be fully justified Secondline --- should be fully justified \stoplines \stoptext
In fact, substituting some marker test as the inbetween argument suggests
inbetween code is inserted only on paragraph breaks:
\starttext \setuplines[inbetween=FOO] \startlines First line Secondline \stoplines \stoptext
An additional concern is that the contents may contain multiple paragraphs,
so that a blank line (now appended with a
\break) should not force a new page.
Edit 1: Ideally I should be able to use something like:
\setupindenting[yes,0.1in] \startX first line of first paragraph, whose end becomes a tex linebreak second line of first paragraph, whose end becomes a tex linebreak third line, left unjustified. % parbreak first line of second paragraph... \stopX
Similar to the way HTML's
<pre> tag works.