From 8952bcc64880be2078c483bf6d9b12797a638af5 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 22 Aug 2018 10:57:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20xelatex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- espdfont.sty | 16 +++++++++++++++- espdlang.sty | 11 +++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/espdfont.sty b/espdfont.sty index b22e51f..61f8dc3 100644 --- a/espdfont.sty +++ b/espdfont.sty @@ -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} diff --git a/espdlang.sty b/espdlang.sty index 8b43772..d3062c9 100644 --- a/espdlang.sty +++ b/espdlang.sty @@ -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}