![](https://secure.gravatar.com/avatar/0fe779b5a46fbe1443290bb88c34ba5b.jpg?s=120&d=mm&r=g)
Hi all, I am going to write my thesis with ConTeXt. The problem is that our University wants chapter titles to be 18 points while body text is 11 points. I do not want to use \switchtobodyfont every time I type a chapter title, but I have no idea how to make it a style in the setup area. Any hints? Thanks a lot. Yous, Roy
![](https://secure.gravatar.com/avatar/117a058bed6945e7fa1b40ff2f6e7aa7.jpg?s=120&d=mm&r=g)
Hi Roy,
I think these little will do what you want:
====================================
\setupbodyfont [11pt] file://\\definebodyfont[11pt][rm][tff=Regular
\definebodyfont[11pt][rm][tff=Regular at 18pt]
\setuphead
[chapter]
[textstyle=\tff,
numberstyle=\tff]
====================================
On 4/3/07, Roy Zuo
Hi all,
I am going to write my thesis with ConTeXt. The problem is that our University wants chapter titles to be 18 points while body text is 11 points. I do not want to use \switchtobodyfont every time I type a chapter title, but I have no idea how to make it a style in the setup area. Any hints? Thanks a lot.
Yous,
Roy
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
-- Sincerely yours, Chen ---------------------------------------------------------------- Zhi-chu Chen | Shanghai Synchrotron Radiation Facility No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China tel: 086 21 5955 3405 | zhichu.chen.googlepages.com | www.sinap.ac.cn ----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/4b4ced3073feb2d1288a7744c747e62b.jpg?s=120&d=mm&r=g)
On Tue, 3 Apr 2007, Roy Zuo wrote:
I do not want to use \switchtobodyfont every time I type a chapter title, but I have no idea how to make it a style in the setup area.
Good news is that this is fairly easily done. The Hello World document on ConTextwiki (ConTeXtGarden) has one solution where the common nominators are given in one go and then more stuff is added separately; see http://wiki.contextgarden.net/Hello_world and the stuff starting with \setuphead Now, my solution has been to define each heading level separately: % This sets the look of the first level headings \setuphead [chapter] [style=\sstfc, prefix=+] % This sets the look of the second level headings \setuphead [section] [style=\sstfb, before={\blank[2*big]}] \setuphead [subject] [style=\sstfb, before={\blank[2*big]}] % Third level headings \setuphead [subsection] [style=\ssbf] Note: "section" and "subject" are of same level, but section is numbered (1.2 etc.) while subject is not. You can find this information and more 1) In the wiki on page http://wiki.contextgarden.net/Titles 2) In the beginner's manual ("Excursion") at http://www.pragma-ade.com/general/manuals/ms-cb-en.pdf under "5 Headers" (!) 3) In the big manual at http://www.pragma-ade.com/general/manuals/cont-eni.pdf (this is the interactive on-screen version) under "8 Text Elements" Now, interestingly, I cannot find any direct examples how to give point size to chapter heading, I'm used to doing just \tfa, \tfb and \tfc (somewhat bigger than standard, quite a bit bigger, huge). However, judging from the Hello World document, this might work out: \setuphead [chapter] [style={\switchtobodyfont[18pt]}] %is {} needed here? If the text should also be sans serif (Arial etc), this might be the way: \setuphead [chapter] [style={\ss\switchtobodyfont[18pt]}] Yep, both of the above work at least in my ConTeXt. So I learned something new today! (Mostly thanks to Sanjoy's wonderful Hello World...) This should give you a reasonable starting point, the rest you can probably figure out with the documentation and some testing (been there, done that, got it right in the end....) Mari
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
2007/4/3, Roy Zuo
Hi all,
I am going to write my thesis with ConTeXt. The problem is that our University wants chapter titles to be 18 points while body text is 11 points. I do not want to use \switchtobodyfont every time I type a chapter title, but I have no idea how to make it a style in the setup area. Any hints? Thanks a lot.
Yous,
Roy
Hi Roy, \definefont[chapterfont][Sans at 18pt] \setuphead[chapter][style=\titlefont] \setupbodyfont[12pt] \starttext \chapter{Knuth} \input knuth \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/0fe779b5a46fbe1443290bb88c34ba5b.jpg?s=120&d=mm&r=g)
Thanks Wolfgang and Mari! You are really nice.
I have never noticed that Sanjoy's Hello World includes so many ConTeXt
features, and it is really great! I think I have to carefully read that
Hello World source before starting my thesis.
Yours,
Roy
On 4/3/07, Wolfgang Schuster
2007/4/3, Roy Zuo
: Hi all,
I am going to write my thesis with ConTeXt. The problem is that our University wants chapter titles to be 18 points while body text is 11 points. I do not want to use \switchtobodyfont every time I type a chapter title, but I have no idea how to make it a style in the setup area. Any hints? Thanks a lot.
Yous,
Roy
Hi Roy,
\definefont[chapterfont][Sans at 18pt] \setuphead[chapter][style=\titlefont]
\setupbodyfont[12pt]
\starttext
\chapter{Knuth}
\input knuth
\stoptext
Wolfgang
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (4)
-
Mari Voipio
-
Roy Zuo
-
Wolfgang Schuster
-
Zhichu Chen