Hi everyone, I know it is possible to make local changes by enclosing text in \start \stop pairs to make local changes. Then, there are also commands that only affect the next/current paragraph, such as \looseness. But is there a similar mechanism for page-layout changes? For example your penalty settings allow widows and orphans, but on one particular page you want to change the penalties. Or, you use \setupalign[height], but on one page you want to use \setupalign[bottom] instead. Is there a way to do this ? Best, Denis
Hi everyone,
I know it is possible to make local changes by enclosing text in \start \stop pairs to make local changes. Then, there are also commands that only affect the next/current paragraph, such as \looseness.
But is there a similar mechanism for page-layout changes? For example your penalty settings allow widows and orphans, but on one particular page you want to change the penalties. Or, you use \setupalign[height], but on one page you want to use \setupalign[bottom] instead. Is there a way to do this ? it works per paragraph so then you need to adapt it for a specific
On 5/10/2021 5:15 PM, denis.maier@ub.unibe.ch wrote: paragraph when the par starts, the properties are stored (in lmtx it's configured that way); you can change properties in the middle of a paragraph but then you need to explicitly freeze them, as demonstrated in the examples below; tracing will show you all stored properties (default tex behaviour is that the last setting counts which can be somewhat unexpected) \starttext \tracingoutput1 \tracingonline1 \pretolerance9000 test \pretolerance8000 test \par \pretolerance9000 test \pretolerance7000 \updateparagraphproperties test \par \pretolerance9000 test \pretolerance6000 \snapshotpar\frozentolerancecode test \par \stoptext the log shows ... \par[newgraf][16=1,17=1], .... pretolerance 9000, .... \par[newgraf][16=1,17=1], .... pretolerance 7000, .... \par[newgraf][16=1,17=1], .... pretolerance 6000, .... now, as you probably don't want to be persistent you can group: \def\MyHack {\bgroup \pretolerance5000 \snapshotpar\frozentolerancecode \egroup} test \MyHack test works ok because the snapshotting applies to the current paragraph (it's actually described in some manual) so, basically, you have a lot of control, all together some 36 parameters (pablo probably loves the somewhat secret on the fly adjustspacing step, stretch and shrink tweakability) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Thanks, Hans, really interesting stuff.
so, basically, you have a lot of control, all together some 36 parameters (pablo probably loves the somewhat secret on the fly adjustspacing step, stretch and shrink tweakability) Any hints where I can find these 36 parameters?
Thanks for your help, Denis
-----Ursprüngliche Nachricht-----
Von: Hans Hagen
Gesendet: Dienstag, 11. Mai 2021 00:13 An: mailing list for ConTeXt users ; Maier, Denis Christian (UB) Betreff: Re: [NTG-context] Adjusting parameters for a single page On 5/10/2021 5:15 PM, denis.maier@ub.unibe.ch wrote:
Hi everyone,
I know it is possible to make local changes by enclosing text in \start \stop pairs to make local changes. Then, there are also commands that only affect the next/current paragraph, such as \looseness.
But is there a similar mechanism for page-layout changes? For example your penalty settings allow widows and orphans, but on one particular page you want to change the penalties. Or, you use \setupalign[height], but on one page you want to use \setupalign[bottom] instead. Is there a way to do this ? it works per paragraph so then you need to adapt it for a specific paragraph
So, that means you cannot make changes to a page, but only to paragraph. If a paragraph goes over page boundaries, you cannot add stretch or shrink interlinespace for just one page... correct?
On Tue, May 11, 2021 at 10:29 AM
Von: Hans Hagen
Gesendet: Dienstag, 11. Mai 2021 00:13 An: mailing list for ConTeXt users ; Maier, Denis Christian (UB) Betreff: Re: [NTG-context] Adjusting parameters for a single page On 5/10/2021 5:15 PM, denis.maier@ub.unibe.ch wrote:
Hi everyone,
I know it is possible to make local changes by enclosing text in \start \stop pairs to make local changes. Then, there are also commands that only affect the next/current paragraph, such as \looseness.
But is there a similar mechanism for page-layout changes? For example your penalty settings allow widows and orphans, but on one particular page you want to change the penalties. Or, you use \setupalign[height], but on one page you want to use \setupalign[bottom] instead. Is there a way to do this ? it works per paragraph so then you need to adapt it for a specific
-----Ursprüngliche Nachricht----- paragraph
So, that means you cannot make changes to a page, but only to paragraph. If a paragraph goes over page boundaries, you cannot add stretch or shrink interlinespace for just one page... correct?
this looks more a otr technique, e.g. https://www.tug.org/TUGboat/tb11-1/tb27salomon.pdf (or grep the context code for otr) -- luigi
Von: ntg-context
Von: Hans Hagen
mailto:j.hagen@xs4all.nl> Gesendet: Dienstag, 11. Mai 2021 00:13 An: mailing list for ConTeXt users mailto:ntg-context@ntg.nl>; Maier, Denis Christian (UB) mailto:denis.maier@ub.unibe.ch> Betreff: Re: [NTG-context] Adjusting parameters for a single page On 5/10/2021 5:15 PM, denis.maier@ub.unibe.chmailto:denis.maier@ub.unibe.ch wrote:
Hi everyone,
I know it is possible to make local changes by enclosing text in \start \stop pairs to make local changes. Then, there are also commands that only affect the next/current paragraph, such as \looseness.
But is there a similar mechanism for page-layout changes? For example your penalty settings allow widows and orphans, but on one particular page you want to change the penalties. Or, you use \setupalign[height], but on one page you want to use \setupalign[bottom] instead. Is there a way to do this ? it works per paragraph so then you need to adapt it for a specific paragraph
So, that means you cannot make changes to a page, but only to paragraph. If a paragraph goes over page boundaries, you cannot add stretch or shrink interlinespace for just one page... correct? this looks more a otr technique, e.g. https://www.tug.org/TUGboat/tb11-1/tb27salomon.pdf (or grep the context code for otr) Thanks for the hint. I have TeX by Topic open at the moment :-) Denis
participants (3)
-
denis.maier@ub.unibe.ch
-
Hans Hagen
-
luigi scarso