getmarking and empty chapter number
![](https://secure.gravatar.com/avatar/da275274bab3cdbc839a9d0e8f2c2299.jpg?s=120&d=mm&r=g)
Hi all, I'm just trying to wrap my mind around why the following doesn't work as I expect: -- \setupheadertexts [] [{\doifsomething{\getmarking[sectionnumber]}{\getmarking[sectionnumber]\enskip}\getmarking[section]}] [{\doifsomething{\getmarking[chapternumber]}{\getmarking[chapternumber]\enskip}\getmarking[chapter]}] [] -- When this encounters an unnumbered \startchapter (say in the front matter) then this \doifsomething should detect this void and in particular not insert the \enskip. For some reason the space ends up in the PDF nevertheless :-( Any ideas? Many thanks, Oliver
![](https://secure.gravatar.com/avatar/c5ae4f9aa0d3a9bd5376e92b322c3e50.jpg?s=120&d=mm&r=g)
On Mon, 23 May 2011, Oliver Buerschaper wrote:
Hi all,
I'm just trying to wrap my mind around why the following doesn't work as I expect:
-- \setupheadertexts [] [{\doifsomething{\getmarking[sectionnumber]}{\getmarking[sectionnumber]\enskip}\getmarking[section]}] [{\doifsomething{\getmarking[chapternumber]}{\getmarking[chapternumber]\enskip}\getmarking[chapter]}] [] --
When this encounters an unnumbered \startchapter (say in the front matter) then this \doifsomething should detect this void and in particular not insert the \enskip. For some reason the space ends up in the PDF nevertheless :-(
Any ideas?
From supp-box.mkiv:
%D \macros %D {doiftextelse, doiftext} %D %D When \type {\doifelse} cum suis hopelessly fail, for %D instance because we pass data, we can fall back on the next %D macro: %D %D \starttyping %D \doiftextelse {data} {then branch} {else branch} %D \doiftext {data} {then branch} %D \stoptyping Aditya
![](https://secure.gravatar.com/avatar/da275274bab3cdbc839a9d0e8f2c2299.jpg?s=120&d=mm&r=g)
%D \macros %D {doiftextelse, doiftext} %D %D When \type {\doifelse} cum suis hopelessly fail, for %D instance because we pass data, we can fall back on the next %D macro: %D %D \starttyping %D \doiftextelse {data} {then branch} {else branch} %D \doiftext {data} {then branch} %D \stoptyping
Works neatly! Thanks a lot. Oliver
participants (2)
-
Aditya Mahajan
-
Oliver Buerschaper