summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'obsolete/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex')
-rw-r--r--obsolete/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex90
1 files changed, 90 insertions, 0 deletions
diff --git a/obsolete/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex b/obsolete/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex
new file mode 100644
index 0000000000..e8d5f5bf0b
--- /dev/null
+++ b/obsolete/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex
@@ -0,0 +1,90 @@
+\documentclass[a4paper]{scrartcl}
+\usepackage[T2A, T1]{fontenc}
+\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{lmodern}
+% Use LaTeX kernel macro instead of the obsolete "substitutefont" package:
+\DeclareFontFamilySubstitution{T2A}{lmr}{fcm}
+\DeclareFontFamilySubstitution{T2A}{lmss}{fcs}
+\DeclareFontFamilySubstitution{T2A}{lmtt}{fct}
+% \usepackage{substitutefont}
+% \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{https://ctan.org/pkg/cm-super}{CM-Super} package installes
+ itself as CM substitute and is used for Cyrillic text, too.
+
+\item \href{https://ctan.org/pkg/lm}{Latin Modern} does not include Cyrillic
+ fonts. The default substitution is CM, either CM-Super or
+ \href{https://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{https://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}