3

I'm working on my LaTeX project (I'm using MikTeX on Win10, pdflatex). I need to use Serbian cyrillic (babel, serbianc) script. I found this new erewhon font, whose documentation says it can be used with T2A encoding.

Unfortunately, it doesn't work, for unknown reasons. This is simple piece of code:

\documentclass[10pt,oneside,a4paper,titlepage,draft]{article}

% set serbianc...
\usepackage{amsmath,amsthm,amssymb}
\usepackage{mathtext}
\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,serbianc]{babel}

% load erewhon, as in erewhon manual..
\usepackage[p,osf,scaled=.98,space]{erewhon}
\usepackage[varqu,varl]{inconsolata} % typewriter
\usepackage[type1,scaled=.95]{cabin} % sans serif like Gill Sans
\usepackage[utopia,vvarbb]{newtxmath}

%change some names..
\addto\captionsserbianc{
    \renewcommand{\contentsname}{Садржаније}
}

\begin{document}

% toc...
\tableofcontents

%main text...
\section[Поглавље]{Поглавље}
Текст у поглављу.
\subsection[Подпоглавље]{Подпоглавље}
Текст у подпоглављу.
\subsubsection[Минипоглавље]{Минипоглавље}
Текст у минипоглављу.
\paragraph[Параграф]{Параграф}
Текст у параграфу.

\end{document}

edit: The first compilation error I get:

LaTeX Error: Symbol font `LY1letters' is not defined.
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Martin Schröder May 27 '17 at 23:37
  • Just curious: It's 2017 and we have Unicode-capable engine (LuaTeX & XeTeX) which can handle Opentype fonts. Why don't you use them? – Martin Schröder May 27 '17 at 23:38
  • "it doesn't work" - meaning what exactly? Does the computer explode? – Martin Schröder May 27 '17 at 23:39
  • @MartinSchröder I'll definitely try using XeTeX, if there isn't other solution. (the first) compilation error will be added to the post. – Mijat Gligorić May 27 '17 at 23:51
  • If I remove mathtext and postpone loading babel after the font packages, I get no error. – egreg May 28 '17 at 0:00
3

The package mathtext (which I don't really understand the purpose of) is the cause. You should also postpone loading babel after the font packages.

\documentclass[10pt,oneside,a4paper,titlepage,draft]{article}

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsthm,amssymb,textcomp}

% load erewhon, as in erewhon manual..
\usepackage[erewhon,vvarbb]{newtxmath}
\usepackage[p,osf,scaled=.98,space]{erewhon}
\usepackage[varqu,varl]{inconsolata} % typewriter
\usepackage[type1,scaled=.95]{cabin} % sans serif like Gill Sans

% set serbianc...
\usepackage[english,serbianc]{babel}

%change some names..
\addto\captionsserbianc{%
    \renewcommand{\contentsname}{Садржаније}%
}

\begin{document}

% toc...
\tableofcontents

%main text...
\section[Поглавље]{Поглавље}
Текст у поглављу.
\subsection[Подпоглавље]{Подпоглавље}
Текст у подпоглављу.
\subsubsection[Минипоглавље]{Минипоглавље}
Текст у минипоглављу.
\paragraph[Параграф]{Параграф}
Текст у параграфу.
\[
\sum_{k=1}^{n}\int_{k-1}^{k} f(x)\,dx=\int_{0}^{n}f(x)\,dx
\]

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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