summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/substitutefont/substitutefont.sty.html
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/substitutefont.sty.html
Initial commit
Diffstat (limited to 'macros/latex/contrib/substitutefont/substitutefont.sty.html')
-rw-r--r--macros/latex/contrib/substitutefont/substitutefont.sty.html115
1 files changed, 115 insertions, 0 deletions
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>