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 \startlines
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
that the 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.


\crlf. (It should be possible to do this in an automated manner, but I'll need to search for that). I don't understand what you mean by honor empty lines as paragraph breaks. – Aditya Jul 20 '15 at 00:08\startlinesto obey\parindent? – Jared Kulik Jul 20 '15 at 00:35paragraph,command=,option=, I can't find any documentation for any of this. Also, isn'tinbetweenmisdocumented in the page linked in the OP? – Jared Kulik Jul 20 '15 at 02:15inbetweenis mis-documented. I write a semi-regular series on ConTeXt for beginners in the TugBoat Journal.paragraphwas from the answer by Metafox. For the other options ... I have a working document on Typesetting Poems, which can be done using thelinesenvironment. I had dug out all the options as part of that article, but finishing the article is still on my To Do list. – Aditya Jul 20 '15 at 02:41\par, but are actually treated as whitespace in the output. – Jared Kulik Jul 20 '15 at 03:17