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

the depth info is missing when using latex package hyperref #246

Closed
c-ding-math opened this issue Aug 29, 2023 · 2 comments
Closed

the depth info is missing when using latex package hyperref #246

c-ding-math opened this issue Aug 29, 2023 · 2 comments
Assignees
Labels
enhancement improve existing functionality
Milestone

Comments

@c-ding-math
Copy link

c-ding-math commented Aug 29, 2023

I have a tex file test.tex like this:

\usepackage[active,tightpage]{preview}
\begin{document}
\begin{preview}
$A$
\end{preview}
\end{document}

If I use

latexmk -output-format=dvi test.tex
dvisvgm test.dvi

then I get the everything as expected in the stdout:

...
width = ..., height=..., depth=...
...

But when I add the latex package hyperref in the tex file

\usepackage[active,tightpage]{preview}
\usepackage{hyperref}
\begin{document}
\begin{preview}
$A$
\end{preview}
\end{document}

then the width, height and depth info won't show.

@mgieseki
Copy link
Owner

At the moment, dvisvgm only supports the hypertex mode of the hyperref package. The PS mode can interfere with the processing of the preview data. The following variant should work:

\usepackage[hypertex]{hyperref}

@mgieseki mgieseki self-assigned this Aug 29, 2023
@mgieseki mgieseki added the enhancement improve existing functionality label Aug 30, 2023
@mgieseki
Copy link
Owner

I've improved the evaluation of the preview extents so that they are now also recognized if additional PS code interferes with the data.

mgieseki added a commit that referenced this issue Aug 30, 2023
Instead of parsing the PS code containing the extent values directly, they
are now taken from the PS operand stack where the code of the preview package
puts them at the end of a page.
(fixes #246)
@mgieseki mgieseki added this to the 3.1.2 milestone Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improve existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants