Menu

#392 LaTeX/XeTeX writers: Duplicate "Contents" PDF bookmarks with memoir class

None
closed-fixed
nobody
2021-04-03
2020-06-14
No

When the LaTeX 2e and XeTeX writers convert a .. contents:: directive into LaTeX/XeTeX, they place an explicit \pdfbookmark[1]{Contents}{contents} command before the \tableofcontents so that the resulting PDF will have a bookmark for the table of contents. However, the \tableofcontents command in the memoir class already includes a "Contents" entry, along with a "Contents" PDF bookmark, and so setting --documentclass=memoir ultimately results in a PDF with two consecutive "Contents" bookmarks.

Eliminating the duplicate bookmark in memoir documents can be done either by omitting the explicit \pdfbookmark command or by using the memoir-specific \tableofcontents* (note star) command instead of the regular \tableofcontents command.

The following files are attached:

  • dupcontents.rst — a sample input file that leads to the above-described behavior
  • dupcontents.tex — the output from rst2latex.py --documentclass=memoir dupcontents.rst; typesetting this by running pdflatex dupcontents.tex twice produces a PDF with two "Contents" bookmarks
2 Attachments

Discussion

  • Günter Milde

    Günter Milde - 2020-07-10
    • status: open --> open-fixed
     
  • Günter Milde

    Günter Milde - 2020-07-10

    Fixed in r8523.
    Thank you for reporting.

     
  • Günter Milde

    Günter Milde - 2021-04-03
    • status: open-fixed --> closed-fixed
     
  • Günter Milde

    Günter Milde - 2021-04-03

    Fixed in Docutils 0.17.
    Thanks again for the report.

     

Log in to post a comment.