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've been trying to create a CV template by following the tutorial from here.

Here's the latex code I used

\documentclass[a4paper,10pt]{article}

%A Few Useful Packages
\usepackage{marvosym}
\usepackage{fontspec}   %load fonts
\usepackage{url,parskip}   %formatting
\usepackage{xunicode,xltxtra}  %other packages for XeTeX
\usepackage{titlesec}

%Graphics - Colors
\RequirePackage{color,graphicx}
\usepackage[usenames,dvipsnames]{xcolor}
%better formatting of the A4 page
\usepackage[big]{layaureo}
%An alternative to Layaureo can be usepackage{fullpage}

\usepackage{supertabular}   %for Grades
\usepackage{titlesec}   %custom section

%Setup hyperref package, and colours for links
\usepackage{hyperref}
\definecolor{linkcolour}{rgb}{0,0.2,0.6}
\hypersetup{colorlinks,breaklinks, urlcolor=linkcolour, linkcolor=linkcolour}

\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}

\titleformat{section}{Largescshaperaggedright}{}{0em}{}[\titlerule]
\titlespacing{section}{0pt}{3pt}{3pt}

I compiled it using XeTeX extension (xelatex resume.tex).

I got the following error message in the terminal.

kpathsea: Running mktextfm Fontin
/usr/share/texmf/web2c/mktexnam: Could not map source abbreviation F for Fontin.
/usr/share/texmf/web2c/mktexnam: Need to update /usr/share/texmf-texlive/fonts/map/fontname/special.map?
mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input Fontin
This is METAFONT, Version 2.718281 (TeX Live 2009/Debian)


kpathsea: Running mktexmf Fontin
! I can't find file `Fontin'.
<*> ...:=ljfour; mag:=1; nonstopmode; input Fontin

Please type another input file name
! Emergency stop.
<*> ...:=ljfour; mag:=1; nonstopmode; input Fontin

Transcript written on mfput.log.
grep: Fontin.log: No such file or directory
mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input Fontin' failed to make Fontin.tfm.
kpathsea: Appending font creation commands to missfont.log.

! Font \zf@basefont=Fontin at 10.0pt not loadable: Metric (TFM) file or install
ed font not found.
\zf@fontspec ...ntname \zf@suffix " at \f@size pt 
                                                  \unless \ifzf@icu \zf@set@...
l.26 ...[SmallCapsFont = Fontin SmallCaps]{Fontin}

I suppose it's because the font 'Fontin' is missing. I downloaded 'Fontin' and tried to add it as external font by

\fontspec
[ Path = /home/primal/fonts/ ,
UprightFont = *-regular ,
BoldFont = *-bold ,
SmallCapsFont = *-SmallCaps ]
{Fontin}

But it didn't work out as well.

Any help on this would be much appreciated. Also when I tried that line which was causing the error, I got an error message on next line specifying formatting for sections.

! Package xkeyval Error: `section' undefined in families `titlesec'.

See the xkeyval package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.28 ...section}{Largescshaperaggedright}{}{0em}{}
                                                  [\titlerule]
share|improve this question

2 Answers 2

up vote 6 down vote accepted

The Problem has nothing to to with XeLateX or Fontin.

The reason for the error is that the \titleformat and \titlespacing commands are incorrect. Apparently some backslashes got lost. If you look at Alessandro's complete source code in cv.tex or follow the link to his source, you will find that it should read

\titleformat{\section}{\large\scshape\raggedright}{}{0em}{}[\titlerule]
\titlespacing{\section}{0pt}{3pt}{3pt}

And by the way, you can also copy the Fontin files (or any other font for that matter) to your local OS font directory (~/.fonts in Linux) If all files are present there fontspec will automatically know which to use for bold etc.

share|improve this answer
    
Oh - and I left a comment on the original site. –  Carsten Thiel Dec 19 '10 at 10:53

Try to download the packages from this site and install them individually.... http://www.josbuivenga.demon.nl/fontin.html

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.