Using lualatex, I have uderlined links :

enter image description here

Using pdflatex they are gone :

enter image description here




\AtBeginDocument{\hypersetup{pdfborderstyle={/S/U/W .6pt}}}

\tikzset{RndBox/.style args={#1 and #2}{%
    inner sep=0pt,
%   outer sep=0pt,
    rounded corners=2pt,
    minimum width=.6cm,
    minimum height=1.25em,
    text depth = 0ex,
    font = \bfseries\sffamily
    RndBox/.default={gray!25 and black}


    \smash{Labyrinthe}} un lien


\tikz[anchor=base, baseline]
    \node[RndBox,minimum width=20pt] {C} ;
    \smash{Labyrinthe}} un lien

  • What's the purpose of the directive \AtBeginDocument{\hypersetup{pdfborderstyle={/S/U/W .6pt}}}? It seems to do something under LuaLaTeX but not under pdfLaTeX. If I remove this directive, the output of your sample code is the same under both pdfLaTeX and LuaLaTeX. – Mico Feb 7 '18 at 15:46
  • It's the answer I get on this question : tex.stackexchange.com/questions/414073/… – Tarass Feb 7 '18 at 15:48
  • @Mico, is it underlined in your case? My pdflatex returns the same result with and without that command... but both not underlined... – koleygr Feb 7 '18 at 15:51
  • I don't use "pt" in my other answer - hyperref warns that this is invalid syntax. pdfborderstyle={/S/U/W .6} works fine for me. – Ulrike Fischer Feb 7 '18 at 15:54
  • 1
    This works fine for me too. That solves question. Please write an answser. I run texlive 2017 : pdfTeX 3.14159265-2.6-1.40.18 (TeX Live 2017) – Tarass Feb 7 '18 at 15:55

The pdflatex code of hyperref contains some syntax checks. According to this checks your syntax of the pdfborderstyle option is wrong (there should be no pt in the value). hyperref warns you in the log (of the pdflatex compilation) that it will ignore the option:

Package hyperref Warning: Invalid value `/S/S/W 0.6pt'
(hyperref)                for option `pdfborderstyle'.
(hyperref)                Option setting is ignored on input line 146.

The luatex code doesn't have such a check. I don't know if the syntax is really invalid -- perhaps not as it works for luatex. But at least for pdflatex you should change the option to

  \AtBeginDocument{\hypersetup{pdfborderstyle={/S/S/W 0.6}}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.