ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Bart C. Wise" <bntgcontext@wiseguysweb.com>
To: ntg-context@ntg.nl
Subject: Re: Kerning
Date: Wed, 12 Nov 2008 10:03:56 -0700	[thread overview]
Message-ID: <200811121003.56433.bntgcontext@wiseguysweb.com> (raw)
In-Reply-To: <200811120928.40138.bntgcontext@wiseguysweb.com>

Okay, it works until I place an an argument in the stretched command.

def\MyChapterCommand#1#2{
       \framed[align=center,frame=off,width=\textwidth]{
		\vbox{
fails-->			\stretched{#2}
works-->			\stretched{This is a Test}
		}
	}
\setuphead[chapter][
   command=\MyChapterCommand
}


I get the following error when I run texexec:

! Missing \endcsname inserted.
<to be read again>
                   \let
\nextprocessedtoken ...oup \ifincolor \ifcsname #1
                                                  #3\endcsname \let 
\dostopa...

\dodoprocesstokens ...token \let \before \between
                                                  \fi \let \nextprocessedtok...
<argument> This is a test: \dostartattributes
                                              {\??ko \v!title }\c!style 
\c!c...

\processtokens ...fore \before \doprocesstokens #5
                                                  \lastcharacter \endgroup
\stretched ... \relax \hss \relax {\hss \hss }{#1}
                                                  \egroup
...

How can I use the #1 & #2 arguments in the stretched command?

On Wednesday 12 November 2008 09:28:39 am Bart C. Wise wrote:
> Wolfgang,
>
> It works!
>
> Thanks,
> Bart
>
> On Wednesday 12 November 2008 08:54:49 am Wolfgang Schuster wrote:
> > Am 12.11.2008 um 16:48 schrieb Bart C. Wise:
> > > I am trying to change the spacing of a chapter title head.  I found
> > > the
> > > "\kern" command; however, I could not get that to work over a string
> > > of text.
> > >
> > > Then I found the following code:
> > > \def\dolist{\afterassignment\dodolist\let\next= }
> > > \def\dodolist{\ifx\next\endlist \let\next\relax
> > >   \else \\\let\next\dolist \fi
> > >   \next}
> > > \def\endlist{\endlist}
> > > \def\track#1\by#2{\def\\{\next\kern#2}%
> > >   \leavevmode \hbox{\expandafter\dolist#1\endlist}}
> > >
> > > Then I tried:
> > >
> > > def\MyChapterCommand#1#2{
> > >        \framed[align=center,frame=off,width=\textwidth]{
> > > 		\vbox{
> > > 			\track{This is a Test} \by{.2em}
> > > 			\track #2  \by{.2em}
> > > 		}
> > > 	}
> > > \setuphead[chapter][
> > >    command=\MyChapterCommand
> > > }
> > >
> > > The output from the \track{This is a Test} \by{.2em} works.
> > > However, the
> > > second track command (\track #2 \by{0.2em}) fails.
> > >
> > > I spent many hours last night trying to change the kerning.  What I
> > > want is
> > > something like: \kern{TEXT}{KERNING AMOUNT}.
> > >
> > > What's available, or how do I fix the track command above.  By the
> > > way,I'm
> > > running mkii.
> >
> > Search for \stretched and \stretchednormalcase.
> >
> > http://archive.contextgarden.net/message/20080815.074940.ae67f770.en.html
> >
> > 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  : https://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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-11-12 17:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-12 15:48 Kerning Bart C. Wise
2008-11-12 15:54 ` Kerning Wolfgang Schuster
2008-11-12 16:28   ` Kerning Bart C. Wise
2008-11-12 17:03     ` Bart C. Wise [this message]
2008-11-12 17:17       ` Kerning Wolfgang Schuster
2008-11-13  6:18         ` Kerning Bart C. Wise
2008-11-13  7:46           ` Kerning Hans Hagen
2008-11-13 16:20             ` Kerning Bart C. Wise
2008-11-14 15:00               ` Kerning Hans Hagen
2008-11-13  8:36           ` Kerning Wolfgang Schuster
2008-11-13 15:26             ` Kerning Bart C. Wise
     [not found] <429D6DD1.2040005@wxs.nl>
     [not found] ` <429D734F.7040203@elvenkind.com>
     [not found]   ` <429D7FB5.90406@wxs.nl>
2005-06-02 15:31     ` [NTG-pdftex] kerning Taco Hoekwater
2005-06-28 12:10       ` kerning Patrick Gundlach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811121003.56433.bntgcontext@wiseguysweb.com \
    --to=bntgcontext@wiseguysweb.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).