ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Schorsch <tralalas@freenet.de>
To: ntg-context@ntg.nl
Subject: right and left alignment in header w/ linebreak sign
Date: Sun, 17 Jul 2011 17:48:12 +0200	[thread overview]
Message-ID: <20110717174812.29905d1a@freenet.de> (raw)

Hi,

I am trying to have the header text aligned at the outer border of
margin. 

At the moment I have 

	\setupheadertexts[margin][][\rightaligned{\CurrentChapter}][\leftaligned{\CurrentChapter}][]

and in the text

	\chapter{A very, very long long heading}

and it works like I expect it. But as soon I have a linebreak in the
heading (via \\) I get following error message:

	structure       > sectioning > chapter @ level 2 : 0.1 -> A
	very,\\very long long title ! Extra }, or forgotten \endgroup.

	system          > tex > error on line 1 in file
	context-test-struktur3.tex: Extra }, or forgotten  ...

As soon I remove the alignment in the header also the chapter with the
linebreak sign works - but of course I get then a wrong alignment.

How can I make that the header works with the correct alignment and
linebreaks in the heading? (header should be still without linebreaks)

Thanks in advance!


Complete example:
-------------8<----------------------------

% define margins
\definelayout[WithMarginnotes][location={duplex},grid=no,topspace=3cm,height=24cm,backspace=3cm,cutspace=0cm,leftmargin=1cm,leftmargindistance=0.4cm,width=12.1cm,rightmargindistance=0.4cm,rightmargin=3.5cm]
\setuplayout[WithMarginnotes]
\setuppagenumbering[alternative=doublesided,location=]
\showframe

% define header
\define\CurrentChapter%
	{\doiftextelse {\getmarking[chapternumber]}%
		{\getmarking[chapternumber].~\getmarking[chapter]}%
		{\getmarking[chapter]}%
	}
\setupheadertexts[margin][][\rightaligned{\CurrentChapter}][\leftaligned{\CurrentChapter}][]%

%
\starttext
\completecontent[criterium=all]
\chapter{A very,\\very long long heading}
\chapter{A very, very long long heading}
\chapter{End}
\stoptext
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


             reply	other threads:[~2011-07-17 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-17 15:48 Peter Schorsch [this message]
2011-07-17 16:37 ` Wolfgang Schuster

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=20110717174812.29905d1a@freenet.de \
    --to=tralalas@freenet.de \
    --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).