ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Long heading alignment
@ 2007-03-25 19:36 Paul Schalck
  2007-03-26 19:08 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Schalck @ 2007-03-25 19:36 UTC (permalink / raw)
  To: ntg-context

Hello!

First, I want to thank you all. It's my first post here, but I've read many of your emails before, and I've already found a lot of solutions for my problems in there. I'm using Context intensely since several months (before, I was Latex) and at the moment, I'm setting my first big document (400 pages, very boring) with it.

My issue: I have a little problem with headings I can't solve by my own. It's rather simple: I would like to align headings that span across multiple lines on the left margin, like this:

a) This is (not really) a very, very, very
loooooooooooooooong title 

and not that way:

a) This is (not really) a very, very, very
   loooooooooooooooong title

The use of (\setuphead[section][command=\MySectionCommand] disables the standard alignment mechanism. I wonder if there is a simpler way to achieve this.

Any ideas? Thank you very much!

Scheeni Grieß (it's Alsatian German)
Paul
_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192

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

* Re: Long heading alignment
  2007-03-25 19:36 Long heading alignment Paul Schalck
@ 2007-03-26 19:08 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2007-03-26 19:08 UTC (permalink / raw)
  To: ntg-context

On Sun, 25 Mar 2007 21:36:12 +0200
Paul Schalck <schickele@web.de> wrote:

> Hello!
> 
> First, I want to thank you all. It's my first post here, but I've read many of your emails before, and I've already found a lot of solutions for my problems in there. I'm using Context intensely since several months (before, I was Latex) and at the moment, I'm setting my first big document (400 pages, very boring) with it.
> 
> My issue: I have a little problem with headings I can't solve by my own. It's rather simple: I would like to align headings that span across multiple lines on the left margin, like this:
> 
> a) This is (not really) a very, very, very
> loooooooooooooooong title 
> 
> and not that way:
> 
> a) This is (not really) a very, very, very
>    loooooooooooooooong title
> 
> The use of (\setuphead[section][command=\MySectionCommand] disables the standard alignment mechanism. I wonder if there is a simpler way to achieve this.
> 
> Any ideas? Thank you very much!
> 
> Scheeni Grieß (it's Alsatian German)
> Paul

Hi Paul,

the solution to you problem is very simple:

\def\MySectionCommand#1#2%
  {\vbox
     {\hsize\textwidth
       #1 #2}}

\setuphead
  [section]
  [command=\MySectionCommand]

\starttext

\section{\dorecurse{100}{foo }}

\stoptext

To learn more about this you can read the german book Einführung in TeX:
http://www.ruhr-uni-bochum.de/www-rz/schwanbs/TeX/

Wolfgang

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

end of thread, other threads:[~2007-03-26 19:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-25 19:36 Long heading alignment Paul Schalck
2007-03-26 19:08 ` Wolfgang Schuster

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).