1

I have a problem compiling a resume in Texmaker using XeLatex. Any help on this is much appreciated. It seems the problem is finding the fonts from the package fontspec.

My code

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

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

\usepackage{xunicode,xltxtra,url,parskip} % Formatting packages 

\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors

\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

\font\fb=''[cmr10]'' % Change the font of the \LaTeX command under the skills section

The title format and title spacing should be correct as suggested in:

Problems with fontspec and titlesec packages

Also i have downloaded the latest version of Texmaker and made sure that the fonts are installed. I do not know if they are located in the correct directory as i did have some problems with compiling after upgrading to EL Capitan on my mac. This problem was solved using this guide:

TexMaker (and TexShop) not working after installation of El Capitan

The error i get

enter image description here

Krumme
  • 11
  • 2
    Welcome to TeX.SX! You don't have Fontin in your system: this is what the error says. Where did you install it? Note also that \font\fb=''[cmr10]'' is a big mistake. – egreg Nov 22 '15 at 14:32
  • Does your program compile (module the \font\fb=''[cmr10]'' bit) if you run it under LuaLaTeX instead of XeLaTeX? – Mico Nov 22 '15 at 14:40
  • LuaLaTex doesn't work either. It is installed using Tex Live Utility in the directory: usr/local/texlive/2015/texmf/tex/latex/fontspec. To be honest i am a little confused what directories are in use after the change i made to get Texmaker to compile after upgrading to El Capitan – Krumme Nov 22 '15 at 14:47
  • the issue isn't where is fontspec (clearly tex found that) so much as where the Fontin font is. \font\fb=''[cmr10]'' is just wrong however you look at it, you shouldn't use \font with latex and the syntax for file names uses " not two ' – David Carlisle Nov 22 '15 at 15:17
  • What are your trying to achieve exactly? – Lierre Nov 22 '15 at 15:50
  • Fonspec lets you use fonts you've installed generally for the system (e.g. with FontBook) - it doesn't include any fonts itself. It is a way of using whichever fonts you have installed anyway. [At least, this is simplified. Really, XeTeX/LuaTeX lets you use the fonts and fontspec provides a fancy interface to do so easily.] Can you use Fontin in regular OS X applications e.g. TextEdit or LibreOffice or Word? – cfr Nov 22 '15 at 16:29
  • I have listened to your comments and deleted the code: \font\fb=''[cmr10]''. I have the Fontin fonts installed in Library/Fonts/ and they are available in Word and other text editors. The document used to work and i had no problem compiling it. After upgrading to El Capitan i had to change location of different directories in order to get TexMaker to work. Now the document won't compile giving the above error. – Krumme Nov 26 '15 at 07:05
  • On my Windows machine, it compiles when I put \end{document} at the end of your MWE, comment the \font\fb=''[cmr10]' and \setmainfont... and add some text in the document. Can you verify this on your macOS machine? – Budo Zindovic Nov 05 '16 at 23:29

0 Answers0