diff options
Diffstat (limited to 'macros/latex/contrib/stex/tex/etc/stex-highlighting.sty')
-rw-r--r-- | macros/latex/contrib/stex/tex/etc/stex-highlighting.sty | 59 |
1 files changed, 46 insertions, 13 deletions
diff --git a/macros/latex/contrib/stex/tex/etc/stex-highlighting.sty b/macros/latex/contrib/stex/tex/etc/stex-highlighting.sty index 0cd04872a1..ec0058d519 100644 --- a/macros/latex/contrib/stex/tex/etc/stex-highlighting.sty +++ b/macros/latex/contrib/stex/tex/etc/stex-highlighting.sty @@ -1,5 +1,16 @@ %\RequirePackage{xcolor} \RequirePackage{pdfcomment} +\RequirePackage{l3keys2e} +\ExplSyntaxOn + +\keys_define:nn { stexhighlighting / pkg}{ + boxes .default:n = {true}, + boxes .bool_set:N = \c_stexhighlighting_boxes_bool, +} + +\ProcessKeysOptions{ stexhighlighting / pkg} + +\ExplSyntaxOff \def\compemph#1{% \ifcsname textcolor\endcsname @@ -28,20 +39,40 @@ } \def\varemph#1{\ifcsname textcolor\endcsname\textcolor{gray}{#1}\else#1\fi} -\protected\def\compemph@uri#1#2{% - \pdftooltip{% - \srefsymuri{#2}{\compemph{#1}}% - }{% - URI:~\detokenize{#2}% - }% +\ExplSyntaxOn + +\bool_if:NTF\c_stexhighlighting_boxes_bool{ + \protected\def\compemph@uri#1#2{ + \pdftooltip{ + \srefsymuri{#2}{\compemph{#1}} + }{ + URI:~\detokenize{#2} + } + } + \protected\def\symrefemph@uri#1#2{ + \pdftooltip{ + \srefsymuri{#2}{\symrefemph{#1}} + }{ + URI:~\detokenize{#2} + } + } +}{ + \protected\def\compemph@uri#1#2{ + \pdftooltip{{\hypersetup{pdfborder={0~0~0}} + \srefsymuri{#2}{\compemph{#1}} + }}{ + URI:~\detokenize{#2} + } + } + \protected\def\symrefemph@uri#1#2{ + \pdftooltip{{\hypersetup{pdfborder={0~0~0}} + \srefsymuri{#2}{\symrefemph{#1}} + }}{ + URI:~\detokenize{#2} + } + } } -\protected\def\symrefemph@uri#1#2{% - \pdftooltip{% - \srefsymuri{#2}{\symrefemph{#1}}% - }{% - URI:~\detokenize{#2}% - }% - } + \protected\def\defemph@uri#1#2{% \pdftooltip{% \defemph{#1}% @@ -56,3 +87,5 @@ Variable~\detokenize{#2}% }% } + +\ExplSyntaxOff
\ No newline at end of file |