Re: [NTG-context] \setuphead and testpage
Am 14.07.2012 um 00:32 schrieb Hans Hagen: On 13-7-2012 10:02, Wolfgang Schuster wrote: Hi Hans, can you add a testpage option to \setuphead? %\setuphead[section][testpage=4] \setuphead[section][before={\testpage[4]\blank[2*big]}] \starttext \section{First} \dorecurse{36}{Line \recurselevel\par} \section{Second} \dorecurse{36}{Line \recurselevel\par} \stoptext Are we sure about that key? (a conditional page entry is also an option, like page=lines:4 or so Adding the \testpage functionality to \page (and providing \blank like options, e.g. lines:4,offset:1cm) is another solution and has the advantage that you don’t need another key for \setuphead 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] \seeindex and processors
Am 13.07.2012 um 19:56 schrieb Andreas Mang: Dear Hans Wolfgang, Thanks for looking into this. I know that this has quite low priority. As it seems to me processors do not really seem to provide the behaviour I had in mind. Clearly, I should have thought of a better example in the first place: % \defineprocessor[smallcaps][style=\sc] \starttext % this works nicely {\sc Test}\index{smallcaps-Test} % this is what I want it to look like % (which does not work for \seeindex[.]) \index{{\sc Cauchy}||Problem} % this is what I tried after you have suggested % to use processors, but it does not work (*) {\sc Cauchy}||Problem\index{{smallcaps-Cauchy}||Problem} \placeindex[n=1] \stoptext % (*) As you can see I am using smallcaps as an indicator for a personal name. From looking at the code (I have to admit that I do not know anything about what's beyond the context front end) I think there's no quick solution to get this to work with preprocessors. Am I doing something wrong? With a simple change of the string type in strc-reg.mkiv you can also use commands/style switches in \seeindex: \def\strc_registers_insert_see_indeed#1#2#3#4% register key entry seeword {\begingroup ... entries = { % we need a special one for xml, this is just a single one - \currentregisterentries, #2 + \!!bs\currentregisterentries\!!es, #2 }, seeword = { - text = \currentregisterseeword + text = \!!bs\currentregisterseeword\!!es }, } }}% \endgroup} 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] linenumbering
On 07/12/2012 10:34 PM, Wolfgang Schuster wrote: The liner numbering environment has no before/after keys, you should always keep in mind that line numbers are added after the page is finished and the start/stop commands are mark the begin and end of the block where numbers are added. You can always use the annotation module which has space before/spaceafter keys to control the spacing around the environment. Thanks, Wolfgang, but that was Hans's code, in fact :-) But that's good to know anyway! Thomas ___ 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] ## not permitted in the presence of .
Hi, I run into trouble with mkiv (ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2012.7.7 int: english/english). A small example: \starttext \def\c#1#2{\halign{##\hfil##\cr\bf#1\quad#2\cr}} \c{11}{this} \stoptext gives and error: ! Only one # is allowed per tab. This runs error-free under mkii (pdftex, xetex), plain tex (luatex, xetex), latex (luatex) etc. Would someone comment? Thank you, Eythan ___ 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] ## not permitted in the presence of .
Am 14.07.2012 um 17:20 schrieb Eythan Weg: Hi, I run into trouble with mkiv (ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2012.7.7 int: english/english). A small example: \starttext \def\c#1#2{\halign{##\hfil##\cr\bf#1\quad#2\cr}} \c{11}{this} \stoptext gives and error: ! Only one # is allowed per tab. This runs error-free under mkii (pdftex, xetex), plain tex (luatex, xetex), latex (luatex) etc. Would someone comment? The error message is not very helpful in this case because the is the problem. In MkIV we made a while ago _, ^ and normal characters in the text and you don’t have to write \_ (or \textunderscore) etc. to use them. A side effect of this was that \halign can’t be used anymore in a document (which isn’t recommended anyway because ConTeXt has other high level table interfaces), when you now want to use \halign to create a command put it in a \unprotect … \protect block or use the \aligntab (it’s a LuaTeX primitive with the same meaning as ). \unprotect \def\one#1#2{\halign{##\hfil##\cr\bf#1\quad#2\cr}} \protect \def\two#1#2{\halign{##\hfil\aligntab##\cr\bf#1\aligntab\quad#2\cr}} \starttext \one{underscore}{_} \two{ampersand}{} \stoptext BTW: \c is already defined as a accent macro. 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] ## not permitted in the presence of .
Thank you. But isn't \donknuthmode suppose to keep the compatibility with standard tex? Eythan Wolfgang Schuster schuster.wolfg...@gmail.com Sat, 14 Jul 2012 17:39:12 +0200 Am 14.07.2012 um 17:20 schrieb Eythan Weg: Hi, I run into trouble with mkiv (ConTeXt ver: 2012.05.30 11:26 MKIV fmt: 2012.7.7 int: english/english). A small example: \starttext \def\c#1#2{\halign{##\hfil##\cr\bf#1\quad#2\cr}} \c{11}{this} \stoptext gives and error: ! Only one # is allowed per tab. This runs error-free under mkii (pdftex, xetex), plain tex (luatex, xetex), latex (luatex) etc. Would someone comment? The error message is not very helpful in this case because the is the problem. In MkIV we made a while ago _, ^ and normal characters in the text and you don’t have to write \_ (or \textunderscore) etc. to use them. A side effect of this was that \halign can’t be used anymore in a document (which isn’t recommended anyway because ConTeXt has other high level table interfaces), when you now want to use \halign to create a command put it in a \unprotect … \protect block or use the \aligntab (it’s a LuaTeX primitive with the same meaning as ). \unprotect \def\one#1#2{\halign{##\hfil##\cr\bf#1\quad#2\cr}} \protect \def\two#1#2{\halign{##\hfil\aligntab##\cr\bf#1\aligntab\quad#2\cr}} \starttext \one{underscore}{_} \two{ampersand}{} \stoptext BTW: \c is already defined as a accent macro. 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 ___ ___ 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 ___