From 69763be32bfe1e90e08819dfc251c1fbf1d0b8a7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 5 May 2012 00:36:08 +0000 Subject: new latex package substitutefont 0.1.1 (30apr12) git-svn-id: svn://tug.org/texlive/trunk@26199 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/substitutefont/README | 49 ++ .../doc/latex/substitutefont/README.html | 742 +++++++++++++++++++++ .../doc/latex/substitutefont/substitutefont.pdf | Bin 0 -> 64858 bytes .../latex/substitutefont/substitutefont.sty.xhtml | 101 +++ .../doc/latex/substitutefont/test-cyrillic.pdf | Bin 0 -> 141022 bytes .../doc/latex/substitutefont/test-cyrillic.tex | 53 ++ .../doc/latex/substitutefont/test-greek.pdf | Bin 0 -> 241491 bytes .../doc/latex/substitutefont/test-greek.tex | 53 ++ .../doc/latex/substitutefont/test-txtt.pdf | Bin 0 -> 357305 bytes .../doc/latex/substitutefont/test-txtt.tex | 49 ++ 10 files changed, 1047 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/substitutefont/README create mode 100644 Master/texmf-dist/doc/latex/substitutefont/README.html create mode 100644 Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf create mode 100644 Master/texmf-dist/doc/latex/substitutefont/substitutefont.sty.xhtml create mode 100644 Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf create mode 100644 Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.tex create mode 100644 Master/texmf-dist/doc/latex/substitutefont/test-greek.pdf create mode 100644 Master/texmf-dist/doc/latex/substitutefont/test-greek.tex create mode 100644 Master/texmf-dist/doc/latex/substitutefont/test-txtt.pdf create mode 100644 Master/texmf-dist/doc/latex/substitutefont/test-txtt.tex (limited to 'Master/texmf-dist/doc') 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 +: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 + ``_, ``__ + +_`Tests` + * CB-Fonts for Greek text in a document using Times/Helvetica/Courier: + ``__, ``__ + * TeX-Gyre with Cyrillic from the once included `Freefonts`: + ``__, ``__ + * Monospaced text in many variants with txtt: + ``__, ``__ + +References: + + `LaTeX2e font selection + `_ + + `LaTeX font encodings + `_ + + .. _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 @@ + + + + + + +Combine font families + + + + + + +
+

Combine font families

+ +
+
Date
+
Last revised 2012-04-30
+ + +
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.

+
+
+

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
+
+
+
+

References:

+
+

LaTeX2e font selection

+

LaTeX font encodings

+
+
+ + diff --git a/Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf new file mode 100644 index 00000000000..2a1910aed82 Binary files /dev/null and b/Master/texmf-dist/doc/latex/substitutefont/substitutefont.pdf differ 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 @@ + + + + + + +Easy font substitution + + + + + +
+

Easy font substitution

+ +
+ + +
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.

+
+
Identification
+
\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{substitutefont}
+[2012/04/30 v0.1.1 combine font families]
+
+
+
+
+

Abstract

+

Provide the \substitutefont macro for defining +substitute fonts for specified font encodings.

+
+
+
Changelog:
+
+++++ + + + + + + + + + + +

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
+
+
+
+ + diff --git a/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf b/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf new file mode 100644 index 00000000000..083ed783606 Binary files /dev/null and b/Master/texmf-dist/doc/latex/substitutefont/test-cyrillic.pdf differ 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 +\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 new file mode 100644 index 00000000000..2754730d644 Binary files /dev/null and b/Master/texmf-dist/doc/latex/substitutefont/test-greek.pdf differ 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 new file mode 100644 index 00000000000..82e2363318a Binary files /dev/null and b/Master/texmf-dist/doc/latex/substitutefont/test-txtt.pdf differ 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} -- cgit v1.2.3