diff options
Diffstat (limited to 'macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex')
-rw-r--r-- | macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex b/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex new file mode 100644 index 0000000000..2e68c7b876 --- /dev/null +++ b/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex @@ -0,0 +1,87 @@ +\documentclass[a4paper]{scrartcl} +\usepackage{fixltx2e} % LaTeX patches, \textsubscript +\usepackage[T2A, T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[russian,english]{babel} +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref} +\usepackage{bookmark} +\usepackage{parskip} +\pagestyle{empty} + +% Combine "Latin Modern" fonts for Latin and +% "CLG" fonts for Cyrillic. +\usepackage{substitutefont} +\usepackage{lmodern} +\substitutefont{T2A}{lmr}{fcm} +\substitutefont{T2A}{lmss}{fcs} +\substitutefont{T2A}{lmtt}{fct} + +\begin{document} + +\section*{Cyrillic fonts to match Latin Modern} + +Declaring the font encoding T1 (by inclusion in the option list for fontenc) +is recommended, if the text contains accented Latin characters as is usual +in most European languages and even in some English words (e.g. \emph{Résumé +of Nathan Söderblom}). However, the original Computer Modern fonts (CM) are +not available in T1 encoding. There are two alternative CM-compatible vector +fonts supporting T1: + +\begin{itemize} + +\item The \href{http://www.ctan.org/pkg/cm-super}{CM-Super} package installes + itself as CM substitute and is used for Cyrillic text, too. + +\item \href{http://www.ctan.org/pkg/lm}{Latin Modern} does not include Cyrillic + fonts. The default substitution is CM, either CM-Super or + \href{http://www.ctan.org/pkg/LH}{LH} bitmap fonts. +\end{itemize} + +The preamble code of this document uses \emph{substitutefont} to set up the +vector-fonts from the \href{http://www.ctan.org/pkg/cm-lgc}{cm-lgc} +package as a Cyrillic replacement for Latin Modern. + +\section{\foreignlanguage{russian}{Тест шрифтов}} + +\newcommand{\teststring}{Hello world! + \foreignlanguage{russian}{Здравствуй, мир!}} + +\begin{description} + \item [Normal:] \teststring + + \item [it:] \textit{\teststring} + + \item [sl:] \textsl{\teststring} + + \item [bf:] \textbf{\teststring} + + \item [bf it:] \textbf{\textit\teststring} + + \item [sc:] \textsc{\teststring} + + % \item [bf sc:] \textsc{\textbf\teststring} missing in Didot + + \item [sf:] \textsf{\teststring} + + \item [sf bf:] \textsf{\textbf\teststring} + + \item [sf sl:] \textsf{\textsl\teststring} + + \item [sf sc:] \textsf{\textsc\teststring} + + \item [tt:] \texttt{\teststring} + +\end{description} + +\selectlanguage{english} + +The Russian language definition switches the font encoding from +\emph{cyrillicencoding} to \emph{latinencoding} when changing from Russian +to another language. Babel base sets the variable \emph{latinencoding} to T1 +if this font encoding is declared and to OT1 else. + +\selectlanguage{russian} + +До свидания! + +\end{document} |