[dev-context] Bugs: align[outer] requires setuppagenumbering, and fails on odd pages

Wolfgang Schuster schuster.wolfgang at googlemail.com
Mon Feb 20 20:36:47 CET 2012


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 <schuster.wolfgang at googlemail.com> 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


More information about the dev-context mailing list