summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex/contrib/substitutefont/substitutefont.sty.html
diff options
context:
space:
mode:
Diffstat (limited to 'obsolete/macros/latex/contrib/substitutefont/substitutefont.sty.html')
-rw-r--r--obsolete/macros/latex/contrib/substitutefont/substitutefont.sty.html111
1 files changed, 111 insertions, 0 deletions
diff --git a/obsolete/macros/latex/contrib/substitutefont/substitutefont.sty.html b/obsolete/macros/latex/contrib/substitutefont/substitutefont.sty.html
new file mode 100644
index 0000000000..4e4bf9a636
--- /dev/null
+++ b/obsolete/macros/latex/contrib/substitutefont/substitutefont.sty.html
@@ -0,0 +1,111 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta charset="utf-8" />
+<meta name="generator" content="Docutils 0.21b.dev: https://docutils.sourceforge.io/" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<meta name="dcterms.rights" content="© 2010 Günter Milde" />
+<title>Easy font substitution</title>
+<link rel="schema.dcterms" href="http://purl.org/dc/terms/"/>
+<link rel="stylesheet" href="../../Python/docutils/docutils/docutils/writers/html5_polyglot/minimal.css" type="text/css" />
+<link rel="stylesheet" href="../../Python/docutils/docutils/docutils/writers/html5_polyglot/responsive.css" type="text/css" />
+</head>
+<body>
+<main id="easy-font-substitution">
+<h1 class="title">Easy font substitution</h1>
+<dl class="docinfo">
+<dt class="copyright">Copyright<span class="colon">:</span></dt>
+<dd class="copyright">© 2010 Günter Milde</dd>
+<dt class="contributor">Contributor<span class="colon">:</span></dt>
+<dd class="contributor"><p>Special thanks to Ulrike Fischer who provided
+the indirect definition with active <span class="docutils literal">\nfss&#64;catcodes</span>.</p>
+</dd>
+<dt class="licence">Licence<span class="colon">:</span></dt>
+<dd class="licence"><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 any later version.</p>
+</dd>
+<dt class="identification">Identification<span class="colon">:</span></dt>
+<dd class="identification"><pre class="literal-block">\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{substitutefont}
+[2023-08-13 v0.1.5 combine font families (obsolete)]</pre>
+</dd>
+</dl>
+<div class="topic abstract" role="doc-abstract">
+<p class="topic-title">Abstract</p>
+<p>Provide the <span class="docutils literal">\substitutefont</span> macro for defining
+substitute fonts for specified font encodings.</p>
+</div>
+<dl>
+<dt>Changelog:</dt>
+<dd><table class="borderless">
+<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>
+<tr><td><p>2023-08-13</p></td>
+<td><p>0.1.5</p></td>
+<td><p>declare obsolete, update documentation and tests</p></td>
+</tr>
+</tbody>
+</table>
+</dd>
+</dl>
+<section id="usage">
+<h2>Usage</h2>
+<p>The macro <span class="docutils literal"><span class="pre">\substitutefont{&lt;encoding&gt;}{&lt;family&gt;}{&lt;new-family&gt;}</span></span>
+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>
+<dt>Example:</dt>
+<dd><p>Palatino with the standard package <a class="reference external" href="https://ctan.org/pkg/mathpazo">mathpazo</a> for Latin and
+<a class="reference external" href="https://mirrors.ctan.org/help/Catalogue/entries/gfsdidot.html">GFS Didot</a> for Greek:</p>
+<pre class="code latex literal-block"><code><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></code></pre>
+</dd>
+</dl>
+</section>
+<section id="implementation">
+<h2>Implementation</h2>
+<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>
+</section>
+</main>
+</body>
+</html>