TeX - LaTeX Asked by Ulrike Fischer on July 14, 2021
Update 2021 In a new driver for hyperref that I’m developing as part of the "LaTeX tagged PDF" project I use the colors suggested by Phelype Oleinik as default colors. All other suggestions have been added as color scheme and can be chosen with an option.
There have been some complaints that the default colors of hyperref
aren’t so great. So here your chance for better defaults. Suggest a new set of color. The best one will be either the default (if we dare to change it) or added through an option, e.g. nicecolors
.
(there is also a anchorcolor
option, but the color isn’t used anywhere so I left it out).
You can enter any color you want and in what ever syntax you prefer. Adding options to xcolor or loading some other package is fine too.
documentclass{article}
usepackage{xcolor}
usepackage[colorlinks]{hyperref}
%setup new colors
hypersetup{
% linkcolor=
%,citecolor=
%,filecolor=
%,urlcolor=
%,menucolor=
%,runcolor=
%,linkbordercolor=
%,citebordercolor=
%,filebordercolor=
%,urlbordercolor=
%,menubordercolor=
%,runbordercolor=
}
begin{document}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkcolor} & ref{sec} \
textcolor{green}{green, citecolor}& cite{cite} \
textcolor{cyan}{cyan, filecolor} & href{example-image.pdf}{file}\
textcolor{magenta}{magenta, urlcolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{cyan}{cyan, runcolor} & href{run:sumatra}{run something}
end{tabular}
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 1} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkbordercolor} & ref{sec} \
textcolor{green}{green, citebordercolor}& cite{cite} \
textcolor{teal}{teal, filebordercolor} & href{example-image.pdf}{file}\
textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menubordercolor} & Acrobatmenu{View}{View Something}\
textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor} & href{run:sumatra}{run something}
end{tabular}
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Here's a proposal (the default color
column is (unsurprisingly) the default colour, and the example
column is the ones I'm suggesting):
I tried to stick to darker colours because too bright ones, especially pure (#FFFF00
), but also (#00FF00
) and (#00FFFF
), are terrible to read, both in PDF print. Note that in the picture above the menu colour is still a bit bright; yellow is not a good colour to put on a white background. . .
The first three colours I chose based on some colours I used for my own documents (one red, one green and one blue), and the other three I tried to pick so that they were different enough from the first ones. The border colours are the same as the text colours, except that they are mixed with white, so that the border doesn't punch you in the face when you look at it. I also changed the width of the border from 1
to 0.3
, if that's a valid option.
I also tweaked the original colours I had so that they look different enough for people with the three severe types of colour blindness (colour blindness simulated using Color Oracle):
I also chose less bright colours so that greyscale print of documents will also be readable (though hidelinks
is a better option in this scenario). The brightest colour (the View Something
text in the left column) is still darker than about half of the default colours (results may vary depending on how you compute brightness).
Here's the code:
documentclass{article}
usepackage{xcolor}
usepackage[margin=1.5cm]{geometry}
usepackage{multicol}
usepackage[colorlinks]{hyperref}
deftmp#1#2#3{%
definecolor{Hy#1color}{#2}{#3}%
hypersetup{#1color=Hy#1color}}
tmp{link}{HTML}{800006}
tmp{cite}{HTML}{2E7E2A}
tmp{file}{HTML}{131877}
tmp{url} {HTML}{8A0087}
tmp{menu}{HTML}{727500}
tmp{run} {HTML}{137776}
deftmp#1#2{%
colorlet{Hy#1bordercolor}{Hy#1color#2}%
hypersetup{#1bordercolor=Hy#1bordercolor}}
tmp{link}{!60!white}
tmp{cite}{!60!white}
tmp{file}{!60!white}
tmp{url} {!60!white}
tmp{menu}{!60!white}
tmp{run} {!60!white}
begin{document}
begin{multicols}{2}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkcolor} & ref{sec} \
textcolor{green}{green, citecolor}& cite{cite} \
textcolor{cyan}{cyan, filecolor} & href{example-image.pdf}{file}\
textcolor{magenta}{magenta, urlcolor}& url{www.latex-project.org}\
textcolor{red}{red, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{cyan}{cyan, runcolor} & href{run:sumatra}{run something}\
end{tabular}
You can read more in section~ref{sec} and in~cite{cite}. Both of which
contain a~href{example-image.pdf}{file} that can also be found at
url{www.latex-project.org}. Such file helps you Acrobatmenu{View}{View
Something} or, alternatively href{run:sumatra}{run something}, which is
rather nice.
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 0.3} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkbordercolor} & ref{sec} \
textcolor{green}{green, citebordercolor}& cite{cite} \
textcolor{teal}{teal, filebordercolor} & href{example-image.pdf}{file}\
textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& url{www.latex-project.org}\
textcolor{red}{red, menubordercolor} & Acrobatmenu{View}{View Something}\
textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor} & href{run:sumatra}{run something}\
end{tabular}
You can read more in section~ref{sec} and in~cite{cite}. Both of which
contain a~href{example-image.pdf}{file} that can also be found at
url{www.latex-project.org}. Such file helps you Acrobatmenu{View}{View
Something} or, alternatively href{run:sumatra}{run something}, which is
rather nice.
end{multicols}
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Answered by Phelype Oleinik on July 14, 2021
I like Phelypes suggestions. Just wanted to add some that we have used for a few books (that are also available as PDF files). We always use the colorlinks option and does not differentiate between file and url.
They are either different colors or darker versions of the default, mainly chosen such that they do not disturb the reading experince.
documentclass{article}
usepackage{xcolor}
usepackage[colorlinks]{hyperref}
%setup new colors
hypersetup{
linkcolor={[rgb]{0,0.2,0.6}},
citecolor={[rgb]{0,0.6,0.2}},
filecolor={[rgb]{0.8,0,0.8}},
urlcolor={[rgb]{0.8,0,0.8}},
runcolor={[rgb]{0.8,0,0.8}}, % defaults to filecolor but it missing an
% expansion for this syntax
menucolor={[rgb]{0,0.2,0.6}}, % I never set or use this, so we'll see
% it to link color
linkbordercolor={[rgb]{0,0.2,0.6}},
citebordercolor={[rgb]{0,0.6,0.2}},
filebordercolor={[rgb]{0.8,0,0.8}},
urlbordercolor={[rgb]{0.8,0,0.8}},
runbordercolor={[rgb]{0.8,0,0.8}},
menubordercolor={[rgb]{0,0.2,0.6}},
}
begin{document}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkcolor} & ref{sec} \
textcolor{green}{green, citecolor}& cite{cite} \
textcolor{cyan}{cyan, filecolor} & href{example-image.pdf}{file}\
textcolor{magenta}{magenta, urlcolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{cyan}{cyan, runcolor} & href{run:sumatra}{run something}
end{tabular}
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 1} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkbordercolor} & ref{sec} \
textcolor{green}{green, citebordercolor}& cite{cite} \
textcolor{teal}{teal, filebordercolor} & href{example-image.pdf}{file}\
textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menubordercolor} & Acrobatmenu{View}{View Something}\
textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor} & href{run:sumatra}{run something}
end{tabular}
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Answered by daleif on July 14, 2021
My personal preference would be that most link should be a uniform NavyBlue (vote here for that option).
Furthermore, the default should be colorlinks
and not border. Borders are not easy to see and they are misrendered in Preview.app on macOS (see screenshot at end of this post). However, border don't print by default, so some may prefer them to colorlinks
.
All that said, here is a proposal in which most types of links are still distinguishable. The most common types of links, i.e. internal link, and citations, are a different shade of the same colour that is currently used, so that people familiar with the meaning of these colours would not be confused. Weblinks are blue, as this is the de-fact standard on the web.
The screenshot is from Acrobat on macOS.
documentclass{article}
usepackage[dvipsnames]{xcolor}
usepackage[colorlinks]{hyperref}
%setup new colors
hypersetup{
linkcolor=BrickRed
,citecolor=Green
,filecolor=Mulberry
,urlcolor=NavyBlue
,menucolor=BrickRed
,runcolor=Mulberry
,linkbordercolor=BrickRed
,citebordercolor=Green
,filebordercolor=Mulberry
,urlbordercolor=NavyBlue
,menubordercolor=BrickRed
,runbordercolor=Mulberry
}
begin{document}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default color & example hline
textcolor{BrickRed}{BrickRed, linkcolor} & ref{sec} \
textcolor{Green}{Green, citecolor}& cite{cite} \
textcolor{Mulberry}{Mulberry, filecolor} & href{example-image.pdf}{file}\
textcolor{NavyBlue}{NavyBlue, urlcolor}& url{https://www.latex-project.org/}\
textcolor{BrickRed}{BrickRed, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{Mulberry}{Mulberry, runcolor} & href{run:sumatra}{run something}
end{tabular}
subsection*{Example text}
You can read more in section~ref{sec} and in~cite{cite}. Both of which
contain a~href{example-image.pdf}{file} that can also be found at
url{www.latex-project.org}. Such file helps you Acrobatmenu{View}{View
Something} or, alternatively href{run:sumatra}{run something}, which is
rather nice.
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 1} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{BrickRed}{BrickRed, linkbordercolor} & ref{sec} \
textcolor{Green}{Green, citebordercolor}& cite{cite} \
textcolor{Mulberry}{Mulberry, filebordercolor} & href{example-image.pdf}{file}\
textcolor{NavyBlue}{NavyBlue, urlbordercolor}& url{https://www.latex-project.org/}\
textcolor{BrickRed}{BrickRed, menubordercolor} & Acrobatmenu{View}{View Something}\
textcolor{Mulberry}{Mulberry, runbordercolor} & href{run:sumatra}{run something}
end{tabular}
subsection*{Example text}
You can read more in section~ref{sec} and in~cite{cite}. Both of which
contain a~href{example-image.pdf}{file} that can also be found at
url{www.latex-project.org}. Such file helps you Acrobatmenu{View}{View
Something} or, alternatively href{run:sumatra}{run something}, which is
rather nice.
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
The following is what frequently happens in Preview.app on macOS when using a non-retina screen. Preview.app is one of the most common PDF viewers. Therefore, whether or not this is a bug in Preview, borders should not be the default. colorlinks
is always better.
Answered by Szabolcs on July 14, 2021
For voting purposes, I post a second answer in which most link types have the same colour. I chose NavyBlue
for this because blue is the typical link colour on the web. Those link types which could be considered a security issue may have another, more alerting colour, such as Red
. I will let others decide which link types should be highlighted this way. For this demo, I chose file, menu and run. Some may consider file links to be more akin to url links than to run links, and may therefore prefer them to be blue.
documentclass{article}
usepackage[dvipsnames]{xcolor}
usepackage[colorlinks]{hyperref}
%setup new colors
hypersetup{
linkcolor=NavyBlue
,citecolor=NavyBlue
,filecolor=Red
,urlcolor=NavyBlue
,menucolor=Red
,runcolor=Red
,linkbordercolor=NavyBlue
,citebordercolor=NavyBlue
,filebordercolor=Red
,urlbordercolor=NavyBlue
,menubordercolor=Red
,runbordercolor=Red
}
begin{document}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default color & example hline
textcolor{NavyBlue}{NavyBlue, linkcolor} & ref{sec} \
textcolor{NavyBlue}{NavyBlue, citecolor}& cite{cite} \
textcolor{Red}{Red, filecolor} & href{example-image.pdf}{file}\
textcolor{NavyBlue}{NavyBlue, urlcolor}& url{https://www.latex-project.org/}\
textcolor{Red}{Red, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{Red}{Red, runcolor} & href{run:sumatra}{run something}
end{tabular}
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 1} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{NavyBlue}{NavyBlue, linkbordercolor} & ref{sec} \
textcolor{NavyBlue}{NavyBlue, citebordercolor}& cite{cite} \
textcolor{Red}{Red, filebordercolor} & href{example-image.pdf}{file}\
textcolor{NavyBlue}{NavyBlue, urlbordercolor}& url{https://www.latex-project.org/}\
textcolor{Red}{Red, menubordercolor} & Acrobatmenu{Red}{View Something}\
textcolor{Red}{Red, runbordercolor} & href{run:sumatra}{run something}
end{tabular}
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Answered by Szabolcs on July 14, 2021
Somewhat in accordance with the 'henry ford color scheme' I suggest an even dark gray (60%) across all hyperrefs (with colorlinks as defaults as Szabolcs suggested). Additional bonuses are: No trouble with printing grayscale and no trouble with color vision deficiencies.
About the links being colored for safety (i.e. in order to tell where they lead to): most pdf-viewers should give you a heads-up if a link leads to something off your machine anyway.
documentclass{article}
usepackage{xcolor}
usepackage[colorlinks]{hyperref}
definecolor{darkgray}{HTML}{666666}
%setup new colors
hypersetup{
linkcolor=darkgray
,citecolor=darkgray
,filecolor=darkgray
,urlcolor=darkgray
,menucolor=darkgray
,runcolor=darkgray
,linkbordercolor=darkgray
,citebordercolor=darkgray
,filebordercolor=darkgray
,urlbordercolor=darkgray
,menubordercolor=darkgray
,runbordercolor=darkgray
}
begin{document}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkcolor} & ref{sec} \
textcolor{green}{green, citecolor}& cite{cite} \
textcolor{cyan}{cyan, filecolor} & href{example-image.pdf}{file}\
textcolor{magenta}{magenta, urlcolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{cyan}{cyan, runcolor} & href{run:sumatra}{run something}
end{tabular}
bigskip
In running text ref{sec} these cite{cite} refs shoud still be quite visible: href{example-image.pdf}{file}. Check url{https://www.latex-project.org/} for more information, Acrobatmenu{View}{View Something} if it helps, or even href{run:sumatra}{run something}.
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 1} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkbordercolor} & ref{sec} \
textcolor{green}{green, citebordercolor}& cite{cite} \
textcolor{teal}{teal, filebordercolor} & href{example-image.pdf}{file}\
textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menubordercolor} & Acrobatmenu{View}{View Something}\
textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor} & href{run:sumatra}{run something}
end{tabular}
bigskip
In running text ref{sec} these cite{cite} refs shoud still be quite visible: href{example-image.pdf}{file}. Check url{https://www.latex-project.org/} for more information, Acrobatmenu{View}{View Something} if it helps, or even href{run:sumatra}{run something}.
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Answered by TivV on July 14, 2021
One could argue that the default colours do not need to distinguish between all six kinds of links. Semantically it makes sense to visually highlight the difference between internal links within the document, and external links to other files or web sites.
Here is a proposal using the popular 5-class RdBu
color scheme from colorbrewer2.org which is both print friendly and colourblind safe. Using tex.stackexchange.com/a/117959/24165 the internal colour is also used for footnotes.
documentclass{article}
usepackage{xcolor}
usepackage[colorlinks]{hyperref}
usepackage{etoolbox}
makeatletter
def@footnotecolor{red}
define@key{Hyp}{footnotecolor}{%
HyColor@HyperrefColor{#1}@footnotecolor%
}
patchcmd{@footnotemark}{hyper@linkstart{link}}{hyper@linkstart{footnote}}{}{}
makeatother
definecolor{intcolor}{HTML}{CA0020}
definecolor{extcolor}{HTML}{0571B0}
%setup new colors
hypersetup{
linkcolor=intcolor
,citecolor=intcolor
,filecolor=extcolor
,urlcolor=extcolor
,menucolor=intcolor
,runcolor=extcolor
,linkbordercolor=intcolor
,citebordercolor=intcolor
,filebordercolor=extcolor
,urlbordercolor=extcolor
,menubordercolor=intcolor
,runbordercolor=extcolor
,footnotecolor=intcolor
}
begin{document}
section{hyperref colors / colorlinks}label{sec}
begin{tabular}{lll}
default colorfootnote{internal color used for footnotes} & example hline
textcolor{red}{red, linkcolor} & ref{sec} \
textcolor{green}{green, citecolor}& cite{cite} \
textcolor{cyan}{cyan, filecolor} & href{example-image.pdf}{file}\
textcolor{magenta}{magenta, urlcolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menucolor} & Acrobatmenu{View}{View Something}\
textcolor{cyan}{cyan, runcolor} & href{run:sumatra}{run something}
end{tabular}
section{hyperref colors / border }
makeatletterdef@pdfborder{1 1 1} defHyColor@UseColor#1{}makeatother
begin{tabular}{lll}
default color & example hline
textcolor{red}{red, linkbordercolor} & ref{sec} \
textcolor{green}{green, citebordercolor}& cite{cite} \
textcolor{teal}{teal, filebordercolor} & href{example-image.pdf}{file}\
textcolor[rgb]{0,1,1}{rgb 0,1,1, urlbordercolor}& url{https://www.latex-project.org/}\
textcolor{red}{red, menubordercolor} & Acrobatmenu{View}{View Something}\
textcolor[rgb]{0,0.7,0.7}{rgb 0,0.7,0.7, runbordercolor} & href{run:sumatra}{run something}
end{tabular}
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Answered by Julian on July 14, 2021
% Based on https://tex.stackexchange.com/questions/525261 (Ulrike's code)
documentclass{article}
usepackage{xcolor}
usepackage[colorlinks]{hyperref}
% Set 1
definecolor{MK_One_One}{RGB}{140,81,10}
definecolor{MK_One_Two}{RGB}{216,179,101}
definecolor{MK_One_Three}{RGB}{246,232,195}
definecolor{MK_One_Four}{RGB}{199,234,229}
definecolor{MK_One_Five}{RGB}{90,180,172}
definecolor{MK_One_Six}{RGB}{1,102,94}
%setup new colors 1
hypersetup{
linkcolor=MK_One_One
,citecolor=MK_One_Two
,filecolor=MK_One_Three
,urlcolor= MK_One_Six
,menucolor=MK_One_Five
,runcolor=MK_One_Four
,linkbordercolor=MK_One_One
,citebordercolor=MK_One_Two
,filebordercolor=MK_One_Three
,urlbordercolor=MK_One_Six
,menubordercolor=MK_One_Five
,runbordercolor=MK_One_Four
}
begin{document}
tableofcontents
noindent
Based on url{https://colorbrewer2.org/#type=diverging&scheme=BrBG&n=6}.
section{Proposal 1}label{sec}
subsection{Colorlinks}
begin{tabular}{lll}
Type & Example hline
texttt{linkcolor} & ref{sec} \
texttt{citecolor} & cite{cite} \
texttt{filecolor} & href{example-image.pdf}{file}\
texttt{urlcolor} & url{https://www.latex-project.org/}\
texttt{menucolor} & Acrobatmenu{View}{View Something}\
texttt{runcolor} & href{run:sumatra}{run something}
end{tabular}
subsection{Borders}
makeatletter
def@pdfborder{1 1 1}
defHyColor@UseColor#1{}
makeatother
begin{tabular}{lll}
Type & Example hline
texttt{linkbordercolor} & ref{sec} \
texttt{citebordercolor} & cite{cite} \
texttt{filebordercolor} & href{example-image.pdf}{file}\
texttt{urlbordercolor} & url{https://www.latex-project.org/}\
texttt{menubordercolor} & Acrobatmenu{View}{View Something}\
texttt{runbordercolor} & href{run:sumatra}{run something}
end{tabular}
makeatletter
def@pdfborder{0 0 0}
defHyColor@UseColor#1{%
ifxrelax#1@empty
else
ifx@empty#1@empty
else
expandafterexpandafterexpandafterHyColor@@UseColor#1@nil
fi
fi
}
makeatother
% ========================================================
% Set 2
definecolor{MK_Two_One}{RGB}{178,24,43}
definecolor{MK_Two_Two}{RGB}{239,138,98}
definecolor{MK_Two_Three}{RGB}{253,219,199}
definecolor{MK_Two_Four}{RGB}{209,229,240}
definecolor{MK_Two_Five}{RGB}{103,169,207}
definecolor{MK_Two_Six}{RGB}{33,102,172}
%setup new colors 2
hypersetup{
linkcolor=MK_Two_One
,citecolor=MK_Two_Two
,filecolor=MK_Two_Three
,urlcolor= MK_Two_Six
,menucolor=MK_Two_Five
,runcolor=MK_Two_Four
,linkbordercolor=MK_Two_One
,citebordercolor=MK_Two_Two
,filebordercolor=MK_Two_Three
,urlbordercolor=MK_Two_Six
,menubordercolor=MK_Two_Five
,runbordercolor=MK_Two_Four
}
section{Proposal 2}
subsection{Colorlinks}
begin{tabular}{lll}
Type & Example hline
texttt{linkcolor} & ref{sec} \
texttt{citecolor} & cite{cite} \
texttt{filecolor} & href{example-image.pdf}{file}\
texttt{urlcolor} & url{https://www.latex-project.org/}\
texttt{menucolor} & Acrobatmenu{View}{View Something}\
texttt{runcolor} & href{run:sumatra}{run something}
end{tabular}
subsection{Borders}
makeatletter
def@pdfborder{1 1 1}
defHyColor@UseColor#1{}
makeatother
begin{tabular}{lll}
Type & Example hline
texttt{linkbordercolor} & ref{sec} \
texttt{citebordercolor} & cite{cite} \
texttt{filebordercolor} & href{example-image.pdf}{file}\
texttt{urlbordercolor} & url{https://www.latex-project.org/}\
texttt{menubordercolor} & Acrobatmenu{View}{View Something}\
texttt{runbordercolor} & href{run:sumatra}{run something}
end{tabular}
makeatletter
def@pdfborder{0 0 0}
defHyColor@UseColor#1{%
ifxrelax#1@empty
else
ifx@empty#1@empty
else
expandafterexpandafterexpandafterHyColor@@UseColor#1@nil
fi
fi
}
makeatother
% ========================================================
% Set 3
definecolor{MK_Three_One}{RGB}{118,42,131}
definecolor{MK_Three_Two}{RGB}{175,141,195}
definecolor{MK_Three_Three}{RGB}{231,212,232}
definecolor{MK_Three_Four}{RGB}{217,240,211}
definecolor{MK_Three_Five}{RGB}{127,191,123}
definecolor{MK_Three_Six}{RGB}{27,120,55}
%setup new colors 3
hypersetup{
linkcolor=MK_Three_One
,citecolor=MK_Three_Two
,filecolor=MK_Three_Three
,urlcolor= MK_Three_Six
,menucolor=MK_Three_Five
,runcolor=MK_Three_Four
,linkbordercolor=MK_Three_One
,citebordercolor=MK_Three_Two
,filebordercolor=MK_Three_Three
,urlbordercolor=MK_Three_Six
,menubordercolor=MK_Three_Five
,runbordercolor=MK_Three_Four
}
section{Proposal 3}
subsection{Colorlinks}
begin{tabular}{lll}
Type & Example hline
texttt{linkcolor} & ref{sec} \
texttt{citecolor} & cite{cite} \
texttt{filecolor} & href{example-image.pdf}{file}\
texttt{urlcolor} & url{https://www.latex-project.org/}\
texttt{menucolor} & Acrobatmenu{View}{View Something}\
texttt{runcolor} & href{run:sumatra}{run something}
end{tabular}
subsection{Borders}
makeatletter
def@pdfborder{1 1 1}
defHyColor@UseColor#1{}
makeatother
begin{tabular}{lll}
Type & Example hline
texttt{linkbordercolor} & ref{sec} \
texttt{citebordercolor} & cite{cite} \
texttt{filebordercolor} & href{example-image.pdf}{file}\
texttt{urlbordercolor} & url{https://www.latex-project.org/}\
texttt{menubordercolor} & Acrobatmenu{View}{View Something}\
texttt{runbordercolor} & href{run:sumatra}{run something}
end{tabular}
makeatletter
def@pdfborder{0 0 0}
defHyColor@UseColor#1{%
ifxrelax#1@empty
else
ifx@empty#1@empty
else
expandafterexpandafterexpandafterHyColor@@UseColor#1@nil
fi
fi
}
makeatother
% ========================================================
% Set 4
definecolor{MK_Two_One}{RGB}{178,24,43}
definecolor{MK_Two_Two}{RGB}{239,138,98}
definecolor{MK_Two_Three}{RGB}{253,219,199}
definecolor{MK_Two_Four}{RGB}{209,229,240}
definecolor{MK_Two_Five}{RGB}{103,169,207}
definecolor{MK_Two_Six}{RGB}{33,102,172}
%setup new colors 4
hypersetup{
linkcolor=MK_Two_One
,citecolor=MK_Two_One
,filecolor=MK_Two_Two
,urlcolor= MK_Two_One
,menucolor=MK_Two_Six
,runcolor=MK_Two_Five
,linkbordercolor=MK_Two_One
,citebordercolor=MK_Two_Two
,filebordercolor=MK_Two_Three
,urlbordercolor=MK_Two_Six
,menubordercolor=MK_Two_Five
,runbordercolor=MK_Two_Four
}
section{Proposal 4}
subsection{Colorlinks}
begin{tabular}{lll}
Type & Example hline
texttt{linkcolor} & ref{sec} \
texttt{citecolor} & cite{cite} \
texttt{filecolor} & href{example-image.pdf}{file}\
texttt{urlcolor} & url{https://www.latex-project.org/}\
texttt{menucolor} & Acrobatmenu{View}{View Something}\
texttt{runcolor} & href{run:sumatra}{run something}
end{tabular}
subsection{Borders}
makeatletter
def@pdfborder{1 1 1}
defHyColor@UseColor#1{}
makeatother
begin{tabular}{lll}
Type & Example hline
texttt{linkbordercolor} & ref{sec} \
texttt{citebordercolor} & cite{cite} \
texttt{filebordercolor} & href{example-image.pdf}{file}\
texttt{urlbordercolor} & url{https://www.latex-project.org/}\
texttt{menubordercolor} & Acrobatmenu{View}{View Something}\
texttt{runbordercolor} & href{run:sumatra}{run something}
end{tabular}
makeatletter
def@pdfborder{0 0 0}
defHyColor@UseColor#1{%
ifxrelax#1@empty
else
ifx@empty#1@empty
else
expandafterexpandafterexpandafterHyColor@@UseColor#1@nil
fi
fi
}
makeatother
begin{thebibliography}{99}
bibitem{cite} some text
end{thebibliography}
end{document}
Answered by Dr. Manuel Kuehner on July 14, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP