LyX ⇒ Alpha-numerical chapters
Alpha-numerical chapters
Hello,
I try to use LyX to write my german law thesis. If I add chapters and sections, I get a structure like I, 1, 1.1 what I want is though: A, I, 1, a), aa, (i), (ii)
Is it possible with LyX? If yes, how?
Thank you in advance
I try to use LyX to write my german law thesis. If I add chapters and sections, I get a structure like I, 1, 1.1 what I want is though: A, I, 1, a), aa, (i), (ii)
Is it possible with LyX? If yes, how?
Thank you in advance
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
Alpha-numerical chapters
Hi Aerus,
welcome to the board!
You could place LaTeX redefinitions in your LyX document preamble for that.
Have a look at Manipulating the way counters are printed to learn more about that.
Stefan
welcome to the board!
You could place LaTeX redefinitions in your LyX document preamble for that.
Code: Select all
\renewcommand*{\thechapter}{\Alph{chapter}}
...
\renewcommand*{\thesubsubsection}{(\roman{subsubsection})}
Have a look at Manipulating the way counters are printed to learn more about that.
Stefan
LaTeX.org admin
Re: Alpha-numerical chapters
Thanks for your rapid reply.
If I set this into preamble, I get this error message:
LaTex Error: \thechapter undefined
What can it be?
If I set this into preamble, I get this error message:
LaTex Error: \thechapter undefined
What can it be?
- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Alpha-numerical chapters
Obviously you use a document class which doesn't provide chapters, such as article. Or which one did you choose?
Stefan
Stefan
LaTeX.org admin
Re: Alpha-numerical chapters
Ok, thanks, I figured it out now. I have another question. My TOC looks now like in the attachment.
I don't need the spacing between the number and the caption. How can I change this, too?
I don't need the spacing between the number and the caption. How can I change this, too?
- Attachments
-
- alphanum-chapters.png (115.27 KiB) Viewed 13047 times
Last edited by Stefan Kottwitz on Sat Feb 04, 2012 1:04 pm, edited 1 time in total.
- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Alpha-numerical chapters
Perhaps post your settings here, or the LyX preamble, as attachment. We cannot see yet how you produce that space or which settings cause that.
Stefan
Stefan
LaTeX.org admin
Alpha-numerical chapters
I use article with KOMA-Script. My preamble looks like this:
Code: Select all
\renewcommand*{\thepart}{\Alph{part}}
\renewcommand*{\thesection}{\Roman{section}}
\renewcommand*{\thesubsection}{\arabic{subsection}}
\renewcommand*{\thesubsubsection}{\alph{subsubsection}}
\renewcommand*{\theparagraph}{\roman{paragraph}}
\renewcommand*{\thesubparagraph}{(\arabic{subparagraph})}
- Stefan Kottwitz
- Site Admin
- Posts: 10344
- Joined: Mon Mar 10, 2008 9:44 pm
Alpha-numerical chapters
Ok, let's make a minimal working example, with your settings and class:
You will get the default look, which reserves space for wider numbers, because numbering such as I.1.a. is expected.
Now let's load tocstyle. It belongs to KOMA-Script, which you have installed, and provides an option for automatically calculating the indentation in the toc.
It will calculate during several LaTeX compiler runs, then it will finally look this way:
Stefan
Code: Select all
\documentclass{scrartcl}
\renewcommand*{\thepart}{\Alph{part}}
\renewcommand*{\thesection}{\Roman{section}}
\renewcommand*{\thesubsection}{\arabic{subsection}}
\renewcommand*{\thesubsubsection}{\alph{subsubsection}}
\renewcommand*{\theparagraph}{\roman{paragraph}}
\renewcommand*{\thesubparagraph}{(\arabic{subparagraph})}
\begin{document}
\tableofcontents
\section{Section level}
\subsection{Subsection level}
\subsubsection{Subsubsection level}
\subsubsection{Subsubsection level}
\paragraph{Paragraph level}
\end{document}
Now let's load tocstyle. It belongs to KOMA-Script, which you have installed, and provides an option for automatically calculating the indentation in the toc.
Code: Select all
\usepackage[tocindentauto]{tocstyle}
Stefan
LaTeX.org admin