diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-05 01:02:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-05 01:02:19 +0000 |
commit | 5580b0901368ea492550c898d28628d7a224b9b0 (patch) | |
tree | 2a0a4ee4128f176371a9d8d5ad348229efae8cc1 | |
parent | dd92320637427aa7d3a3bced788047134a4c0281 (diff) |
substitutefont (4nov13)
git-svn-id: svn://tug.org/texlive/trunk@32066 c570f23f-e606-0410-a88d-b1316a301751
16 files changed, 432 insertions, 253 deletions
diff --git a/Master/texmf-dist/doc/latex/substitutefont/README b/Master/texmf-dist/doc/latex/substitutefont/README index 588b16a3533..61c4a1416e5 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/README +++ b/Master/texmf-dist/doc/latex/substitutefont/README @@ -1,8 +1,9 @@ +substitutefont +-------------- Combine font families ********************* -:Date: Last revised 2013-10-28 -:Copyright: © 2011 Günter Milde <milde@users.sf.net> +: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 @@ -12,45 +13,89 @@ Combine font families .. _LaTeX Project Public License: http://www.latex-project.org/lppl.txt -Many free fonts are extensions of a basic font family with new glyphs -or shapes. Sometimes they are given a new name due to license reasons -or the creators preference. +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]_. -The `substitutefont` package facilitates the task to set up a font -family as substitute for another one in a specified font encoding. +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. -News: - 2013-10-28 Documentation/Test update. +The `substitutefont` package facilitates the task to set up a font family as +substitute for another one in a specified `font encoding <encguide>`_. -Example: - Palatino with the standard package `mathpazo` for Latin and - `GFS Didot`_ for Greek:: +: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}{pplx}{udidot} + \substitutefont{LGR}{\rmdefault}{udidot} -Source - `<substitutefont.sty>`_, `<substitutefont.sty.html>`__ +For details on LaTeX font selection, see [encguide]_ and [fntguide]_. Tests/Examples - * Palatino with Greek from `GFS Didot`_: - `<greek-palatino-didot.tex>`__, `<greek-palatino-didot.pdf>`__ - * Times (newtx) with GFS Artemisia, GFS Neohellenic, and CB: - `<greek-times-bodoni.tex>`__, `<greek-times-bodoni.pdf>`__ - * Latin Modern with Cyrillic from `CM LGC`_: - `<cyrillic-lm-lgc.tex>`__, `<cyrillic-lm-lgc.tex>`__ - * Times/Helvetica (TeX Gyre) with Cyrillic ParaType_ fonts: - `<cyrillic-times-paratype.tex>`__, `<cyrillic-times-paratype.pdf>`__ - - -References: - `LaTeX2e font selection - <http://mirror.ctan.org/macros/latex/doc/fntguide.pdf>`_ - - `LaTeX font encodings - <http://mirror.ctan.org/macros/latex/doc/encguide.pdf>`_ - - .. _GFS Didot: http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html - .. _CM LGC: http://mirror.ctan.org/help/Catalogue/entries/cm-lgc.html - .. _ParaType: http://mirror.ctan.org/help/Catalogue/entries/paratype.html +============== + +* 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/Master/texmf-dist/doc/latex/substitutefont/README.html b/Master/texmf-dist/doc/latex/substitutefont/README.html deleted file mode 100644 index 50a6b5e05f8..00000000000 --- a/Master/texmf-dist/doc/latex/substitutefont/README.html +++ /dev/null @@ -1,72 +0,0 @@ -<?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>Combine font families</title> -<meta name="date" content="Last revised 2013-10-28" /> -<meta name="copyright" content="© 2011 Günter Milde <milde@users.sf.net>" /> -<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="combine-font-families"> -<h1 class="title">Combine font families</h1> - -<dl class="docinfo simple"> -<dt class="date">Date</dt> -<dd class="date">Last revised 2013-10-28</dd> -<dt class="copyright">Copyright</dt> -<dd class="copyright">© 2011 Günter Milde <<a class="reference external" href="mailto:milde@users.sf.net">milde@users.sf.net</a>></dd> -<dt>Contributor</dt> -<dd><p>Special thanks to Ulrike Fischer who provided -the indirect definition with active <tt class="literal">\nfss@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 1.3 of this license or (at your option) -any later version.</p> -</dd> -</dl> -<p>Many free fonts are extensions of a basic font family with new glyphs -or shapes. Sometimes they are given a new 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 font encoding.</p> -<dl class="docutils"> -<dt>News:</dt> -<dd><p>2013-10-28 Documentation/Test update.</p> -</dd> -<dt>Example:</dt> -<dd><p>Palatino with the standard package <cite>mathpazo</cite> 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="literal-block">\usepackage[sc,slantedGreek]{mathpazo} -\usepackage{substitutefont} -\substitutefont{LGR}{pplx}{udidot} -</pre> -</dd> -<dt>Source</dt> -<dd><p><a class="reference external" href="substitutefont.sty">substitutefont.sty</a>, <a class="reference external" href="substitutefont.sty.html">substitutefont.sty.html</a></p> -</dd> -<dt>Tests/Examples</dt> -<dd><ul class="simple"> -<li><p>Palatino with Greek from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/gfsdidot.html">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 (newtx) with GFS Artemisia, GFS Neohellenic, and CB: -<a class="reference external" href="greek-times-bodoni.tex">greek-times-bodoni.tex</a>, <a class="reference external" href="greek-times-bodoni.pdf">greek-times-bodoni.pdf</a></p></li> -<li><p>Latin Modern with Cyrillic from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/cm-lgc.html">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.tex">cyrillic-lm-lgc.tex</a></p></li> -<li><p>Times/Helvetica (TeX Gyre) with Cyrillic <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/paratype.html">ParaType</a> fonts: -<a class="reference external" href="cyrillic-times-paratype.tex">cyrillic-times-paratype.tex</a>, <a class="reference external" href="cyrillic-times-paratype.pdf">cyrillic-times-paratype.pdf</a></p></li> -</ul> -</dd> -<dt>References:</dt> -<dd><p><a class="reference external" href="http://mirror.ctan.org/macros/latex/doc/fntguide.pdf">LaTeX2e font selection</a></p> -<p><a class="reference external" href="http://mirror.ctan.org/macros/latex/doc/encguide.pdf">LaTeX font encodings</a></p> -</dd> -</dl> -</div> -</body> -</html> diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf Binary files differindex fbd70cbf90c..027656c6424 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf +++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex index 8aba4c02845..2e68c7b876a 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex +++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-lm-lgc.tex @@ -1,36 +1,50 @@ -\documentclass[a4paper,russian]{scrartcl} -% generated by Docutils <http://docutils.sourceforge.net/> +\documentclass[a4paper]{scrartcl} \usepackage{fixltx2e} % LaTeX patches, \textsubscript -\usepackage[T1,T2A]{fontenc} +\usepackage[T2A, T1]{fontenc} \usepackage[utf8]{inputenc} -\usepackage[german,english,russian]{babel} -\usepackage{hyperref,bookmark} +\usepackage[russian,english]{babel} +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref} +\usepackage{bookmark} \usepackage{parskip} -\usepackage{substitutefont} +\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} - -\addto\extrasgerman{\fontencoding{T1}\selectfont} -\addto\noextrasgerman{\fontencoding{T2A}\selectfont} - \begin{document} \section*{Cyrillic fonts to match Latin Modern} -Latin Modern does not work for the Cyrillic script. If the CM-Super package -is installed, it will be used instead. If not, bitmapped LM fonts are used -for cyrillic text. The \emph{cmlgc} package provides free Cyrillic -vector-fonts matching CM. +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} -\section{Тест шрифтов} +\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. -\newcommand{\teststring}{Здравствуй, мир!} +\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 @@ -59,31 +73,12 @@ vector-fonts matching CM. \end{description} -\section{Section title in Latin script} - \selectlanguage{english} -Babel does not switch the font encoding when changing between Russian and -English or other languages using the Latin script. As a TeX \emph{standard -text font encoding}, T2A provides basic Latin. However, there are no -pre-composed accented Latin characters (compare the result of drag-and-drop -of the following line from the PDF rendering). - -\begin{quotation} - Résumé of Nathan Söderblom -\end{quotation} -For a document that mixes Russian with , e.g., German with its heavy use of -Umlauts, this may prove a major obstacle. The preamble of this document adds -font-encoding switches to the \texttt{extrasgerman} and -\texttt{noextrasgerman} babel macros. -So lets switch to German and try (again, compare the result of drag-and-drop -of the following line from the PDF rendering): - -\selectlanguage{german} - -\begin{quotation} - Viele Grüße! -\end{quotation} +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} diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdf b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-paratype.pdf Binary files differindex aa71e28726b..98a826b8907 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.pdf +++ b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-paratype.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-paratype.tex b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-paratype.tex new file mode 100644 index 00000000000..d5a4ac2a9fa --- /dev/null +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex b/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex deleted file mode 100644 index c311de4dbf0..00000000000 --- a/Master/texmf-dist/doc/latex/substitutefont/cyrillic-times-paratype.tex +++ /dev/null @@ -1,76 +0,0 @@ -\documentclass[a4paper,russian]{scrartcl} -\usepackage{fixltx2e} % LaTeX patches, \textsubscript -\usepackage[T1,T2A]{fontenc} -\usepackage[utf8]{inputenc} -\usepackage[english,russian]{babel} - -% Combine "TeX Gyre" fonts for Latin and "ParaType" fonts for Cyrillic: - -\usepackage{substitutefont} - -\usepackage[scaled=0.9]{PTSerif} -\usepackage{tgtermes} -\substitutefont{T2A}{qtm}{PTSerif-TLF} - -\usepackage[scaled=0.9]{PTSans} -\usepackage[scale=.90]{tgheros} -\substitutefont{T2A}{qhv}{PTSans-TLF} - -% \substitutefont{T2A}{qcr}{PTMono-TLF} -% -% !pdfTeX error: pdflatex (file PTMono-Regular-tlf-t2a--base): Font PTMono-Regula -% r-tlf-t2a--base at 657 not found -% ==> Fatal error occurred, no output PDF file produced! - -% use DejaVu for tt -\usepackage[scaled=0.85]{DejaVuSansMono} -\usepackage[matchlowercase]{tgcursor} -\substitutefont{T2A}{qcr}{DejaVuSansMono-TLF} - - -\begin{document} - -\section*{Cyrillic fonts to match Times/Helvetica/Cursor} - -TeX-compatible Cyrillic extensions to the URW standard Postscript fonts by -Valek Filippov were part of TeXGyre but removed due to license -incompatibility. The cyrillic fonts from the \emph{paratype} package are not -exact matches but work quite well (the \emph{paratype} package contains also -basic Latin fonts): - -\section{Тест шрифтов} - -\newcommand{\teststring}{Здравствуй, мир! - {\fontencoding{T1}\selectfont Hello world!}} - -\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:] missing % \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:] missing % \textsf{\textsc\teststring} - - \item [tt:] \texttt{\teststring}\footnote{The PTMono font fails to load, - so this example uses DejaVuSansMono.} - -\end{description} - - - -\end{document} diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf Binary files differindex e8e4d725101..933663d561c 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf +++ b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex index e391043feeb..e8bddaf56cb 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex +++ b/Master/texmf-dist/doc/latex/substitutefont/greek-palatino-didot.tex @@ -1,36 +1,46 @@ % Example and test for the substitutefont package: -\documentclass{article} +\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}{ppl}{udidot} +\substitutefont{LGR}{\rmdefault}{udidot} % Sans \usepackage[scale=.90]{tgheros} -\substitutefont{LGR}{qhv}{neohellenic} +\substitutefont{LGR}{\sfdefault}{neohellenic} % Monospaced -\usepackage[matchlowercase]{tgcursor} -\substitutefont{LGR}{qcr}{cmtt} % CB fonts +% \usepackage[matchlowercase]{tgcursor} +\renewcommand{\ttdefault}{txtt} +\substitutefont{LGR}{\ttdefault}{cmtt} % CB fonts +% \substitutefont{LGR}{\ttdefault}{fdm} % Droid Sans Mono % Teststring \newcommand{\alphabet}{% abcdefghjiklmnoprqrstuvwxyzäöüß - {\fontencoding{LGR}\selectfont abgdezhjiklmnxoprsctufqyw} \\ + \foreignlanguage{greek}{abgdezhjiklmnxoprsctufqyw} \\ ABCDEFGHJIKLMNOPRQRSTUVWXYZÄÖÜ - {\fontencoding{LGR}\selectfont ABGDEZHJIKLMNXOPRSTUFQYW} + \foreignlanguage{greek}{ABGDEZHJIKLMNXOPRSTUFQYW} } \begin{document} -\section*{Palatino/Helvetica/Courier and Greek replacements} +\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: @@ -62,15 +72,20 @@ Helvetica (TG Heros) with GFS Neohellenic: \item [sf sl:] \textsf{\textsl\alphabet} \item [sf sc:] \textsf{\textsc\alphabet} - + \end{description} -Curier (TG Cursor) with CB teletype: +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/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf Binary files differindex b1020c97870..9045f6c7a36 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf +++ b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex index 7d1e5c3d267..b6740a37f69 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex +++ b/Master/texmf-dist/doc/latex/substitutefont/greek-times-artemisia.tex @@ -3,20 +3,21 @@ \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}{ntxr}{artemisia} +\substitutefont{LGR}{\rmdefault}{artemisia} % Sans -% \renewcommand*\sfdefault{uop} -\substitutefont{LGR}{ntxss}{neohellenic} +\substitutefont{LGR}{\sfdefault}{neohellenic} % Monospaced -\substitutefont{LGR}{ntxtt}{cmtt} % CB fonts +\substitutefont{LGR}{\ttdefault}{cmtt} % CB fonts % Teststring @@ -24,14 +25,21 @@ abcdefghjiklmnoprqrstuvwxyzäöüß {\fontencoding{LGR}\selectfont abgdezhjiklmnxoprsctufqyw} \\ ABCDEFGHJIKLMNOPRQRSTUVWXYZÄÖÜ - {\fontencoding{LGR}\selectfont ABGDEZHJIKLMNXOPRSTUFQYW} + {\fontencoding{LGR}\selectfont ABGDEZHJIKLMNXOPRSTUFQYW}% } \begin{document} -\section*{Times/Helvetica/Courier (newtx) and Greek replacements} +\section*{Times/Helvetica/TXTT and Greek replacements} -Use GFS Artemisia, GFS Neohellenic, and CB for Greek text. +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 @@ -39,7 +47,7 @@ Use GFS Artemisia, GFS Neohellenic, and CB for Greek text. \item [it:] \textit{\alphabet} \item [sl:] \textsl{\alphabet} - + \item [bf:] \textbf{\alphabet} \item [bf it:] \textbf{\textit\alphabet} diff --git a/Master/texmf-dist/doc/latex/substitutefont/substitutefont-doc.html b/Master/texmf-dist/doc/latex/substitutefont/substitutefont-doc.html new file mode 100644 index 00000000000..8df4b99b402 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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 <milde@users.sf.net>" /> +<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 <<a class="reference external" href="mailto:milde@users.sf.net">milde@users.sf.net</a>></dd> +<dt>Contributor</dt> +<dd><p>Special thanks to Ulrike Fischer who provided +the indirect definition with active <tt class="literal">\nfss@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 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{<encoding>}{<family>}{<new-family>}</span></tt> 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) <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"><encoding></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"><family></tt> and <tt class="literal"><span class="pre"><new-family></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/Master/texmf-dist/doc/latex/substitutefont/substitutefont-test.pdf b/Master/texmf-dist/doc/latex/substitutefont/substitutefont-test.pdf Binary files differnew file mode 100644 index 00000000000..d357cf67644 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/substitutefont-test.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/substitutefont-test.tex b/Master/texmf-dist/doc/latex/substitutefont/substitutefont-test.tex new file mode 100644 index 00000000000..0d32eb18ce8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.html b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.html index 82c74c2ac74..9d91bd89a9b 100644 --- a/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.html +++ b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.html @@ -3,11 +3,11 @@ <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.10: http://docutils.sourceforge.net/" /> +<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="../../../../Code/Python/docutils-svn/docutils/docutils/writers/html4strict/html4css1.css" type="text/css" /> -<link rel="stylesheet" href="../../../../Code/Python/docutils-svn/docutils/docutils/writers/html4strict/html4css2.css" type="text/css" /> +<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"> @@ -45,7 +45,7 @@ substitute fonts for specified font encodings.</p> <col width="8%" /> <col width="74%" /> </colgroup> -<tbody valign="top"> +<tbody> <tr><td><p>2010-11-04</p></td> <td><p>0.1</p></td> <td><p>initial version</p></td> @@ -62,6 +62,10 @@ substitute fonts for specified font encodings.</p> <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> @@ -70,14 +74,15 @@ substitute fonts for specified font encodings.</p> <h1>Usage</h1> <p>The macro <tt class="literal"><span class="pre">\substitutefont{<encoding>}{<family>}{<new-family>}</span></tt> 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".</p> +encoding is <encoding> 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 <cite>mathpazo</cite> for Latin and +<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="k">\usepackage</span><span class="na">[sc,slantedGreek]</span><span class="nb">{</span>mathpazo<span class="nb">}</span> -<span class="k">\substitutefont</span><span class="nb">{</span>LGR<span class="nb">}{</span>pplx<span class="nb">}{</span>udidot<span class="nb">}</span> +<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> diff --git a/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty b/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty index f1a4b18c365..1960c8cff9f 100644 --- a/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty +++ b/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty @@ -28,6 +28,7 @@ % 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 % ============ ===== ================================================= % % @@ -40,13 +41,14 @@ % and "small-caps" and the shapes "medium", "bold", and "bold-extended". % % Example: -% Palatino with the standard package `mathpazo` for Latin and +% Palatino with the standard package `mathpazo`_ for Latin and % `GFS Didot`_ for Greek: % % .. code:: latex % % \usepackage[sc,slantedGreek]{mathpazo} -% \substitutefont{LGR}{pplx}{udidot} +% \usepackage{substitutefont} +% \substitutefont{LGR}{\rmdefault}{udidot} % % % Implementation @@ -75,3 +77,4 @@ % .. _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 |