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

bookmarkstype option not correctly supported. #4

Closed
u-fischer opened this issue Jan 26, 2021 · 1 comment
Closed

bookmarkstype option not correctly supported. #4

u-fischer opened this issue Jan 26, 2021 · 1 comment

Comments

@u-fischer
Copy link
Contributor

hyperref has a rather unknown option to show a different list in the bookmark by setting bookmarkstype to another extension.

bookmark doesn't support this due to a faulty expansion, and so the test fails:

\documentclass{article}

\usepackage[bookmarkstype=lof]{hyperref}
\usepackage{bookmark}


\makeatletter 
\def\Hy@writebookmark#1#2#3#4#5{%
  \ifnum#4>\BKM@depth\relax
  \else
    \def\BKM@type{#5}% wrong
    %\edef\BKM@type{#5}% fix
    \ifx\BKM@type\Hy@bookmarkstype 
      \begingroup
        \ifBKM@numbered
          \let\numberline\Hy@numberline
          \let\booknumberline\Hy@numberline
          \let\partnumberline\Hy@numberline
          \let\chapternumberline\Hy@numberline
        \else
          \let\numberline\@gobble
          \let\booknumberline\@gobble
          \let\partnumberline\@gobble
          \let\chapternumberline\@gobble
        \fi
        \bookmark[level=#4,dest={\HyperDestNameFilter{#3}}]{#2}%
      \endgroup
    \fi
  \fi
}
\ExplSyntaxOff
\begin{document}
\showoutput
\section{abc}
\begin{figure}
\caption{figure}
\end{figure}
\end{document}
@u-fischer
Copy link
Contributor Author

resolved in version 1.30

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