11

I am working on a legal dissertation using Lyx where the numbering should be alpha numeric more specifically:

A.  ---> Part 
I.  ---> Chapter 
1.   ---> Section
a) -- > Subsection 
aa) 

I did find some guidance online and I am now using as latex preamble

\renewcommand{\thepart}{\Alph{part}}
\renewcommand{\thechapter}{\Roman {chapter}}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\alph{subsection})}
\renewcommand{\thesubsubsection}{\alph{subsection}\alph{subsubsection})}

the problem is that for the roman numbers VII and VIII the spacing is wrong and it gets over the title of the chapter (see screenshot)

problem with roman number chapter

I would need some help to add a space after the chapter number an possibly a point too (e.g. I. II. III. )

thanks in advance

errata corrige sorry but I forgot to mention that the new structure should be as follow:

 § 1 Introduction
 § 2 TOPIC
   A. Section or chapter? 
     I.   sub-section 1
     II.  sub section 2 
     III. sub 3 
          1. sub sub 
          2. 
          3. 
          4. 
          5. 
          ....

can you help me to achieve this? Thanks a lot

ggdev
  • 143
  • What documentclass do you use? Is there any modification to the TOC? A MWE might help us find the answer more effectively. – moewe Oct 02 '13 at 14:49
  • Is the image you've posted an image of the ToC? BTW, Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – karlkoeller Oct 02 '13 at 15:06
  • @moewe I am using book (more fonts) – ggdev Oct 03 '13 at 20:50
  • really sorry but in the editing I forgot to mention that I need a different numbering system for law so I guess I need to change the latex preamble or use a package? thanks in advance !! – ggdev Oct 03 '13 at 20:51
  • @ggdev If you forgot to mention something, edit again; it is much better to find all the information needed in the question than having to sift through the comments to find important bits scattered in lots of places. What do you mean by "different numbering system for law"? Does that mean you want to change the style mid-document? In your example it might help to specify what sectioning levels the output is supposed to have. Is §1 supposed to be part or chapter? – moewe Oct 03 '13 at 21:26

1 Answers1

9

I think the image you've posted is an image of your Table of Contents.

To achieve what you want in the ToC, you can load the package titletoc

\usepackage{titletoc}

and add the following lines to your preamble:

\titlecontents{chapter}
[2.65em]
{\addvspace{10pt}\bfseries}
{\contentslabel{2.3em}}
{\hspace*{-2.3em}}
{\space.\hfill\contentspage}

Thus, the following MWE

\documentclass{book}
\usepackage{titletoc}

\renewcommand{\thepart}{\Alph{part}}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\alph{subsection})}
\renewcommand{\thesubsubsection}{\alph{subsection}\alph{subsubsection})}

\titlecontents{chapter}
[2.65em]
{\addvspace{10pt}\bfseries}
{\contentslabel{2.3em}}
{\hspace*{-2.3em}}
{\space.\hfill\contentspage}

\begin{document}

\tableofcontents

\part{1st part}
\chapter{1st chap}
\chapter{2nd chap}
\chapter{3rd chap}
\chapter{4th chap}
\chapter{5th chap}
\chapter{6th chap}
\chapter{7th chap}
\chapter{Swiss Law}
\section{Definition}
\section{Investors}
\section{Requirements}

\end{document} 

yields

enter image description here

karlkoeller
  • 124,410
  • thanks a lot for this but I forgot to add to the question the problem with the sections that now have to follow a different format :( I would be grateful if you could look at that. – ggdev Oct 03 '13 at 20:49
  • @ggdev Until karlkoeller updates his answer \renewcommand{\thechapter}{\S~\arabic{chapter}} \renewcommand{\thesection}{\Alph{section}.} \renewcommand{\thesubsection}{\Roman{subsection}.} \renewcommand{\thesubsubsection}{\arabic{subsubsection}.} \setcounter{tocdepth}{4} \setcounter{secnumdepth}{4} or \renewcommand{\thepart}{\S~\arabic{part}} \renewcommand{\thechapter}{\Alph{chapter}.} \renewcommand{\thesection}{\Roman{section}.} \renewcommand{\thesubsection}{\arabic{subsection}.} might help you. – moewe Oct 03 '13 at 21:28
  • I wonder if there is a a way to have after a new § the chapter numbering to start from A. again. in my current test it seems that moves to the net letter e.g. §2 L in stade of §2 A. – ggdev Oct 03 '13 at 23:57
  • @ggdev Please try to be clearer. First of all, I don't understand what you're asking in the last comment. Also, which one of moewe's solutions is the right one for you? Moreover, if you use \renewcommand{\thechapter}{\S~\arabic{chapter}}, you will have Chapter § 1 Introduction in the text: is this a wanted behavior? – karlkoeller Oct 04 '13 at 05:02
  • @moewe it's better not to include the period in the above definitions, otherwise they will end up in references as well. – karlkoeller Oct 04 '13 at 05:08
  • @moewe this solution worked well \renewcommand{\thepart}{\S~\arabic{part}} \renewcommand{\thechapter}{\Alph{chapter}.} \renewcommand{\thesection}{\Roman{section}.} \renewcommand{\thesubsection}{\arabic{subsection}.} \renewcommand{\headrulewidth}{0pt} what I meant it this: a) I wanted to remove (for the class book, more fonts) the interpage which would say Part § ......... and, more important, after each Chapter to reset the section number so §.....,A., I,II and then B should restart from I and not from IV for example – ggdev Oct 04 '13 at 09:26
  • this is achievable with this \usepackage{titlesec} \titleclass{\part}{top} \titleformat{\part}[hang]{\normalfont\huge\bfseries}{\thepart}{20pt}{\Huge} \titlespacing*{\part}{0pt}{50pt}{40pt} \titleclass{\chapter}{straight} \titleformat{\chapter}[display]{\normalfont\LARGE\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\LARGE} \titlespacing*{\chapter} {0pt}{50pt}{40pt} – ggdev Oct 04 '13 at 09:31
  • 1
    @ggdev The edit in your question and all the above comments lead to something really different from the original question. This is what I suggest: 1) re-edit the question to be the original one, 2) ask a new question with the new requests, 3) you or moewe can give the answer, since you two have given the answer to the updated question, 4) delete all these comments that have nothing to do with the original question. – karlkoeller Oct 04 '13 at 11:57