summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml')
-rw-r--r--Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml101
1 files changed, 101 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml
new file mode 100644
index 00000000000..30089a11a63
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml
@@ -0,0 +1,101 @@
+<?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.9: 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/04/30 v0.1.1 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 valign="top">
+<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>
+</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 &quot;normal&quot;, &quot;italic&quot;, &quot;slanted&quot;,
+and &quot;small-caps&quot; and the shapes &quot;medium&quot;, &quot;bold&quot;, and &quot;bold-extended&quot;.</p>
+<dl class="docutils">
+<dt>Example:</dt>
+<dd><p>Use the <cite>txtt</cite> font family from <a class="reference external" href="http://mirror.ctan.org/help/Catalogue/entries/txfonts.html">txfonts</a> instead of CM for
+monospaced text (enables monospaced-bold as well as
+monospaced-italic):</p>
+<p><tt class="literal"><span class="pre">\substitutefont{T1}{txtt}{cmtt}</span></tt></p>
+</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>