> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/de/ausfuhrliche-artikel/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.md).

# Schritt 4: Wie man mit fontspec eine variable Kursivschrift konfiguriert

[Einführung](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [Schritt 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [Schritt 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [Schritt 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [Schritt 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [Schritt 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [Schritt 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [Schritt 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [Schritt 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [Beispiele und Projekte](https://www.overleaf.com/learn/latex/Articles/Overleaf_projects_showing_how_to_use_variable_fonts_with_LaTeX?preview=true)

In diesem Schritt konfigurieren wir eine kursive variable Schrift, um eine der drei Warnungen zu „undefinierter Form“ zu beheben.

## Zusammenfassung der Warnungen unseres Projekts zu „undefinierter Form“

LaTeX warnt derzeit, dass drei Schriftformen in unserem Projekt fehlen:

![Bild, das die fehlenden Schriftwarnungen in LaTeX zeigt.](/files/51ae0f58af86de0fc384d39476a26e5a2e5e8a1c)

Diese sind in der folgenden Tabelle zusammengefasst, aber denken Sie daran, dass m aus dem Serienbezeichner gestrichen wird *außer* wo *beides* Breite und Stärke m (mittel) sind. In diesem Artikel zeigen wir, wie man die zweite Warnung behebt, indem man eine Schrift mit mittlerer Stärke, mittlerer Breite und in kursiver Form hinzufügt.

| **Warnungsnummer** | **Warnungsbeschreibung**                                                                    | **Serienbezeichner** | **Stärke** | **Breite** | **Form** |
| ------------------ | ------------------------------------------------------------------------------------------- | -------------------- | ---------- | ---------- | -------- |
| 1                  | **b**fette Stärke, **m**Schrift mit mittlerer Breite in der **n**normalen (aufrechten) Form | b                    | b          | m          | n        |
| 2                  | **m**Stärke mittel, **m**Schrift mit mittlerer Breite in der **it**kursiven Form            | m                    | m          | m          | it       |
| 3                  | **b**fette Stärke, **m**Schrift mit mittlerer Breite in der **it**kursiven Form             | b                    | b          | m          | it       |

## Zwei Schriftdateien für Noto Serif

Das Design aufrechter und kursiver Schriftstile (Schriftarten) unterscheidet sich oft zu stark, um einen sanften Übergang zwischen ihnen über eine Designachse in einer variablen Schrift zu ermöglichen. Aufrechte und kursive Formen benötigen jeweils eine eigene Schriftdatei, um die einzigartigen Eigenschaften ihres Designs zu erhalten. Daher enthält das Overleaf-Tutorialprojekt die folgenden Dateien für Noto Serif:

* für die aufrechte Form: `NotoSerif-VariableFont-wdth-wght.ttf`
* für die kursive Form: `NotoSerif-Italic-VariableFont-wdth-wght.ttf`

## So fügen Sie die kursive Noto-Serif-Schrift hinzu

Unsere Hauptschrift für den Dokumenttext, Noto Serif, wird mit dem Befehl `\setmainfont` von fontspec konfiguriert:

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
```

Zur Erinnerung, `\setmainfont` hat die allgemeine Form

```
\setmainfont{⟨font⟩}[⟨font features⟩]
```

Wir können die optionalen `⟨font features⟩` verwenden, um mit dem Schlüssel `ItalicFont` von fontspec eine kursive Form für die Hauptschrift des Dokuments zu aktivieren.

### Konfigurieren einer kursiven variablen Schrift

Verwenden Sie die folgenden Schritte, um die kursive variable Schrift Noto Serif zu aktivieren (zu konfigurieren).

1. Stellen Sie sicher, dass Sie das in Schritt 3 konfigurierte Tutorial-Projekt öffnen.
2. Ersetzen Sie diese Zeile

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
```

durch Folgendes

```
\setmainfont{NotoSerif-VariableFont-wdth-wght.ttf}
[
ItalicFont=NotoSerif-Italic-VariableFont-wdth-wght.ttf
]
```

6. Kompilieren Sie erneut und beachten Sie die folgenden Punkte.

* Es gibt zwei Warnungen zu undefinierten Schriftformen, eine weniger als zuvor:

![Bild, das die fehlenden Schriftwarnungen in LaTeX zeigt.](/files/5f980ea42122cde21a69f940d8eed7d82f0f3d18)

Diese Warnungen werden durch das Fehlen fetter Schriften für die Schriftformen normal (n) und kursiv (it) verursacht.

* Die folgende Warnung erscheint nicht mehr:

``Schriftform `TU/NotoSerif-VariableFont-wdth-wght.ttf(0)/m/it' undefiniert``

* Kursiver Text ist im gesetzten Dokument wieder aufgetaucht, weil LaTeX nun Zugriff auf eine kursive Schrift mit mittlerer Stärke und mittlerer Breite (Serie) in der `NotoSerif-VariableFont-wdth-wght.ttf(0)` Schriftfamilie hat.

## Im nächsten Schritt

In Schritt 5 lernen wir variable Schriftstärken kennen und bereiten uns auf Schritt 6 vor, in dem wir die anfängliche Konfiguration unserer variablen Schriften abschließen.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/de/ausfuhrliche-artikel/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
