Question: How to change Chapter numbering to Roman?

Hello All,

I am new TeXmacs user. I am using book document style. How to change the Chapter numbering from Arabic to Roman numeral?

Thanks.

I am not sure the best way to do this, but it could be achieved by re-defining the chapter-numbered-title in preamble: Part → Create preamble, and paste the following code

<assign|chapter-numbered-title|<macro|title|<chapter-title|<chapter-text>
<number|<the-chapter>|Roman><vspace|1fn><new-line><arg|title>>>>
1 Like

That method works. Thanks.

A few more questions please:

  1. how about roman numbering for section, subsection, subsubsection?
  2. where and how do I learn about these codes?

Hi @anotatta and welcome to the forum.

For section and sub …:

<assign|display-section|<macro|nr|<if|<sectional-short-style>|<number|<arg|nr>|Roman>|<chapter-prefix><number|<arg|nr>|Roman>>>>

<assign|display-subsection|<macro|nr|<section-prefix><number|<arg|nr>|Roman>>>

<assign|display-subsubsection|<macro|nr|<subsection-prefix><number|<arg|nr>|Roman>>>

For learning about these codes, there is documentation on how the style-sheet language works both in the TeXmacs manual, at https://www.texmacs.org/tmweb/documents/manuals/texmacs-manual.en.pdf, section 11 and following (except 12 and 13 which deal with other topics), and in the Jolly Writer, which you find at https://www.scypress.com/book_download.html (the download is free, a donation is optional); in the book, chapters 12 and 13.

On the other hand, manual and book do not cover all of the constructs that one needs to customize TeXmacs’ styles. A helpful software tool remediates this, at least in part, I think: the Macro Editor. You find a description of how it works, with examples, at https://texmacs.github.io/notes/docs/macro-editor.html

I think that getting to grips with the TeXmacs macro system takes some time. The behaviour of the TeXmacs editor when editing source code is only partially documented (see manual) and different from the behaviour of editing in many other programs; it takes a bit getting used to it.
You can always ask here in the forum or in the mailing list.

2 Likes

The shorter

<assign|display-chapter|<macro|x|<number|<arg|x>|Roman>>>

also works.

2 Likes

All four if these assign codes works.

Thanks for the learning resource recommendation.