Re: Strange side effect on bookmarks in hyperref

Ulrike Fischer <[email protected]>
Newsgroups gmane.comp.tex.miktex
Message-ID <[email protected]>
Am Sun, 31 Jul 2016 12:00:37 +0200 schrieb Daniele Giorgio Degiorgi:

> In a document, if I use

This is not a miktex specific question, you should ask such
questions e.g. on tex.SX

> \input{A1}

Why do you make it so difficult for other to test and reproduce your
problem? The \input are completly irrelevant. 

 
> I just wonder if there is a safe possibility to reset chapter numbers while
> using hyperref.

You need to change the hyperref counter representation two so that
hyperref can set unique links.

\listfiles
\documentclass{book}
\usepackage{hyperref}

\begin{document}
\chapter{A1}

\chapter{A2}

\let\savethechapter\thechapter
\let\savetheHchapter\theHchapter
\def\thechapter{\arabic{chapter}a}
\def\theHchapter{\arabic{chapter}a}
\chapter{A3a}
\section{blub}
\section{blub}

\setcounter{chapter}{2}

\def\thechapter{\arabic{chapter}b}
\def\theHchapter{\arabic{chapter}b}
\chapter{A3b}
\section{blub}
\section{blub}
\let\thechapter\savethechapter
\let\theHchapter\savetheHchapter

\chapter{A4}

\end{document}

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/


------------------------------------------------------------------------------
_______________________________________________
Q: How can I leave the mailing list?
A: See http://docs.miktex.org/faq/support.html#leavingml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.