diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-05 00:36:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-05 00:36:08 +0000 |
commit | 69763be32bfe1e90e08819dfc251c1fbf1d0b8a7 (patch) | |
tree | bc0f5acb0eb3f69ae1521058cc6088980a895337 | |
parent | 779adbaa19cc8f97203ea9938e435799989240b4 (diff) |
new latex package substitutefont 0.1.1 (30apr12)
git-svn-id: svn://tug.org/texlive/trunk@26199 c570f23f-e606-0410-a88d-b1316a301751
14 files changed, 1123 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/substitutefont/README b/Master/texmf-dist/doc/latex/substitutefont/README new file mode 100644 index 00000000000..64ff715c389 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/README @@ -0,0 +1,49 @@ +Combine font families +********************* + +:Date: Last revised 2012-04-30 +:Copyright: © 2011 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 + +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. + +The `substitutefont` package facilitates the task to set up a font +family as substitute for another one in a specified font encoding. + +Example: + Use the `txtt` font family from txfonts_ instead of CM for + monospaced text (enables monospaced-bold as well as + monospaced-italic):: + + \usepackage{substitutefont} + \substitutefont{T1}{txtt}{cmtt} + +Source + `<substitutefont.sty>`_, `<substitutefont.sty.xhtml>`__ + +_`Tests` + * CB-Fonts for Greek text in a document using Times/Helvetica/Courier: + `<test-greek.tex>`__, `<test-greek.pdf>`__ + * TeX-Gyre with Cyrillic from the once included `Freefonts`: + `<test-cyrillic.tex>`__, `<test-cyrillic.pdf>`__ + * Monospaced text in many variants with txtt: + `<test-txtt.tex>`__, `<test-txtt.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>`_ + + .. _txfonts: http://mirror.ctan.org/help/Catalogue/entries/txfonts.html diff --git a/Master/texmf-dist/doc/latex/substitutefont/README.html b/Master/texmf-dist/doc/latex/substitutefont/README.html new file mode 100644 index 00000000000..cc1908436bd --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/README.html @@ -0,0 +1,742 @@ +<?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>Combine font families</title> +<meta name="date" content="Last revised 2012-04-30" /> +<meta name="copyright" content="© 2011 Günter Milde <milde@users.sf.net>" /> +<style type="text/css"> + +/* +:Author: David Goodger (goodger@python.org) +:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $ +:Copyright: This stylesheet has been placed in the public domain. + +Default cascading style sheet for the HTML output of Docutils. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. +*/ + +/* used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0 } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 ! important } + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 ! important } + +.last, .with-subtitle { + margin-bottom: 0 ! important } + +.hidden { + display: none } + +a.toc-backref { + text-decoration: none ; + color: black } + +blockquote.epigraph { + margin: 2em 5em ; } + +dl.docutils dd { + margin-bottom: 0.5em } + +object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { + overflow: hidden; +} + +/* Uncomment (and remove this text!) to get bold-faced definition list terms +dl.docutils dt { + font-weight: bold } +*/ + +div.abstract { + margin: 2em 5em } + +div.abstract p.topic-title { + font-weight: bold ; + text-align: center } + +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { + margin: 2em ; + border: medium outset ; + padding: 1em } + +div.admonition p.admonition-title, div.hint p.admonition-title, +div.important p.admonition-title, div.note p.admonition-title, +div.tip p.admonition-title { + font-weight: bold ; + font-family: sans-serif } + +div.attention p.admonition-title, div.caution p.admonition-title, +div.danger p.admonition-title, div.error p.admonition-title, +div.warning p.admonition-title { + color: red ; + font-weight: bold ; + font-family: sans-serif } + +/* Uncomment (and remove this text!) to get reduced vertical space in + compound paragraphs. +div.compound .compound-first, div.compound .compound-middle { + margin-bottom: 0.5em } + +div.compound .compound-last, div.compound .compound-middle { + margin-top: 0.5em } +*/ + +div.dedication { + margin: 2em 5em ; + text-align: center ; + font-style: italic } + +div.dedication p.topic-title { + font-weight: bold ; + font-style: normal } + +div.figure { + margin-left: 2em ; + margin-right: 2em } + +div.footer, div.header { + clear: both; + font-size: smaller } + +div.line-block { + display: block ; + margin-top: 1em ; + margin-bottom: 1em } + +div.line-block div.line-block { + margin-top: 0 ; + margin-bottom: 0 ; + margin-left: 1.5em } + +div.sidebar { + margin: 0 0 0.5em 1em ; + border: medium outset ; + padding: 1em ; + background-color: #ffffee ; + width: 40% ; + float: right ; + clear: right } + +div.sidebar p.rubric { + font-family: sans-serif ; + font-size: medium } + +div.system-messages { + margin: 5em } + +div.system-messages h1 { + color: red } + +div.system-message { + border: medium outset ; + padding: 1em } + +div.system-message p.system-message-title { + color: red ; + font-weight: bold } + +div.topic { + margin: 2em } + +h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, +h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { + margin-top: 0.4em } + +h1.title { + text-align: center } + +h2.subtitle { + text-align: center } + +hr.docutils { + width: 75% } + +img.align-left, .figure.align-left, object.align-left { + clear: left ; + float: left ; + margin-right: 1em } + +img.align-right, .figure.align-right, object.align-right { + clear: right ; + float: right ; + margin-left: 1em } + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left } + +.align-center { + clear: both ; + text-align: center } + +.align-right { + text-align: right } + +/* reset inner alignment in figures */ +div.align-right { + text-align: inherit } + +/* div.align-center * { */ +/* text-align: left } */ + +ol.simple, ul.simple { + margin-bottom: 1em } + +ol.arabic { + list-style: decimal } + +ol.loweralpha { + list-style: lower-alpha } + +ol.upperalpha { + list-style: upper-alpha } + +ol.lowerroman { + list-style: lower-roman } + +ol.upperroman { + list-style: upper-roman } + +p.attribution { + text-align: right ; + margin-left: 50% } + +p.caption { + font-style: italic } + +p.credits { + font-style: italic ; + font-size: smaller } + +p.label { + white-space: nowrap } + +p.rubric { + font-weight: bold ; + font-size: larger ; + color: maroon ; + text-align: center } + +p.sidebar-title { + font-family: sans-serif ; + font-weight: bold ; + font-size: larger } + +p.sidebar-subtitle { + font-family: sans-serif ; + font-weight: bold } + +p.topic-title { + font-weight: bold } + +pre.address { + margin-bottom: 0 ; + margin-top: 0 ; + font: inherit } + +pre.literal-block, pre.doctest-block, pre.math { + margin-left: 2em ; + margin-right: 2em } + +span.classifier { + font-family: sans-serif ; + font-style: oblique } + +span.classifier-delimiter { + font-family: sans-serif ; + font-weight: bold } + +span.interpreted { + font-family: sans-serif } + +span.option { + white-space: nowrap } + +span.pre { + white-space: pre } + +span.problematic { + color: red } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80% } + +table.citation { + border-left: solid 1px gray; + margin-left: 1px } + +table.docinfo { + margin: 2em 4em } + +table.docutils { + margin-top: 0.5em ; + margin-bottom: 0.5em } + +table.footnote { + border-left: solid 1px black; + margin-left: 1px } + +table.docutils td, table.docutils th, +table.docinfo td, table.docinfo th { + padding-left: 0.5em ; + padding-right: 0.5em ; + vertical-align: top } + +table.docutils th.field-name, table.docinfo th.docinfo-name { + font-weight: bold ; + text-align: left ; + white-space: nowrap ; + padding-left: 0 } + +h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, +h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { + font-size: 100% } + +ul.auto-toc { + list-style-type: none } + +</style> +<style type="text/css"> + +/* html4css2.css: Cascading style sheet for Docutils' html4strict writer. */ +/* */ +/* :Author: Günter Milde */ +/* :Copyright: © 2009 Günter Milde. */ +/* Released without warranties or conditions of any kind */ +/* under the terms of the Apache License, Version 2.0 */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* This stylesheet supplements the Docutils standard style 'html4css1.css'. */ +/* It uses CSS 2.1 elements (supported by up-to-date versions of popular */ +/* browsers). */ + +/* General rules */ +/* ============= */ + +body { + padding: 0 5%; + margin: 8px 0; + line-height:1.3; + /* http://ilovetypography.com/2008/02/28/a-guide-to-web-typography/ + recommends "line-spacing that’s at least 140% of your text size" */ + counter-reset: table; + /* counter-reset: figure; */ +} + +/* avoid long lines --> better reading */ +/* OTOH: lines should not be too short because of missing hyphenation, */ +div.document { + max-width: 45em; + margin: auto; +} + +/* separate items except for compact lists */ +dl > dd { + margin-bottom: 1em; +} +.compact li, .compact p, .compact ul, .compact ol +dl.simple > dd, .simple li, .simple p, .simple ul, .simple ol { + margin-top: 0; + margin-bottom: 0; +/* background: magenta; */ +} +dl.simple, dl.compact, dl.simple > dd, dl.compact > dd { + margin-top: 0; + margin-bottom: 0; +/* background: lightgreen; */ +} + +/* space around paragraphs */ +dl > dd p:first-child { + margin: 0; +} + +/* Sidebar */ +/* ------- */ + +div.sidebar { + margin-right: -5%; +} + +/* Special definition lists */ +/* ======================== */ + +/* bold definition term on the same line as the label */ +dl.field-list > dt, dl.option-list > dt, dl.docinfo > dt, +dl.footnote > dt, dl.citation > dt, dl.description > dt { + clear: left; + float: left; + margin: 0; + padding: 0; + padding-right: 0.5em; + font-weight: bold; +} +/* except for these */ +dl.option-list > dt, dl.footnote > dt { + font-weight: normal; +} + + + +/* Field Lists */ +/* ----------- */ + +/* field names followed by a colon */ +dl.field-list > dt:after, dl.docinfo > dt:after { + content: ":"; +} + +/* Offset for field content (corresponds to the --field-name-limit option) */ +dl.field-list > dd { + margin-left: 9em; /* ca. 14 chars in the test examples */ + padding-left: 0.5em; +} + +/* start field-body on a new line after long field names */ +dl.field-list > dd p { + width: 100%; +/* display: inline-block; */ +/* background: yellow; */ +} + +dl.field-list > dd > p:first-child, +/* dl.field-list > dd > ol:first-child, */ +/* dl.field-list > dd > ul:first-child, */ +dl.field-list > dd > dl:first-child { + display: inline-block; +} + +/* field-list variants:: */ + +/* example for custom field-name width */ +dl.field-list.narrow > dd { + margin-left: 5em; +} + +/* start field-body on same line after long field names */ +dl.field-list.run-in > dd p { + display: block; +} + +/* wrap or truncate long field names */ +dl.field-list.fix-labelwidth > dt { + width: 8em; /* set to dl.field-list > dd margin-left - padding-left */ + overflow: hidden; +} +dl.field-list.fix-labelwidth > dd:after { + /* a "stopper" to prevent next dd floating up too far */ + content: ''; + display: block; + clear: left; +} + +/* docinfo */ + +dl.docinfo > dd { + margin-left: 8em; +/* margin-bottom: 0.5em; */ +} + + +/* option list */ + +dl.option-list { + margin-left: 1em; + padding-left: 0; +} + +dl.option-list > dd { + margin-left: 8em; + /* margin-bottom: 0.5em; */ +} + +/* start description on a new line after long options */ +dl.option-list > dd p { + width: 100%; + display: inline-block; +} + +/* footnotes */ + +a.footnote-reference, a.fn-backref { + text-decoration: inherit; /* do not underline footnote links */ +} + +dl.footnote { + /* line on the left */ + padding-left: 1ex; + border-left: solid; + border-left-width: thin; + /* border-color: black; */ +} + +/* paragraph on same line as backrefs */ +dd > em { +/* background: green; */ + float: left; + margin-right: 1ex +} + + +/* +Ordered List (Enumeration) +-------------------------- + +Use counters to replace the deprecated start attribute. Make sure the +resulting list resembles the list-style 'outside' with a hanging indent. +*/ + +/* New ordered list: reset counter, suppress the default label */ +ol { + counter-reset: item; + list-style-type: none ! important; +} + +/* Set the negative indent of the list label as feature of the list item */ +ol > li { + text-indent: -40px; /* Mozillas default indent */ +} +/* reset for child elements */ +ol > li > * { + text-indent: 0px; + text-indent: 0; + margin-top: 0; + /* background: lightgreen; */ +} + +/* Label */ +ol > li:before { + /* increment and typeset counter(s), */ + counter-increment: item; + content: counter(item) "."; + /* display next to the content (aligned top-right), */ + display: inline-block; + text-align: right; + vertical-align: top; + /* sum must match ol>li {text-indent:} (40px is Mozillas default) */ + width: 35px; + padding-right: 5px; +/* background: yellow; */ +} + +/* The list item's first line starts next to the label, without indent */ +ol > li > p:first-child, +ol > li > ol:first-child, +ol > li > ul:first-child, +ol > li > dl:first-child { + display: inline-block; + /* background: lightblue; */ +} + +/* default separator variants */ +ol.loweralpha > li:before { + content: counter(item, lower-alpha) ")"; +} +ol.upperalpha > li:before { + content: counter(item, upper-alpha) "."; +} +ol.lowerroman > li:before { + content: "(" counter(item, lower-roman) ")"; +} +ol.upperroman > li:before { + content: counter(item, upper-roman) ")"; +} +/* nested counters (1, 1.1, 1.1.1, etc) */ +/* nested enumerated lists "inherit" the class attribute, other lists not */ +ol.nested > li:before, ol.nested ol > li:before { + content: counters(item, ".") " "; +} + +/* lists nested in definition list */ + +dd > ul, dd > ol { + padding-left: 0pt; + +/* TODO: prefix, suffix? */ + +/* smaller font for super- and subscripts */ +/* sub, sup {font-size: 70%;} */ /* Mozilla default is `smaller` */ + + +/* Tables */ +/* ====== */ + +/* margins and borders for "normal" tables */ +table { + margin-top: 0.5em ; + margin-bottom: 0.5em; +/* border-style: outset; */ + border-style: solid; + border-color: silver; + border-width: thin; + border-collapse: collapse; +} +blockquote > table { + margin-top: 0em ; + margin-bottom: 0em; +} + +td, th { + border-style: solid; + border-width: thin; + border-color: silver; + /* text-align: left; */ + padding: 0 1ex; +} + +td > p:first-child, th > p:first-child { + margin-top: 0; +} +td > p, th > p { + margin-bottom: 0; +} + +/* no borders for "borderless" tables */ +table.borderless, table.borderless * { + border-style: none; +} + +/* "booktabs" style (no vertical lines) */ +table.booktabs { + border: 0; + border-top: 2px solid; + border-bottom: 2px solid; +} + +table.booktabs * { + border: 0; +} +table.booktabs th { + border-bottom: thin solid; +} + +table > caption { + text-align: left; +/* padding: 2em 0 1em 0; */ +} + +/* numbered tables*/ +table.numbered > caption:before { + counter-increment: table; /* defined/re-set in body */ + content: "Table " counter(table) ": "; + font-weight: bold; +} + + +/* literal text + ------------ +*/ +/* whitespace and wrapping in inline literals */ +/* possible values: normal, nowrap, pre, pre-wrap, pre-line */ +tt.literal { + white-space: pre-wrap; +} + +/* /* compensate for initial line-break (which is literal with XHTML 1.1) */ */ +/* pre.literal-block, pre.doctest-block { */ +/* margin-top: 0em ; */ +/* } */ + +/* Table of Contents */ + +/* don't indent like a topic */ +div.topic.contents { + margin: 0; +} +/* div.topic.contents ul { */ +/* list-style: none; */ +/* } */ + +div.topic.contents a { + text-decoration: none; /* no underline for links */ +} + +/* section numbers */ + +span.sectnum { + padding-right: 1ex; +} + +/* admonitions */ + +/* no padding for top and bottom */ +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { + padding: 0px 1em } + +</style> +</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 2012-04-30</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>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> +<pre class="literal-block">\usepackage{substitutefont} +\substitutefont{T1}{txtt}{cmtt} +</pre> +</dd> +<dt>Source</dt> +<dd><p><a class="reference external" href="substitutefont.sty">substitutefont.sty</a>, <a class="reference external" href="substitutefont.sty.xhtml">substitutefont.sty.xhtml</a></p> +</dd> +<dt><span class="target" id="tests">Tests</span></dt> +<dd><ul class="simple"> +<li><p>CB-Fonts for Greek text in a document using Times/Helvetica/Courier: +<a class="reference external" href="test-greek.tex">test-greek.tex</a>, <a class="reference external" href="test-greek.pdf">test-greek.pdf</a></p></li> +<li><p>TeX-Gyre with Cyrillic from the once included <cite>Freefonts</cite>: +<a class="reference external" href="test-cyrillic.tex">test-cyrillic.tex</a>, <a class="reference external" href="test-cyrillic.pdf">test-cyrillic.pdf</a></p></li> +<li><p>Monospaced text in many variants with txtt: +<a class="reference external" href="test-txtt.tex">test-txtt.tex</a>, <a class="reference external" href="test-txtt.pdf">test-txtt.pdf</a></p></li> +</ul> +</dd> +</dl> +<p>References:</p> +<blockquote> +<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> +</blockquote> +</div> +</body> +</html> diff --git a/Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf Binary files differnew file mode 100644 index 00000000000..2a1910aed82 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf 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@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 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{<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> +<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@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 +</pre> +</div> +</div> +</body> +</html> diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf b/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf Binary files differnew file mode 100644 index 00000000000..083ed783606 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.tex b/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.tex new file mode 100644 index 00000000000..81cfcafa681 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.tex @@ -0,0 +1,53 @@ +\documentclass[a4paper,russian]{scrartcl} +% generated by Docutils <http://docutils.sourceforge.net/> +\usepackage{fixltx2e} % LaTeX patches, \textsubscript +\usepackage{cmap} % fix search and cut-and-paste in Acrobat +\usepackage{substitutefont} +\usepackage[T1,T2A]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[english,russian]{babel} + +% PDF Standard Fonts +\usepackage{tgtermes} +\usepackage[scale=.90]{tgheros} +\usepackage[matchuppercase]{tgcursor} + +% Cyrillic with "Freefonts" +\substitutefont{T2A}{qtm}{ftm} +\substitutefont{T2A}{qhv}{fhv} +\substitutefont{T2A}{qcr}{fcr} + +% hyperlinks: +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=blue]{hyperref} + +\begin{document} + +TeX-compatible Cyrillic extensions to the URW standard Postscript fonts by +Valek Filippov were part of TeXGyre but removed due to license +incompatibility. On Debian, they are still available in the package +\emph{scalable-cyrfonts-tex}. + +% Attention: there is a font name clash with the \emph{fouriernc} package, as +% both use \texttt{fnc} for \emph{Free/Fourier New Century Schoolbook}. + +\section*{Заголовок% + \phantomsection% + \addcontentsline{toc}{section}{Заголовок}% + \label{id1}% +} + +первый пример: \glqq{}Здравствуй, мир!\grqq{} + +\texttt{"Здравствуй, мир!"} + +\section*{Title% + \phantomsection% + \addcontentsline{toc}{section}{Title}% + \label{title}% +} + +\otherlanguage{english}{first example: \glqq{}Hello world!\grqq{}. + +\texttt{"Hello world!\glqq} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-greek.pdf b/Master/texmf-dist/doc/latex/substitutefont/test-greek.pdf Binary files differnew file mode 100644 index 00000000000..2754730d644 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/test-greek.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-greek.tex b/Master/texmf-dist/doc/latex/substitutefont/test-greek.tex new file mode 100644 index 00000000000..247592d9967 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/test-greek.tex @@ -0,0 +1,53 @@ +% Example and test for the substitutefont package: +\documentclass{minimal} +\usepackage{parskip} + +\usepackage[LGR,T1]{fontenc} +\usepackage{mathptmx} +\usepackage[scaled=.92]{helvet} % scaled to fit Times +\usepackage{courier} + +\usepackage{substitutefont} +% Use CMR (actually the CB-Fonts) instead of Times/Helvetica/Courier +% for Greek text (LGR font encoding): +\substitutefont{LGR}{ptm}{cmr} +\substitutefont{LGR}{phv}{cmss} +\substitutefont{LGR}{pcr}{cmtt} + +% Teststring +\newcommand{\alphabet}{{\fontencoding{LGR}\selectfont +ABGDEZHJIKLMNXOPRSTUFQYW +abgdezhjiklmnxoprsctufqyw +}} + +\begin{document} + +Times/Helvetica/Courier with CB for Greek text. (There are better +alternatives, but this example shall demonstrate the package without further +non-standard dependencies.)\\ + +Normal: \alphabet + +Italic: \textit{\alphabet} + +Slanted: \textsl{\alphabet} + +Bold: \textbf{\alphabet} + +Bold Italic: \textbf{\textit\alphabet} + +Small-Caps: \textsc{\alphabet} + +Bold SC: \textsc{\textbf\alphabet} + +Sans-serif: \textsf{\alphabet} + +Bold Sans-serif: \textsf{\textbf\alphabet} + +Sans-serif Slanted: \textsf{\textsl\alphabet} + +Sans-serif SC: \textsf{\textsc\alphabet} + +Monospaced: \texttt{\alphabet} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-txtt.pdf b/Master/texmf-dist/doc/latex/substitutefont/test-txtt.pdf Binary files differnew file mode 100644 index 00000000000..82e2363318a --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/test-txtt.pdf diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-txtt.tex b/Master/texmf-dist/doc/latex/substitutefont/test-txtt.tex new file mode 100644 index 00000000000..43ea44b17f2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/substitutefont/test-txtt.tex @@ -0,0 +1,49 @@ +% Example and test for the substitutefont package: +\documentclass{minimal} +\usepackage{lmodern} +\usepackage{parskip} +\usepackage[T1]{fontenc} +\pagestyle{empty} + +\usepackage{substitutefont} +\substitutefont{T1}{txtt}{cmtt} + +% Teststring +\newcommand{\alphabet}{ +ABGDEZHJIKLMNXOPRSTUFQYW +abgdezhjiklmnxoprsctufqyw +} + +\begin{document} + +The Computer Modern and Latin Modern fonts provide a monospaced font only in +upright shape. The \emph{txfonts} package comes with a nice monospaced font +in the common shapes and real small caps.\\ + + +Normal: \alphabet + +Italic: \textit{\alphabet} + +Slanted: \textsl{\alphabet} + +Bold: \textbf{\alphabet} + +Bold Italic: \textbf{\textit\alphabet} + +Small-Caps: \textsc{\alphabet} + +Monospaced: \texttt{\alphabet} + +Monospaced Bold: \texttt{\textbf \alphabet} + +Monospaced Italic: \texttt{\textit \alphabet} + +Monospaced Slanted: \texttt{\textsl \alphabet} + +Monospaced Bold Slanted: \texttt{\textbf{\textit \alphabet}} + +Monospaced Small-Caps: \texttt{\textsc \alphabet} + + +\end{document} diff --git a/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty b/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty new file mode 100644 index 00000000000..de22a81abd0 --- /dev/null +++ b/Master/texmf-dist/tex/latex/substitutefont/substitutefont.sty @@ -0,0 +1,73 @@ +% 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/04/30 v0.1.1 combine font families] + +% Changelog: +% .. class:: borderless +% +% ============ ===== ================================================= +% 2010-11-04 0.1 initial version +% 2012-04-30 0.1.1 documentation update, upload to CTAN +% ============ ===== ================================================= +% +% +% 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: +% Use the `txtt` font family from txfonts_ instead of CM for +% monospaced text (enables monospaced-bold as well as +% monospaced-italic): +% +% ``\substitutefont{T1}{txtt}{cmtt}`` +% +% +% 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 +% .. _txfonts: http://mirror.ctan.org/help/Catalogue/entries/txfonts.html diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 30288691005..0a492fbcb49 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -373,7 +373,8 @@ my @TLP_working = qw( stdclsdv stdpage steinmetz stellenbosch stex stix stmaryrd storebox storecmd stringstrings struktex sttools stubs sty2dtx suanpan subdepth subeqn subeqnarray - subfig subfigmat subfigure subfloat substr subsupscripts sudoku + subfig subfigmat subfigure subfloat substitutefont substr + subsupscripts sudoku sudokubundle suftesi sugconf supertabular susy svg-inkscape svgcolor svn svn-multi svn-prov svninfo swebib swimgraf syllogism syntax synproof syntrace synttree diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index 51801240d79..f83577d254e 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -694,6 +694,7 @@ depend subeqnarray depend subfigmat depend subfigure depend subfloat +depend substitutefont depend substr depend supertabular depend svgcolor diff --git a/Master/tlpkg/tlpsrc/substitutefont.tlpsrc b/Master/tlpkg/tlpsrc/substitutefont.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/substitutefont.tlpsrc |