LyX ⇒ Alpha-numerical chapters
Alpha-numerical chapters
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.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Alpha-numerical chapters
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
Re: Alpha-numerical chapters
If I set this into preamble, I get this error message:
LaTex Error: \thechapter undefined
What can it be?
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Alpha-numerical chapters
Stefan
Re: Alpha-numerical chapters
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 13002 times
- Stefan Kottwitz
- Site Admin
- Posts: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Re: Alpha-numerical chapters
Stefan
Alpha-numerical chapters
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: 10328
- Joined: Mon Mar 10, 2008 9:44 pm
Alpha-numerical chapters
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