ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Tom" <Tom@tuxedo-press.com>
To: "'mailing list for ConTeXt users'" <ntg-context@ntg.nl>
Subject: Re: \stretched in chapter titles in MKII
Date: Tue, 6 Jul 2010 22:12:08 -0400	[thread overview]
Message-ID: <012701cb1d79$cdd7ee80$6987cb80$@com> (raw)
In-Reply-To: <4C335769.8030604@googlemail.com>


\define[1]\ChapterTextStretch  {\line{\stretched{#1}}}
\define[1]\ChapterNumberStretch{\determineheadnumber[chapter]\ChapterTextStr
etch{Chapter 
\currentheadnumber}}

\setuphead
   [chapter]
   [alternative=middle,
    textstyle=sansbold,
    numberstyle=sans,
    deeptextcommand=\ChapterTextStretch,
    deepnumbercommand=\ChapterNumberStretch]

\starttext
\chapter{Test Chapter Title}
\input knuth
\stoptext

Wolfgang

I've tried to modify this code to change the chapter numbers to words. That
part was successful but the above code only stretches the word "Chapter" but
not the numbers' words. I also get errors when I try to get all caps by
inserting \WORD in the first command.

\input c:/BookLayouts/MyFirstBook/Macros/numstr.tex

\define[1]\ChapterTextStretch  {\line{\stretched{#1}}} 

\define[1]\ChapterNumberStretch
{\ChapterTextStretch{Chapter\ChapterNumberWords}}

\define[1]\ChapterNumberWords
{\determineheadnumber[chapter]\numstr{\currentheadnumber}}

\setuphead
   [chapter]
   [alternative=middle,
    textstyle=sansbold,
    numberstyle=sans,
    deeptextcommand=\ChapterTextStretch,
    deepnumbercommand=\ChapterNumberStretch]

\starttext
\completecontent
\chapter{Test Chapter Title}
\input knuth
\chapter{Test Chapter With Very Long Title That Might Overflow Page}
\input knuth
\chapter{Test Chapter With Long Title Doesn't Overflow}
\input knuth
\stoptext

Tom


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


  parent reply	other threads:[~2010-07-07  2:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 19:15 Tom
2010-07-06 14:00 ` Tom
2010-07-06 14:06 ` Wolfgang Schuster
2010-07-06 16:18 ` Wolfgang Schuster
2010-07-06 17:52   ` Tom
2010-07-07  2:12   ` Tom [this message]
2011-02-22  0:18   ` Tom
2011-02-22  8:39     ` Wolfgang Schuster
2011-02-22 13:42       ` Tom
2011-02-22 22:14         ` Wolfgang Schuster
2011-02-23 12:13           ` Tom

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='012701cb1d79$cdd7ee80$6987cb80$@com' \
    --to=tom@tuxedo-press.com \
    --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).