Update: moderncv
loads the package hyperref
by itself with its own hypersetup
. From moderncv.cls
,
Hence, you need not load hyperref
again. But load the hypersetup
using \AfterPreamble
(or \AtBeginDocument
) hook as in this code:
\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[green]{classic}
\usepackage[scale=0.8]{geometry}
\AtBeginDocument{\recomputelengths}
\firstname{Rob}
\familyname{Ward}
\mobile{mobile +64 21 0377 936}
\phone{phone +64 6 212 0549}
\email{contact@robward.co.nz}
\homepage{www.robward.co.nz}
\AfterPreamble{\hypersetup{
pdfauthor={Rob Ward},
pdftitle={CV for Rob Ward},
pdfsubject={Detailed CV for Rob},
urlcolor=blue,
}}
\begin{document}
% EDUCATION
\section{Education}
\cventry{2006--2011}{PhD physics/biophysics}{Massey University}{Palmerston
North}{New Zealand}{} % arguments 3 to 6 can be left empty
\cventry{1999--2004}{BSc (hons.) physics}{Victoria
University}{Wellington}{New Zealand}{}
\cventry{1999--2002}{BSc mathematics}{Victoria University}{Wellington}{New
Zealand}{}
\cventry{1988--1989}{NCEE}{Central Institute of Technology}{Wellington}{New
Zealand}{}
\end{document}
The pdf properties will then look like:
Earlier attempt:
\PassOptionsToPackage{pdftex,
pdfauthor={Rob Ward},
pdftitle={CV for Rob Ward},
pdfsubject={Detailed CV for Rob},
urlcolor={blue}}{hyperref}
\documentclass[11pt,a4paper]{moderncv}
\moderncvtheme[green]{classic}
\usepackage[scale=0.8]{geometry}
\AtBeginDocument{\recomputelengths}
\firstname{Rob}
\familyname{Ward}
\mobile{mobile +64 21 0377 936}
\phone{phone +64 6 212 0549}
\email{contact@robward.co.nz}
\homepage{www.robward.co.nz}
%\usepackage[pdftex,
% pdfauthor={Rob Ward},
% pdftitle={CV for Rob Ward},
% pdfsubject={Detailed CV for Rob},
% urlcolor={blue}]{hyperref}
\begin{document}
% EDUCATION
\section{Education}
\cventry{2006--2011}{PhD physics/biophysics}{Massey University}{Palmerston North}{New Zealand}{} % arguments 3 to 6 can be left empty
\cventry{1999--2004}{BSc (hons.) physics}{Victoria University}{Wellington}{New Zealand}{}
\cventry{1999--2002}{BSc mathematics}{Victoria University}{Wellington}{New Zealand}{}
\cventry{1988--1989}{NCEE}{Central Institute of Technology}{Wellington}{New Zealand}{}
\end{document}
Note: Noting the comments of Heiko Oberdiek,
Package hyperref does a lot of redefinitions in order to support
non-ASCII stuff in strings for bookmarks and entries in the
information dictionary of PDF files. Much of this support gets lost,
if LaTeX expands the options the hard way before hyperref has a chance
to see them. Therefore it is better to set the information entries
after hyperref is loaded.
this is not always advisable. In this case, it won't give desired results as the hypersetup
is over-written later by the moderncv
itself.
I faced the same issue (for Portuguese language) and solved as follows:
- The reported issue occurred to me only when a non-Latin character
appeared in an input TeX file (e.g., chapter1.tex, chapter2.tex,
etc.) called in main TeX file (e.g., thesis.tex). Note that for the
main TeX file the package
\usepackage[latin1]{inputenc}
was working
properly;
- It must be mentioned that I'm using WinEdt 9.0 editor;
- So, I set the "document mode" of main file (e.g., thesis.tex) as "TeX" and
its "Document Format" as "ANSI - 0 Default ANSI code page";
- Similarly, I set the "document mode" of auxiliary files (e.g.,
chapter1.tex, chapter2.tex, etc.) as "TeX" and their "Document
Format" as "ANSI - 0 Default ANSI code page".
In summary: before, each file was configured in different input modes. So, MikTex was unable to compile all them with "latin1" codification. Standardize all files to TeX and ANSI and call the inputenc
package just once.
Best Answer
I just stumbled upon the same issue with the frontiers style. You can add
in line 25 of
frontiersSCNS.cls
and usein your document. I've submitted this suggestion also to the frontiers editorial office.