1

I want to use LaTeX packages in the Quarto YAML header for Typst output formats. A sketch of my YAML header is below. It seems that it doesn't work for \usepackage[none]{hyphenat}. The output shows usepackage[none]{hyphenat} after the author's name and document renders with hyphenation. Any hints, please?

---
title: "Title"
author: "Author"
format:
  typst:
    papersize: a4
    mainfont: Latin Modern Roman
    sansfont: Latin Modern Roman
    fontsize: 12pt
    margin:
      x: 1cm
      y: 1cm
    toc: false
    section-numbering: 1.1.a
    columns: 1
    include-in-header:
      text: |
        \usepackage[none]{hyphenat}
editor: visual
---
2
  • 6
    Typst isn't latex Commented Jun 26 at 7:44
  • 1
    FYI, backticks are used to mark up code (and file paths, etc.). “LaTeX”, “Quarto”, “YAML” and “Typst” are not code, they are names. Don’t use backticks for them. Commented Jun 26 at 8:16

1 Answer 1

2
+50

As mentioned in a comment, latex packages are not compatible with Typst, since these are two different languages.

You'll have to find a way to achieve the desired effect in typst.

For example, to disable hyphenation:

format:
  typst:
    include-before-body:
      - text: |
          #set text(hyphenate: false)

References:

Not the answer you're looking for? Browse other questions tagged or ask your own question.