[NTG-context] setuphead bug?

Wolfgang Schuster schuster.wolfgang at gmail.com
Tue Oct 7 22:32:02 CEST 2014


Am 07.10.2014 um 21:22 schrieb Otared Kavian <otared at gmail.com>:

> Hi,
> 
> You are right, it seems that there is a trailing « else » somewhere in the sources… 
> Actually the possible keys for « alternative= » are
> 	
> 	 alternative=paragraph normal inmargin margin middle top bottom IDENTIFIER
> 
> and the following works fine also:
> 
> \setuphead[chapter] [number=no, alternative=middle] 
> \starttext
>  \startchapter[title=TITLE] 
> \input knuth.tex
>  \stopchapter
> \stoptext
> 
> However, saying
> 	
> 	\setuphead[chapter] [alternative=middle] 
> 
> gives the wrong result you mentioned, suggesting that there is somewhere an « else » which shouldn’t be there.
> Maybe Hans H. with the above informations can nail it down?

strc-ren.mkiv

\startsetups[\??headrenderings:\v!middle]
    \vbox {
        \headsetupspacing
        \veryraggedcenter
        \let\\\endgraf
        \let\crlf\endgraf
        \ifconditional\headshownumber
            \strut
            \headnumbercontent
            \par
-       else
+       \else
            \fakeheadnumbercontent % will also be done in the other ones (force consistency with numbered)
        \fi
        \begstrut
        \headtextcontent
        \endstrut
    }
\stopsetups

Wolfgang



More information about the ntg-context mailing list