j

jastylest-zh

@preview

Article optimized for Chinese typesetting

v0.1.2
MIT
Template

Package Information

Last Updated
Minimum Typst Version
0.14.0
Authors
mike-unk
Categories
reportpaper

Preview

Template preview

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/jastylest-zh:0.1.2

2. Initialize from template

Create a new project from this template:

typst init @preview/jastylest-zh:0.1.2

Version History

0.1.20.14.0
4ab12fbf3434...
0.1.10.13.0
32fcfbd29c6b...
0.1.00.13.0
1305f9f818c8...

中文 | English

jastylest-zh

jastylest is a template for Japanese typesetting in Typst, and jastylest-zh is optimized for Chinese typesetting based on it.

Usage

Add the following code at the very beginning of your file:

#import "@preview/jastylest-zh:0.1.2": *

Then use the configuration file:

#let (article, textsf) = template(
  seriffont: "STIX Two Text",             // Western serif font
  seriffont-cjk: "Noto Serif CJK SC",     // Chinese serif font
  sansfont: "Noto Serif",                 // Western sans-serif font
  sansfont-cjk: "Noto Sans CJK SC",       // Chinese sans-serif font
  monofont: "Fira Mono",                  // Western monospaced font
  monofont-cjk: "Noto Sans Mono CJK SC",  // Chinese monospaced font
  mathfont: "STIX Two Math",              // Mathematical font
  kaiti-cjk: "FandolKai",                 // Kai font, default is FandolKai (needs to be imported)
  paper: "a4",              // Paper size, default is a4
  font-size: 12pt,          // Font size, can also be used with other packages to import Chinese font sizes
  code-font-size: 11pt,     // Code font size
  font-weight: "regular",   // Font weight, default is regular
  cols: 1,                  // Multi-column, default is 1 column
  titlepage: false,         // Whether to display the title page, default is not to display
  title: [*Title*],         // Title, can use formatting
  office: [Organization],   // Organization, can use formatting, can also serve as a subtitle
  author: [Author],         // Author, can use formatting
  // date: none,            // Date, default is the current date
)
#show: article  // Display the document

Fonts

The default fonts are STIX Two Text/Math, Fira Sans/Mono, and Noto Serif/Sans CJK SC. You can also modify them yourself.

The default Chinese font for italics is FandolKai (you need to upload it yourself). You can also change it in the above configuration. The Fandol font series can be downloaded at https://ctan.org/pkg/fandol.

Functions

There are two built-in functions: #textsf[] and #noindent[]. #textsf[] allows the part enclosed in parentheses to use the sans-serif font, while #noindent[] allows the part enclosed in parentheses to cancel the indentation.

Examples

The document.typ file contains a document example with all configurable parameters.