I use the hyperref package and defined custom settings as follows:
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{url}
\usepackage{hyperref}
\hypersetup{
bookmarks=true, % show bookmarks bar?
unicode=false, % non-Latin characters in Acrobat’s bookmarks
pdftoolbar=true, % show Acrobat’s toolbar?
pdfmenubar=true, % show Acrobat’s menu?
pdffitwindow=false, % window fit to page when opened
pdfstartview={FitH}, % fits the width of the page to the window
pdftitle={My title}, % title
pdfauthor={Author}, % author
pdfsubject={Subject}, % subject of the document
pdfcreator={Creator}, % creator of the document
pdfproducer={Producer}, % producer of the document
pdfkeywords={keyword1} {key2} {key3}, % list of keywords
pdfnewwindow=true, % links in new window
colorlinks=true, % false: boxed links; true: colored links
linkcolor=red, % color of internal links
citecolor=green, % color of links to bibliography
filecolor=magenta, % color of file links
urlcolor=OliveGreen % color of external links
}
I saw here that I can somehow put these settings into an external file to slim down the preamble. I created a hyperref.sty and moved the \hypersetup{} part in there. I noticed that it is considered in the compilation process, however, it fails.
Question:
What is the proper way to externalize the options for the hyperref package?
xcolorthere is no need to loadcolor. You can externalize the setup in an extra file which can be include byinput– Marco Daniel Sep 7 '12 at 17:32