4

In ConTeXt, if I have code like this, it just displays the three lines, with no blank space between:

\starttext
    This is a paragraph.

    This is another paragraph.

    This is yet another paragraph.
\stoptext

How can I get ConTeXt to know these are different paragraphs and to place a blank line between paragraphs, so readers can see these are paragraphs?

2 Answers 2

10

Spaces between paragraphs are handled via \setupwhitespace. Since you need a line...

%\setuppapersize[A6]
\setupwhitespace[line]
\starttext
De pie, luchar, que vamos va a triunfar. Avanzan ya banderas de unidad.

Y tú vendrás marchando junto a mí y así verás tu canto y tu bandera florecer\unknown
\stoptext

enter image description here

1

ConTeXt is based on TeX, so TeX primitive concept is possible too:

\parskip=\baselineskip
\starttext
    This is a paragraph.

    This is another paragraph.

    This is yet another paragraph.
\stoptext
4
  • Sorry I downvoted. In general, it is a bad idea to use TeX global formatting commands in ConTeXt as it can lead to hard to debug situations. The correct way is to use \setupwhitespace.
    – Aditya
    Jun 2, 2021 at 3:01
  • @Aditya This is opinion based. Try to use \tracingall before \setupwhitespace. You will see 63 lines in the log file. But when using \parskip= then you get only 3 lines in the log file (about setting to the primitive register). IMHO it is much more comfortable to see three lines than 63 lines when debugging.
    – wipet
    Jun 2, 2021 at 3:15
  • I agree on both counts. My recommendation not to do this is opinion based. And using a primitive \parskip is simpler to understand than using a high-level interface. However, there is a reason that context uses 63 lines to simply set \parskip. In my opinion, a user who wants to understand what is happening behind the scenes should use close to "close to metal" macro package like plain, eplain, or optex; a user who wants the convenience of a consistent user-interface should use context. However, mixing plain tex ideas in context can lead to hard to debug situations.
    – Aditya
    Jun 3, 2021 at 1:33
  • Fewer line when you enable tracing is a weak argument to prefer \parskip over \setupwhitespace and while the results are the same in your minimal example there are cases where the output is wrong. A few of these cases are (a) when you enable the grid mechanism where ConTeXt ensures the added space is either a half or a full line, (b) when you change the bodyfont (\setupbodyfont[...]) for a environment (e.g. block quotes) the space is adjusted to the current font size (c) when you change the baseline distance (\setupinterlinespace[...]) the space is adjusted to the new distance. Jun 4, 2021 at 18:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .