On Wed, 25 Oct 2006 11:02:15 +0200
Steffen Wolfrum <[EMAIL PROTECTED]> wrote:
> " \hphantom " ! What a promising word for exactly what I needed!
> Again and again I am surprised how many (strange) commands there
> exist. Where does \hphantom come frome? Where is it documented?
>
> Thank you for your replies! But it could be even better:
>
> As I need, finally, a construct like ...
> \writetolist[Test]{}{{\hphantom{999}}{\hfill}\bf{Nicely centers TOC
> entry}{\hfill}\it 999}
> ... I would like to make sure that both manually entered numbers are
> the same (I don't want to risk a typo!).
>
> So I'd like to use something like \def\FakePageNumber{999}, using
> \FakePageNumber at the beginning and the end of the above line.
>
> The following worked ...
> \expanded{\writetolist[Test]{}{\hfill {\bf Nicely centers TOC entry}
> \hfill \FakePageNumber}}
> ... but not in combination with \MySpace or \hphantom anymore:
> \expanded{\writetolist[Test]{}{???\hfill {\bf Nicely centers TOC
> entry} \hfill \FakePageNumber}}
>
> Could someone please help me over this "expanded/argument/
> whateveristheproblem" gap?
>
>
> Thank you very much,
> Steffen
>
>
>
>
> Am 24.10.2006 um 21:31 schrieb Peter Münster:
>
> > On Tue, 24 Oct 2006, Wolfgang Schuster wrote:
> >
> >> \def\MySpace
> >> {\dosingleempty\doMySpace}
> >>
> >> \def\doMySpace[#1]%
> >> {\setbox\scratchbox=\hbox{#1}%
> >> \unskip\hskip \the\wd \scratchbox}
> >
> > Or perhaps just:
> >
> > \starttext
> > Text\hphantom{999}Text
> > \stoptext
> >
> > ?
> >
> > Cheers, Peter
> >
Hi Steffen,
I presnt you a few solution to your problem, I don't how it
should look to you.
<example>
\def\FakePageNumber{999}
\starttext
\placecontent
\section{Knuth}
\input knuth
% your solution
\expanded{\writetolist[section]{}{\hfill{\bf Nicely centers TOC entry}
\hfill\FakePageNumber}}
% solution 1
\writetolist[section]{}{\hfill {\bf Nicely centers TOC entry} \hfill
\llap{\FakePageNumber}}
% solution 2
\writetolist[section]{}{\hfilll bla \hfilll \llap{\FakePageNumber}}
% solution 3
\writebetweenlist[section]{\hfilll bla \hfilll \llap{\FakePageNumber}}
\section{Knuth}
\input knuth
\stoptext
</example>
Wolfgang
_______________________________________________
ntg-context mailing list
[email protected]
http://www.ntg.nl/mailman/listinfo/ntg-context