fmarotta / kaobook

A LaTeX class for books, reports or theses based on https://github.com/kenohori/thesis and https://github.com/Tufte-LaTeX/tufte-latex.
https://github.com/fmarotta/kaobook
LaTeX Project Public License v1.3c
858 stars 184 forks source link

Table of content in Pdf reader is not the actual ToC #180

Closed RemDelaporteMathurin closed 3 years ago

RemDelaporteMathurin commented 3 years ago

Prerequisites

Description

When compiling a book and reading the pdf in a pdf reader (i tested Adobe Reader, Chrome and Edge) the displayed table of content is somehow mixed up and weird.

Minimal Working Example

\documentclass{kaobook}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage{kaobiblio}
\usepackage{kaotheorems}
\usepackage{kaorefs}

\begin{document}

\title{Bug Report}
\author{Author}
\date{\today}

\frontmatter

\KOMAoptions{twoside=semi}
\maketitle
\KOMAoptions{twoside=false}

\mainmatter
\setchapterstyle{kao}

\chapter{First Chapter}
\section{Section 1}
\section{Section 2}
\section{Section 3}
\subsection{Subsection 3.1}

\chapter{Second Chapter}
\section{Section 1}
\section{Section 2}
\section{Section 3}
\subsection{Subsection 3.1}

\blindtext

\end{document}

Expected behavior: A ToC similar to the ToC we have in the tex document

Chapter 1:

Actual behavior:

Screenshot of Adobe reader image

AlexanderZeilmann commented 3 years ago

This is weird. Sadly, I can not reproduce the problem on a Mac. On the left is the latest version of Acrobat Reader. This uses exactly the code from your bug report and the latest version of kaobook from the git repo. Are you sure, that everything is up-to-date (Acrobat, kaobook, LaTeX installation, ...)? Which OS are you on? How are you compiling the document pdflatex, xelatex, lualatex, ...?

Bildschirmfoto 2021-10-13 um 19 24 29
RemDelaporteMathurin commented 3 years ago

Sorry I forgot to mention I used verion 0.9.7 of Kaobook.

I tested against the latest version on master and it works as expected.

Maybe this has been fixed between 0.9.7 and now!

I shall try and update everything!

Thank you!