Fixed xelatex and luatex compilation errors due to ifpdf checks

This commit is contained in:
Xavier Danaux
2010-07-20 19:54:24 -04:00
committed by Xavier Danaux
parent 03e827c31b
commit 79f0e6d7bf
3 changed files with 19 additions and 24 deletions

View File

@ -1,3 +1,11 @@
version 0.11 (xx July 2010)
- removed the \ifpdf check when loading the graphicx package, as graphicx does
does check internally and this was preventing proper functionning with xelatex
and luatex, as reported by A. Trautmann. The same check was also removed
everywhere else in the document (i.e. when loading the color and hyperref
packages).
-
version 0.10 (13 June 2010)
- fixed a compatibility issue with the natbib package (natbib uses \section*
to format the bibliography title, while only \section was defined by moderncv),

View File

@ -32,9 +32,8 @@
\def\FileSubject{Cover letter}
\def\FileKeyWords{\firstname \familyname, Cover letter}
\renewcommand{\ttdefault}{pcr}
\usepackage{url}
\renewcommand{\ttdefault}{pcr}
\urlstyle{tt}
\ifpdf
\usepackage[pdftex,pdfborder=0,breaklinks,baseurl=http://,pdfpagemode=None,pdfstartview=XYZ,pdfstartpage=1]{hyperref}
@ -49,10 +48,10 @@
\usepackage[dvips]{hyperref}
\fi
\renewcommand{\familydefault}{\sfdefault}% for use with a résumé using sans serif fonts;
%\renewcommand{\familydefault}{\rmdefault}% for use with a résumé using sans serif fonts;
\begin{document}
\sffamily % for use with a résumé using sans serif fonts;
%\rmfamily % for use with a résumé using serif fonts;
\hfill%
\begin{minipage}[t]{.6\textwidth}
\raggedleft%

View File

@ -93,15 +93,11 @@
% if... then... else... constructs
\RequirePackage{ifthen}
% pdf vs ps compilation
\RequirePackage{ifpdf}
% latex vs pdflatex vs xelatex vs luatex compilation
%\RequirePackage{ifpdf}
% color
\ifpdf
\RequirePackage[pdftex]{color}
\else
\RequirePackage[dvips]{color}
\fi
\RequirePackage{color}
% font encoding
\RequirePackage[T1]{fontenc}
@ -110,9 +106,8 @@
%\usepackage{type1cm}
% latin modern fonts
%\AtEndOfClass{%
\if@lmodern
\RequirePackage{lmodern}\fi%}
\if@lmodern
\RequirePackage{lmodern}\fi
% symbols like \Telefon, \Mobilefone, \Letter and \Email
\RequirePackage{marvosym}
@ -134,12 +129,8 @@
% load hyperred at the end of the preamble to pass options required by loaded packages (like CJK)
\AtEndPreamble{
\@ifpackageloaded{CJK}
{
\ifpdf\RequirePackage[pdftex,CJKbookmarks]{hyperref}
\else\RequirePackage[dvips,CJKbookmarks]{hyperref}\fi}
{
\ifpdf\RequirePackage[pdftex]{hyperref}
\else\RequirePackage[dvips]{hyperref}\fi}
{\RequirePackage[CJKbookmarks]{hyperref}}
{\RequirePackage[pdftex]{hyperref}}
\AtBeginDocument{
\hypersetup{
breaklinks,
@ -159,10 +150,7 @@
}
% graphics
\ifpdf
\RequirePackage[pdftex]{graphicx}
\else
\RequirePackage[dvips]{graphicx}\fi
\RequirePackage{graphicx}
% headers and footers
\RequirePackage{fancyhdr}