Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to use the CV template provided by this link.

In the .tex file the author recommends to compile with XeLaTeX. In TeXmaker 4.0, I've used the right option to compile but the following error showed up:

! Fatal fontspec error: "cannot-use-pdftex"

Should I try to compile using the LuaLaTeX support?

EDIT The texlive-xetex package was not installed on the system

sudo apt-get install texlive-xetex

-> Now I can compile. Another error came out:

File `layaureo.sty' not found

EDIT 2 I installed texlive-lang-italian package

sudo apt-get install texlive-lang-italian

Now the error is:

! Font \XeTeXLink@font=pzdr at 0.00002pt not loadable: Metric (TFM) file or ins

Solved using

sudo apt-get install texlive-fonts-recommended

from my old question

share|improve this question
1  
Then you are not using XeLaTeX. May be add %!TEX TS-program = xelatex as the first line of the document. –  Manuel Apr 23 at 21:17
    
I've added it to the first line. Still getting the same error. –  narutov6 Apr 23 at 22:29
    
Sorry, I misunderstood TeXWorks, I don't know if TeXMaker follows those directives. Are you sure you told the program to call XeLaTeX? Because for what you say, it seems that it's calling pdfLaTeX. –  Manuel Apr 23 at 22:40
    
Yes it was correctly set up. The texlive-xetex package was not installed! That's weird, it should have been marked as a dependency for the texmaker –  narutov6 Apr 23 at 22:58

2 Answers 2

If you compile with XeLaTeX and have the Fontin fonts installed on your system it works fine after some modifications to the preamble and the very beginning of the file.

The main modifications consisted in deleting some obsolete options or packages, and the \fb switch-font command defined just after \begin{document}; re-defining it with fontspec and using Latin Modern rather than Computer Modern since the former exists in Opentype format.

Here is the beginning I used to compile:

%----------------------------------------------------------------------------------------
%   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[a4paper,10pt]{article} % Default font size and paper size

\usepackage{fontspec} % For loading fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font
\newfontface\fb{LMRoman10}

\usepackage{parskip, url} % Formatting packages%% xunicode,xltxtra are obsolete
\usepackage[dvipsnames]{xcolor} % Required for specifying custom colors usenames,
%% usenames is an obsolete option

\usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo %can be \usepackage{fullpage}
% To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}

\usepackage{hyperref} % Required for adding links   and customizing them
\definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document

\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections
\titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections

\begin{document}

\pagestyle{empty} % Removes page numbering

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION
%----------------------------------------------------------------------------------------
share|improve this answer
    
I've deleted the \fp command. Same Error Fatal fontspec error: "cannot-use-pdftex". The fontspec package requires either XeTeX or LuaTeX to function. You must change your typesetting engine to, e.g., "xelatex" or "lualatex" instead of plain "latex" or "pdflatex". See the fontspec documentation for further information. –  narutov6 Apr 23 at 22:37
1  
I finally found out what's the problem (personally I use WinEdt so it took me some time to understand why it compiled fine with me and not with you…). The reason is that 1) there is no XeLaTeX submenu in the Tools menu 2) Quick Build (F1 key) has pdflatex as the default engine. So you have to go to Options -> Configure TeXmaker and change Quick Build settings in favour of XeLaTeX. Now I can compile even from TeXmaker –  Bernard Apr 23 at 23:30
    
Thank you. The problem was the missing xetex package –  narutov6 Apr 23 at 23:38
    
xetex is not a package, but one of the tex engines — unfortunately not easily accessible from within TeXmaker:( –  Bernard Apr 23 at 23:47
up vote 1 down vote accepted

The package required to compile using XeLaTeX was not installed on my linux ditribution. Solved with:

sudo apt-get install texlive-xetex
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.