Поддержка 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} \NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{espdfont}[2010/01/14 v0.98 Font Definitions] \ProvidesPackage{espdfont}[2010/01/14 v0.98 Font Definitions]
\RequirePackage{gostfont}
\newcommand{\ESPDfontBaseLineStretch}{1} \newcommand{\ESPDfontBaseLineStretch}{1}
@ -55,12 +54,27 @@
\newcommand{\ESPDfontX}{% \newcommand{\ESPDfontX}{%
\ESPDfontSetBaseLineStretch \ESPDfontSetBaseLineStretch
\ESPDfontXsize\selectfont\ESPDfontShape} \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}{% \newcommand{\ESPDfontGostIII}{%
\ESPDfontSetBaseLineStretch \ESPDfontSetBaseLineStretch
\ESPDfontIIIsize\selectfont\GostBFont} \ESPDfontIIIsize\selectfont\GostBFont}
\newcommand{\ESPDfontGostIV}{% \newcommand{\ESPDfontGostIV}{%
\ESPDfontSetBaseLineStretch \ESPDfontSetBaseLineStretch
\ESPDfontIVsize\selectfont\GostBFont} \ESPDfontIVsize\selectfont\GostBFont}
\fi
\newcommand{\ESPDfontTabHead}{\ESPDfontV} \newcommand{\ESPDfontTabHead}{\ESPDfontV}
\newcommand{\ESPDfontTabBody}{\ESPDfontV} \newcommand{\ESPDfontTabBody}{\ESPDfontV}

View File

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