Re: [NTG-context] header entries semi-wrong
Am 06.03.2011 um 11:56 schrieb Steffen Wolfrum: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Could some maybe please have look at my test file (see original post): Is this asynchronoushead a bug or am I simply doing something wrong?? Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
On Thu, Mar 10, 2011 at 2:38 PM, Steffen Wolfrum cont...@st.estfiles.de wrote: Am 06.03.2011 um 11:56 schrieb Steffen Wolfrum: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Could some maybe please have look at my test file (see original post): Is this asynchronoushead a bug or am I simply doing something wrong?? I don't know, but with \dorecurse{2}{\input tufte \par} \page \section{Two} things go better. -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
I agree with Luigi, after using different length and \page I was able to produce correct output. According to me your example is probably a border case. Willi On 10 Mar 2011, at 14:59, luigi scarso wrote: On Thu, Mar 10, 2011 at 2:38 PM, Steffen Wolfrum cont...@st.estfiles.de wrote: Am 06.03.2011 um 11:56 schrieb Steffen Wolfrum: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Could some maybe please have look at my test file (see original post): Is this asynchronoushead a bug or am I simply doing something wrong?? I don't know, but with \dorecurse{2}{\input tufte \par} \page \section{Two} things go better. -- luigi \showframe \setupbodyfont[postscript, 10pt]\setupinterlinespace[line=12pt] \definepapersize[Pape][width=14.7cm,height=22.3cm] \setuppapersize[Pape][Pape] \setuplayout [width=113mm,height=572pt\relax, backspace=17mm,topspace=17mm, header=12pt,headerdistance=6pt, footer=36pt,footerdistance=0pt, location=middle,marking=off] \setupwhitespace[halfline] \setuppagenumbering [alternative=doublesided,location=] \setupheader[align=middle] \mainlanguage[de] \def\HeadL{Part {\convertnumber{Numbers}{\namedheadnumber{chapter}}}\enskip\getmarking[EbeneEins]} \def\HeadR{\headnumber[section]\enskip\getmarking[section][current]} \setupheadertexts [\vtop{\startalignment[center]\HeadR\stopalignment}] [pagenumber] [pagenumber] [\vtop{\startalignment[center]\HeadL\stopalignment}] \starttext \chapter{X} \section{One} \dorecurse{9}{\input ward \par} % \dorecurse{5}{\input ward \par} %\dorecurse{2}{\input tufte \par} \page \strut\page \dorecurse{2}{\input tufte \par} \section{Two} \dorecurse{11}{\input ward \par} \page \section{Three} \dorecurse{11}{\input ward \par} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
Am 06.03.2011 um 11:56 schrieb Steffen Wolfrum: Hi, please run the minimal example attached: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Is this a bug or am I doing something wrong? TeX reads always more text than it needs for a page and in your example the “Section 1.2” was seen by TeX when it was building page 3 although it didn’t fit and was postponed till page 4. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
Am 10.03.2011 um 15:26 schrieb Wolfgang Schuster: Am 06.03.2011 um 11:56 schrieb Steffen Wolfrum: Hi, please run the minimal example attached: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Is this a bug or am I doing something wrong? TeX reads always more text than it needs for a page and in your example the “Section 1.2” was seen by TeX when it was building page 3 although it didn’t fit and was postponed till page 4. Sure, but why does TeX write 1.2 one? The second part one is correct ... Why can't both parts be synchronized (correctly of course!)?? Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
Of course, manually tweaking helps. Only, one needs to see that here is a page where tweaking is needed! And this is the problem: The head says 1.2 one, but it should be 1.1 one! First I trusted the automated head entries, then I realized it can be wrong and now I skim typeset books before sending them to printer. But when skimming a book it is quite likely to not-see the wrong 1 when seeing the correct one! Is there no way to automatically get the correct number information 1.1 that is corresponding to the correct text entry one?? \getmarking[section] provides the right information, \headnumber[section] is too far in border cases ... Isn't there a command that gets the number that belongs to the text of \getmarking[section] Steffen Am 10.03.2011 um 15:16 schrieb Willi Egger: I agree with Luigi, after using different length and \page I was able to produce correct output. According to me your example is probably a border case. Willi On 10 Mar 2011, at 14:59, luigi scarso wrote: On Thu, Mar 10, 2011 at 2:38 PM, Steffen Wolfrum cont...@st.estfiles.de wrote: Am 06.03.2011 um 11:56 schrieb Steffen Wolfrum: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Could some maybe please have look at my test file (see original post): Is this asynchronoushead a bug or am I simply doing something wrong?? I don't know, but with \dorecurse{2}{\input tufte \par} \page \section{Two} things go better. -- luigi \showframe \setupbodyfont[postscript, 10pt]\setupinterlinespace[line=12pt] \definepapersize[Pape][width=14.7cm,height=22.3cm] \setuppapersize[Pape][Pape] \setuplayout [width=113mm,height=572pt\relax, backspace=17mm,topspace=17mm, header=12pt,headerdistance=6pt, footer=36pt,footerdistance=0pt, location=middle,marking=off] \setupwhitespace[halfline] \setuppagenumbering [alternative=doublesided,location=] \setupheader[align=middle] \mainlanguage[de] \def\HeadL{Part {\convertnumber{Numbers}{\namedheadnumber{chapter}}}\enskip\getmarking[EbeneEins]} \def\HeadR{\headnumber[section]\enskip\getmarking[section][current]} \setupheadertexts [\vtop{\startalignment[center]\HeadR\stopalignment}] [pagenumber] [pagenumber] [\vtop{\startalignment[center]\HeadL\stopalignment}] \starttext \chapter{X} \section{One} \dorecurse{9}{\input ward \par} % \dorecurse{5}{\input ward \par} %\dorecurse{2}{\input tufte \par} \page \strut\page \dorecurse{2}{\input tufte \par} \section{Two} \dorecurse{11}{\input ward \par} \page \section{Three} \dorecurse{11}{\input ward \par} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
Am 10.03.2011 um 15:48 schrieb Steffen Wolfrum: Sure, but why does TeX write 1.2 one? The second part one is correct ... Why can't both parts be synchronized (correctly of course!)?? It’s because \headnumber is macro expansion which happens when TeX collects material for the page and \getmarking use TeX’s mark mechanism which is meant for elements which are added after the page is finished. Here is a example which shows a problem with expansion: \setuplayout[lines=10] \def\foo{foo} \appendtoks\gdef\foo{bar}\to\everyaftershipout \starttext \dorecurse{20}{\foo\par} \stoptext What you can do is to create a new mark with \definemarking where you set \headnumber and which you then use in the header. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
Am 10.03.2011 um 15:55 schrieb Steffen Wolfrum: Isn't there a command that gets the number that belongs to the text of \getmarking[section] \getmarking[sectionnumber] % partnumber, chapternumber etc. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
On Thu, Mar 10, 2011 at 3:59 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 10.03.2011 um 15:55 schrieb Steffen Wolfrum: Isn't there a command that gets the number that belongs to the text of \getmarking[section] \getmarking[sectionnumber] % partnumber, chapternumber etc. Wolfgang Right: this works ok. \showframe \setupbodyfont[postscript, 10pt]\setupinterlinespace[line=12pt] \definepapersize[Pape][width=14.7cm,height=22.3cm] \setuppapersize[Pape][Pape] \setuplayout [width=113mm,height=572pt\relax, backspace=17mm,topspace=17mm, header=12pt,headerdistance=6pt, footer=36pt,footerdistance=0pt, location=middle,marking=off] \setupwhitespace[halfline] \setuppagenumbering [alternative=doublesided,location=] \setupheader[align=middle] %\def\HeadL{Part {\convertnumber{Numbers}{\namedheadnumber{chapter}}}\enskip\getmarking[section][first]}%[EbeneEins]} %\def\HeadR{\headnumber[section]\enskip\getmarking[section][first]} \def\HeadL{Part {\convertnumber{Numbers}{\namedheadnumber{chapter}}}\enskip\getmarking[EbeneEins]} \def\HeadR{\getmarking[sectionnumber]\enskip\getmarking[section]} \setupheadertexts [\vtop{\startalignment[center]\HeadR\stopalignment}] [pagenumber] [pagenumber] [\vtop{\startalignment[center]\HeadL\stopalignment}] \starttext \chapter{X} \section{One} \page x \page \dorecurse{5}{\input ward \par} \dorecurse{2}{\input tufte \par} \section{Two} \dorecurse{11}{\input ward \par} \stoptext -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] header entries semi-wrong
Am 10.03.2011 um 15:59 schrieb Wolfgang Schuster: Am 10.03.2011 um 15:55 schrieb Steffen Wolfrum: Isn't there a command that gets the number that belongs to the text of \getmarking[section] \getmarking[sectionnumber] % partnumber, chapternumber etc. Yes! \getmarking[sectionnumber] This one I have been seeking for so long now. Wolfgang, the Living ConTeXt Reference :o) Thank you so much for your response! Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] header entries semi-wrong
Hi, please run the minimal example attached: --on page 1 there is section 1.1 one and you get the header entry 1.1 one - on page 3 there is still section 1.1 one and you get the header entry 1.2 one (- ?!) - on page 5 there is section 1.2 two and you get the header entry 1.2 two you see the problem? the getmarking behaves correctly (one/one/two) while the headnumber is confused (1.1/1.2/1.2))! Is this a bug or am I doing something wrong? Steffen --- % ConTeXt ver: 2011.02.25 22:03 MKIV \showframe \setupbodyfont[postscript, 10pt]\setupinterlinespace[line=12pt] \definepapersize[Pape][width=14.7cm,height=22.3cm] \setuppapersize[Pape][Pape] \setuplayout [width=113mm,height=572pt\relax, backspace=17mm,topspace=17mm, header=12pt,headerdistance=6pt, footer=36pt,footerdistance=0pt, location=middle,marking=off] \setupwhitespace[halfline] \setuppagenumbering [alternative=doublesided,location=] \setupheader[align=middle] \def\HeadL{Part {\convertnumber{Numbers}{\namedheadnumber{chapter}}}\enskip\getmarking[EbeneEins]} \def\HeadR{\headnumber[section]\enskip\getmarking[section]} \setupheadertexts [\vtop{\startalignment[center]\HeadR\stopalignment}] [pagenumber] [pagenumber] [\vtop{\startalignment[center]\HeadL\stopalignment}] \starttext \chapter{X} \section{One} \page x \page \dorecurse{5}{\input ward \par} \dorecurse{2}{\input tufte \par} \section{Two} \dorecurse{11}{\input ward \par} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___