ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \def\MyChapterCommand#1#2 error...
@ 2013-10-11 21:13 Ciro A. Soto
  2013-10-11 21:18 ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Ciro A. Soto @ 2013-10-11 21:13 UTC (permalink / raw)
  To: context


[-- Attachment #1.1: Type: text/plain, Size: 990 bytes --]

I am not able to use #1#2 arguments... Don't know what is going on.
thank you for your help

ciro
---------------------------------


*Case 1)  *
\setuphead[chapter][command=\MyChapterCommand]
\def\MyChapterCommand{}

\starttext
\chapter{first chapter}
\stoptext

*output:* no error message, pdf file produced. Everything as expected.

*Case 2)*
\setuphead[chapter][command=\MyChapterCommand]
\def\MyChapterCommand#1#2{{#1} : {#2}}

\starttext
\chapter{first chapter}
\stoptext

*output:*
.
.
.
fonts           > 'fallback modern rm 12pt' is loaded
structure       > sectioning > chapter @ level 2 : 0.1 -> first chapter
! Argument of \MyChapterCommand has an extra }.

system          > tex > error on line 6 in file
/home/ciro/Desktop/TGM_SpanishTranslation/test2.tex: Argument of  ...

1     \setuphead[chapter][command=\MyChapterCommand]
2     %\def\MyChapterCommand{}
3     \def\MyChapterCommand#1#2{{#1} : {#2}
4     }
5     \starttext
6 >>  \chapter{first chapter}
7     \stoptext
8

[-- Attachment #1.2: Type: text/html, Size: 2655 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \def\MyChapterCommand#1#2 error...
  2013-10-11 21:13 \def\MyChapterCommand#1#2 error Ciro A. Soto
@ 2013-10-11 21:18 ` Hans Hagen
  2013-10-11 21:45   ` Ciro A. Soto
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2013-10-11 21:18 UTC (permalink / raw)
  To: ntg-context

On 10/11/2013 11:13 PM, Ciro A. Soto wrote:
> I am not able to use #1#2 arguments... Don't know what is going on.
> thank you for your help
>
> ciro
> ---------------------------------
>
>
> *Case 1) *
> \setuphead[chapter][command=\MyChapterCommand]
> \def\MyChapterCommand{}
>
> \starttext
> \chapter{first chapter}
> \stoptext
>
> *output:* no error message, pdf file produced. Everything as expected.
>
> *Case 2)*
> \setuphead[chapter][command=\MyChapterCommand]
> \def\MyChapterCommand#1#2{{#1} : {#2}}

\unexpanded\def ....


> \starttext
> \chapter{first chapter}
> \stoptext
>
> *output:*
> .
> .
> .
> fonts           > 'fallback modern rm 12pt' is loaded
> structure       > sectioning > chapter @ level 2 : 0.1 -> first chapter
> ! Argument of \MyChapterCommand has an extra }..
>
> system          > tex > error on line 6 in file
> /home/ciro/Desktop/TGM_SpanishTranslation/test2.tex: Argument of  ...
>
> 1     \setuphead[chapter][command=\MyChapterCommand]
> 2     %\def\MyChapterCommand{}
> 3     \def\MyChapterCommand#1#2{{#1} : {#2}
> 4     }
> 5     \starttext
> 6 >>  \chapter{first chapter}
> 7     \stoptext
> 8
>
>
>
>
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \def\MyChapterCommand#1#2 error...
  2013-10-11 21:18 ` Hans Hagen
@ 2013-10-11 21:45   ` Ciro A. Soto
  2013-10-11 23:59     ` Hans Hagen
  0 siblings, 1 reply; 4+ messages in thread
From: Ciro A. Soto @ 2013-10-11 21:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3421 bytes --]

thank you again.
(\unexpanded was not needed 5 years ago...)

ciro

ciro


Books you should read:

[image: Lead, Follow & Suceed] <http://www.kavyata.com/lfs.html>  [image:
The Guitar Maker] <http://www.kavyata.com/tgm.html>  [image: La Vida, El
Amor, La Mujer] <http://www.kavyata.com/vam.html>
My social profile: [image:
Facebook]<http://www.facebook.com/profile.php?id=752641627> [image:
Twitter] <http://www.twitter.com/CASotoAguirre>


On Fri, Oct 11, 2013 at 5:18 PM, Hans Hagen <pragma@wxs.nl> wrote:

> On 10/11/2013 11:13 PM, Ciro A. Soto wrote:
>
>> I am not able to use #1#2 arguments... Don't know what is going on.
>> thank you for your help
>>
>> ciro
>> ------------------------------**---
>>
>>
>> *Case 1) *
>>
>> \setuphead[chapter][command=\**MyChapterCommand]
>> \def\MyChapterCommand{}
>>
>> \starttext
>> \chapter{first chapter}
>> \stoptext
>>
>> *output:* no error message, pdf file produced. Everything as expected.
>>
>> *Case 2)*
>>
>> \setuphead[chapter][command=\**MyChapterCommand]
>> \def\MyChapterCommand#1#2{{#1} : {#2}}
>>
>
> \unexpanded\def ....
>
>
>  \starttext
>> \chapter{first chapter}
>> \stoptext
>>
>> *output:*
>>
>> .
>> .
>> .
>> fonts           > 'fallback modern rm 12pt' is loaded
>> structure       > sectioning > chapter @ level 2 : 0.1 -> first chapter
>> ! Argument of \MyChapterCommand has an extra }..
>>
>>
>> system          > tex > error on line 6 in file
>> /home/ciro/Desktop/TGM_**SpanishTranslation/test2.tex: Argument of  ...
>>
>> 1     \setuphead[chapter][command=\**MyChapterCommand]
>> 2     %\def\MyChapterCommand{}
>> 3     \def\MyChapterCommand#1#2{{#1} : {#2}
>> 4     }
>> 5     \starttext
>> 6 >>  \chapter{first chapter}
>> 7     \stoptext
>> 8
>>
>>
>>
>>
>>
>> ______________________________**______________________________**
>> _______________________
>> 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 <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/<http://foundry.supelec.fr/projects/contextrev/>
>> wiki     : http://contextgarden.net
>> ______________________________**______________________________**
>> _______________________
>>
>>
>
> --
>
> ------------------------------**------------------------------**-----
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
>                                              | www.pragma-pod.nl
> ------------------------------**------------------------------**-----
> ______________________________**______________________________**
> _______________________
> 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 <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/<http://foundry.supelec.fr/projects/contextrev/>
> wiki     : http://contextgarden.net
> ______________________________**______________________________**
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 6626 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: \def\MyChapterCommand#1#2 error...
  2013-10-11 21:45   ` Ciro A. Soto
@ 2013-10-11 23:59     ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2013-10-11 23:59 UTC (permalink / raw)
  To: ntg-context

On 10/11/2013 11:45 PM, Ciro A. Soto wrote:
> thank you again.
> (\unexpanded was not needed 5 years ago...)

indeed, but at some point in mkiv development it was decided that it 
made sense .. already a few years ago

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-11 23:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-11 21:13 \def\MyChapterCommand#1#2 error Ciro A. Soto
2013-10-11 21:18 ` Hans Hagen
2013-10-11 21:45   ` Ciro A. Soto
2013-10-11 23:59     ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).