From: Devendra Ghate <devendra.ghate@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Chapter headings macro
Date: Sat, 09 Feb 2013 12:00:54 +0530 [thread overview]
Message-ID: <5115ED1E.8030502@gmail.com> (raw)
In-Reply-To: <F08128D7-CF68-4826-9D0C-D10668A68A90@gmail.com>
On 02/08/2013 06:43 PM, Wolfgang Schuster wrote:
> Am 08.02.2013 um 07:31 schrieb Devendra Ghate <devendra.ghate@gmail.com>:
>
>> Hello everyone,
>>
>> I have defined a macro for the chapter layouts -- nothing fancy, but still it is giving me trouble.
>> Essentially, I call this macro using *command=* in *\setuphead*. My philosophy was to add
>> all the details in the macro, so that I don't have to call anyother keyvalue pairs in *\setuphead*.
>> However, the macro gives two different results when called for typesetting a chapter heading
>> by ConTeXt internals and explicitly by me in the document (see attached file).
>>
>> I don't know why the chapter number font style is not obeyed. If I add *numberstyle=dfont* in
>> *\setuphead*, then the font size is increased but the frame size has spurious space at top and
>> bottom.
>>
>> When I call the macro myself, there is a single whitespace before the chapter heading (as can be
>> seen in the attached file).
>>
>> I have gone through the wiki as much as possible and I think that I could have easily copied
>> *much better* heading styles from it. But I do not want to use code that I don't fully
>> understand.
>>
>> Any suggestions/help will be most appreciated.
> \definefont [ChaperNumberStyle][Serif at 60pt]
> \definecolor[ChaperNumberColor][x=d8dcd6]
>
> \startsetups[head:devendra]
>
> \startlinealignment[left]
>
> \startframed
> [frame=on,
> rulethickness=3pt,
> framecolor=ChaperNumberColor,
> foregroundcolor=ChaperNumberColor,
> corner=00]
> \hspace[big]\headnumbercontent
> \stopframed
>
> \hspace[big]
>
> \startframed
> [width=.1\textwidth,
> strut=no,
> frame=on,
> align={flushleft,nothyphenated,verytolerant}]
> \headtextcontent
> \stopframed
>
> \stoplinealignment
>
> \stopsetups
>
>
> \defineheadalternative[devendra][renderingsetup=head:devendra]
>
> \setuphead
> [chapter]
> [alternative=devendra,
> numberstyle=ChaperNumberStyle,
> textstyle={\tfc\kap\kerncharacters[.5]}]
>
> \starttext
> \chapter{Introduction to thesis}
> \stoptext
>
> Wolfgang
> _____
Thank you Wolfgang. I guess this is the proper ConTeXt way.
Presumably I will have to define a plain set up for unnumbered chapters
like bibliographies
and call *\setuphead[chapter][alternative=plain]* for these chapters.
Devendra
> ______________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2013-02-09 6:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 6:31 Devendra Ghate
2013-02-08 13:13 ` Wolfgang Schuster
2013-02-09 6:30 ` Devendra Ghate [this message]
2013-02-09 13:16 ` 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=5115ED1E.8030502@gmail.com \
--to=devendra.ghate@gmail.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).