Package cloze: Class scrartcl Error: undefined old font command `\it' Thema ist als GELÖST markiert

Alles rund um das System für Linux, Mac & Windows.


Trippkees
Forum-Anfänger
Forum-Anfänger
Beiträge: 25
Registriert: Mi 11. Nov 2020, 20:06

Package cloze: Class scrartcl Error: undefined old font command `\it'

Beitrag von Trippkees »

Erst mal das Minimalbeispiel:

\documentclass[12pt,paper=a4,fleqn]{scrartcl}
%
\usepackage{cloze}
%
\begin{document}
	Jemand musste Josef K. \cloze{verleumdet} haben.
\end{document}

Die Fehlermeldungen:

! Class scrartcl Error: undefined old font command `\it'.

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 `\it' 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
`\it', e.g., by `\normalfont \itshape `. Otherwise you should reconfigure
or replace the package. If you have used the old font command `\it' yourself,
you should replace it, e.g., by `\normalfont \itshape '.
To make it work for now, you can use the already also deprecated class option
`enabledeprecatedfontcommands'.

Ist "enabledeprecatedfontcommands"

\documentclass[12pt,paper=a4,fleqn,enabledeprecatedfontcommands]{scrartcl}

auf Dauer ein echtes Problem?

Wenn ich das Paket lokal selber anpassen möchte, wo muss ich da suchen? Also "\it" mit "normalfont \itshape" ersetzen. Hab Ubuntu 20.04 und Vanilla TeX Live 2020. Unter /usr/local/texlive/2020 oder ~/.texlive2020?

PS: Ich werde das auch bei Gelegenheit mal bei github posten ...


MoeWe
Forum-Meister
Forum-Meister
Beiträge: 801
Registriert: Fr 30. Aug 2019, 15:35
Kontaktdaten:

Re: Package cloze: Class scrartcl Error: undefined old font command `\it'

Beitrag von MoeWe »

Das Herumdoktern an vom System installierten Dateien ist selten anzuraten. Wenn Du Dein System neu aufsetzt oder das Paket aus irgendeinem Grunde aktualisiert oder neu installiert wird, sind Deine Änderungen weg. Außerdem hat das Paket dann auf Deinem System ein anderes Verhalten als anderswo, das macht es sehr schwer, Dokumente mit anderen zu teilen oder Probleme zu reproduzieren.

Hier geht es zum Glück einfacher. In den vom cloze-Paket installierten Dateien kommt nur in cloze.tex einmal \it vor (vgl. die Paketquellen auf GitHub). Das ist ein vom Nutzer konfigurierbarer Befehl, also kannst Du das selbst zu \itshape umstellen.

\documentclass[12pt,paper=a4,fleqn]{scrartcl}

\usepackage{cloze}
\renewcommand\clozefont{\itshape}

\begin{document}
  Jemand musste Josef K. \cloze{verleumdet} haben.
\end{document}

kompiliert ohne Fehler.

---
Trippkees hat geschrieben:
Fr 15. Jan 2021, 15:25

Ist "enabledeprecatedfontcommands"

\documentclass[12pt,paper=a4,fleqn,enabledeprecatedfontcommands]{scrartcl}

auf Dauer ein echtes Problem?

Naja, Befehle wie \it sind seit 1994 veraltet und haben gegenüber ihren Nachfolgern die in https://www.texfaq.org/FAQ-2letterfontcmd gelisteten Nachteile. Die Befehle sind im LaTeX-Kern gar nicht mehr definiert. Sie werden von den Standardklassen noch aus Kompatibilitätsgründen unterstützt, bei KOMA-Script-Klassen muss man das mit enabledeprecatedfontcommands explizit einschalten. Die Option enabledeprecatedfontcommands ist zumindest in der Online-Version der KOMA-Script-Anleitung nicht dokumentiert. Ob Du Dich auf eine nicht dokumentierte Funktion einer Klasse verlassen möchtest, von der Dir die Klasse in der .log-Datei auch noch selbst abrät, musst Du selbst entscheiden. Empfehlen kann ich es Dir nicht.

Trippkees hat geschrieben:
Fr 15. Jan 2021, 15:25

PS: Ich werde das auch bei Gelegenheit mal bei github posten ...

Das ist eine sehr gute Idee. Paketentwicklerinnen sind immer daran interessiert, Probleme mit ihrem Code gemeldet zu bekommen. Und hier ist der Fix ja recht einfach.

Zuletzt geändert von MoeWe am Fr 15. Jan 2021, 17:02, insgesamt 1-mal geändert.

Trippkees
Forum-Anfänger
Forum-Anfänger
Beiträge: 25
Registriert: Mi 11. Nov 2020, 20:06

Re: Package cloze: Class scrartcl Error: undefined old font command `\it'

Beitrag von Trippkees »

Super, vielen Dank für Deine schnelle Antwort und den Workaround! Ich werde mir bei github einen Account anlegen uns das melden ...


Antworten