Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong page numbers and hierarchy in case of class with chapters #12

Open
dbitouze opened this issue Oct 2, 2016 · 0 comments
Open

Wrong page numbers and hierarchy in case of class with chapters #12

dbitouze opened this issue Oct 2, 2016 · 0 comments

Comments

@dbitouze
Copy link

dbitouze commented Oct 2, 2016

The following MWE points out that, in case of class with chapters:

  1. some bookmarks have wrong page numbers and link to wrong pages,
  2. the list of figures and list of tables are chapters but are considered as children of the previous chapter.
\documentclass{report}
\usepackage{hypdoc}%
\makeatletter
\@ifpackageloaded{hypdoc}{%
  \def\listoftables{%
    \ifHD@numbered
    \else
    \stepcounter{HD@unique}%
    \pdfbookmark[\HD@guesstoclevel{\HDorg@listoftables}]%
    {\listtablename}{toc\theHD@unique}%
    \fi
    \begingroup
    \HD@sectionpatch
    \HDorg@listoftables
    \endgroup
  }
  \def\listoffigures{%
    \ifHD@numbered
    \else
    \stepcounter{HD@unique}%
    \pdfbookmark[\HD@guesstoclevel{\HDorg@listoffigures}]%
    {\listfigurename}{toc\theHD@unique}%
    \fi
    \begingroup
    \HD@sectionpatch
    \HDorg@listoffigures
    \endgroup
  }
}{%
}
\makeatother
\begin{document}
\tableofcontents
\chapter{Foo}
\listoffigures
\listoftables
\end{document}
@u-fischer u-fischer transferred this issue from ho-tex/oberdiek Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant