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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing my thesis at a company and have to write it in their default font.

How can I set a .otf font in Latex (using Texmaker on Windows)?

\fontspec [Path = fonts/,
    UprightFont = *-Light,
    ItalicFont = *-Thin


hello world


Latex throws an error:

! LaTeX Error: File `expl3.sty' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: sty)Enter file name:! Emergency stop.<read > \usepackage

How can I install expl13? Is the way to include fonts correct? My fonts are in the "fonts" folder in the same directory like the .tex File and are called AkkoPro-Light.otf and AkkoPro-Thin.otf. Is it possible to include fonts for Bold and others? (I've got AkkoPro in Bold, Light, Medium, Regular and Thin...)

I found a lot about xetex and luatex, but I don't know, what it is...

Sorry for my terrible english =)

I solved the font problem by using

\setmainfont[Path = fonts/,
BoldFont = AkkoPro-Bold.otf,
ItalicFont = AkkoPro-Thin.otf,
BoldItalicFont = AkkoPro-Light.otf

but now I´ve got a lot problems by the other packages and commants...

When I'm using the utf8 inputenc package, there will be an error in the header "!Missing \endscname inserted".


is now called "undefined control sequence"


in Line using \includegraphics XeLaTeX throws the error "!Dimension too large. ...

all these errors appears by using \setmainfont and disappears by deleting this command...

My header:


\setmainfont[Path = fonts/,
BoldFont = AkkoPro-Bold.otf,
ItalicFont = AkkoPro-Thin.otf,
BoldItalicFont = AkkoPro-Light.otf

\usepackage[ngerman]{babel} % Paket für die neue deutsche Rechtschreibung
\usepackage{listings} % Packet zum Erstellen von Listinings



\definecolor{lightgreen}{HTML}{3F7F5F} % comments
\definecolor{purple}{HTML}{950055} % keywords
\definecolor{lightblue}{HTML}{3F7DE0} % javadoc
%XML Style
  morekeywords={android, name}% list your attributes here
% Allgmeiner Style für Listings
% die folgendenen 3 Pakete sichern, dass Wörter nicht so oft am rechten Rand herausragen
\usepackage{graphicx} % Paket zur Verwendung von Bildern. alternatif epsfig
anchorcolor=black,% Ankertext
citecolor=green, % Verweise auf Literaturverzeichniseinträge im Text
urlcolor=cyan, % Farbe der URLs
backref % Back-Links zu den Kapiteln
\usepackage{floatflt} % Paket Bildpositionierung
\usepackage{marvosym} % Paket zur Verwendung von manchen Sonderzeichen
% Paket zur Verlinkung des Inhaltsverzeichnisses, als (vor-)letztes laden (es muss zweimal compiliert werden), nur glossaries muss danach geladen werden
\usepackage{fancyhdr} % Paket für den Pagestyle fancy
\usepackage{dirtree} % Paket zum Erstellen einer Verzeichnisstruktur
nonumberlist,   %keine Seitenzahlen anzeigen
acronym         %ein Abkürzungsverzeichnis erstellen
% Entfernt den Punkt am Ende der Beschreibung beim Glossar
%sammelt die Einträge
%Allgemeine Informationen%
  /Title    (Titel)
  /Author   (me)
  /Creator  ()
  /Producer ()
  /Subject  ()
  /Keywords ()
share|improve this question

closed as too localized by Andrew Swann, Guido, Claudio Fiandrino, lockstep, mafp Mar 18 '13 at 10:20

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

What is your TeX installation (MikTeX, TeX Live, ...)? You probably need to do some updating, but this will be easier to tell if you add \listfiles to your preamble and then post the version numbers of the loaded packages, which will be listed at the end of your .log file. For \fontspec, you need to process your document with xelatex or lualatex, not pdflatex or latex. – jon Mar 15 '13 at 13:16
As for the path = fonts/ option, that only confuses the issue if the font files are in the same directory as your .tex file. – jon Mar 15 '13 at 13:17
The fonts are in a folder named "font" in the same directory like the .tex file. Now I added \listfiles on the top of the document and processed the document with xelatex, which is configured xelatex -synctex=1 -interaction=nonstopmode %.tex in my texmaker. I don´t know, what the logfile means... Which part of the logfile is importand? edit: I've got MikTex on Windows and Texmaker as GUI – lis Mar 15 '13 at 13:28
Parts of the logfile: This is XeTeX, Version 3.1415926-2.3-0.9997.5 (MiKTeX 2.9 64-bit) (preloaded format=xelatex 2013.3.15) 15 MAR 2013 14:32 entering extended mode and ("C:\Program Files\MiKTeX\tex\latex\fontspec\fontspec.sty" Package: fontspec 2011/02/26 v2.1f Advanced font selection for XeLaTeX/LuaLaTeX ! LaTeX Error: File expl3.sty' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: sty) Enter file name: ! Emergency stop. <read *> l.21 \input binhex.tex % before expl syntax!^^M *** (cannot \read from terminal in nonstop modes)` – lis Mar 15 '13 at 13:33
Your version of the fontspec package (2.1, Feb. 2011) is quite obsolete; the current version is 2.3, released late last month. Please try updating your entire MiKTeX distribution, including the LaTeX3 packages (such a expl3). – Mico Mar 15 '13 at 13:41

Browse other questions tagged or ask your own question.