Re: [dev-context] Bugs: align[outer] requires setuppagenumbering, and fails on odd pages
Am 20.02.2012 um 19:43 schrieb Sietse Brouwer:
Hi Wolfgang,
I tried making that alteration in /opt/context/tex/texmf-context/tex/context/base/spac-ali.mkiv , but that didn't work. Was merely changing that file not enough, or should I conclude that this fix does not work?
You have to regenerate the format (context --make en) when you patch a core file. BTW: The location key for \setuplayout is to position the page on the paper when the have different sizes. \setuppapersize[A5][A4] \setuppagenumbering[alternative=doublesided] \setuplayout [location=doublesided] \showframe \starttext \dorecurse{12}{\input knuth\par} \stoptext Wolfgang
Sietse Brouwer wrote:
I tried making that alteration [see below] in /opt/context/tex/texmf-context/tex/context/base/spac-ali.mkiv , but that didn't work. Was merely changing that file not enough, or should I conclude that this fix does not work?
Wolfgang Schuster
You have to regenerate the format (context --make en) when you patch a core file.
Just did so. The odd-page-invocations still fail. Does it work on your end? As an aside, on the page [[Running Mark IV]] the wiki says "Starting with 2011, formats are automatically (re)generated by `context myfile.tex` when it believes it is necessary to do so.", so perhaps the format does not need to be manually regenerated. But that's not relevant to this bug, directly.
BTW: The location key for \setuplayout is to position the page on the paper when the have different sizes. Ah, so doublesided typesetting is activated from \setuppagenumbering, not from \setuplayout? Thanks for the tip.
Cheers, Sietse
\setuppapersize[A5][A4]
\setuppagenumbering[alternative=doublesided] \setuplayout [location=doublesided]
\showframe
\starttext \dorecurse{12}{\input knuth\par} \stoptext
Wolfgang
(Reproducing here the patch Wolfgang sent me, as it didn't go to the list the first time.) \def\spac_align_flush_horizontal {\ifcase\c_spac_align_state_horizontal % 0 \spac_align_set_horizontal_none \or % 1 center \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_center \or \spac_align_set_horizontal_very_center \or \spac_align_set_horizontal_wide_center \fi \or % 2 flush left \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_right \else \spac_align_set_horizontal_very_right \fi \or % 3 flush right \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_left \else \spac_align_set_horizontal_very_left \fi \or % 4 inner \ifdoublesided \signalinnerrealign \fi \rightorleftpageaction\spac_align_set_horizontal_right\spac_align_set_horizontal_left \or % 5 outer \ifdoublesided \signalouterrealign \fi - \rightorleftpageaction\c_spac_align_state_horizontal_left\spac_align_set_horizontal_right + \rightorleftpageaction\spac_align_state_horizontal_left\spac_align_set_horizontal_right \or % 6 oneliner \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_right \else \spac_align_set_horizontal_very_right \fi \parfillskip\zeropoint \or % 7 centered last line \spac_align_set_horizontal_centered_last_line \fi}
Am 20.02.2012 um 20:28 schrieb Sietse Brouwer:
Sietse Brouwer wrote:
I tried making that alteration [see below] in /opt/context/tex/texmf-context/tex/context/base/spac-ali.mkiv , but that didn't work. Was merely changing that file not enough, or should I conclude that this fix does not work?
Wolfgang Schuster
wrote: You have to regenerate the format (context --make en) when you patch a core file.
Just did so. The odd-page-invocations still fail. Does it work on your end?
There was a typo, this works: \def\spac_align_flush_horizontal {\ifcase\c_spac_align_state_horizontal % 0 \spac_align_set_horizontal_none \or % 1 center \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_center \or \spac_align_set_horizontal_very_center \or \spac_align_set_horizontal_wide_center \fi \or % 2 flush left \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_right \else \spac_align_set_horizontal_very_right \fi \or % 3 flush right \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_left \else \spac_align_set_horizontal_very_left \fi \or % 4 inner \ifdoublesided \signalinnerrealign \fi \rightorleftpageaction\spac_align_set_horizontal_right\spac_align_set_horizontal_left \or % 5 outer \ifdoublesided \signalouterrealign \fi %\rightorleftpageaction\c_spac_align_state_horizontal_left\spac_align_set_horizontal_right \rightorleftpageaction\spac_align_set_horizontal_left\spac_align_set_horizontal_right \or % 6 oneliner \ifcase\c_spac_align_state_broad \spac_align_set_horizontal_right \else \spac_align_set_horizontal_very_right \fi \parfillskip\zeropoint \or % 7 centered last line \spac_align_set_horizontal_centered_last_line \fi}
As an aside, on the page [[Running Mark IV]] the wiki says "Starting with 2011, formats are automatically (re)generated by `context myfile.tex` when it believes it is necessary to do so.", so perhaps the format does not need to be manually regenerated. But that's not relevant to this bug, directly.
The format is only auto generated when the version number is incremented which does happen when Hans releases a new beta/current but not when you change files.
BTW: The location key for \setuplayout is to position the page on the paper when the have different sizes. Ah, so doublesided typesetting is activated from \setuppagenumbering, not from \setuplayout? Thanks for the tip.
Yes, you need \setuppagenumbering to select between single- and doublesided document. Wolfgang
Wolfgang Schuster wrote:
There was a typo, this works:
Marvellous, it works indeed. Thank you for your help.
The format is only auto generated when the version number is incremented which does happen when Hans releases a new beta/current but not when you change files.
Okay, I've added that to the wiki.
BTW: The location key for \setuplayout is to position the page on the paper when the have different sizes. Ah, so doublesided typesetting is activated from \setuppagenumbering, not from \setuplayout? Thanks for the tip.
Yes, you need \setuppagenumbering to select between single- and doublesided document.
Thanks. Looking through the wiki for a place to mention that (or/and a place that is already mentioned.) Thank you very much for your help! Kind regards, Sietse
On 20-2-2012 20:52, Sietse Brouwer wrote:
Wolfgang Schuster wrote:
There was a typo, this works:
Marvellous, it works indeed. Thank you for your help.
The format is only auto generated when the version number is incremented which does happen when Hans releases a new beta/current but not when you change files.
Okay, I've added that to the wiki.
If really needed, you can trigger automake with: context --expert --touch (after all, that is how I jump the version) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Sietse Brouwer
-
Wolfgang Schuster