Development build 586e1bd4
Typst文档简体中文版v0.15.1 + dev 586e1bd4

Formats

Typst documents can be exported to various different export formats. This section documents the available export formats and lists format-specific settings and features.

Each export format has an associated element through which it can be configured. These elements are defined in the global format module. The major formats pdf and html are additionally directly available in the global scope.

Configuring export settings

There are two ways to specify export settings:

Below is an example showing how you could change the default PDF standard for a document. Unless specified otherwise (e.g. via a command line argument), a document with this set rule will be exported as a PDF/UA-1.

// The document will now default to PDF/UA-1.
#set pdf(standard: "ua-1")

Similarly, we can write a set rule that makes rendered PNG a bit sharper by default. Here, we have to write format.png instead of just png since the PNG format element is not globally available (as it’s a bit more niche of an export format than PDF).

// This makes PNGs a bit higher-res.
#set format.png(ppi: 300)

定义