latex3 / hyperref

Hypertext support for LaTeX
167 stars 37 forks source link

using hypertex with dvi to svg, how to change appearance? #106

Open PaulSt opened 5 years ago

PaulSt commented 5 years ago

I am using \documentclass[dvisvgm,hypertex]{beamer} to produce slides that can run in the brower, as done in this example. How can I change the link appearance when loading hyperref in this way? I tried everything... In particular I would like to remove the boxes around the hyperlinks.

davidcarlisle commented 5 years ago

doesn't the \hypersetup usage in Juan's answer on the page you link to work for you?

(also please note that questions are better asked on stackexchange, this is a bug tracking system and we would need a reproducible test file that showed a bug, if you think you have a case that is not working as documented.)

On Fri, 18 Oct 2019 at 16:07, Paul Stocker notifications@github.com wrote:

I am using \documentclass[dvisvgm,hypertex]{beamer} to produce slides that can run in the brower, as done in this example https://tex.stackexchange.com/questions/235139/using-the-animate-package-without-adobe . How can I change the link appearance when loading hyperref in this way? I tried everything... In particular I would like to remove the boxes https://tex.stackexchange.com/questions/823/remove-ugly-borders-around-clickable-cross-references-and-hyperlinks/12408#12408 around the hyperlinks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/latex3/hyperref/issues/106?email_source=notifications&email_token=AAJVYAXH4NMQGJVLQ66TBZLQPHGM5A5CNFSM4JCIWP52YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HSY35CQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVYAUGCFFXWBTTR4HLNOLQPHGM5ANCNFSM4JCIWP5Q .

PaulSt commented 5 years ago

Thank you very much for the fast answer! :sunglasses: Below you can find a minimal not working example, most of the things I have tried are commented out. I believe it is a bug, since I am suppost to use hypersetup, but it is not working.

%\PassOptionsToPackage{hidelinks}{hyperref}
\documentclass[dvisvgm,hypertex,onlymath,11pt]{beamer}
%\documentclass[hidelinks,dvisvgm,hypertex,onlymath,11pt]{beamer}
%\usepackage[hidelinks]{hyperref}
%\hypersetup{hidelinks}
%\hypersetup{
    %colorlinks=false,
    %pdfborder={0 0 0},
%}
\section{Test}
\begin{document}
\begin{frame}
 \usebeamerfont{title}\insertsectionhead
\end{frame}
\end{document}

Sorry, but the upload as a file failed for me :open_mouth: I hope the above is ok
As described earlier, I compile this using

latex <filename>
dvisvgm --font-format=woff --exact --zoom=-1 -p1,- <filename>
davidcarlisle commented 5 years ago

Ok thanks for the test file.

I can confirm that it doesn't work, but this is a feature request rather than a bug, I think.

As far as I can see neither hyperref nor beamer has any explicit support for dvisvgm, so it just works as far as the dvips specials are understood by dvisvgm, and as far as beamer is using tikz/pgf (which does have a dvisvgm back end)

grep driver *def hdvipdfm.def: Hyperref driver for dvipdfm] hdvips.def: Hyperref driver for dvips] hdvipson.def: Hyperref driver for dvipsone] hdviwind.def: Hyperref driver for dviwindo] hluatex.def: Hyperref driver for luaTeX] hpdftex.def: Hyperref driver for pdfTeX] htex4ht.def: Hyperref driver for TeX4ht] htexture.def: Hyperref driver for Textures] hvtex.def: Hyperref driver for VTeX in PDF/PS mode] hvtexhtm.def: Hyperref driver for VTeX in HTML mode] hvtexmrk.def: Hyperref driver for VTeX in PDF/PS mode (pdfmark specials)] hxetex.def: Hyperref driver for XeTeX] hxetex.def: XeTeX driver only supports `unicode=true'. Ignoring\MessageBreak hxetex.def: XeTeX driver only supports\MessageBreak hypertex.def: Hyperref driver for HyperTeX specials] pdfmark.def: \Hy@Message{Sorry, pdfmark drivers do not support FORM gauges}%

However dvisvgm allows you to specify the link style on the commandline so I get an unboxed link with

dvisvgm --linkmark=none --font-format=woff --exact --zoom=-1 -p1,-  filname

with file

\documentclass[dvisvgm,hypertex,onlymath,11pt]{beamer}

\section{Test}

\begin{document}

\begin{frame}

 \usebeamerfont{title}\insertsectionhead\par%

\end{frame}

\end{document}
davidcarlisle commented 5 years ago

A small clarification on my last comment having read more of the dvisvgm manual again... dvisvgm does explicitly support the html-based hypertex specials but these are somewhat limited (predating hyperref) and don't have any direct support for the pdf inspired border style options. Hence the commandline switch.

That said, it is possibly possible to use the literal svg specials to insert what is needed. comparing the output of your test file with and without --link=none shows the diff

<rect fill='none' stroke='#000' stroke-width='0.5' x='-44.153545' y='35.63157' width='25.714819' height='11.027991'/>

PaulSt commented 5 years ago

excellent!! i am sorry, i did not expect this to be a dvisvgm thing!

davidcarlisle commented 5 years ago

Actually I'm going to re-open this, as I say it may be possible to use literal svg specials to do more even without explicit link annotation support in the driver (or maybe the driver could be extended) I'll leave this open to nag me (although I don't plan to do anything in the immediate future)