6

I would like to change the heading defaults so that every level of heading is in the same font size as the body font, only the face would be changed for different levels (bold, italic, bold italic, etc.). How would one go about doing that? I’ve tried to search for this information in the files ConTeXt an excursion, ConTeXt the manual, and the ConTeXt garden wiki, without luck (which, I realize, doesn’t mean the information isn’t there, just that if it is, I couldn’t find it ;‑)).

I would need to use the default heading commands and not a custom defined heading command. That is, the document is created via pandoc, and I can therefore only change the template being used for the conversion.

I guess the needed command would start something like:

\setuphead[something, I don't know what][something, again I don't know what]
\starttext
\subject{Heading text}

body text.
\stoptext

Uhh, goes to show my ConTeXt-fu is very limited.

6

The following should get you started:

\setupbodyfont [14pt]

\setuphead [section]    [style=\tf]
\setuphead [subsection] [style=italicbold]
\setuphead [subject]    [style=small]

\starttext

\startsection [title=Section]
    \startsubsection [title=Subsection]
    \stopsubsection
\stopsection

\startsubject [title=Subject]
\stopsubject


\stoptext

It looks like this: result

The first argument of \setuphead is the sectioning command. subsection and subject derive from section. However chapter is seperate. As illustrated in my example, you can set the values separate for each level. \tf resets the size to the body font size. It is also possible to set the values for several levels at the same time:

\setuphead [chapter,section] [style=bold]

You find further information and more settings in the ConTeXt manual in section 11.3.

  • 1
    Thanks! I had to use, i.e., \bold and \italicbold to make it work for some reason. – morbusg Mar 10 '12 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.