summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/substitutefont
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/substitutefont
Initial commit
Diffstat (limited to 'macros/latex/contrib/substitutefont')
-rw-r--r--macros/latex/contrib/substitutefont/README101
-rw-r--r--macros/latex/contrib/substitutefont/cyrillic-lm-lgc.pdfbin0 -> 322975 bytes
-rw-r--r--macros/latex/contrib/substitutefont/cyrillic-lm-lgc.tex87
-rw-r--r--macros/latex/contrib/substitutefont/cyrillic-paratype.pdfbin0 -> 261997 bytes
-rw-r--r--macros/latex/contrib/substitutefont/cyrillic-paratype.tex95
-rw-r--r--macros/latex/contrib/substitutefont/greek-palatino-didot.pdfbin0 -> 351177 bytes
-rw-r--r--macros/latex/contrib/substitutefont/greek-palatino-didot.tex91
-rw-r--r--macros/latex/contrib/substitutefont/greek-times-artemisia.pdfbin0 -> 393346 bytes
-rw-r--r--macros/latex/contrib/substitutefont/greek-times-artemisia.tex71
-rw-r--r--macros/latex/contrib/substitutefont/substitutefont-doc.html106
-rw-r--r--macros/latex/contrib/substitutefont/substitutefont-test.pdfbin0 -> 147683 bytes
-rw-r--r--macros/latex/contrib/substitutefont/substitutefont-test.tex55
-rw-r--r--macros/latex/contrib/substitutefont/substitutefont.sty80
-rw-r--r--macros/latex/contrib/substitutefont/substitutefont.sty.html115
14 files changed, 801 insertions, 0 deletions
diff --git a/macros/latex/contrib/substitutefont/README b/macros/latex/contrib/substitutefont/README
new file mode 100644
index 0000000000..61c4a1416e
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/README
@@ -0,0 +1,101 @@
+substitutefont
+--------------
+Combine font families
+*********************
+
+:Copyright: © 2010 Günter Milde <milde@users.sf.net>
+:Contributor: Special thanks to Ulrike Fischer who provided
+ the indirect definition with active ``\nfss@catcodes``.
+:Licence: This work may be distributed and/or modified under the
+ conditions of the `LaTeX Project Public License`_,
+ either version 1.3 of this license or (at your option)
+ any later version.
+
+.. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
+
+In traditional 8-bit LaTeX, fonts are restricted to 256 glyphs per file.
+To support different languages and scripts, the New Font Selection Scheme
+uses a set of TeX font encodings [encguide]_.
+
+Many Latin TeX fonts do not support Greek or Cyrillic, while many non-Latin
+fonts are extensions of a Latin font family but use a different family name
+due to license reasons or the creators preference.
+
+The `substitutefont` package facilitates the task to set up a font family as
+substitute for another one in a specified `font encoding <encguide>`_.
+
+:News: 2013-11-04 Documentation/Test fixes.
+
+:Source: `<substitutefont.sty>`_
+
+ The literate source was converted with PyLit_ to reStructuredText_ and
+ with Docutils_ to the HTML documentation `<substitutefont.sty.html>`__.
+
+Usage
+=====
+
+The macro ``\substitutefont{<encoding>}{<family>}{<new-family>}`` selects
+the font family <new-family> as replacement for <family> in the font
+encoding <encoding>. The substitution must be defined before the first use
+of the specified font encoding, preferably in the document preamble.
+In contrast to the (deprecated) ``\substitutefontfamily`` macro provided by
+Babel_, ``\substitutefont`` does not write auxiliary files.
+
+The ``<encoding>`` is one of the LaTeX font encodings [encguide]_, e.g., T1
+for Latin, T2A for Cyrillic(Russian), or LGR for Greek.
+
+For ``<family>`` and ``<new-family>``, use the «TeX names» of the font.
+There are defined by a TeX font package's ``*.fd`` or ``*.sty`` file(s).
+LaTeX stores the default family names for Roman, Sans-Serif, and Teletype
+fonts in the ``\rmdefault``, ``\sfdefault``, and ``\ttdefault`` macros
+respectively.
+
+Example: Set the font family to Palatino using the standard package
+`mathpazo` for Latin and `GFS Didot`_ for Greek::
+
+ \usepackage[sc,slantedGreek]{mathpazo}
+ \usepackage{substitutefont}
+ \substitutefont{LGR}{\rmdefault}{udidot}
+
+For details on LaTeX font selection, see [encguide]_ and [fntguide]_.
+
+Tests/Examples
+==============
+
+* Simple test with Latin fonts:
+ `<substitutefont-test.tex>`__, `<substitutefont-test.pdf>`__
+* Palatino with Greek from `GFS Didot`_:
+ `<greek-palatino-didot.tex>`__, `<greek-palatino-didot.pdf>`__
+* Times/Helvetica/Courier (newtx_) with `GFS Artemisia`_, `GFS
+ Neohellenic`_, and teletype from the CB_ fonts: txfontsb_
+ `<greek-times-artemisia.tex>`__, `<greek-times-artemisia.pdf>`__
+* Latin Modern with Cyrillic from `CM LGC`_:
+ `<cyrillic-lm-lgc.tex>`__, `<cyrillic-lm-lgc.pdf>`__
+* Times/Helvetica/Courier (TeX Gyre) with Cyrillic ParaType_ fonts:
+ `<cyrillic-paratype.tex>`__, `<cyrillic-paratype.pdf>`__
+
+
+References
+==========
+
+.. [encguide] Frank Mittelbach, Robin Fairbairns, Werner Lemberg,
+ LaTeX3 Project Team, `LaTeX font encodings`:
+ http://mirror.ctan.org/macros/latex/doc/encguide.pdf.
+
+.. [fntguide] LaTeX3 Project Team, `LaTeX 2e font selection`:
+ http://mirror.ctan.org/macros/latex/doc/fntguide.pdf.
+
+.. _Babel: http://www.ctan.org/pkg/babel
+.. _CM LGC: http://www.ctan.org/pkg/cm-lgc
+.. _CB: http://www.ctan.org/pkg/cbgreek-complete
+.. _GFS Artemisia: http://www.ctan.org/pkg/gfsartemisia
+.. _GFS Didot: http://www.ctan.org/pkg/gfsdidot
+.. _GFS Neohellenic: http://www.ctan.org/pkg/gfsneohellenic
+.. _mathpazo: http://www.ctan.org/pkg/mathpazo
+.. _newtx: http://www.ctan.org/pkg/newtx
+.. _txfontsb: http://www.ctan.org/pkg/txfontsb
+.. _ParaType: http://www.ctan.org/pkg/paratype
+
+.. _PyLit: http://pylit.berlios.de
+.. _reStructuredText: http://docutils.sourceforge.net/rst.html
+.. _Docutils: http://docutils.sourceforge.net/rst.html
diff --git a/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.pdf b/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.pdf
new file mode 100644
index 0000000000..027656c642
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/cyrillic-lm-lgc.pdf
Binary files differ
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}
diff --git a/macros/latex/contrib/substitutefont/cyrillic-paratype.pdf b/macros/latex/contrib/substitutefont/cyrillic-paratype.pdf
new file mode 100644
index 0000000000..98a826b890
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/cyrillic-paratype.pdf
Binary files differ
diff --git a/macros/latex/contrib/substitutefont/cyrillic-paratype.tex b/macros/latex/contrib/substitutefont/cyrillic-paratype.tex
new file mode 100644
index 0000000000..d5a4ac2a9f
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/cyrillic-paratype.tex
@@ -0,0 +1,95 @@
+\documentclass[a4paper]{article}
+\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}
+
+\pagestyle{empty}
+
+% Combine "TeX Gyre" fonts for Latin and "ParaType" fonts for Cyrillic:
+
+% 1. Load paratype font-packages to get scaled Paratype fonts
+\usepackage[scaled=0.9]{PTSerif}
+\usepackage[scaled=0.9]{PTSans}
+\usepackage[scaled=0.87]{PTMono}
+
+% 2. Load TeX Gyre font-packages (after Paratype to use them as default fonts)
+\usepackage{tgtermes}
+\usepackage[scale=.90]{tgheros}
+\usepackage{tgcursor}
+
+% 3. Set up the substitutions:
+\usepackage{substitutefont}
+\substitutefont{T2A}{\rmdefault}{PTSerif-TLF}
+\substitutefont{T2A}{\sfdefault}{PTSans-TLF}
+\substitutefont{T2A}{\ttdefault}{PTMono-TLF}
+
+
+\begin{document}
+
+\section*{Cyrillic fonts to match Times/Helvetica/Curier}
+
+The \href{http://www.ctan.org/pkg/tex-gyre}{TeX Gyre} project provides
+extensions to the URW standard Postscript fonts. Cyrillic extensions by
+Valek Filippov were part of TeXGyre but removed due to license
+incompatibility.
+
+These fonts are still available in the
+\href{http://packages.debian.org/stable/scalable-cyrfonts-tex}%
+{scalable-cyrfonts-tex} Debian package but not on CTAN. Furthermore, both
+\href{http://www.ctan.org/pkg/fouriernc}{Fourier New Century} and
+\emph{Free New Century} use the TeX-name \emph{fnc}. Therefore
+\emph{scalable-cyrfonts-tex} conflicts with the Debian
+\href{http://packages.debian.org/stable/texlive-fonts-extra}%
+{texlive-fonts-extra} package.
+
+The Cyrillic fonts from the
+\href{http://www.ctan.org/pkg/paratype}{paratype} package are not exact
+matches but fit quite well if they are downscaled a bit. As the Paratype
+package includes also T1 encoded fonts, Paratype fonts can be used for both
+Latin and Cyrillic text.
+
+Other vector fonts supporting Cyrillic include
+\href{http://www.ctan.org/pkg/dejavu}{Deja Vu},
+\href{http://www.ctan.org/pkg/droid}{Droid},
+\href{http://www.ctan.org/pkg/gentium-tug}{Gentium}, and
+\href{http://www.ctan.org/pkg/libertine}{Linux Libertine}.
+
+\section*{\selectlanguage{russian}Тест шрифтов}
+
+\newcommand{\teststring}{Hello world!
+ \foreignlanguage{russian}{Здравствуй, мир!}}
+
+\begin{description}
+ \item [Normal:] \teststring
+
+ \item [it:] \textit{\teststring}
+
+ \item [sl:] \textsl{\teststring}%
+ \footnote{TeX Gyre merges slanted and italic shapes}
+
+ \item [bf:] \textbf{\teststring}
+
+ \item [bf it:] \textbf{\textit\teststring}
+
+ \item [sc:] not available in Paratype % \textsc{\teststring}
+
+ \item [bf sc:] missing % \textsc{\textbf\teststring}
+
+ \item [sf:] \textsf{\teststring}
+
+ \item [sf bf:] \textsf{\textbf\teststring}
+
+ \item [sf sl:] \textsf{\textsl\teststring}
+
+ \item [sf sc:] not available in Paratype % \textsf{\textsc\teststring}
+
+ \item [tt:] \texttt{\teststring}
+
+\end{description}
+
+
+
+\end{document}
diff --git a/macros/latex/contrib/substitutefont/greek-palatino-didot.pdf b/macros/latex/contrib/substitutefont/greek-palatino-didot.pdf
new file mode 100644
index 0000000000..933663d561
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/greek-palatino-didot.pdf
Binary files differ
diff --git a/macros/latex/contrib/substitutefont/greek-palatino-didot.tex b/macros/latex/contrib/substitutefont/greek-palatino-didot.tex
new file mode 100644
index 0000000000..e8bddaf56c
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/greek-palatino-didot.tex
@@ -0,0 +1,91 @@
+% Example and test for the substitutefont package:
+\documentclass[a4paper,DIV14]{scrartcl}
+\usepackage{parskip}
+\usepackage[LGR,T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[greek,english]{babel}
+\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
+\usepackage{bookmark}
+\pagestyle{empty}
+
+\usepackage{substitutefont}
+% Serif
+\usepackage[sc,slantedGreek]{mathpazo}
+\substitutefont{LGR}{\rmdefault}{udidot}
+
+% Sans
+\usepackage[scale=.90]{tgheros}
+\substitutefont{LGR}{\sfdefault}{neohellenic}
+
+% Monospaced
+% \usepackage[matchlowercase]{tgcursor}
+\renewcommand{\ttdefault}{txtt}
+\substitutefont{LGR}{\ttdefault}{cmtt} % CB fonts
+% \substitutefont{LGR}{\ttdefault}{fdm} % Droid Sans Mono
+
+
+% Teststring
+\newcommand{\alphabet}{%
+ abcdefghjiklmnoprqrstuvwxyzäöüß
+ \foreignlanguage{greek}{abgdezhjiklmnxoprsctufqyw} \\
+ ABCDEFGHJIKLMNOPRQRSTUVWXYZÄÖÜ
+ \foreignlanguage{greek}{ABGDEZHJIKLMNXOPRSTUFQYW}
+}
+
+\begin{document}
+
+\section*{Palatino/Helvetica/TXTT and Greek replacements}
+
+Default font families after loading mathpazo, tgheros, and tgcursor:\\
+familydefault: \familydefault{},
+rmdefault: \rmdefault{},
+sfdefault: \sfdefault{},
+ttdefault: \ttdefault{}
+
+Palatino (mathpazo) with GFS Didot:
+
+\begin{description}
+ \item [Normal:] \alphabet
+
+ \item [it:] \textit{\alphabet}
+
+ \item [sl:] \textsl{\alphabet}
+
+ \item [bf:] \textbf{\alphabet}
+
+ \item [bf it:] \textbf{\textit\alphabet}
+
+ \item [sc:] \textsc{\alphabet}
+
+ % \item [bf sc:] \textsc{\textbf\alphabet}
+
+\end{description}
+
+Helvetica (TG Heros) with GFS Neohellenic:
+
+\begin{description}
+
+ \item [sf:] \textsf{\alphabet}
+
+ \item [sf bf:] \textsf{\textbf\alphabet}
+
+ \item [sf sl:] \textsf{\textsl\alphabet}
+
+ \item [sf sc:] \textsf{\textsc\alphabet}
+
+\end{description}
+
+There is no Greek extension for the monospaced standard PS font Curier.
+A good replacement are the teletype fonts from
+\href{http://www.ctan.org/pkg/newtx}{txfonts} and
+\href{http://www.ctan.org/pkg/cbgreek-complete}{CB-Greek}:
+
+\begin{description}
+
+ \item [tt:] \texttt{\alphabet}
+ % \item [tt bf:] \texttt{\textbf\alphabet} % not in CB-Greek
+ \item [tt it:] \texttt{\textit\alphabet}
+
+\end{description}
+
+\end{document}
diff --git a/macros/latex/contrib/substitutefont/greek-times-artemisia.pdf b/macros/latex/contrib/substitutefont/greek-times-artemisia.pdf
new file mode 100644
index 0000000000..9045f6c7a3
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/greek-times-artemisia.pdf
Binary files differ
diff --git a/macros/latex/contrib/substitutefont/greek-times-artemisia.tex b/macros/latex/contrib/substitutefont/greek-times-artemisia.tex
new file mode 100644
index 0000000000..b6740a37f6
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/greek-times-artemisia.tex
@@ -0,0 +1,71 @@
+% Example and test for the substitutefont package:
+\documentclass{article}
+\usepackage{parskip}
+\usepackage[LGR,T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref}
+\usepackage{bookmark}
+\pagestyle{empty}
+
+\usepackage{substitutefont}
+
+% Serif
+\usepackage[scaled=0.97]{newtxtext}
+\substitutefont{LGR}{\rmdefault}{artemisia}
+
+% Sans
+\substitutefont{LGR}{\sfdefault}{neohellenic}
+
+% Monospaced
+\substitutefont{LGR}{\ttdefault}{cmtt} % CB fonts
+
+
+% Teststring
+\newcommand{\alphabet}{%
+ abcdefghjiklmnoprqrstuvwxyzäöüß
+ {\fontencoding{LGR}\selectfont abgdezhjiklmnxoprsctufqyw} \\
+ ABCDEFGHJIKLMNOPRQRSTUVWXYZÄÖÜ
+ {\fontencoding{LGR}\selectfont ABGDEZHJIKLMNXOPRSTUFQYW}%
+}
+
+\begin{document}
+
+\section*{Times/Helvetica/TXTT and Greek replacements}
+
+Use Times, Helvetica, and TXTT from the
+\href{http://www.ctan.org/pkg/newtx}{newtx} package and
+\href{http://www.ctan.org/pkg/gfsartemisia}{GFS Artemisia},
+\href{http://www.ctan.org/pkg/gfsneohellenic}{GFS Neohellenic},
+and \href{http://www.ctan.org/pkg/cbgreek-complete}{CB-Fonts},
+for Greek text.\footnote{%
+See the \href{http://www.ctan.org/pkg/txfontsb}{txfontsb}
+package for an alternative.}
+
+\begin{description}
+ \item [Normal:] \alphabet
+
+ \item [it:] \textit{\alphabet}
+
+ \item [sl:] \textsl{\alphabet}
+
+ \item [bf:] \textbf{\alphabet}
+
+ \item [bf it:] \textbf{\textit\alphabet}
+
+ \item [sc:] \textsc{\alphabet}
+
+ % \item [bf sc:] \textsc{\textbf\alphabet} missing in Bodoni
+
+ \item [sf:] \textsf{\alphabet}
+
+ \item [sf bf:] \textsf{\textbf\alphabet}
+
+ \item [sf sl:] \textsf{\textsl\alphabet}
+
+ \item [sf sc:] \textsf{\textsc\alphabet}
+
+ \item [tt:] \texttt{\alphabet}
+
+\end{description}
+
+\end{document}
diff --git a/macros/latex/contrib/substitutefont/substitutefont-doc.html b/macros/latex/contrib/substitutefont/substitutefont-doc.html
new file mode 100644
index 0000000000..8df4b99b40
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/substitutefont-doc.html
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
+<title>substitutefont</title>
+<meta name="copyright" content="© 2010 Günter Milde &lt;milde&#64;users.sf.net&gt;" />
+<link rel="stylesheet" href="../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css1.css" type="text/css" />
+<link rel="stylesheet" href="../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css2.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="substitutefont">
+<h1 class="title">substitutefont</h1>
+<h2 class="subtitle" id="combine-font-families">Combine font families</h2>
+
+<dl class="docinfo simple">
+<dt class="copyright">Copyright</dt>
+<dd class="copyright">© 2010 Günter Milde &lt;<a class="reference external" href="mailto:milde&#64;users.sf.net">milde&#64;users.sf.net</a>&gt;</dd>
+<dt>Contributor</dt>
+<dd><p>Special thanks to Ulrike Fischer who provided
+the indirect definition with active <tt class="literal">\nfss&#64;catcodes</tt>.</p>
+</dd>
+<dt>Licence</dt>
+<dd><p>This work may be distributed and/or modified under the
+conditions of the <a class="reference external" href="http://www.latex-project.org/lppl.txt">LaTeX Project Public License</a>,
+either version&nbsp;1.3 of this license or (at your option)
+any later version.</p>
+</dd>
+</dl>
+<p>In traditional 8-bit LaTeX, fonts are restricted to 256 glyphs per file.
+To support different languages and scripts, the New Font Selection Scheme
+uses a set of TeX font encodings <a class="citation-reference" href="#encguide" id="id1">[encguide]</a>.</p>
+<p>Many Latin TeX fonts do not support Greek or Cyrillic, while many non-Latin
+fonts are extensions of a Latin font family but use a different family name
+due to license reasons or the creators preference.</p>
+<p>The <cite>substitutefont</cite> package facilitates the task to set up a font family as
+substitute for another one in a specified <a class="reference external" href="encguide">font encoding</a>.</p>
+<dl class="field-list">
+<dt>News</dt>
+<dd><p>2013-11-04 Documentation/Test fixes.</p>
+</dd>
+<dt>Source</dt>
+<dd><p><a class="reference external" href="substitutefont.sty">substitutefont.sty</a></p>
+<p>The literate source was converted with <a class="reference external" href="http://pylit.berlios.de">PyLit</a> to <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> and
+with <a class="reference external" href="http://docutils.sourceforge.net/rst.html">Docutils</a> to the HTML documentation <a class="reference external" href="substitutefont.sty.html">substitutefont.sty.html</a>.</p>
+</dd>
+</dl>
+<div class="section" id="usage">
+<h1>Usage</h1>
+<p>The macro <tt class="literal"><span class="pre">\substitutefont{&lt;encoding&gt;}{&lt;family&gt;}{&lt;new-family&gt;}</span></tt> selects
+the font family &lt;new-family&gt; as replacement for &lt;family&gt; in the font
+encoding &lt;encoding&gt;. The substitution must be defined before the first use
+of the specified font encoding, preferably in the document preamble.
+In contrast to the (deprecated) <tt class="literal">\substitutefontfamily</tt> macro provided by
+<a class="reference external" href="http://www.ctan.org/pkg/babel">Babel</a>, <tt class="literal">\substitutefont</tt> does not write auxiliary files.</p>
+<p>The <tt class="literal">&lt;encoding&gt;</tt> is one of the LaTeX font encodings <a class="citation-reference" href="#encguide" id="id2">[encguide]</a>, e.g., T1
+for Latin, T2A for Cyrillic(Russian), or LGR for Greek.</p>
+<p>For <tt class="literal">&lt;family&gt;</tt> and <tt class="literal"><span class="pre">&lt;new-family&gt;</span></tt>, use the «TeX names» of the font.
+There are defined by a TeX font package’s <tt class="literal">*.fd</tt> or <tt class="literal">*.sty</tt> file(s).
+LaTeX stores the default family names for Roman, Sans-Serif, and Teletype
+fonts in the <tt class="literal">\rmdefault</tt>, <tt class="literal">\sfdefault</tt>, and <tt class="literal">\ttdefault</tt> macros
+respectively.</p>
+<p>Example: Set the font family to Palatino using the standard package
+<cite>mathpazo</cite> for Latin and <a class="reference external" href="http://www.ctan.org/pkg/gfsdidot">GFS Didot</a> for Greek:</p>
+<pre class="literal-block">\usepackage[sc,slantedGreek]{mathpazo}
+\usepackage{substitutefont}
+\substitutefont{LGR}{\rmdefault}{udidot}
+</pre>
+<p>For details on LaTeX font selection, see <a class="citation-reference" href="#encguide" id="id3">[encguide]</a> and <a class="citation-reference" href="#fntguide" id="id4">[fntguide]</a>.</p>
+</div>
+<div class="section" id="tests-examples">
+<h1>Tests/Examples</h1>
+<ul class="simple">
+<li><p>Simple test with Latin fonts:
+<a class="reference external" href="substitutefont-test.tex">substitutefont-test.tex</a>, <a class="reference external" href="substitutefont-test.pdf">substitutefont-test.pdf</a></p></li>
+<li><p>Palatino with Greek from <a class="reference external" href="http://www.ctan.org/pkg/gfsdidot">GFS Didot</a>:
+<a class="reference external" href="greek-palatino-didot.tex">greek-palatino-didot.tex</a>, <a class="reference external" href="greek-palatino-didot.pdf">greek-palatino-didot.pdf</a></p></li>
+<li><p>Times/Helvetica/Courier (<a class="reference external" href="http://www.ctan.org/pkg/newtx">newtx</a>) with <a class="reference external" href="http://www.ctan.org/pkg/gfsartemisia">GFS Artemisia</a>, <a class="reference external" href="http://www.ctan.org/pkg/gfsneohellenic">GFS
+Neohellenic</a>, and teletype from the <a class="reference external" href="http://www.ctan.org/pkg/cbgreek-complete">CB</a> fonts: <a class="reference external" href="http://www.ctan.org/pkg/txfontsb">txfontsb</a>
+<a class="reference external" href="greek-times-artemisia.tex">greek-times-artemisia.tex</a>, <a class="reference external" href="greek-times-artemisia.pdf">greek-times-artemisia.pdf</a></p></li>
+<li><p>Latin Modern with Cyrillic from <a class="reference external" href="http://www.ctan.org/pkg/cm-lgc">CM LGC</a>:
+<a class="reference external" href="cyrillic-lm-lgc.tex">cyrillic-lm-lgc.tex</a>, <a class="reference external" href="cyrillic-lm-lgc.pdf">cyrillic-lm-lgc.pdf</a></p></li>
+<li><p>Times/Helvetica/Courier (TeX Gyre) with Cyrillic <a class="reference external" href="http://www.ctan.org/pkg/paratype">ParaType</a> fonts:
+<a class="reference external" href="cyrillic-paratype.tex">cyrillic-paratype.tex</a>, <a class="reference external" href="cyrillic-paratype.pdf">cyrillic-paratype.pdf</a></p></li>
+</ul>
+</div>
+<div class="section" id="references">
+<h1>References</h1>
+<dl class="citation"><dt class="label">[encguide]</dt>
+<dd id="encguide">
+<em>(<a class="fn-backref" href="#id1">1</a>, <a class="fn-backref" href="#id2">2</a>, <a class="fn-backref" href="#id3">3</a>)</em> <p class="last">Frank Mittelbach, Robin Fairbairns, Werner Lemberg,
+LaTeX3 Project Team, <cite>LaTeX font encodings</cite>:
+<a class="reference external" href="http://mirror.ctan.org/macros/latex/doc/encguide.pdf">http://mirror.ctan.org/macros/latex/doc/encguide.pdf</a>.</p>
+</dd>
+</dl>
+<dl class="citation"><dt class="label"><a class="fn-backref" href="#id4">[fntguide]</a></dt>
+<dd id="fntguide">
+<p class="first last">LaTeX3 Project Team, <cite>LaTeX 2e font selection</cite>:
+<a class="reference external" href="http://mirror.ctan.org/macros/latex/doc/fntguide.pdf">http://mirror.ctan.org/macros/latex/doc/fntguide.pdf</a>.</p>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
diff --git a/macros/latex/contrib/substitutefont/substitutefont-test.pdf b/macros/latex/contrib/substitutefont/substitutefont-test.pdf
new file mode 100644
index 0000000000..d357cf6764
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/substitutefont-test.pdf
Binary files differ
diff --git a/macros/latex/contrib/substitutefont/substitutefont-test.tex b/macros/latex/contrib/substitutefont/substitutefont-test.tex
new file mode 100644
index 0000000000..0d32eb18ce
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/substitutefont-test.tex
@@ -0,0 +1,55 @@
+\documentclass[a4paper]{article}
+\usepackage{fixltx2e} % LaTeX patches, \textsubscript
+\usepackage[T1,OT1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage{parskip}
+
+\title{Simple substitutefont test}
+\author{Günter Milde}
+
+% Combine "Latin Modern" fonts for OT1 and Bookman for T1.
+\usepackage{substitutefont}
+\usepackage{lmodern}
+% Substitution also works for fonts that exist in the specified encoding:
+\substitutefont{T1}{lmr}{pbk}
+
+% \addto\extrasgerman{\fontencoding{T1}\selectfont}
+% \addto\noextrasgerman{\fontencoding{\encodingdefault}\selectfont}
+
+\begin{document}
+
+\maketitle
+
+This document is a test that should work with any standard basic LaTeX
+installation. For real use cases, see the test documents setting up matching
+Latin and Greek or Cyrillic fonts.
+
+Some text in \encodingdefault{} encoding, the font is Latin Modern:
+Résumé of Nathan Söderblom.
+
+% (Defining the substitution in the document body is possible (but not
+% recommended) if it is done before the first use of a font in the specified
+% encoding.)
+% \substitutefont{T1}{lmr}{pbk}
+
+\fontencoding{T1}\selectfont
+
+Some text in T1 encoding, the font is Bookmark: Résumé of Nathan Söderblom%
+\footnote{Compare the result of drag-and-drop or text search for words with
+accented characters for OT1 and T1 encoded text.}
+
+\fontencoding{OT1}\selectfont
+
+Back to OT1 and Latin Modern.
+
+% The following substitution definition is ignored, because T1 fonts are
+% already set up:
+\substitutefont{T1}{lmr}{pag}
+
+
+
+\fontencoding{T1}\selectfont
+
+Some more text in T1 encoding and Bookmark.
+
+\end{document}
diff --git a/macros/latex/contrib/substitutefont/substitutefont.sty b/macros/latex/contrib/substitutefont/substitutefont.sty
new file mode 100644
index 0000000000..1960c8cff9
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/substitutefont.sty
@@ -0,0 +1,80 @@
+% Easy font substitution
+% **********************
+%
+% :Copyright: © 2010 Günter Milde
+%
+% :Contributor: Special thanks to Ulrike Fischer who provided
+% the indirect definition with active ``\nfss@catcodes``.
+%
+% :Licence: This work may be distributed and/or modified under the
+% conditions of the `LaTeX Project Public License`_, either
+% version 1.3 of this license or any later version.
+%
+% :Abstract: Provide the ``\substitutefont`` macro for defining
+% substitute fonts for specified font encodings.
+%
+% :Identification:
+% ::
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{substitutefont}
+[2012/07/07 v0.1.3 combine font families]
+
+% Changelog:
+% .. class:: borderless
+%
+% ============ ===== =================================================
+% 2010-11-04 0.1 initial version
+% 2012-04-30 0.1.1 documentation update, upload to CTAN
+% 2012-07-05 0.1.2 documentation/example update
+% 2012-07-07 0.1.3 bugfix (comment usage example)
+% 2013-11-04 0.1.4 documentation update
+% ============ ===== =================================================
+%
+%
+% Usage
+% =====
+%
+% The macro ``\substitutefont{<encoding>}{<family>}{<new-family>}``
+% selects the font <new-family> as replacement for <family> if the font
+% encoding is <encoding> in the variants "normal", "italic", "slanted",
+% and "small-caps" and the shapes "medium", "bold", and "bold-extended".
+%
+% Example:
+% Palatino with the standard package `mathpazo`_ for Latin and
+% `GFS Didot`_ for Greek:
+%
+% .. code:: latex
+%
+% \usepackage[sc,slantedGreek]{mathpazo}
+% \usepackage{substitutefont}
+% \substitutefont{LGR}{\rmdefault}{udidot}
+%
+%
+% Implementation
+% ==============
+% ::
+
+\begingroup
+\nfss@catcodes
+\newcommand*{\substitutefont}[3]{%
+ \DeclareFontFamily{#1}{#2}{}
+ \DeclareFontShape{#1}{#2}{m}{n}{<->ssub * #3/m/n}{}
+ \DeclareFontShape{#1}{#2}{m}{it}{<->ssub * #3/m/it}{}
+ \DeclareFontShape{#1}{#2}{m}{sl}{<->ssub * #3/m/sl}{}
+ \DeclareFontShape{#1}{#2}{m}{sc}{<->ssub * #3/m/sc}{}
+ \DeclareFontShape{#1}{#2}{b}{n}{<->ssub * #3/b/n}{}
+ \DeclareFontShape{#1}{#2}{b}{it}{<->ssub * #3/b/it}{}
+ \DeclareFontShape{#1}{#2}{b}{sl}{<->ssub * #3/b/sl}{}
+ \DeclareFontShape{#1}{#2}{b}{sc}{<->ssub * #3/b/sc}{}
+ \DeclareFontShape{#1}{#2}{bx}{n}{<->ssub * #3/bx/n}{}
+ \DeclareFontShape{#1}{#2}{bx}{it}{<->ssub * #3/bx/it}{}
+ \DeclareFontShape{#1}{#2}{bx}{sl}{<->ssub * #3/bx/sl}{}
+ \DeclareFontShape{#1}{#2}{bx}{sc}{<->ssub * #3/bx/sc}{}
+}
+\global\let\substitutefont\substitutefont
+\endgroup
+
+% .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt
+% .. _GFS Didot: http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html
+% .. _mathpazo: http://www.ctan.org/pkg/mathpazo
diff --git a/macros/latex/contrib/substitutefont/substitutefont.sty.html b/macros/latex/contrib/substitutefont/substitutefont.sty.html
new file mode 100644
index 0000000000..9d91bd89a9
--- /dev/null
+++ b/macros/latex/contrib/substitutefont/substitutefont.sty.html
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
+<title>Easy font substitution</title>
+<meta name="copyright" content="© 2010 Günter Milde" />
+<link rel="stylesheet" href="../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css1.css" type="text/css" />
+<link rel="stylesheet" href="../../../../Python/docutils-svn/docutils/docutils/writers/html4strict/html4css2.css" type="text/css" />
+</head>
+<body>
+<div class="document" id="easy-font-substitution">
+<h1 class="title">Easy font substitution</h1>
+
+<dl class="docinfo">
+<dt class="copyright">Copyright</dt>
+<dd class="copyright">© 2010 Günter Milde</dd>
+<dt>Contributor</dt>
+<dd><p>Special thanks to Ulrike Fischer who provided
+the indirect definition with active <tt class="literal">\nfss&#64;catcodes</tt>.</p>
+</dd>
+<dt>Licence</dt>
+<dd><p>This work may be distributed and/or modified under the
+conditions of the <a class="reference external" href="http://www.latex-project.org/lppl.txt">LaTeX Project Public License</a>, either
+version&nbsp;1.3 of this license or any later version.</p>
+</dd>
+<dt>Identification</dt>
+<dd><pre class="literal-block">\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{substitutefont}
+[2012/07/07 v0.1.3 combine font families]
+</pre>
+</dd>
+</dl>
+<div class="abstract topic">
+<p class="topic-title first">Abstract</p>
+<p>Provide the <tt class="literal">\substitutefont</tt> macro for defining
+substitute fonts for specified font encodings.</p>
+</div>
+<dl class="docutils">
+<dt>Changelog:</dt>
+<dd><table class="borderless">
+<colgroup>
+<col width="18%" />
+<col width="8%" />
+<col width="74%" />
+</colgroup>
+<tbody>
+<tr><td><p>2010-11-04</p></td>
+<td><p>0.1</p></td>
+<td><p>initial version</p></td>
+</tr>
+<tr><td><p>2012-04-30</p></td>
+<td><p>0.1.1</p></td>
+<td><p>documentation update, upload to CTAN</p></td>
+</tr>
+<tr><td><p>2012-07-05</p></td>
+<td><p>0.1.2</p></td>
+<td><p>documentation/example update</p></td>
+</tr>
+<tr><td><p>2012-07-07</p></td>
+<td><p>0.1.3</p></td>
+<td><p>bugfix (comment usage example)</p></td>
+</tr>
+<tr><td><p>2013-11-04</p></td>
+<td><p>0.1.4</p></td>
+<td><p>documentation update</p></td>
+</tr>
+</tbody>
+</table>
+</dd>
+</dl>
+<div class="section" id="usage">
+<h1>Usage</h1>
+<p>The macro <tt class="literal"><span class="pre">\substitutefont{&lt;encoding&gt;}{&lt;family&gt;}{&lt;new-family&gt;}</span></tt>
+selects the font &lt;new-family&gt; as replacement for &lt;family&gt; if the font
+encoding is &lt;encoding&gt; in the variants “normal”, “italic”, “slanted”,
+and “small-caps” and the shapes “medium”, “bold”, and “bold-extended”.</p>
+<dl class="docutils">
+<dt>Example:</dt>
+<dd><p>Palatino with the standard package <a class="reference external" href="http://www.ctan.org/pkg/mathpazo">mathpazo</a> for Latin and
+<a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html">GFS Didot</a> for Greek:</p>
+<pre class="code latex literal-block"><span class="keyword">\usepackage</span><span class="name attribute">[sc,slantedGreek]</span><span class="name builtin">{</span>mathpazo<span class="name builtin">}</span>
+<span class="keyword">\usepackage</span><span class="name builtin">{</span>substitutefont<span class="name builtin">}</span>
+<span class="keyword">\substitutefont</span><span class="name builtin">{</span>LGR<span class="name builtin">}{</span><span class="keyword">\rmdefault</span><span class="name builtin">}{</span>udidot<span class="name builtin">}</span>
+</pre>
+</dd>
+</dl>
+</div>
+<div class="section" id="implementation">
+<h1>Implementation</h1>
+<pre class="literal-block">\begingroup
+\nfss&#64;catcodes
+\newcommand*{\substitutefont}[3]{%
+ \DeclareFontFamily{#1}{#2}{}
+ \DeclareFontShape{#1}{#2}{m}{n}{&lt;-&gt;ssub * #3/m/n}{}
+ \DeclareFontShape{#1}{#2}{m}{it}{&lt;-&gt;ssub * #3/m/it}{}
+ \DeclareFontShape{#1}{#2}{m}{sl}{&lt;-&gt;ssub * #3/m/sl}{}
+ \DeclareFontShape{#1}{#2}{m}{sc}{&lt;-&gt;ssub * #3/m/sc}{}
+ \DeclareFontShape{#1}{#2}{b}{n}{&lt;-&gt;ssub * #3/b/n}{}
+ \DeclareFontShape{#1}{#2}{b}{it}{&lt;-&gt;ssub * #3/b/it}{}
+ \DeclareFontShape{#1}{#2}{b}{sl}{&lt;-&gt;ssub * #3/b/sl}{}
+ \DeclareFontShape{#1}{#2}{b}{sc}{&lt;-&gt;ssub * #3/b/sc}{}
+ \DeclareFontShape{#1}{#2}{bx}{n}{&lt;-&gt;ssub * #3/bx/n}{}
+ \DeclareFontShape{#1}{#2}{bx}{it}{&lt;-&gt;ssub * #3/bx/it}{}
+ \DeclareFontShape{#1}{#2}{bx}{sl}{&lt;-&gt;ssub * #3/bx/sl}{}
+ \DeclareFontShape{#1}{#2}{bx}{sc}{&lt;-&gt;ssub * #3/bx/sc}{}
+}
+\global\let\substitutefont\substitutefont
+\endgroup
+</pre>
+</div>
+</div>
+</body>
+</html>