ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Martin Kolarík" <martin@mii.cz>
Subject: RE: Re: Using command in section
Date: Wed, 5 Mar 2003 08:40:51 +0100	[thread overview]
Message-ID: <000d01c2e2ea$8bc67920$2197fac3@mii.cz> (raw)
In-Reply-To: <usmu21dbv.fsf@multiline.com.au>

Thank you,

I will test it and I suppose your solution will work. But I think that
simple TeX-only solution should work too. Maybe I am a bit foolish :-) if I
try to do things as simple as possible and if I try to use thing with
understanding them...

The behaviour surprised me and as I did not expect it, I discussed it here.
And sure, if it is a feature, I really should use \tbox :-)

Have a nice day,

Martin

> -----Original Message-----
> From: ntg-context-admin@ntg.nl [mailto:ntg-context-admin@ntg.nl]On
> Behalf Of Guy Worthington
> Sent: Wednesday, March 05, 2003 8:29 AM
> To: ntg-context@ref.ntg.nl
> Subject: [NTG-context] Re: Using command in section
>
>
> Martin Kolarík wrote:
>
> > I'm using private macro for title of section:
>
> Sometimes I get so cross with ConTeXt, and that's because, like you,
> when stuck, I run to "The TeXbook" and not to "ConTeXt the manual".
>
> Only a fortnight ago, I was facing your exact problem and wasted
> several hours making a solution for a non-existant problem.  So, in
> the hope that you can profit from my bitter experience, here's what I
> advice:
>
>   1) Go to the ConTeXt manual,
>
>   2) Look up '\setuphead' in the index,
>
>   3) Encapsulated within the handful of pages, following the index
>      reference, is the solution to your exact problem laid out, step
>      by step.  (It's also a good introduction into the methodology
>      used in the ConTeXt interface.)
>
> I'm only guessing that you want your section header looking like:
>
>    X     The Quick Brown
>          Fox Jumped Over
>          The Lazy Dog
>
> and using that assumption, I had a go at translating that into ConTeXt
>
> -----
>
> \setuphead[section]
> 	  [command=\doTitle]
>
> %% \def\doTitle#1#2{%
> %%   \vbox to 0pt{
> %%     \hsize=3cm
> %%     \hbox{\vtop{#1}\raise\lineheight\vtop{#2}}
> %%     \vss}}
>
> \def\doTitle#1#2{%
>   \hbox to 3cm \bgroup
>     \hfill
>     \setupframed [offset=.5em, frame=off]
>     \tbox{\framed [width=1.5cm, align=right]{#1}}%
>     \tbox{\framed [width=3cm, align=right]{#2}}%
>   \egroup}
>
> \starttext
>
> \section A Day in the Life of the Quick Brown Fox
>
> \stoptext
>
> ------
>
> _______________________________________________
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context
>

  reply	other threads:[~2003-03-05  7:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-04 16:16 Martin Kolařík
2003-03-04 22:12 ` Hans Hagen
2003-03-05  9:19   ` Martin Kolarík
2003-03-05  7:29 ` Guy Worthington
2003-03-05  7:40   ` Martin Kolarík [this message]
2003-03-05  8:52   ` Hans Hagen

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='000d01c2e2ea$8bc67920$2197fac3@mii.cz' \
    --to=martin@mii.cz \
    --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).