> 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/nl/diepgaande-artikelen/40-step-4-how-to-configure-an-italic-variable-font-using-fontspec.md).

# Stap 4: Hoe je een cursief variabel lettertype configureert met fontspec

[Inleiding](https://www.overleaf.com/learn/latex/Articles/How_to_use_OpenType_variable_fonts_with_LaTeX?preview=true) [Stap 1](https://www.overleaf.com/learn/latex/Articles/Step_1:_Setting_up_an_Overleaf_project_to_use_variable_fonts?preview=true) [Stap 2](https://www.overleaf.com/learn/latex/Articles/Step_2:_An_introduction_to_LaTeX_fonts?preview=true) [Stap 3](https://www.overleaf.com/learn/latex/Articles/Step_3:_Replacing_LaTeX’s_default_fonts_with_variable_fonts?preview=true) [Stap 4](https://www.overleaf.com/learn/latex/Articles/Step_4:_How_to_configure_an_italic_variable_font_using_fontspec?preview=true) [Stap 5](https://www.overleaf.com/learn/latex/Articles/Step_5:_LaTeX_font_weights_and_named_instances_of_variable_fonts?preview=true) [Stap 6](https://www.overleaf.com/learn/latex/Articles/Step_6:_Using_variable_fonts_to_add_bold_fonts_to_an_Overleaf_project?preview=true) [Stap 7](https://www.overleaf.com/learn/latex/Articles/Step_7:_Using_Noto_Sans_and_Roboto_Mono_variable_fonts_with_LaTeX?preview=true) [Stap 8](https://www.overleaf.com/learn/latex/Articles/Step_8:_How_to_create_a_simple_LaTeX_package_to_configure_your_variable_fonts?preview=true) [Voorbeelden en projecten](https://www.overleaf.com/learn/latex/Articles/Overleaf_projects_showing_how_to_use_variable_fonts_with_LaTeX?preview=true)

In deze stap configureren we een cursief variabel lettertype om een van de drie waarschuwingen over een “ongedefinieerde vorm” op te lossen.

## Samenvatting van de waarschuwingen over een “ongedefinieerde vorm” in ons project

LaTeX waarschuwt momenteel dat er drie lettertypvormen ontbreken in ons project:

![Afbeelding met LaTeX-waarschuwingen over ontbrekende lettertypen.](/files/57801746425ec8fc604e0bf141badcfc58529c67)

Deze worden samengevat in de onderstaande tabel, maar onthoud dat m uit de serie-identificatie wordt weggelaten *behalve* waar *beide* breedte en gewicht zijn m (medium). In dit artikel laten we zien hoe je de tweede waarschuwing kunt oplossen door een lettertype toe te voegen met gemiddeld gewicht, gemiddelde breedte en in de cursieve vorm.

| **Waarschuwingsnummer** | **Beschrijving van de waarschuwing**                                                    | **Serie-identificatie** | **Gewicht** | **Breedte** | **Vorm** |
| ----------------------- | --------------------------------------------------------------------------------------- | ----------------------- | ----------- | ----------- | -------- |
| 1                       | **b**oud gewicht, **m**edium-breedtelettertype in de **n**normale (rechtopstaande) vorm | b                       | b           | m           | n        |
| 2                       | **m**edium gewicht, **m**edium-breedtelettertype in de **it**alische vorm               | m                       | m           | m           | it       |
| 3                       | **b**oud gewicht, **m**edium-breedtelettertype in de **it**alische vorm                 | b                       | b           | m           | it       |

## Twee lettertypebestanden voor Noto Serif

Het ontwerp van rechtopstaande en cursieve lettertypestijlen (lettertypen) verschilt vaak te veel om een soepele overgang daartussen via een ontwerpas in een variabel lettertype mogelijk te maken. Rechtopstaande en cursieve vormen hebben elk een apart lettertypebestand nodig om de unieke kenmerken van hun ontwerp te behouden. Daarom bevat het Overleaf-zelfstudioproject de volgende bestanden voor Noto Serif:

* voor de rechtopstaande vorm: `NotoSerif-VariableFont-wdth-wght.ttf`
* voor de cursieve vorm: `NotoSerif-Italic-VariableFont-wdth-wght.ttf`

## Hoe je het cursieve Noto Serif-lettertype toevoegt

Ons hoofdtekstlettertype, Noto Serif, wordt geconfigureerd met fontspecs `\setmainfont` commando:

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

Ter herinnering, `\setmainfont` heeft de algemene vorm

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

We kunnen de optionele `⟨font features⟩` gebruiken om een cursieve vorm voor het hoofdlettertype van het document in te schakelen met fontspecs `ItalicFont` sleutel.

### Een variabel cursief lettertype configureren

Volg de onderstaande stappen om het variabele cursieve lettertype Noto Serif te activeren (configureren).

1. Zorg ervoor dat je het in stap 3 geconfigureerde zelfstudioproject opent.
2. Vervang deze regel

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

door het volgende

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

6. Compileer opnieuw en let op de volgende punten.

* Er zijn twee waarschuwingen over een ongedefinieerde vorm, één minder dan voorheen:

![Afbeelding met LaTeX-waarschuwingen over ontbrekende lettertypen.](/files/979ea2032650871b4c0c52cba775f58595add9be)

Deze waarschuwingen worden veroorzaakt door het ontbreken van vetgedrukte lettertypen voor de lettertypvormen normaal (n) en cursief (it).

* De volgende waarschuwing verschijnt niet meer:

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

* Cursieve tekst is weer verschenen in het opgemaakte document omdat LaTeX nu toegang heeft tot een lettertype in de vorm cursief (shape) met gemiddeld gewicht en gemiddelde breedte (series) in de `NotoSerif-VariableFont-wdth-wght.ttf(0)` familie.

## In de volgende stap

In stap 5 leren we over variabele lettertypegewichten, zodat we voorbereid zijn op stap 6, waarin we de eerste configuratie van onze variabele lettertypen afronden.


---

# 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/nl/diepgaande-artikelen/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.
