# pdflatex vs lualatex underline mystery

Using lualatex, I have uderlined links :

Using pdflatex they are gone :

\documentclass[french]{article}

\usepackage{xcolor,hyperref,tikz}

\hypersetup{%
urlcolor=blue,
urlbordercolor=blue}

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

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

\begin{document}

\href{%
https://studio.code.org/s/course3/stage/2/puzzle/1}{%
\smash{Labyrinthe}} un lien

\medskip

\tikz[anchor=base, baseline]
\node[RndBox,minimum width=20pt] {C} ;
\href{%
https://studio.code.org/s/course3/stage/2/puzzle/1}{%
\smash{Labyrinthe}} un lien

\end{document}

• 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
• 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'

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