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
doesn't show well, as the '1/2' is printed over the chapter of section name. How can I solve this?
:)A long time ago, I posted the following question, maybe it might interest you: http://tex.stackexchange.com/questions/19605/setting-arbitrary-chapter-values – Paulo Cereda Nov 03 '13 at 17:21\addchapis a KOMA-Script command... – cgnieder Nov 03 '13 at 17:22\addcontentsline{toc}{chapter}{name}should also work. – Chris Nov 03 '13 at 17:56tocloftas in http://tex.stackexchange.com/questions/7853/toc-text-numbers-alignment/7856#7856 – Torbjørn T. Nov 04 '13 at 13:44