summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/defoldfonts
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/defoldfonts')
-rw-r--r--macros/latex/contrib/defoldfonts/LICENSE.md19
-rw-r--r--macros/latex/contrib/defoldfonts/README.md142
-rw-r--r--macros/latex/contrib/defoldfonts/defoldfonts.dtx253
-rw-r--r--macros/latex/contrib/defoldfonts/defoldfonts.pdfbin0 -> 200157 bytes
4 files changed, 414 insertions, 0 deletions
diff --git a/macros/latex/contrib/defoldfonts/LICENSE.md b/macros/latex/contrib/defoldfonts/LICENSE.md
new file mode 100644
index 0000000000..99a6973749
--- /dev/null
+++ b/macros/latex/contrib/defoldfonts/LICENSE.md
@@ -0,0 +1,19 @@
+----------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of the
+LaTeX Project Public License, version 1.3c of the license. The latest
+version of this license is in http://www.latex-project.org/lppl.txt and
+version 1.3c or later is part of all distributions of LaTeX 2005/12/01
+or later. This work has the LPPL maintenance status “maintained”.
+The current maintainer and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+Dieses Werk darf nach den Bedingungen der LaTeX Project Public Lizenz
+in der Version 1.3c, verteilt und/oder verändert werden. Die aktuelle
+Version dieser Lizenz ist http://www.latex-project.org/lppl.txt und
+Version 1.3c oder später ist Teil aller Verteilungen von LaTeX 2005/12/01
+oder später. Dieses Werk hat den LPPL-Verwaltungs-Status „maintained”
+Der aktuelle Verwalter und Autor dieses Werks ist Markus Kohm.
+
+----------------------------------------------------------------------------
diff --git a/macros/latex/contrib/defoldfonts/README.md b/macros/latex/contrib/defoldfonts/README.md
new file mode 100644
index 0000000000..14ede15b32
--- /dev/null
+++ b/macros/latex/contrib/defoldfonts/README.md
@@ -0,0 +1,142 @@
+# Package `defoldfonts`
+
+Copyright © 2019–2023 Markus Kohm
+Release: 2023-07-28 v1.0
+License: LPPL 1.3c
+
+KOMA presents the `defoldfonts` package to define old font commands even if
+the class does not.
+
+----------------------------------------------------------------------------
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, version 1.3c of the license.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3c 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 and author of this work is Markus Kohm.
+
+----------------------------------------------------------------------------
+
+# Abstract
+
+In 1994 with LaTeX2ε the old font commands `\rm`, `\sf`, `\tt`, `\bf`, `\it`,
+`\sl`, and `\sc` became obsolete. They are not implemented in the LaTeX kernel
+anymore. Some classes, e.g., the standard classes still provide the deprecated
+font commands. Early versions of
+[KOMA-Script](https://www.ctan.org/pkg/koma-script) also did and additionally
+defined `\sfb`. Other classes do not provide these commands. For more than 15
+years [KOMA-Script](https://www.ctan.org/pkg/koma-script) officially also do
+not provide them. So depending on the class for several years using them
+resulted in an error message.
+
+However, some old BibTeX styles and even some packages still use these
+commands without testing, if they are defined. This also can result in
+errors. Package `defoldfonts` defines all eight old font commands, `\sfb`
+even, if not a [KOMA-Script](https://www.ctan.org/pkg/koma-script) class, but
+another class has is used.
+
+# Unpacking and Installation for Developers and Distributors
+
+A legal distribution of `defoldfonts` contain at least:
+
+* `defoldfonts.dtx`
+* `README.md`
+
+and optionally:
+
+* `LICENSE.md`
+* `defoldfonts.sty`
+* `defoldfonts.pdf`
+
+For generation of `defoldfonts.sty` you can use:
+
+ l3build unpack
+
+The unpacked files than can be found at `build/local/defoldfonts.sty`.
+
+For generation of the manual `defoldfonts.pdf` you can use:
+
+ l3build doc
+
+The manual `defoldfonts.pdf` than can be found in the main directory.
+
+Developers also can use `l3build` to unpack and install all files and even the
+documentation. Run
+
+ l3build install
+
+to locally install the package without manual, or run
+
+ l3build install --full
+
+to locally install the package with manual.
+
+# Unpacking and Installation for Users
+
+If you are a user, you should wait until all the packages has been added to
+your preferred TeX distribution. Then you can use the package manager of your
+TeX distribution to install all the packages.
+
+# How to get the Manuals
+
+After installation you should get the user manual using:
+
+ texdoc defoldfonts
+
+See the manual of your TeX distribution for more information.
+
+You can also build the manuals from the source. To do so, clone the source of
+the whole project, go to the directory `defoldfonts` and run:
+
+ l3build doc
+
+This will result in the file `defoldfonts.pdf`. This is the user
+manual and (optionally) the implemenation documentation of
+`defoldfonts`.
+
+# How to Contribute
+
+To become a contributor, clone the code and do heavy testing. If you find an
+issue, please report it using the [issue tracker](../../issues). You can
+also, e.g., make new test files to the packages. See the
+[`l3build`](https://ctan.prg/pkg/l3build) manual for more information about
+tests. If you've created a new test and think that it would be useful. Please
+either do a pull request or [add a new issue](../../issues/new/choose) and
+include your test file.
+
+Another kind of contribution would be to contact an author of one of the
+third-party packages and convince her or him to integrate the code of the
+corresponding enhancement package from this project into her or his package.
+
+# How to Report Issues
+
+If you think you have found a bug (or another kind of issue) using
+`defoldfonts` you should use the [issue tracker](../../issues). Please
+first search for similar issues already reported and maybe also already fixed
+and closed. Maybe the replies to such a similar report would help you too.
+
+If your issue is new, you should report it also using the [issue
+tracker](../../issues). Please be kind, not only when writing the report
+but also when reading replies and commenting or answering. And please always
+add a minimal working example and usually the relevant parts of the `log`-file
+to your report. Please use the [markdown for
+code](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks)
+to add such files into the text of your report. The correct language
+identifier for LaTeX code would be `latex`. For `log`-files you won't need any
+language identifier. Usually you should not use attachments for code or
+`log`-files unless you've been asked to do so. And please note, reports should
+always be self-containing. External links often break and so the report become
+useles.
+
+# How to Say Thank You for my Work
+
+Hey, I'm doing this as a hobby. So no need to say thank you. But I'm a vain
+fop, so I'm certainly up for a quick thank you by email. On komascript.de you
+can find an [explanation of my wishes](https://komascript.de/wunschliste) if
+you want to give more. If you don't understand German, just click to links at
+that page.
diff --git a/macros/latex/contrib/defoldfonts/defoldfonts.dtx b/macros/latex/contrib/defoldfonts/defoldfonts.dtx
new file mode 100644
index 0000000000..d99f85af37
--- /dev/null
+++ b/macros/latex/contrib/defoldfonts/defoldfonts.dtx
@@ -0,0 +1,253 @@
+% \iffalse meta-comment
+% ======================================================================
+% defoldfonts.dtx
+% Copyright © 2008–2023 Markus Kohm
+%
+% Development of this work is taking place at
+% <https://github.com/komascript/defoldfont>. New issues should be
+% reported there as well as known issues can be found.
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3c of the license.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.<3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later and of this work.
+%
+% This work has the LPPL maintenance status "author-maintained".
+%
+% The Current Maintainer and author of this work is Markus Kohm.
+%
+% This work consists of the file `defoldfonts.dtx' and `README.md'.
+%
+% The recommended way to install `defoldfonts' is to use
+% the package manager of your TeX distribution.
+% ======================================================================
+%
+%<*dtx>
+\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
+\ProvidesFile{defoldfonts.dtx}
+%</dtx>
+%<*dtx|package>
+%<package>\ProvidePackage{defoldfonts}
+ [2023-07-28 v1.0
+%<dtx> sources and unpack driver of
+ re-implementation of deprecated KOMA-Script code]
+%<package>}
+%</dtx|package>
+%<*dtx>
+\ifx\documentclass\undefined
+ \input docstrip.tex
+ \generate{%
+ \file{defoldfonts.sty}{%
+ \from{defoldfonts.dtx}{package}%
+ }%
+ }%
+\else
+ \let\endbatchfile\relax
+\fi
+\endbatchfile
+\documentclass[ngerman,USenglish]{koma-script-source-doc}
+\setcounter{IndexColumns}{2}
+\usepackage{babel}
+\usepackage{csquotes}
+\usepackage[style=alphabetic]{biblatex}
+\begin{filecontents}[force]{\jobname.bib}
+@online{pkg:koma-script,
+ author={Markus Kohm},
+ version={3.41},
+ date={2023-07-07},
+ title={{\KOMAScript} --- A bundle of versatile classes and packages},
+ url={https://ctan.org/pkg/koma-script},
+ urldate={2023-07-14},
+ note={The \KOMAScript{} bundle provides replacements for the \pkg*{article},
+ \pkg*{report}, and \pkg*{book} classes with emphasis on typography and
+ versatility. There is also a letter class.},
+}
+@manual{pkg:koma-script:manual:de,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={Die Anleitung},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-de.pdf},
+ urldate={2023-07-04},
+}
+@manual{pkg:koma-script:manual:en,
+ author={Markus Kohm},
+ date={2023-06-16},
+ title={{\KOMAScript}},
+ subtitle={The Guide},
+ url={http://mirrors.ctan.org/macros/latex/contrib/koma-script/scrguide-en.pdf},
+ urldate={2023-07-14},
+}
+\end{filecontents}
+\addbibresource{\jobname.bib}
+\setcounter{StandardModuleDepth}{2}
+\begin{document}
+ \nocite{pkg:koma-script,pkg:koma-script:manual:en,pkg:koma-script:manual:de}
+ \DocInput{defoldfonts.dtx}
+\end{document}
+%</dtx>
+%\fi
+%
+% \changes{v0.1}{2023/06/01}{start of \KOMAScript{} spin-off}
+%
+% \GetFileInfo{defoldfonts.dtx}
+% \title{Defining Old Font Commands}
+% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
+% \date{Version \filedate{} \fileversion}
+% \maketitle
+% \begin{abstract}
+% The package defines the old font commands \cs{rm}, \cs{sf}, \cs{tt},
+% \cs{bf}, \cs{it}, and \cs{sc} that became obsolete with \LaTeXe{} and has
+% been removed from the \LaTeX{} kernel. It also defines the old
+% \href{https://komascript.de/}{\KOMAScript} font command \cs{sfb}. It can
+% be useful if you use a class like the
+% \href{https://komascript.de/}{\KOMAScript} classes, which do not define
+% the old commands by default, and also an old \BibTeX{} style or package,
+% that depends on these commands. However, it should be seen as an emergency
+% workaround rather than a solution.
+% \end{abstract}
+%
+% \tableofcontents
+%
+%\iffalse
+%<*doc>
+%\fi
+\section{What are the possible reasons for using package
+ \texorpdfstring{\pkg*{defoldfonts}}{defoldfonts} and how to do it?}
+\label{sec:reasons}
+
+\DescribeCommand{\rm}%
+\DescribeCommand{\sf}%
+\DescribeCommand{\tt}%
+\DescribeCommand{\bf}%
+\DescribeCommand{\it}%
+\DescribeCommand{\sl}%
+\DescribeCommand{\sc}%
+\DescribeCommand{\sfb}%
+With \LaTeXe{} in 1994 the font commands of \LaTeX~2.09 became obsolete. These
+are not longer defined in the \LaTeX{} kernel. Instead of them, you should use
+\cs{rmfamily} resp. \cs{textrm}, \cs{sffamily} resp. \cs{textsf},
+\cs{ttfamily} resp. \cs{texttt}, \cs{bfseries} resp. \cs{textbf}, \cs{itshape}
+resp. \cs{textit}, \cs{slshape} resp. \cs{textsl}, and \cs{scshape}
+resp. \cs{testsc}. The old \href{https://komascript.de/}{\KOMAScript} command
+\cs{sfb} should be replaced by a combination of \cs{sf} and \cs{bf}
+resp. \cs{textsf} and \cs{textbf}. But unfortunately not only some old
+\BibTeX{} styles but even some packages still use these obsolete commands. The
+standard classes therefore still define them. The
+\href{https://komascript.de/}{\KOMAScript} classes also define them, but only
+to show an error message like:
+\begin{verbatim}
+ Class scrartcl Error: undefined old font command `\bf'.
+
+ See the scrartcl class documentation for explanation.
+ Type H <return> for immediate help.
+ ...
+
+ l.3 \bf
+\end{verbatim}
+Within an interactive \LaTeX{} run you can get some more information typing
+\texttt{H} and pressing the \texttt{return} key:
+\begin{verbatim}
+ You should note that since 1994 LaTeX2e provides a new font selection scheme
+ called NFSS2 with several new, combinable font commands. KOMA-Script
+ classes had defined the old font commands like `\bf' only for compatibility
+ with old LaTeX 2.09 document styles of Script 2.0. Nevertheless, these
+ commands are deprecated and undocumented at least since 2003. Since 2013
+ KOMA-Script classes warned about soon removement of these deprecated commands.
+ Now, after two decades of LaTeX2e and NFSS2, these commands will not work any
+ more. If loading a package results in this error message, you should contact
+ the author of that package and ask him to replace the deprecated font command
+ `\bf', e.g., by `\normalfont \bfseries `. Otherwise you should reconfigure
+ or replace the package. If you have used the old font command `\bf' yourself,
+ you should replace it, e.g., by `\normalfont \bfseries '.
+ To make it work for now, you can use the already also deprecated class option
+ `enabledeprecatedfontcommands'.
+\end{verbatim}
+So to fix the issue, you could load the class with option
+\opt{enabledeprecatedfontcommands}. But because this option is also
+deprecated, this would result in warning messages like:
+\begin{verbatim}
+ Class scrartcl Warning: deprecated option `enabledeprecatedfontcommands'.
+ (scrartcl) Note, that this option was already depreacted when
+ (scrartcl) it has been defined. Support for old font commands
+ (scrartcl) has been removed from KOMA-Script more than one
+ (scrartcl) decade ago. It is not recommended to use them any
+ (scrartcl) longer. Therefore usage of this class option also
+ (scrartcl) is not recommended.
+\end{verbatim}
+and:
+\begin{verbatim}
+ Class scrartcl Warning: deprecated old font command `\bf' used.
+ (scrartcl) You should note, that since 1994 LaTeX2e provides a
+ (scrartcl) new font selection scheme called NFSS2 with several
+ (scrartcl) new, combinable font commands. New KOMA-Script classes
+ (scrartcl) defined the old font commands like `\bf' only for
+ (scrartcl) compatibility with LaTeX 2.09 document styles of
+ (scrartcl) Script 2.0. These commands are deprecated and
+ (scrartcl) undocumented at least since 2003. Since 2013,
+ (scrartcl) KOMA-Script classes warned about soon removement of
+ (scrartcl) these deprecated commands. Now, after two decades of
+ (scrartcl) LaTeX2e, NFSS2, and KOMA-Script these commands will
+ (scrartcl) not work any longer. If loading a package results in
+ (scrartcl) this message you should contact the author of that
+ (scrartcl) package and ask him to replace the depracted font
+ (scrartcl) command `\bf', e.g., by `\normalfont \bfseries '.
+ (scrartcl) Otherwise you should reconfigure or replace the
+ (scrartcl) package. If you have used the old font command
+ (scrartcl) `\bf' yourself you should replace it, e.g., by
+ (scrartcl) `\normalfont \bfseries ' on input line ….
+\end{verbatim}
+As an alternative you can load package \pkg*{defoldfonts}.
+
+The package should be loaded in the preamble using:
+\begin{verbatim}
+ \usepackage{defoldfonts}
+\end{verbatim}
+Usually the order of \pkg*{defoldfonts} and other packages is irrelevant.
+
+% \iffalse
+%</doc>
+% \fi
+%
+% \MaybeStop{\printbibliography[heading=bibintoc]\PrintIndex}
+%
+% \iffalse
+%<*package>
+% \fi
+% \section{Implementation}
+% \label{sec:implementation}
+%
+% \begin{macrocode}
+\ProcessOptions\relax
+% \end{macrocode}
+%
+% \begin{command}{\rm,\sf,\tt,\bf,\it,\sl,\sc,\sfb}
+% We define these commands without compromise:
+% \begin{macrocode}
+\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
+\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
+\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
+\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
+\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
+\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
+\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
+\DeclareOldFontCommand{\sfb}{\normalfont\sffamily\bfseries}{\@nomath\sfb}
+% \end{macrocode}
+% \end{command}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
+% \PrintChanges
+%
+% \endinput
+% Local Variables:
+% mode: doctex
+% ispell-local-dictionary: "en_US"
+% eval: (flyspell-mode 1)
+% TeX-master: t
+% End:
diff --git a/macros/latex/contrib/defoldfonts/defoldfonts.pdf b/macros/latex/contrib/defoldfonts/defoldfonts.pdf
new file mode 100644
index 0000000000..b959a71524
--- /dev/null
+++ b/macros/latex/contrib/defoldfonts/defoldfonts.pdf
Binary files differ