Skip to content

Module: Format Check

Trigger words: format, format check, lint, style check

Check Items:

categoryCheck contentstandard
page marginstop, bottom, left and right marginsTypically 1 inch (2.54cm)
line spacingSingle/double spacingAccording to journal requirements
fontText font and sizeTimes New Roman 10-12pt
titleTitle format at all levelsClear levels and correct numbering
chartTitle position and formatIn the table below the figure, the numbers are consecutive
QuoteReference format consistencynumber/author-year format

Script Usage:

bash
uv run python ../scripts/check_format.py main.typ
uv run python ../scripts/check_format.py main.typ --strict

Typst format check points:

typst
// 页面设置
#set page(
  paper: "a4",  // 或 "us-letter"
  margin: (x: 2.5cm, y: 2.5cm)
)

// 文本设置
#set text(
  font: "Times New Roman",
  size: 11pt,
  lang: "en"
)

// 段落设置
#set par(
  justify: true,
  leading: 0.65em,
  first-line-indent: 1.5em
)

// 标题设置
#set heading(numbering: "1.1")

Common formatting issues:

  • Inconsistent margins
  • Mixed fonts (Chinese and English fonts are not separated)
  • Chart numbers are not consecutive
  • The citation format is not uniform

Released under the MIT License.