11

I'm copying to LaTeX my notes on Maths subject. My professor is quite weird, and "invented" a Chapter 2 1/2 (two and a half) between chapter 2 and chapter 3. For example:

  • Chapter 2 Vector spaces and linear equation systems
  • Chapter 2 1/2 Orthogonalization and least squares
  • Chapter 3 Diagonalization

I want to keep the chapter numbering, labeling it as 2 1/2 and, if possible, keeping sections like "2 1/2.1", "2 1/2.2", etc. I know it's weird and I've searched a lot. The only thing I've found is typing

\chapter*{Chapter 2 \nicefrac{1}{2} \vspace{10pt} Orthogonalization and least squares}

But that doesn't appear in ToC and doesn't keep section numbering. How can I solve this? Any ideas are apreciated.

PS: sorry for my terrible English, I'm Spanish!

EDIT: I've tried two different ways from Paulo Cereda's answer (Setting arbitrary chapter values), whose MWE are:

\documentclass[11pt]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{units}
\newcommand{\strangechapter}[1]{\renewcommand{\thechapter}{#1}\chapter}

\begin{document}
\tableofcontents
\chapter{Cálculo diferencial en R}
\chapter{Espacios vectoriales y sistemas de ecuaciones lineales}

\strangechapter{2 \nicefrac{1}{2}}{Ortogonalización y mínimos cuadrados}
\section{Producto escalar}
\setcounter{chapter}{2}
\renewcommand{\thechapter}{\arabic{chapter}}
\chapter{Matrices diagonalizables}

\end{document}

I've also used the same, but changing it a little bit:

\documentclass[11pt]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{units}
\newcommand{\strangechapter}[1]{\renewcommand{\thechapter}{#1}\chapter}

\begin{document}
\tableofcontents
\chapter{Cálculo diferencial en R}
\chapter{Espacios vectoriales y sistemas de ecuaciones lineales}
\clearpage% to flush out last chapter page with correct header and footer
\renewcommand{\thechapter}{2 \nicefrac{1}{2}}
\chapter{Ortogonalización y mínimos cuadrados}
\section{Producto escalar}

\setcounter{chapter}{2}
\renewcommand{\thechapter}{\arabic{chapter}}
\chapter{Matrices diagonalizables}
\end{document}

I've added \setcounter to keep the following chapters with correct numbering.

Both of them work great in the text, but the Table of Contents table of contents doesn't show well, as the '1/2' is printed over the chapter of section name. How can I solve this?

user39421
  • 133

0 Answers0