Поддержка xelatex

This commit is contained in:
Andrei Astafev 2018-08-22 10:57:16 +03:00
parent 9bcd9e0276
commit 8952bcc648
2 changed files with 22 additions and 5 deletions

View File

@ -21,7 +21,6 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{espdfont}[2010/01/14 v0.98 Font Definitions]
\RequirePackage{gostfont}
\newcommand{\ESPDfontBaseLineStretch}{1}
@ -55,12 +54,27 @@
\newcommand{\ESPDfontX}{%
\ESPDfontSetBaseLineStretch
\ESPDfontXsize\selectfont\ESPDfontShape}
\RequirePackage{ifxetex}
\ifxetex
\newcommand{\ESPDtheGostFontName}{}
\newcommand{\ESPDgostFontName}[1]{\renewcommand{\ESPDtheGostFontName}{#1}}
\usepackage{fontspec}
\newcommand{\ESPDfontGostIII}{%
\ESPDfontSetBaseLineStretch
\ESPDfontIIIsize\setmainfont{\ESPDtheGostFontName}}
\newcommand{\ESPDfontGostIV}{%
\ESPDfontSetBaseLineStretch
\ESPDfontIVsize\setmainfont{\ESPDtheGostFontName}}
\else
\RequirePackage{gostfont}
\newcommand{\ESPDfontGostIII}{%
\ESPDfontSetBaseLineStretch
\ESPDfontIIIsize\selectfont\GostBFont}
\newcommand{\ESPDfontGostIV}{%
\ESPDfontSetBaseLineStretch
\ESPDfontIVsize\selectfont\GostBFont}
\fi
\newcommand{\ESPDfontTabHead}{\ESPDfontV}
\newcommand{\ESPDfontTabBody}{\ESPDfontV}

View File

@ -35,12 +35,15 @@
\ProcessOptions\relax
\ifESPD@given@encoding
\RequirePackage{inputenc}
\RequirePackage{ifxetex}
\ifxetex\RequirePackage{xecyr}
\else
\ifESPD@given@encoding
\RequirePackage{inputenc}
\fi
\RequirePackage[T2A]{fontenc}
\fi
\RequirePackage[T2A]{fontenc}
\RequirePackage[\ESPD@lang]{babel}
\input{espd\ESPD@lang.def}