ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mikael Persson" <mickep@math.chalmers.se>
Subject: Re: The name of the current section?
Date: Thu, 20 May 2004 17:15:20 +0200 (MEST)	[thread overview]
Message-ID: <34567.82.182.100.57.1085066120.squirrel@mail.medic.chalmers.se> (raw)
In-Reply-To: <40ACE122.1050605@econ.muni.cz>

> Hi.
>
> Many thanks for your kind answer.
>
>> \setuppagenumbering[alternative=doublesided,
>>    location={header,marginedge}]
>> \setupheadertexts
>>    [section][{\headnumber[section]}][chapter][{\headnumber[chapter]}]
>
> Your code is rather nice (I have learned one nice trick from it), but it
> doesn't what I need. I want all the header stuff to go just separated by
> spaces, not on different sides of the header. Something like this
>
> 117_This_is_an_chapter_name_(chap._5)___________________________________________________________________
> where "_" stands for a space.
>
> Well, with your trick I could possibly to it with some \hfill, but it's
> a rather tricky solution. Moreover, I may need the name of a current
> chapter and section in the document itself. I guess there must be some
> system solution for such a case in the ConTeXt (I think there is almost
> everything in it.) :-)
>
> Of course, as the last instance I can redefine \chapter and \section in
> a way like this
>     \let\OriChapter=\chapter
>     \def\chapter#1{\def\currentchaptername{#1}\chapter{#1}}
> but I don't want to do it -- it is dirty and involves more programming
> to cover crossreferences.
>
> Any more hint how to get the name of current chapter/section?
>
> With best regards
> Michal Kvasnicka
>

I found this in one of my old docs. Is that what you want?

\setupheadertexts
    [{\headnumber[section]\quad\getmarking[section][current]}]
    []
    []
    [{Chapter \headnumber[chapter]:\quad\getmarking[chapter][current]}]


Regards, Micke P

  reply	other threads:[~2004-05-20 15:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19 12:06 Michal Kvasnicka
2004-05-19 19:26 ` Willi Egger
2004-05-20 16:47   ` Michal Kvasnicka
2004-05-20 15:15     ` Mikael Persson [this message]
2004-05-21 12:59       ` Michal Kvasnicka

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=34567.82.182.100.57.1085066120.squirrel@mail.medic.chalmers.se \
    --to=mickep@math.chalmers.se \
    --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).