* [NTG-context] Interline spacing in tabulate paragraphs
@ 2024-09-15 15:12 Kirill Davidov
2024-09-15 15:44 ` [NTG-context] " Florent Michel
0 siblings, 1 reply; 6+ messages in thread
From: Kirill Davidov @ 2024-09-15 15:12 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Interline spacing in tabulate paragraphs
2024-09-15 15:12 [NTG-context] Interline spacing in tabulate paragraphs Kirill Davidov
@ 2024-09-15 15:44 ` Florent Michel
2024-09-15 17:14 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Florent Michel @ 2024-09-15 15:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1582 bytes --]
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 <davidov_ka@edu.surgu.ru> a
écrit :
> 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
>
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 2505 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Interline spacing in tabulate paragraphs
2024-09-15 15:44 ` [NTG-context] " Florent Michel
@ 2024-09-15 17:14 ` Wolfgang Schuster
2024-09-15 17:34 ` Florent Michel
0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2024-09-15 17:14 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Florent Michel, Kirill Davidov
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Interline spacing in tabulate paragraphs
2024-09-15 17:14 ` Wolfgang Schuster
@ 2024-09-15 17:34 ` Florent Michel
2024-09-15 18:01 ` Kirill Davidov
0 siblings, 1 reply; 6+ messages in thread
From: Florent Michel @ 2024-09-15 17:34 UTC (permalink / raw)
To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Kirill Davidov
[-- Attachment #1.1: Type: text/plain, Size: 1449 bytes --]
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
>
>
[-- Attachment #1.2: Type: text/html, Size: 1917 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Interline spacing in tabulate paragraphs
2024-09-15 17:34 ` Florent Michel
@ 2024-09-15 18:01 ` Kirill Davidov
2024-09-15 21:47 ` Wolfgang Schuster
0 siblings, 1 reply; 6+ messages in thread
From: Kirill Davidov @ 2024-09-15 18:01 UTC (permalink / raw)
To: mailing list for ConTeXt users
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!
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
* [NTG-context] Re: Interline spacing in tabulate paragraphs
2024-09-15 18:01 ` Kirill Davidov
@ 2024-09-15 21:47 ` Wolfgang Schuster
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2024-09-15 21:47 UTC (permalink / raw)
To: mailing list for ConTeXt users, Kirill Davidov
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-09-15 21:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-15 15:12 [NTG-context] Interline spacing in tabulate paragraphs Kirill Davidov
2024-09-15 15:44 ` [NTG-context] " Florent Michel
2024-09-15 17:14 ` Wolfgang Schuster
2024-09-15 17:34 ` Florent Michel
2024-09-15 18:01 ` Kirill Davidov
2024-09-15 21:47 ` Wolfgang Schuster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).