Hi ConTeXt User's, Again I'm struggling with MKIV! I get the following error message: ! Argument of \HeadTitle has an extra } My environment file contains the following definition: \def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup} \setuphead [chapter] [command=\HeadTitle] In the text I use: \chapter[voorwrd]{Voorwoord} I updated to the following version: ConTeXt ver: 2013.04.20 01:15 MKIV current fmt: 2013.4.22 int: english/english, but must admit that I haven't used ConTeXt for quite a while! Probably I've missed something but couldn't find any hint from the mail archive to solve this problem, sorry! Regards, Verhaag,G.C.H.M.
On Tue, Apr 23, 2013 at 7:04 PM, Verhaag, G.C.H.M.
Hi ConTeXt User's,
Again I'm struggling with MKIV!
I get the following error message:
! Argument of \HeadTitle has an extra }
My environment file contains the following definition:
\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup}
\unexpanded\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup} -- luigi
Hi Luigi, Thanks for your very quick response, just great! Your suggestion works! By the way, what does this expanded mean, is it documented somewhere? Is it a typical MKIV thing related to Lua? Regards, Verhaag, G.C.H.M. On 04/23/2013 07:08 PM, luigi scarso wrote:
On Tue, Apr 23, 2013 at 7:04 PM, Verhaag, G.C.H.M.
wrote: Hi ConTeXt User's,
Again I'm struggling with MKIV!
I get the following error message:
! Argument of \HeadTitle has an extra }
My environment file contains the following definition:
\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup}
\unexpanded\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup}
-- 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 ___________________________________________________________________________________
-- Afz.: Geert C.H.M. Verhaag St. Jorisstraat 29 5954 AN Beesel NETHERLANDS Tel.: +31-(0)774742493, E-mail: verhaaggchm@ziggo.nl Ik vertrouw erop dat de persoonlijke gegevens, te vinden in deze mail, uitsluitend voor correspondentie met ondergetekende worden gebruikt en beslist niet voor reclamedoeleinden of welke andere wijze dan ook. Het opnemen van deze gegevens, in welk soort van opslagsysteem dan ook, evenals het doorgeven ervan aan derden, zie ik als een schending van mijn privacy.
Am 23.04.2013 um 20:11 schrieb "Verhaag, G.C.H.M."
Hi Luigi,
Thanks for your very quick response, just great! Your suggestion works!
By the way, what does this expanded mean, is it documented somewhere? Is it a typical MKIV thing related to Lua?
It’s a typical way in MkIV to check for the existing of values in “command” keys but it has nothing to do with Lua. I can demonstrate the purpose of \unexpanded with the following example. First I create the two command \one and \two, afterwards I add \expandedone and \expandedtwo which hold the expanded values of \one and \two. As you can see I get the same text with \one and \expandedone. In the next step I redefine \one and \two to hold a new value and compare again the content of all four macros. Unlike in the previous output \one and \expandedone are different while \two and \expandedtwo show the same result. The reason why \expandedtwo show “Second” is that \unexpanded\def prevented the expansion of \two in \edef\expandedtwo{…}. \starttext \def\one{One} \unexpanded\def\two{Two} \edef\expandedone{\one} \edef\expandedtwo{\two} \startlines \one:\expandedone \two:\expandedtwo \stoplines \def\one{First} \def\two{Second} \startlines \one:\expandedone \two:\expandedtwo \stoplines \stoptext Wolfgang
Hi, Thank you very much for the explanation, now it's clear to me! Regards, Verhaag, G.C.H.M. On 04/24/2013 12:20 AM, Wolfgang Schuster wrote:
Am 23.04.2013 um 20:11 schrieb "Verhaag, G.C.H.M."
: Hi Luigi,
Thanks for your very quick response, just great! Your suggestion works!
By the way, what does this expanded mean, is it documented somewhere? Is it a typical MKIV thing related to Lua?
It’s a typical way in MkIV to check for the existing of values in “command” keys but it has nothing to do with Lua.
I can demonstrate the purpose of \unexpanded with the following example. First I create the two command \one and \two, afterwards I add \expandedone and \expandedtwo which hold the expanded values of \one and \two.
As you can see I get the same text with \one and \expandedone. In the next step I redefine \one and \two to hold a new value and compare again the content of all four macros. Unlike in the previous output \one and \expandedone are different while \two and \expandedtwo show the same result. The reason why \expandedtwo show “Second” is that \unexpanded\def prevented the expansion of \two in \edef\expandedtwo{…}.
\starttext
\def\one{One} \unexpanded\def\two{Two}
\edef\expandedone{\one} \edef\expandedtwo{\two}
\startlines \one:\expandedone \two:\expandedtwo \stoplines
\def\one{First} \def\two{Second}
\startlines \one:\expandedone \two:\expandedtwo \stoplines
\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 ___________________________________________________________________________________
Am 23.04.2013 um 19:08 schrieb luigi scarso
On Tue, Apr 23, 2013 at 7:04 PM, Verhaag, G.C.H.M.
wrote: Hi ConTeXt User's,
Again I'm struggling with MKIV!
I get the following error message:
! Argument of \HeadTitle has an extra }
My environment file contains the following definition:
\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup}
\unexpanded\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup}
\define[2]\HeadTitle {\startframedtext[right][height=2cm,width=7cm,frame=off,offset=none,align=flushright] #2 \stopframedtext} Wolfgang
participants (3)
-
luigi scarso
-
Verhaag, G.C.H.M.
-
Wolfgang Schuster