我正在编写以下文档。如您所见,它仅显示在一页上,因此为了不使它成为一幅彩色画,我关闭了最终 PDF 中显示的众多链接周围的彩色矩形。
我想只在某些链接上显示彩色矩形。我该怎么做?据我所知,该选项是开/关选项,可在序言中设置。
这里是 MWE
\documentclass[11pt, a4]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{fullpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{} %\includegraphics[width=2.5cm]{Logo}}
\lfoot{\href{www.facebook.com}{www.facebook.com/mypage}}
\cfoot{}
\rfoot{\href{mailto: [email protected]}{[email protected]}}
\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.0pt}
\setlength\parindent{0pt}
\usepackage{lipsum}
% ----------------------------------------------------
\begin{document}
\thispagestyle{fancy}
\begin{center}
\includegraphics[width=200pt]{Image} \\[10pt]
\Huge \textbf{My Name} \\[5pt]
\Large My home town \\ My Birthday \\
\end{center}
\textbf{BIOGRAFY} \\
\lipsum[3]
\parbox{0.5\textwidth}{}
\vfill
Text with one hyperlink \href{www.facebook.com} {www.facebook.com/mypage} \\[10pt]
\textbf{Link with a colored rectangle} - \href{http://goo.gl}{www.goo.gl} \\
\textbf{Link with a colored rectangle} - \href{http://goo.gl}{www.goo.gl} \\[10pt]
\end{document}
答案1
以下是本地启用边框的版本:
\documentclass[11pt, a4]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{fullpage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{}
\chead{}
\rhead{} %\includegraphics[width=2.5cm]{Logo}}
\lfoot{\href{www.facebook.com}{www.facebook.com/mypage}}
\cfoot{}
\rfoot{\href{mailto: [email protected]}{[email protected]}}
\renewcommand{\headrulewidth}{0.0pt}
\renewcommand{\footrulewidth}{0.0pt}
\setlength\parindent{0pt}
\usepackage{lipsum}
% ----------------------------------------------------
\begin{document}
\thispagestyle{fancy}
\begin{center}
\includegraphics[width=200pt]{Image} \\[10pt]
\Huge \textbf{My Name} \\[5pt]
\Large My home town \\ My Birthday \\
\end{center}
\textbf{BIOGRAFY} \\
\lipsum[3]
\parbox{0.5\textwidth}{}
\vfill
Text with one hyperlink \href{www.facebook.com} {www.facebook.com/mypage} \\[10pt]
\hypersetup{pdfborder=1 1 1}
\textbf{Link with a colored rectangle} - \href{http://goo.gl}{www.goo.gl} \\
\textbf{Link with a colored rectangle} - \href{http://goo.gl}{www.goo.gl} \\[10pt]
\hypersetup{hidelinks}
\href{http://goo.gl}{Test}
\end{document}