Re: [NTG-context] \convertnumber with macro parameter
Has to be \defineheadalternative: \defineheadalternative[mysection][renderingsetup=mysection] \startsetups[mysection] \vbox\bgroup \headsetupspacing \strut\headnumbercontent\par \begstrut\headtextcontent\endstrut \egroup \stopsetups \setuplabeltext[en][section={, Section}] \setuphead [section] [alternative=mysection, conversion=I, sectionstopper=.] \starttext \section{Test} \stoptext Wolfgang It works nice, thanks Jan ___ 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] \convertnumber with macro parameter
Am 11.06.2013 um 14:22 schrieb Jan Pohanka xhpoha...@gmail.com: Hi, just another newbie question \setuphead[section] [command=\MyCommand] \define[2]\MyCommand% {\convertnumber{I}{#1} --- #2} \convertnumber does not work on command parameter. What am I doing wrong? I know that I can use conversion key in setuphead, but I need slightly more complicated command. Use \setuphead[section][conversion=I], you can’t use \convertnumber because the first argument is the formatted (styles and colors are applied) content of the section number. 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] \convertnumber with macro parameter
\convertnumber does not work on command parameter. What am I doing wrong? I know that I can use /conversion/ key in setuphead, but I need slightly more complicated command. Use \setuphead[section][conversion=I], you can't use \convertnumber because the first argument is the formatted (styles and colors are applied) content of the section number. Thanks, I'm aware of this method and I mentioned it in the original question. The question is what to do if I need to use the command key to apply more complex formating using \framed etc. At least I need to make \section{My section title} to print I. Section My section title regards Jan ___ 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] \convertnumber with macro parameter
Am 11.06.2013 um 14:36 schrieb Jan Pohanka xhpoha...@gmail.com: \convertnumber does not work on command parameter. What am I doing wrong? I know that I can use conversion key in setuphead, but I need slightly more complicated command. Use \setuphead[section][conversion=I], you can’t use \convertnumber because the first argument is the formatted (styles and colors are applied) content of the section number. Thanks, I'm aware of this method and I mentioned it in the original question. The question is what to do if I need to use the command key to apply more complex formating using \framed etc. At least I need to make \section{My section title} to print I. Section My section title You can create your own section layout. \definesectionalternative[mysection][renderingsetup=mysection] \startsetups[mysection] \vbox\bgroup \headsetupspacing \strut\headnumbercontent\par \begstrut\headtextcontent\endstrut \egroup \stopsetups \setuplabeltext[en][section={}{Section] \setuphead[section][alternative=mysection] 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] \convertnumber with macro parameter
\definesectionalternative[mysection][renderingsetup=mysection] \startsetups[mysection] \vbox\bgroup \headsetupspacing \strut\headnumbercontent\par \begstrut\headtextcontent\endstrut \egroup \stopsetups \setuplabeltext[en][section={}{Section] \setuphead[section][alternative=mysection] It seams that my context does not know /definesectionalternative/ mtx-context | run 1: luatex --fmt=/home/honza/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en --jobname=test --lua=/home/honza/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui --no-parse-first-line --c:currentrun=1 --c:fulljobname=./test.tex --c:input=./test.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv This is LuaTeX, Version beta-0.75.0-2013031401 (rev 4589) \write18 enabled. (/home/honza/context/tex/texmf-context/tex/context/base/cont-yes.mkiv ConTeXt ver: 2013.03.17 13:59 MKIV fmt: 2013.3.19 int: english/english system 'cont-new.mkiv' loaded (/home/honza/context/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system files jobname 'test', input 'test', result 'test' fontslatin modern fonts are not preloaded languageslanguage 'en' is active (test.tex ! Undefined control sequence. log system tex error on line 9 in file test.tex: Undefined control sequence ... l.9 \definesectionalternative [mysection][renderingsetup=mysection] ? thanks Jan ___ 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] \convertnumber with macro parameter
Am 11.06.2013 um 15:53 schrieb Jan Pohanka xhpoha...@gmail.com: \definesectionalternative[mysection][renderingsetup=mysection] \startsetups[mysection] \vbox\bgroup \headsetupspacing \strut\headnumbercontent\par \begstrut\headtextcontent\endstrut \egroup \stopsetups \setuplabeltext[en][section={}{Section] \setuphead[section][alternative=mysection] It seams that my context does not know definesectionalternative Has to be \defineheadalternative: \defineheadalternative[mysection][renderingsetup=mysection] \startsetups[mysection] \vbox\bgroup \headsetupspacing \strut\headnumbercontent\par \begstrut\headtextcontent\endstrut \egroup \stopsetups \setuplabeltext[en][section={, Section}] \setuphead [section] [alternative=mysection, conversion=I, sectionstopper=.] \starttext \section{Test} \stoptext 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 ___