Knuth in the TeXBook gave an example of "poor
man's bold," (The TeXbook, p. 386) which can be typeset obtained by overprinting the normal weight symbol with slight offsets.
As he says:
The results are somewhat fuzzy, and
they certainly are no match for the
real thing if it's available; but poor
man's bold is better than nothing, and
once in a while you can get away with
it.
Here, one can use a similar technique and the code is shown below:
\documentclass{article}
\usepackage{graphicx,xcolor}
\usepackage{amsmath}
\def\PoorManContour#1#2#3{\leavevmode
\setbox0=\hbox{{#1}}%
\color{#3}\kern-.002em\copy0\kern-\wd0
\color{#3}\raise-.04em\copy0\kern-\wd0
\color{#3}\lower.04em\copy0\kern-\wd0
\color{#3}\raise0.04em\copy0\kern-\wd0
\color{#2}\raise-.012em\copy0\kern-\wd0
\color{#2}\kern.06em\copy0\kern-\wd0
\color{blue}\kern-.020em\lower.003em\box0
}
\begin{document}
\colorbox{gray!5}{\scalebox{5}{\PoorManContour{$\sqrt{\dfrac{A^3_i}{B^2}}$}{gray!60}{gray!60}}}
\end{document}
To achieve the best results possible one has to kern in small steps for possibly twenty steps or so. For simplicity, I have not done that. In the final version, you need to adjust the colors to suit, possibly changing the shading to white.
Edit
After reading Jan's comment below I read the manual and true, as the commenter said the easiest way to achieve what the OP wanted is to include the package without an option i.e., \usepackage{contour}
. Helps to RFM!
I assume this was done by design, seeing as the introduction of hyperlinks may clutter the user's view of the actual text. Moreover, not all hyperlink typesetting is printable - as you've mentioned, the PDF hyperlink is merely "a rectangular area of the page that is mouse-aware". However, if you want to do this, there are two options available
Manual
You deactivate the colorlinks
option so that hyperref
sets the link border:
\hypersetup{%
colorlinks=false,% hyperlinks will be black
linkbordercolor=red,% hyperlink borders will be red
pdfborderstyle={/S/U/W 1}% border style will be underline of width 1pt
}
and typeset the text manually using \color{<color>}
. For example:
...
\begin{document}
\section{To See}\label{tosee}
\hyperref[tosee]{\color{green}just to see}
\end{document}
Note that this is virtually the same as what hyperref
does internally, since the text colour is modified and will typeset this way even if the hyperlink is removed via printing to PDF (or flattening).
The advantage behind this approach (motivating to include it here) is that you can specify different colours for each hyperlink, if you so wish.
Automatic
You activate the colorlinks
option so that hyperref
sets the link colour in the text
\hypersetup{%
colorlinks=true,% hyperlinks will be coloured
linkcolor=green,% hyperlink text will be green
linkbordercolor=red,% hyperlink border will be red
}
and then add the following after the above \hypersetup{...}
:
\makeatletter
\Hy@AtBeginDocument{%
\def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true
\def\@pdfborderstyle{/S/U/W 1}% Overrides border style set with colorlinks=true
% Hyperlink border style will be underline of width 1pt
}
\makeatother
Here is the pdfborderstyle
specification from Adobe:
Best Answer
Use
adjustbox
How to use
cfbox
? This is from manual (ofadjustbox
):With
export
option these keys become available to\includegraphics