diff options
author | Norbert Preining <norbert@preining.info> | 2022-11-08 03:01:43 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-11-08 03:01:43 +0000 |
commit | 118cb5bbc5236bf86ca1088b9b3bae04c7b09beb (patch) | |
tree | 250db680f60212600d0e887c6d63deb3d266da89 /macros/latex/contrib/stealcaps | |
parent | 5fcfa99e5deaf9c601ba9e338f07fbefdd5d4487 (diff) |
CTAN sync 202211080301
Diffstat (limited to 'macros/latex/contrib/stealcaps')
-rw-r--r-- | macros/latex/contrib/stealcaps/README.md | 9 | ||||
-rw-r--r-- | macros/latex/contrib/stealcaps/stealcaps.dtx | 61 | ||||
-rw-r--r-- | macros/latex/contrib/stealcaps/stealcaps.ins | 8 | ||||
-rw-r--r-- | macros/latex/contrib/stealcaps/stealcaps.pdf | bin | 146839 -> 164457 bytes | |||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/CormorantSC-Regular.ttf | bin | 0 -> 368936 bytes | |||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/EBGaramond-Regular.ttf | bin | 0 -> 560560 bytes | |||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/brelaregular.otf | bin | 15764 -> 0 bytes | |||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/stealcapitals-test.pdf | bin | 15452 -> 0 bytes | |||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/stealcapitals-test.tex | 22 | ||||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/stealcaps-test.pdf | bin | 0 -> 15750 bytes | |||
-rw-r--r-- | macros/latex/contrib/stealcaps/testfile/stealcaps-test.tex | 26 |
11 files changed, 85 insertions, 41 deletions
diff --git a/macros/latex/contrib/stealcaps/README.md b/macros/latex/contrib/stealcaps/README.md index 28c939d8d7..bbd43e2fa2 100644 --- a/macros/latex/contrib/stealcaps/README.md +++ b/macros/latex/contrib/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/macros/latex/contrib/stealcaps/stealcaps.dtx b/macros/latex/contrib/stealcaps/stealcaps.dtx index 335fcac307..1bb6557a97 100644 --- a/macros/latex/contrib/stealcaps/stealcaps.dtx +++ b/macros/latex/contrib/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/macros/latex/contrib/stealcaps/stealcaps.ins b/macros/latex/contrib/stealcaps/stealcaps.ins index 76f993dd89..b2c6517470 100644 --- a/macros/latex/contrib/stealcaps/stealcaps.ins +++ b/macros/latex/contrib/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/macros/latex/contrib/stealcaps/stealcaps.pdf b/macros/latex/contrib/stealcaps/stealcaps.pdf Binary files differindex f4ebdd4cc3..5f902d0d51 100644 --- a/macros/latex/contrib/stealcaps/stealcaps.pdf +++ b/macros/latex/contrib/stealcaps/stealcaps.pdf diff --git a/macros/latex/contrib/stealcaps/testfile/CormorantSC-Regular.ttf b/macros/latex/contrib/stealcaps/testfile/CormorantSC-Regular.ttf Binary files differnew file mode 100644 index 0000000000..a51caaa710 --- /dev/null +++ b/macros/latex/contrib/stealcaps/testfile/CormorantSC-Regular.ttf diff --git a/macros/latex/contrib/stealcaps/testfile/EBGaramond-Regular.ttf b/macros/latex/contrib/stealcaps/testfile/EBGaramond-Regular.ttf Binary files differnew file mode 100644 index 0000000000..47f6537515 --- /dev/null +++ b/macros/latex/contrib/stealcaps/testfile/EBGaramond-Regular.ttf diff --git a/macros/latex/contrib/stealcaps/testfile/brelaregular.otf b/macros/latex/contrib/stealcaps/testfile/brelaregular.otf Binary files differdeleted file mode 100644 index 74457a5085..0000000000 --- a/macros/latex/contrib/stealcaps/testfile/brelaregular.otf +++ /dev/null diff --git a/macros/latex/contrib/stealcaps/testfile/stealcapitals-test.pdf b/macros/latex/contrib/stealcaps/testfile/stealcapitals-test.pdf Binary files differdeleted file mode 100644 index 7e9d85b23d..0000000000 --- a/macros/latex/contrib/stealcaps/testfile/stealcapitals-test.pdf +++ /dev/null diff --git a/macros/latex/contrib/stealcaps/testfile/stealcapitals-test.tex b/macros/latex/contrib/stealcaps/testfile/stealcapitals-test.tex deleted file mode 100644 index 996106df7f..0000000000 --- a/macros/latex/contrib/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/macros/latex/contrib/stealcaps/testfile/stealcaps-test.pdf b/macros/latex/contrib/stealcaps/testfile/stealcaps-test.pdf Binary files differnew file mode 100644 index 0000000000..8d4cefe782 --- /dev/null +++ b/macros/latex/contrib/stealcaps/testfile/stealcaps-test.pdf diff --git a/macros/latex/contrib/stealcaps/testfile/stealcaps-test.tex b/macros/latex/contrib/stealcaps/testfile/stealcaps-test.tex new file mode 100644 index 0000000000..42b2b22367 --- /dev/null +++ b/macros/latex/contrib/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 |