LyX ⇒ Altered Heading Numbers
Altered Heading Numbers
Hi,
I am working on an article in LyX (version 2.0.6). Sections are automatically numbered in Arabic numerals and sub-sections accordingly.
I would need to change this: Sections should be numbered in Roman numerals. Sub-sections should be numbered alphabetically (e.g. what are automatically numbered as section 2 and subsection 2.1. should rather become section II and subsection A).
Should it be possible to fix this by means of the menu-bars, that would be even easier as I'm not too comfortable with the actual coding options.
Thanks in advance for you advice!
Tom
I am working on an article in LyX (version 2.0.6). Sections are automatically numbered in Arabic numerals and sub-sections accordingly.
I would need to change this: Sections should be numbered in Roman numerals. Sub-sections should be numbered alphabetically (e.g. what are automatically numbered as section 2 and subsection 2.1. should rather become section II and subsection A).
Should it be possible to fix this by means of the menu-bars, that would be even easier as I'm not too comfortable with the actual coding options.
Thanks in advance for you advice!
Tom
NEW: TikZ book now 40% off at Amazon.com for a short time.

Altered Heading Numbers
I do not use Lyx and have no idea how to implement what you want by means of menu bars. But it is very simple to get what you want by just entering a couple of lines into the preamble of your document. Here is atompv wrote: Should it be possible to fix this by means of the menu-bars, that would be even easier as I'm not too comfortable with the actual coding options.

Code: Select all
\documentclass{article}
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\thesection.\Alph{section}}
\begin{document}
\section{Intro}
\subsection{Blah}
\section{Intro2}
\subsection{Blah blah}
\end{document}
- Attachments
-
- x.jpg (10.29 KiB) Viewed 8254 times
OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Re: Altered Heading Numbers
Thanks very much.
I'm sure I must be doing something wrong, but nothing changes when I enter this into the LaTeX preamble in LyX (also not in case I open a new document)...
I'm sure I must be doing something wrong, but nothing changes when I enter this into the LaTeX preamble in LyX (also not in case I open a new document)...
-
- Site Moderator
- Posts: 542
- Joined: Sat Sep 01, 2012 6:38 am
Altered Heading Numbers
Whenever you enter anything in the preamble you cannot count on LyX understanding it. So always check in the compiled PDF. If you want LyX to understand it you need to read about layouts and modules. See Help > Customization.tompv wrote:Thanks very much.
I'm sure I must be doing something wrong, but nothing changes when I enter this into the LaTeX preamble in LyX (also not in case I open a new document)...
Re: Altered Heading Numbers
So, in putting the two together, I have added the code provided by mas in the local layout (rather than directly in the LaTeX preamble), as suggested by scottkosty. When adding the "Preamble" and "EndPreamble" commands at the beginning and end, respectively, the "valid layout!" message appears. Yet, nothing actually changes (in a given document) or appears (in a blank document). Thanks for your patience --- I think we're getting close 

Re: Altered Heading Numbers
At this point, I feel it is more a LyX question than a LaTeX question
Hopefully LyXers around here might help you.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim
Re: Altered Heading Numbers
Hi,
On the TeX forum, they gave me the following solution, which works:
"To get the result you ask for, add
\renewcommand\thesection{\Roman{section}}
\renewcommand\thesubsection{\Alph{subsection}}
to the preamble."
Thanks and best.
On the TeX forum, they gave me the following solution, which works:
"To get the result you ask for, add
\renewcommand\thesection{\Roman{section}}
\renewcommand\thesubsection{\Alph{subsection}}
to the preamble."
Thanks and best.