* [NTG-context] Re: How do I get roman numerals in all numerable sections with no extra spacing after the period (would appreciate condensed code/simplification) (I read documentation but did not get any result)
2024-08-22 18:54 [NTG-context] How do I get roman numerals in all numerable sections with no extra spacing after the period (would appreciate condensed code/simplification) (I read documentation but did not get any result) Felix
@ 2024-08-22 21:40 ` Hraban Ramm
0 siblings, 0 replies; 2+ messages in thread
From: Hraban Ramm @ 2024-08-22 21:40 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 3475 bytes --]
Felix,
your example contains a lot that is not relevant to your question. Try
to reduce it.
For number types, use the "conversion" option, for Roman numerals, there
are the values r, R, RK, or (lowercase, uppercase, small caps, with
bars). See also https://wiki.contextgarden.net/Command/convertnumber
Any "command" options accepts the name of a macro, "numbercommand" needs
a macro with one parameter; don't try to call a macro here.
For the dot after the number, I'm not sure, try "sectionstopper={.}".
Hraban
Am 22.08.24 um 20:54 schrieb Felix:
> \setuppapersize
> [letter]
> [letter]
>
> \setuplayout[
> backspace=0.5in,
> topspace=0.5in,
> header=0in, % No headers
> footer=0in, % Space for the footer
> width=middle,
> height=middle,
> ]
>
> \definefontfeature [default] [default] [trep=yes]
>
> \definefontfamily [TimesNewRoman] [rm] [Times New Roman]
> \definetypeface [TimesNewRoman] [mm] [math] [stixtwo]
>
> \setupbodyfont [TimesNewRoman,12pt]
>
> \mainlanguage[en-us]
>
> \setupindenting[yes,0.5in]
>
> \setupheads[indentnext=yes] % To get indentation after section numbers, use this
>
> \setuphead[part][
> page=no,
> placehead=yes,
> numbercommand=\groupedcommand{}{.} % Add period after numbers
> ]
>
> \setuphead[chapter][
> page=no,
> numbercommand=\groupedcommand{}{.} % Add period after numbers
> ]
>
> \setuphead[section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][
> numbercommand=\groupedcommand{}{.} % Add period after numbers
> ]
>
> \setuphead[part, chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection, subject, subsubject, subsubsubject, subsubsubsubject, subsubsubsubsection][
> before=,
> after=,
> style=sc, % Small caps style
> align=middle, % Center the section titles
> ] % it seems that when I make this into setupheads and delete the first square braket set it will not result in what I want
>
> \startsetups document:start
> \centerline{\documentvariable{title}}
> \centerline{\documentvariable{author}}
> \centerline{\documentvariable{date}}
> \blank[line]
> \stopsetups
>
> \startdocument[title=Title,author=Author,date=Date]
>
> \startpart[title=one]
>
> \stoppart
>
> \startalignment[middle]
>
> {\sc 1. one} % there is added space as shwon when trying to emulate what I want through regular text
>
> \stopalignment
>
> \startchapter[title=two]
>
> \stopchapter
>
> \startpart[title=three]
>
> \stoppart
>
> \startchapter[title=four]
>
> \stopchapter
>
> \startsubject[title=five]
>
> \stopsubject
>
> \stopdocument
>
> with this code I'm trying to get it so that part, chapter, and the 5 section levels will have roman numerals. I read the docs but didn't get the result I wanted for roman numerals and can't seem to figure out how to get rid of the tiny space that is after the period in the section stuff. Would love an answer for this.
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist :ntg-context@ntg.nl /https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage :https://www.pragma-ade.nl /https://context.aanhet.net (mirror)
> archive :https://github.com/contextgarden/context
> wiki :https://wiki.contextgarden.net
> ___________________________________________________________________________________
[-- Attachment #1.2: Type: text/html, Size: 4489 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread