ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Two coexisting number conversions (in headers and in texts)
@ 2014-05-14 21:27 Maggyero
  0 siblings, 0 replies; 3+ messages in thread
From: Maggyero @ 2014-05-14 21:27 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 135 bytes --]

> Try this:
> \setupheadertexts[{\convertnumber{Romannumerals}{\namedheadnumber{chapter}}\quad\getmarking[chapter]}]

Thanks Wolfgang!

[-- Attachment #1.2: Type: text/html, Size: 201 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

* Re: Two coexisting number conversions (in headers and in texts)
  2014-05-09 13:17 Maggyero
@ 2014-05-11 19:27 ` Wolfgang Schuster
  0 siblings, 0 replies; 3+ messages in thread
From: Wolfgang Schuster @ 2014-05-11 19:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 09.05.2014 um 15:17 schrieb Maggyero <maggyero@gmail.com>:

> Hello,
> 
> 
> How can I achieve this chapter numbering?
> 
> — page 1:
> 
> I My chapter (header)
> -----------------
> First My chapter (text)
> 
> — page 2:
> 
> II My chapter (header)
> ------------------
> II My chapter (text)
> 
> 
> That is to say having every chapter number in roman numeral except the first one but only in the text (not in the header).
> 
> For the moment I can achieve only the chapter numbering for the text but not for the header:
> 
> \define[1]{\myconversion}{\ifcase #1\relax \or First\else \convertnumber{Romannumerals}{#1}\fi}
> \defineconversion[myconversion][\myconversion]
> \setuphead[chapter][conversion=myconversion]
> \setupheadertexts[{\getmarking[chapternumber]\quad\getmarking[chapter]}]

Try this:

    \setupheadertexts[{\convertnumber{Romannumerals}{\namedheadnumber{chapter}}\quad\getmarking[chapter]}]

With the \namedheadnumber command you can access the raw value of a section counter.

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Two coexisting number conversions (in headers and in texts)
@ 2014-05-09 13:17 Maggyero
  2014-05-11 19:27 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Maggyero @ 2014-05-09 13:17 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 854 bytes --]

Hello,


How can I achieve this chapter numbering?

— page 1:

I My chapter (header)
-----------------
First My chapter (text)

— page 2:

II My chapter (header)
------------------
II My chapter (text)


That is to say having every chapter number in roman numeral except the
first one but only in the text (not in the header).

For the moment I can achieve only the chapter numbering for the text but
not for the header:

\define[1]{\myconversion}{\ifcase #1\relax \or First\else
\convertnumber{Romannumerals}{#1}\fi}
\defineconversion[myconversion][\myconversion]
\setuphead[chapter][conversion=myconversion]
\setupheadertexts[{\getmarking[chapternumber]\quad\getmarking[chapter]}]

\starttext
\startchapter[title=My chapter]
\stopchapter
\startchapter[title=My chapter]
\stopchapter
\stoptext


Best regards.

[-- Attachment #1.2: Type: text/html, Size: 1284 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

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

end of thread, other threads:[~2014-05-14 21:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-14 21:27 Two coexisting number conversions (in headers and in texts) Maggyero
  -- strict thread matches above, loose matches on Subject: below --
2014-05-09 13:17 Maggyero
2014-05-11 19:27 ` 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).