From edc1bff0e29e15bb668515373517b5e9710cd142 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 24 Jan 2018 21:52:41 +0000 Subject: stealcaps (24jan18) git-svn-id: svn://tug.org/texlive/trunk@46434 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/stealcaps/README.md | 42 +++++ .../texmf-dist/doc/latex/stealcaps/stealcaps.pdf | Bin 0 -> 146839 bytes .../latex/stealcaps/testfile/EBGaramond.ttf.zip | Bin 0 -> 2853713 bytes .../doc/latex/stealcaps/testfile/brelaregular.otf | Bin 0 -> 15764 bytes .../stealcaps/testfile/stealcapitals-test.pdf | Bin 0 -> 15452 bytes .../stealcaps/testfile/stealcapitals-test.tex | 22 +++ .../source/latex/stealcaps/stealcaps.dtx | 183 +++++++++++++++++++++ .../source/latex/stealcaps/stealcaps.ins | 74 +++++++++ .../texmf-dist/tex/latex/stealcaps/stealcaps.sty | 65 ++++++++ 9 files changed, 386 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/stealcaps/README.md create mode 100644 Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf create mode 100644 Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip create mode 100644 Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf create mode 100644 Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf create mode 100644 Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex create mode 100644 Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx create mode 100644 Master/texmf-dist/source/latex/stealcaps/stealcaps.ins create mode 100644 Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/stealcaps/README.md b/Master/texmf-dist/doc/latex/stealcaps/README.md new file mode 100644 index 00000000000..28c939d8d7c --- /dev/null +++ b/Master/texmf-dist/doc/latex/stealcaps/README.md @@ -0,0 +1,42 @@ +# The `stealcaps` package + +This package enables you to borrow small capitals +from another font than the main document font. +For that simply load the package and specify the replacement font +vie the key-value-option 'from', i.e. + + \usepackage[from=]{stealcaps}. + +In case you use pdfLaTeX the font name has to be NFSS compliant. +With XeLaTeX or LuaLaTeX, correpsondingly, +it has to be `fontspec` compliant. + +Package dependencies: `pgfopts`, `iftex`, `fontspec`. + +This is version 1.0 of the package. + +Copyright (C) 2018 by Ruben Giannotti + +--- + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any +later version. The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions +of LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status `maintained'. + +The Current Maintainer of this work is Ruben Giannotti. + +This work consists of the files + stealcaps.dtx, + stealcaps.ins +and the derived file stealcaps.sty. + +To install the package + + 1. run `latex stealcaps.ins` + 2. move 'stealcaps.sty' to locations where LaTeX will find it diff --git a/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf b/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf new file mode 100644 index 00000000000..f4ebdd4cc3d Binary files /dev/null and b/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf differ diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip b/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip new file mode 100644 index 00000000000..738fbdd2785 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip differ diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf b/Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf new file mode 100644 index 00000000000..74457a50858 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf differ diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf new file mode 100644 index 00000000000..7e9d85b23d8 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf differ diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex new file mode 100644 index 00000000000..996106df7f1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex @@ -0,0 +1,22 @@ +% arara: xelatex +\documentclass{article} +\usepackage{lipsum} +\usepackage{iftex} +\ifPDFTeX + \usepackage[from=ppl]{stealcaps} +\else + \usepackage{fontspec} + \setmainfont{Brela} + \usepackage[from={EB Garamond}]{stealcaps} +\fi + +\providecommand*\pkg{\textsc} + +\title{Testing the \pkg{stealcaps} package} +\author{Ruben Giannotti} +\date{\today} + +\begin{document} +\maketitle +\lipsum +\end{document} diff --git a/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx b/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx new file mode 100644 index 00000000000..335fcac307a --- /dev/null +++ b/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx @@ -0,0 +1,183 @@ +% \iffalse meta-comment +% +% Copyright (C) 2018 by Ruben Giannotti +% +% ------------------------------------------------------- +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any +% later version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions +% of LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Ruben Giannotti. +% +% This work consists of the files +% stealcaps.dtx +% stealcaps.ins +% and the derived file stealcaps.sty. +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{stealcaps.dtx} +% +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesPackage{stealcaps} +%<*package> + [2018/01/21 v1.0 Steal small capitals (RG)] +% +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{amssymb,parskip} +\providecommand*\pkg{\textsf} +\providecommand*\option{\textit} +\providecommand*\url{\texttt} +\providecommand*\email{\texttt} +\providecommand*\important{$\blacktriangleright$\space Important note:\space} +\EnableCrossrefs +\CodelineIndex +\begin{document} + \DocInput{stealcaps.dtx} +\end{document} +% +% \fi +% +% \CheckSum{43} +% +% \CharacterTable +% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% +% \changes{v1.0}{2018/01/21}{Initial version} +% +% \GetFileInfo{stealcaps.dtx} +% +% \DoNotIndex{\newcommand,\newenvironment,\!,\@empty,\@gobble,\@gobbletwo} +% \DoNotIndex{\@ifpackageloaded,\@ifpackagewith,\@ifundefined,\@namedef} +% \DoNotIndex{\@nil,\@onlypreamble,\@tempa,\@tempb,\@tempswafalse,\def} +% \DoNotIndex{\@tempswatrue,\^,\-,\active,\begingroup,\catcode,\@car,\@cdr} +% \DoNotIndex{\edef,\else,\endgroup,\endinput,\expandafter,\fi,\if} +% \DoNotIndex{\if@tempswa,\ifcase,\ifnum,\ifx,\lccode,\let,\lowercase} +% \DoNotIndex{\MessageBreak,\next,\number,\numexpr,\or,\PackageError} +% \DoNotIndex{\PackageWarning,\PackageWarningNoLine,\strip@prefix,\@@end} +% \DoNotIndex{\relax,\space,\string,\DeclareOption,\ProcessOptions} +% \DoNotIndex{\meaning,\ifdefined,\csname,\chardef,\endcsname,\protect} +% \DoNotIndex{\input,\RequirePackage,\global,\ifcsname,\makeatother} +% \DoNotIndex{\@makeother,\the,\toks@} +% +% \title{The \pkg{stealcaps} package\thanks{This document +% corresponds to \pkg{stealcaps}~\fileversion, dated \filedate.}} +% \author{Ruben Giannotti\thanks{\email{ruben dot giannotti at gmx dot net}}} +% +% \maketitle +% +% This little package is mainly meant to be used +% when there is a (TrueType or OpenType) font +% that does not provide real small capitals. +% Some tend to use uppercased letters +% as a workaround -- it is a bad workaround! +% In fact, I consider it better practice +% to borrow, or steal the small capitals from another font. +% And this is exactly what the package does. +% This might also be useful in the rare case +% that someone does not like the present +% small capitals, and wants to change them, +% or likes those from another font better. +% +% However, to achieve the borrowing one does only need to load the package +% and specify the name of the target font via the \option{from} option: +% +% |\usepackage|[\option{from}=\(\langle\)\textit{font name}\(\rangle\)]\{stealcaps\} +% +% It works with both pdf\LaTeX and its successors Xe\LaTeX{} and Lua\LaTeX. +% In the first case you have to make sure the font name is NFSS compliant. +% Otherwise, it has to be \pkg{fontspec} compliant. +% +% \StopEventually{} +% +% The implementation is rather simple and straightforward. +% +% As usual, we start by loading what is required: +% +% \begin{macrocode} +\RequirePackage{pgfopts} +\RequirePackage{iftex} +% \end{macrocode} +% +% We have to load \pkg{fontspec} in case Xe\LaTeX or Lua\LaTeX, +% hence not pdf\LaTeX is in use, to make sure the |\fontspec| command, +% used by this package, is guarantied to be defined. +% +% \begin{macrocode} +\ifPDFTeX\else + \RequirePackage{fontspec} +\fi +% \end{macrocode} +% +% Then we set up the only package option +% and commence its processing. +% +% \begin{macrocode} +\pgfkeys{ + /stc/.cd, + from/.store in=\font@wildcard@stc +} +\ProcessPgfOptions{/stc} +% \end{macrocode} +% +% To distinguish between the operating engines +% there are two macros to select the replacement font +% (one for \pkg{fontspec} powered ones +% and one for good old pdf\LaTeX), +% which then are |\let| to |\font@stc| +% according to the engine in use. +% +% \begin{macrocode} +\def\font@xe@or@lua@stc{\fontspec} +\def\font@pdf@stc{\fontfamily} +\def\selectfont@or@relax@stc{\relax} +\ifPDFTeX + \let\font@stc\font@pdf@stc + \let\selectfont@or@relax@stc\selectfont +\else + \let\font@stc\font@xe@or@lua@stc +\fi +% \end{macrocode} +% +% At last, we load the replacement font +% employing |\font@stc| inside a group +% and substitute the small captials fonts. +% +% \begin{macrocode} +\begingroup + \font@stc\font@wildcard@stc\selectfont@or@relax@stc + \DeclareFontShape{\f@encoding}{\rmdefault}{m}{sc}{% + <-> ssub * \f@family/m/sc + }{} + \DeclareFontShape{\f@encoding}{\rmdefault}{bx}{sc}{% + <-> ssub * \f@family/bx/sc + }{} +\endgroup +% \end{macrocode} +%\Finale +\endinput diff --git a/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins b/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins new file mode 100644 index 00000000000..76f993dd89b --- /dev/null +++ b/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins @@ -0,0 +1,74 @@ +% Copyright (C) 2018 by Ruben Giannotti +% +% ------------------------------------------------------- +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either +% version 1.3c of this license or (at your option) any +% later version. The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions +% of LaTeX version 2005/12/01 or later. +% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Ruben Giannotti. +% +% This work consists of the files +% stealcaps.dtx +% stealcaps.ins +% and the derived file stealcaps.sty. + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/stealcaps} + +\preamble + +This is a generated file. + +Copyright (C) 2018 by Ruben Giannotti + +------------------------------------------------------- + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3c of this license or (at your option) any +later version. The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions +of LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status `maintained'. + +The Current Maintainer of this work is Enrico Gregorio. + +This work consists of the files + stealcaps.dtx + stealcaps.ins +and the derived file stealcaps.sty. + +\endpreamble + +\generate{\file{stealcaps.sty}{\from{stealcaps.dtx}{package}}} + +\def\tmpa{plain} +\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi + +\obeyspaces +\Msg{*************************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the following *} +\Msg{* file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* stealcaps.sty *} +\Msg{* *} +\Msg{* To produce the documentation run the file *} +\Msg{* stealcaps.dtx through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*************************************************************} + +\endbatchfile diff --git a/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty b/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty new file mode 100644 index 00000000000..bd5ddc42f21 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty @@ -0,0 +1,65 @@ +%% +%% This is file `stealcaps.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% stealcaps.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2018 by Ruben Giannotti +%% +%% ------------------------------------------------------- +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any +%% later version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions +%% of LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Enrico Gregorio. +%% +%% This work consists of the files +%% stealcaps.dtx +%% stealcaps.ins +%% and the derived file stealcaps.sty. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{stealcaps} + [2018/01/21 v1.0 Steal small capitals (RG)] +\RequirePackage{pgfopts} +\RequirePackage{iftex} +\ifPDFTeX\else + \RequirePackage{fontspec} +\fi +\pgfkeys{ + /stc/.cd, + from/.store in=\font@wildcard@stc +} +\ProcessPgfOptions{/stc} +\def\font@xe@or@lua@stc{\fontspec} +\def\font@pdf@stc{\fontfamily} +\def\selectfont@or@relax@stc{\relax} +\ifPDFTeX + \let\font@stc\font@pdf@stc + \let\selectfont@or@relax@stc\selectfont +\else + \let\font@stc\font@xe@or@lua@stc +\fi +\begingroup + \font@stc\font@wildcard@stc\selectfont@or@relax@stc + \DeclareFontShape{\f@encoding}{\rmdefault}{m}{sc}{% + <-> ssub * \f@family/m/sc + }{} + \DeclareFontShape{\f@encoding}{\rmdefault}{bx}{sc}{% + <-> ssub * \f@family/bx/sc + }{} +\endgroup +\endinput +%% +%% End of file `stealcaps.sty'. -- cgit v1.2.3