[NTG-context] Command that does not give the expected result (Metafun)
Fabrice Couvreur
fabrice1.couvreur at gmail.com
Tue Aug 11 09:03:40 CEST 2015
Hi Wolfgang,
I will follow your advice but I will try to understand, when I have the time
, the difference between
\unexpanded\def\ChapterCommand#1#2% et \def\ChapterCommand#1#2%.
Fabrice
2015-08-10 22:38 GMT+02:00 Wolfgang Schuster <schuster.wolfgang at gmail.com>:
> Fabrice Couvreur <fabrice1.couvreur at gmail.com>
> 10. August 2015 09:13
> Dear Hans,
> I tested without understanding what \unexpanded, and of course it works !
>
> You can use ConTeXt’s \define command where you don’t have to think about
> \unexpanded etc., e.g.
>
> \define[2]\ChapterCommand
> {\setbox\scratchbox\hbox to \leftmarginwidth{#1\hss}%
> \hskip-\dimexpr\leftmarginwidth+\leftmargindistance\relax
> \framed
> [background=titled,frame=off,offset=0pt]
> {\box\scratchbox
> \hskip\leftmargindistance
> #2}}
>
> Wolfgang
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at 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
>
> ___________________________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150811/620e987d/attachment-0001.html>
More information about the ntg-context
mailing list