Greetings, Is there a way to set interline spacing in tabulate environments? The table's paragraphs do not seem to obey \setupinterlinespace like the rest of the text does. Code to toy with: \startdocument \setupinterlinespace[big] \input lorem \starttabulate[|k0r|k0xp|][EQ={---}] \NC Word \EQ definition; \NC\AR \NC Important word \EQ \input dijkstra \NC\AR \NC Importanter word \EQ not much else here. \NC\AR \stoptabulate \stopdocument
Hello,
It's probably not the best solution, but it seems to work on my side if I
replace `big` by `2em`; see code below.
```
\startdocument
\setupinterlinespace[2em]
\input dijkstra
\starttabulate[|k0r|k0xp|][EQ={---}]
\NC Word \EQ definition; \NC\AR
\NC Important word \EQ \input dijkstra \NC\AR
\NC Importanter word \EQ not much else here. \NC\AR
\stoptabulate
\stopdocument
```
Best regards,
Florent
Le dim. 15 sept. 2024 à 16:13, Kirill Davidov
Greetings,
Is there a way to set interline spacing in tabulate environments? The table's paragraphs do not seem to obey \setupinterlinespace like the rest of the text does. Code to toy with:
\startdocument
\setupinterlinespace[big]
\input lorem
\starttabulate[|k0r|k0xp|][EQ={---}]
\NC Word \EQ definition; \NC\AR \NC Important word \EQ \input dijkstra \NC\AR \NC Importanter word \EQ not much else here. \NC\AR
\stoptabulate
\stopdocument
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
Florent Michel schrieb am 15.09.2024 um 17:44:
Hello,
It's probably not the best solution, but it seems to work on my side if I replace `big` by `2em`; see code below.
When the whole document needs a larger interlinespace \setupinterlinespace[big] is the wrong method and \setupinterlinespace[line=4x] or (which is an alternative form for the one above) \setupinterlinespace[4ex] are the recommended solutions. The reason why Kirill had the problem with is that tabulate resets the interlinespace value to the global settings while "big" is just a relative value which depends on the global value. This reset is necessary because tabulate uses the global interlinespace value to split the table into slices which allows it to break cells across pages. When you need a different interlinespace for a part of the document you should use \start \setupinterlinespace[line=4ex] content which a different interlinespace setting \stop which does also work for tabulate. Wolfgang
Thank you Wofgang for the clarification and information! (And indeed using 4ex makes more sense than my 2em! I must be too used to systems which don't define ex...) Best regards, Florent Le dim. 15 sept. 2024 à 18:14, Wolfgang Schuster < wolfgang.schuster.lists@gmail.com> a écrit :
Florent Michel schrieb am 15.09.2024 um 17:44:
Hello,
It's probably not the best solution, but it seems to work on my side if I replace `big` by `2em`; see code below.
When the whole document needs a larger interlinespace
\setupinterlinespace[big]
is the wrong method and
\setupinterlinespace[line=4x]
or (which is an alternative form for the one above)
\setupinterlinespace[4ex]
are the recommended solutions.
The reason why Kirill had the problem with is that tabulate resets the interlinespace value to the global settings while "big" is just a relative value which depends on the global value.
This reset is necessary because tabulate uses the global interlinespace value to split the table into slices which allows it to break cells across pages.
When you need a different interlinespace for a part of the document you should use
\start \setupinterlinespace[line=4ex]
content which a different interlinespace setting
\stop
which does also work for tabulate.
Wolfgang
Ah, that helps. Then, one more question. I assume line=2.8ex is equivalent to single line spacing, yes? Do I therefore naively multiply that by, say, 1.5 to get 1.5 line spacing? Thanks!
Kirill Davidov schrieb am 15.09.2024 um 20:01:
Ah, that helps. Then, one more question. I assume line=2.8ex is equivalent to single line spacing, yes? Do I therefore naively multiply that by, say, 1.5 to get 1.5 line spacing? Thanks!
Yes, the default value is 2.8ex and the medium, big and numeric values (e.g. \setupinterlinespace[2]) are multiples of it but you should be aware it is depends on the font which specifies the value of ex. An alternative to the default relative setting are absolute values, e.g. \setupinterlinespace[line=16pt]. When your try to reproduce the spacing of another system like MS Word how it specifies the meaning one and half or double spacing because there is no standardized method to set the value, below are a few examples (where I tried to reproduce the MS Word settings but I can be wrong here). %%%% begin example % \definefontfamily [aptos] [rm] [Aptos Serif] % \definefontfamily [aptos] [ss] [Aptos] % % \setupbodyfont[aptos,ss] \startdocument \bold{ConTeXt 1x:} \samplefile{dijkstra} \blank \setupinterlinespace[2]% relative value \bold{ConTeXt 2x:} \samplefile{dijkstra} \blank \setupinterlinespace[line=\dimexpr\bodyfontsize+8pt\relax] \bold{Word 1x:} \samplefile{dijkstra} \blank \setupinterlinespace[line=\dimexpr1.15\bodyfontsize+8pt\relax] \bold{Word 1.15x:} \samplefile{dijkstra} \blank \setupinterlinespace[line=\dimexpr2\bodyfontsize+8pt\relax] \bold{Word 2x:} \samplefile{dijkstra} \stopdocument %%%% end example Wolfgang
participants (3)
-
Florent Michel
-
Kirill Davidov
-
Wolfgang Schuster