diff options
Diffstat (limited to 'Master')
13 files changed, 109 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/stealcaps/README.md b/Master/texmf-dist/doc/latex/stealcaps/README.md index 28c939d8d7c..bbd43e2fa28 100644 --- a/Master/texmf-dist/doc/latex/stealcaps/README.md +++ b/Master/texmf-dist/doc/latex/stealcaps/README.md @@ -11,11 +11,16 @@ In case you use pdfLaTeX the font name has to be NFSS compliant. With XeLaTeX or LuaLaTeX, correpsondingly, it has to be `fontspec` compliant. +Furthermore in Xe(La)TeX or Lua(La)TeX you can use `\renewcaps{<font name>}` +to load a dedicated only small capitals font like + + \renewcaps{Cormorant SC}. + Package dependencies: `pgfopts`, `iftex`, `fontspec`. -This is version 1.0 of the package. +This is version 1.1 of the package. -Copyright (C) 2018 by Ruben Giannotti +Copyright (C) 2018-2022 by Ruben Giannotti --- diff --git a/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf b/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf Binary files differindex f4ebdd4cc3d..5f902d0d518 100644 --- a/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf +++ b/Master/texmf-dist/doc/latex/stealcaps/stealcaps.pdf diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/CormorantSC-Regular.ttf b/Master/texmf-dist/doc/latex/stealcaps/testfile/CormorantSC-Regular.ttf Binary files differnew file mode 100644 index 00000000000..a51caaa710c --- /dev/null +++ b/Master/texmf-dist/doc/latex/stealcaps/testfile/CormorantSC-Regular.ttf diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond-Regular.ttf b/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond-Regular.ttf Binary files differnew file mode 100644 index 00000000000..47f65375152 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond-Regular.ttf diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip b/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip Binary files differdeleted file mode 100644 index 738fbdd2785..00000000000 --- a/Master/texmf-dist/doc/latex/stealcaps/testfile/EBGaramond.ttf.zip +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf b/Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf Binary files differdeleted file mode 100644 index 74457a50858..00000000000 --- a/Master/texmf-dist/doc/latex/stealcaps/testfile/brelaregular.otf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf Binary files differdeleted file mode 100644 index 7e9d85b23d8..00000000000 --- a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex deleted file mode 100644 index 996106df7f1..00000000000 --- a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcapitals-test.tex +++ /dev/null @@ -1,22 +0,0 @@ -% 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/doc/latex/stealcaps/testfile/stealcaps-test.pdf b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcaps-test.pdf Binary files differnew file mode 100644 index 00000000000..8d4cefe782f --- /dev/null +++ b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcaps-test.pdf diff --git a/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcaps-test.tex b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcaps-test.tex new file mode 100644 index 00000000000..42b2b223671 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stealcaps/testfile/stealcaps-test.tex @@ -0,0 +1,26 @@ +% arara: xelatex +\documentclass{article} +\usepackage[from={EB Garamond}]{stealcaps} +% or try +% \usepackage{stealcaps} +% \renewcaps{Cormorant SC} + +\usepackage{titlesec} + \titleformat{\section} + {\scshape\normalsize\MakeLowercase}{\thesection}{1em}{} + +\usepackage{lipsum} + +\newcommand*\pkg{\textsc} + +\title{Test file for the \pkg{stealcaps} package} +\author{Ruben Giannotti} +\date{\today} + +\begin{document} +\maketitle + +\section{Lorem ipsum} + +\lipsum[3] +\end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx b/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx index 335fcac307a..1bb6557a972 100644 --- a/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx +++ b/Master/texmf-dist/source/latex/stealcaps/stealcaps.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright (C) 2018 by Ruben Giannotti +% Copyright (C) 2018-2022 by Ruben Giannotti % <ruben dot giannotti at gmx dot net> % ------------------------------------------------------- % @@ -30,13 +30,14 @@ %<package>\NeedsTeXFormat{LaTeX2e} %<package>\ProvidesPackage{stealcaps} %<*package> - [2018/01/21 v1.0 Steal small capitals (RG)] + [2022/11/07 v1.1 Steal small capitals (RG)] %</package> % %<*driver> \documentclass{ltxdoc} \usepackage{amssymb,parskip} \providecommand*\pkg{\textsf} +\providecommand*\vrs{\textsf} \providecommand*\option{\textit} \providecommand*\url{\texttt} \providecommand*\email{\texttt} @@ -49,7 +50,7 @@ %</driver> % \fi % -% \CheckSum{43} +% \CheckSum{59} % % \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 @@ -69,6 +70,7 @@ % % % \changes{v1.0}{2018/01/21}{Initial version} +% \changes{v1.1}{2022/11/07}{Added the renewcaps macro for Xe(La)\TeX or Lua(La)\TeX} % % \GetFileInfo{stealcaps.dtx} % @@ -113,6 +115,17 @@ % In the first case you have to make sure the font name is NFSS compliant. % Otherwise, it has to be \pkg{fontspec} compliant. % +% As for \vrs{v1.1} in Xe\LaTeX{} and Lua\LaTeX{} you are able +% to use +% +% |\renewcaps{|\(\langle\)\textit{font name}\(\rangle\)|}| +% +% to override |\scshape| alltogether. +% This is mainly meant to be used if you have a single purpose font +% that provides only small capitals, e.g.: +% +% |\renewcaps{Cormorant SC}|. +% % \StopEventually{} % % The implementation is rather simple and straightforward. @@ -140,7 +153,7 @@ % \begin{macrocode} \pgfkeys{ /stc/.cd, - from/.store in=\font@wildcard@stc + from/.store in=\font@from@stc } \ProcessPgfOptions{/stc} % \end{macrocode} @@ -164,20 +177,42 @@ \fi % \end{macrocode} % -% At last, we load the replacement font +% The replacement font is loaded by % employing |\font@stc| inside a group -% and substitute the small captials fonts. +% and substituting the small captials fonts +% employing |\DeclareFontShape| with 'ssub'. % % \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 - }{} + \ifx\font@from@stc\@empty\else + \font@stc\font@from@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 + }{} + \fi \endgroup % \end{macrocode} +% +% At last there is a user macro for XeTeX and LuaTeX environments +% to renew |\scshape| to a dedicated only small capitals TrueType +% or OpenType font, e.g. |\renewcaps{Cormorant SC}|. +% +% \begin{macrocode} +\newcommand*\renewcaps[1]{% + \ifPDFTeX + \typeout{% + You tried to use |\renewcaps| in pdfLaTeX, + which isn't needed. + Or did you mean to use XeLaTeX or LuaLaTeX? + } + \else + \providefontfamily\scshape{#1}% + \renewfontfamily\scshape{#1}% + \fi +} +% \end{macrocode} %\Finale \endinput diff --git a/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins b/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins index 76f993dd89b..b2c65174707 100644 --- a/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins +++ b/Master/texmf-dist/source/latex/stealcaps/stealcaps.ins @@ -1,4 +1,4 @@ -% Copyright (C) 2018 by Ruben Giannotti +% Copyright (C) 2018-2022 by Ruben Giannotti % <ruben dot giannotti at gmx dot net> % ------------------------------------------------------- % @@ -28,7 +28,7 @@ This is a generated file. -Copyright (C) 2018 by Ruben Giannotti +Copyright (C) 2018-2022 by Ruben Giannotti <ruben dot giannotti at gmx dot net> ------------------------------------------------------- @@ -62,10 +62,10 @@ and the derived file stealcaps.sty. \Msg{* To finish the installation you have to move the following *} \Msg{* file into a directory searched by TeX: *} \Msg{* *} -\Msg{* stealcaps.sty *} +\Msg{* stealcaps.sty *} \Msg{* *} \Msg{* To produce the documentation run the file *} -\Msg{* stealcaps.dtx through LaTeX. *} +\Msg{* stealcaps.dtx through LaTeX. *} \Msg{* *} \Msg{* Happy TeXing! *} \Msg{* *} diff --git a/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty b/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty index bd5ddc42f21..495395c5c71 100644 --- a/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty +++ b/Master/texmf-dist/tex/latex/stealcaps/stealcaps.sty @@ -8,7 +8,7 @@ %% %% This is a generated file. %% -%% Copyright (C) 2018 by Ruben Giannotti +%% Copyright (C) 2018-2022 by Ruben Giannotti %% <ruben dot giannotti at gmx dot net> %% ------------------------------------------------------- %% @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{stealcaps} - [2018/01/21 v1.0 Steal small capitals (RG)] + [2022/11/07 v1.1 Steal small capitals (RG)] \RequirePackage{pgfopts} \RequirePackage{iftex} \ifPDFTeX\else @@ -39,7 +39,7 @@ \fi \pgfkeys{ /stc/.cd, - from/.store in=\font@wildcard@stc + from/.store in=\font@from@stc } \ProcessPgfOptions{/stc} \def\font@xe@or@lua@stc{\fontspec} @@ -52,14 +52,28 @@ \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 - }{} + \ifx\font@from@stc\@empty\else + \font@stc\font@from@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 + }{} + \fi \endgroup +\newcommand*\renewcaps[1]{% + \ifPDFTeX + \typeout{% + You tried to use |\renewcaps| in pdfLaTeX, + which isn't needed. + Or did you mean to use XeLaTeX or LuaLaTeX? + } + \else + \providefontfamily\scshape{#1}% + \renewfontfamily\scshape{#1}% + \fi +} \endinput %% %% End of file `stealcaps.sty'. |