1

I have a problem. I am writing a book in Cyrillic, but the numbers of pages are marked in roman letters also written in Cyrillic. How can they be written in Latin only? Instead of i, ii, iii,.. writes и,ии,иии,...

  • 1
    What do you mean by “in Roman letters also written in Cyrillic”? – egreg Apr 4 '18 at 21:40
  • Instead of i, ii, iii,.. writes и,ии,иии,... – BranislavM Apr 5 '18 at 6:27
  • Please, add a minimal example of code producing the issue. – egreg Apr 5 '18 at 6:38
  • \documentclass[a4paper,12pt]{book} \usepackage[english,serbian]{babel} \usepackage{amstext,amsfonts,amsmath,amssymb,amsthm} \usepackage[OT1,OT2]{fontenc} \usepackage[utf8]{inputenc} \usepackage[hidelinks]{hyperref} \newcommand{\lat}{\fontencoding{OT1}\fontfamily{cmr}\selectfont} \begin{document} \frontmatter \include{Naslovna} \mainmatter \include{Gl_1} {\pagestyle{index} \include{Indeks} } \end{document} – BranislavM Apr 5 '18 at 7:49
  • 1
    The example code you showed in the comment should be an edit to the question. Anyway, the problem seems to be in you using OT2; isn't typing directly Cyrillic better for you? – egreg Apr 5 '18 at 9:43
2

It would be much better to use T2A rather than OT2. Anyway, here is how you can do:

\documentclass[a4paper,12pt]{book}
\usepackage[OT1,OT2]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,serbian]{babel}

\usepackage{lipsum}

% let's use scalable fonts
\DeclareFontFamily{OT2}{cmr}{\hyphenchar\font45 }
\DeclareFontShape{OT2}{cmr}{m}{n}{<->wncyr10}{}
\DeclareFontShape{OT2}{cmr}{m}{it}{<->wncyi10}{}
\DeclareFontShape{OT2}{cmr}{m}{sc}{<->wncysc10}{}
\DeclareFontShape{OT2}{cmr}{b}{n}{<->wncyb10}{}
\DeclareFontShape{OT2}{cmr}{bx}{n}{<->ssub*wncyr/b/n}{}
\DeclareFontShape{OT2}{cmr}{m}{sl}{<->ssub*wncyr/m/it}{}


\newcommand{\lat}{\fontencoding{OT1}\fontfamily{cmr}\selectfont}
\DeclareTextFontCommand{\textlat}{\lat}
\makeatletter
\renewcommand{\@roman}[1]{%
  \textlat{\romannumeral #1}%
}
\makeatother

\begin{document}
\frontmatter
\chapter{Увод}

\lipsum

\end{document}

enter image description here

  • Thank you for your help! When I put in what you wrote to me, I get an error message ("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\ursfs.fd") ! Argument of \@tforloop has an extra }. <inserted text> \par l.53 \end{titlepage} ? – BranislavM May 6 '18 at 21:10
  • @BranislavM Your code doesn't load rsfs, so I can't tell more about the problem. – egreg May 6 '18 at 21:20

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.