Skip to main content
Recipe number 90

Cookbook · Chapter 5 · Book structure

A Chinese paper cited to GB/T 7714

A two-column Chinese journal article: [@key] citations print as superscript [1] and [2–4], the references carry [M], [J], [D] and [EB/OL].

On this page

p. 41 · 1 of 2

  • Trim 184 × 260 mm
  • 2 columns, 6.3 mm gutter
  • Noto Serif SC 9/15
  • LXGW WenKai TC
  • Noto Sans SC
  • 2 pages
  • Level
  • Postext 1.65.0
  • Laid out in 151 ms
  • 149 lines of code

In short

A short research article from a Chinese journal. The author writes a code for each source; Postext numbers the sources in the order they are cited and prints the list of references the way Chinese journals require.

What you'll build

Two pages of a research article in an invented journal of publishing studies, 示例出版研究 (“Example Publishing Research”), set as a Chinese university journal sets its papers. The page is 16开, 184 × 260 mm, with two columns of 23 characters of 小五 on a 15 pt grid. A title block runs across the page: the journal’s name on an indigo band, the title in bold Hei, the authors, their affiliations and an abstract with its keywords. The citations follow GB/T 7714—2015, the national standard for references, in its numeric system (顺序编码制): each work takes a number in the order it is first cited, the number prints as a superscript in square brackets, and three or more consecutive numbers become a range. The reference list gives each entry its document-type code and writes 等 after three authors of a Chinese work and “et al.” after those of a Western one. A thesis chapter cited in APA 7 uses the same citation markup in an author-date style.

This recipe answers

  • How do I cite to the Chinese standard GB/T 7714, also in vertical text?
  • How do I cite works and build the bibliography in APA, IEEE or another citation style?

The short answer

script.js · lines 31–43in full code
// Register the engine once, before the first build. The GB/T 7714 numeric style writes
// superscript [n] in the order works are first cited, joins three or more in a row into a
// range and sets the list with its type codes: [M] book, [J] article, [D] thesis, [C]
// conference paper, [EB/OL] web page. Its CSL file holds a second layout for works whose
// language is English, with "et al." for 等: a Western entry takes "et al." and a Chinese
// one keeps 等, each chosen by the entry's `language`.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
  style: 'china-national-standard-gb-t-7714-2015-numeric',
  locale: 'zh-CN', // 等, 卷, 版 and the other terms of the list
  bibliography: { fontSize: em(7.5 / BODY), lineHeight: pt(12), entrySpacing: pt(1.5),
    labelWidth: em(1.7) }, // turnovers under the text, not past it: [1] and a space
};

GB/T 7714 numbered: [1] in citation order, [2–4], 等 or et al. by language

Ingredients

Type
Noto Serif SC, Noto Sans SC, LXGW WenKai TC (SIL OFL 1.1)
Assets
None: every picture is drawn in code

Method

#1 · The style, and its layout for Western works

The code is the short answer above. The citation engine is registered once, before the first build, and postext-citeproc ships the three GB/T 7714 styles: numeric, author-date and notes (Citations). In the text a citation is a key in square brackets. [@tinker1963] prints a superscript [1], and [@rayner2016; @dyson2001; @lin2023] prints [2–4]. Two numbers in a row stay a list, [5,6]. A work cited again keeps its first number: [4] in the third paragraph, and [1] and [2] later in the article.

The standard asks for “et al.” after the first three authors of a Western work and 等 after those of a Chinese one. The bundled CSL file holds two layouts for that, one of them for works in English, and each entry takes its layout from its own language field: Rayner and four co-authors become “RAYNER K, SCHOTTER E R, MASSON M E J, et al.”, and 林岚 and three co-authors become “林岚, 周明远, 陈思齐, 等”. locale: 'zh-CN' writes the rest of the list’s words in Chinese.

#2 · The references in a CSL-YAML block

The works are listed in a :::references{format=csl-yaml} block at the end of the Markdown, in the format Zotero exports as CSL YAML (References). The CSL type decides the code: book prints [M], article-journal [J], thesis [D], paper-conference [C] after its // and the proceedings, and webpage [EB/OL] with the access date in square brackets. A journal article with a DOI becomes [J/OL] and keeps its DOI, as the standard asks. Chinese names go in literal, so the style does not split them into family and given names. :::bibliography{title=""} puts the list under the unnumbered heading 参考文献, and labelWidth sets the turnover lines under the text of the entry, not past it.

Page 2: Western entries in capitals with et al., Chinese entries with 等, each with its type code.

#3 · The title block on a band

script.js · lines 47–68in full code
const BAND = 30; // mm from the trim's top
const at = (id, edge, y) => ({ anchor: { to: id ? `#${id}` : 'container', edge },
  offset: { y: mm(y) }, size: { width: mm(AREA) } });
const line = (id, content, family, size, color, placement, extra) => ({ kind: 'text', id,
  content, fontFamily: family, fontSize: pt(size), color: col(color), align: 'center',
  overflow: 'wrap', placement, ...extra });
const onBand = (x, y) => ({ anchor: { to: 'page', edge: 'top-left' },
  offset: { x: mm(x), y: mm(y) }, size: { width: mm(AREA) } });
const [JOURNAL, ISSUE] = ['示例出版研究', '第44卷 第3期 2026年9月']; // the journal's band
const masthead = { enabled: true, minHeight: pt(9 * LEAD), slot: { elements: [
  { kind: 'box', id: 'band', style: { backgroundColor: col('indigo') },
    placement: { anchor: { to: 'page', edge: 'top-left' },
      size: { width: 'fill', height: mm(BAND) } } },
  line('journal', JOURNAL, HEI, 15, 'paper', onBand(15.8, 13),
    { fontWeight: 700, align: 'left', letterSpacing: pt(3) }),
  line('issue', ISSUE, HEI, 8, 'mist', onBand(15.8, 16),
    { align: 'right' }),
  line('title', '{titleText}', HEI, 17, 'ink', at('', 'top-left', 14),
    { fontWeight: 700, lineHeight: 1.45 }),
  line('authors', '{attr.authors}', KAI, 12, 'ink', at('title', 'below', 4)),
  line('affiliations', '{attr.affiliations}', SONG, 7.5, 'muted', at('authors', 'below', 2)),
] } };

The title block is the design of the H1, a heading style that spans both columns. The band is a box anchored to the trim, and the journal’s name sits on it in white. The title, the authors and the affiliations come from the heading and its attributes, each placed below the one before (#title, below), so a three-line title pushes the rest down (Span and advanced design).

#4 · The abstract and its labels

script.js · lines 72–79in full code
// In 宋, not 楷: the one Kai on Fontsource is a Taiwan face (gotcha: cjk-face-region).
const calloutStyles = [{ id: 'abstract', span: 'page', backgroundEnabled: false,
  padding: { top: pt(0), bottom: pt(0), left: em(2), right: em(2) },
  marginTop: pt(0), marginBottom: pt(LEAD),
  body: { fontFamily: SONG, fontSize: pt(BODY), lineHeight: pt(LEAD), firstLineIndent: pt(0),
    textAlign: 'justify' } }];
const chipStyles = [{ id: 'label', fontFamily: HEI, bold: true, color: col('indigo'),
  backgroundEnabled: false, borderWidth: pt(0), paddingX: em(0), gap: em(0.5) }];

The abstract is a callout across the page, indented two characters on each side. Its labels are chips: :chip[摘 要:]{style="label"} sets the word in bold Hei, in the journal’s indigo, with no box (Chip styles). Chinese journals often set the abstract in 楷体; this one stays in Song, for the reason in Pitfalls.

script.js · lines 16–22in full code
const palette = {
  ink: '#1a1a1a', indigo: '#24427a', mist: '#b8c6e0', rule: '#9aa3b5', muted: '#5f6470',
  paper: '#ffffff',
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.indigo })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));

The whole recipe

Sandbox
// ═══ Postext Cookbook · Nº 090 · A Chinese paper cited to GB/T 7714 ═════════════════
// https://postext.dev/en/cookbook/gbt7714-chinese-paper
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Noto Serif SC, Noto Sans SC, LXGW WenKai TC (SIL OFL 1.1) · Needs postext ≥ 1.34.0
import {
  buildDocument, withLoadedFonts, renderPageToCanvas, registerCitationEngine,
} from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
import { createCiteprocEngine, STYLES, LOCALES } from 'https://esm.sh/postext-citeproc';

const LANG = 'en'; // @lang: the language of the frame; the paper is Chinese in both editions
const RECIPE = 'gbt7714-chinese-paper';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: black text, one indigo for the journal's name, its rules and its labels
const palette = {
  ink: '#1a1a1a', indigo: '#24427a', mist: '#b8c6e0', rule: '#9aa3b5', muted: '#5f6470',
  paper: '#ffffff',
};
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.indigo })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
// #endregion
const [SONG, HEI, KAI] = ['Noto Serif SC', 'Noto Sans SC', 'LXGW WenKai TC']; // 宋, 黑, 楷
const [BODY, LEAD] = [9, 15]; // pt: 小五 on a 15 pt line, the grid both columns share
const [CHARS, LINES] = [23, 40]; // characters to a column's line, lines to a column
const PT = 25.4 / 72; // mm in a point
const AREA = (2 * CHARS + 2) * BODY * PT; // mm: two columns and a 2-em gutter, 152.4

// #region answer: GB/T 7714 numbered: [1] in citation order, [2–4], 等 or et al. by language
// Register the engine once, before the first build. The GB/T 7714 numeric style writes
// superscript [n] in the order works are first cited, joins three or more in a row into a
// range and sets the list with its type codes: [M] book, [J] article, [D] thesis, [C]
// conference paper, [EB/OL] web page. Its CSL file holds a second layout for works whose
// language is English, with "et al." for 等: a Western entry takes "et al." and a Chinese
// one keeps 等, each chosen by the entry's `language`.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
  style: 'china-national-standard-gb-t-7714-2015-numeric',
  locale: 'zh-CN', // 等, 卷, 版 and the other terms of the list
  bibliography: { fontSize: em(7.5 / BODY), lineHeight: pt(12), entrySpacing: pt(1.5),
    labelWidth: em(1.7) }, // turnovers under the text, not past it: [1] and a space
};
// #endregion

// #region masthead: the journal's name on an indigo band, then title, authors, affiliations
const BAND = 30; // mm from the trim's top
const at = (id, edge, y) => ({ anchor: { to: id ? `#${id}` : 'container', edge },

The composed script.js runs as it is: paste it into any page’s module script, or open the recipe on CodePen. Recipe folder on GitHub ↗ (opens in a new tab)

Variations

#Corner brackets instead of superscripts

Some journals print citation numbers on the line, at the text size. marker changes how the number is marked and leaves the style alone: 'brackets' gives [1] on the line, 'corner' gives 〔1〕.

   locale: 'zh-CN', // 等, 卷, 版 and the other terms of the list
+  marker: 'brackets',

#Chinese works first

Mixed bibliographies are sometimes sorted with the Chinese works ahead of the Western ones. In a numeric style the numbers then no longer run in order down the list, so this suits the author-date style better.

-  style: 'china-national-standard-gb-t-7714-2015-numeric',
+  style: 'china-national-standard-gb-t-7714-2015-author-date',
   locale: 'zh-CN', // 等, 卷, 版 and the other terms of the list
-  bibliography: { fontSize: em(7.5 / BODY), lineHeight: pt(12), entrySpacing: pt(1.5),
+  bibliography: { groupByLanguage: true, fontSize: em(7.5 / BODY), lineHeight: pt(12),

Pitfalls

Pitfall

Tag the document zh-Hans or zh-Hant, not with LANG

A recipe's editions are en and es, but a Chinese sample is Chinese in both: `locale: LANG` would tag it English or Spanish, hyphenate its Latin words, label its figures Figure or Figura and give the PDF the wrong language. From postext 1.30 the tag is also the language the text is shaped in (measured, painted and embedded), so under an English or Spanish tag a Chinese face sets its digits and the punctuation it shares with Latin text in other forms, and the lines break elsewhere. Write the tag yourself: 'zh-Hans' (mainland conventions: GB line breaking, Kaiming punctuation) or 'zh-Hant' (Taiwan: full-width centred punctuation); 'zh-HK' for Hong Kong. A bare 'zh' reads as Simplified, mainland. A Japanese sample takes 'ja' (gotcha ja-locale-tag). Chinese line breaking →

Pitfall

Chinese faces load by slices, through the cjk block

Fontsource serves a Chinese, Japanese or Korean family as about a hundred files per weight, each covering a range of characters. loadFonts fetches only the latin file, so on screen the Han characters come from a system face and measure wrong, and fontsourceProvider hands the PDF that latin file, which prints them as empty boxes. List the cjk kit block, call loadCjkFonts(FONTS, markdown) after loadFonts (once per voice, with the text it sets, when the book uses several CJK faces) and give renderToPdf fontProvider: cjkPdfProvider: both take the files that hold the text's characters. Chinese, Japanese and Korean fonts →

  • A narrative citation, @zhou2019 without brackets, names the authors and adds the number, but a key runs on through Chinese characters, so @zhou2019认为 reads as a key that does not exist. Write the name in the text and the citation after it, 周明远[@zhou2019]认为, as Chinese papers do anyway.
  • The bundled numeric style prints no locators: [@zhou2019, 页 45] gives [5] without the page. GB/T 7714 puts the page after the bracket in the superscript, [5]45; until the style does, write the page in the sentence.
  • LXGW WenKai TC, the only Kai on Fontsource, is a Taiwan face: it draws ,and 。 in the middle of the cell, and under zh-Hans the engine trims the right half of the cell, which cuts into the glyph. The abstract is set in Noto Serif SC, and the Kai is kept for the authors’ names, which have no punctuation.
  • On a character grid column balancing is off by default: every line stays on the grid, and a column that cannot take the next head ends short. Left off, the second column of page 1 would end three lines short (the head 2 结果 needs its own two lines and two of text under it, so it opens page 2), and the last page would fill its first column and leave the second half empty. The recipe sets headings.balancing.enabled: true: a short column takes whole grid lines above its heads, never by spreading characters off their cells, and the two columns of the last page end level.

Credits

Text
Original prose, CC BY 4.0
Fonts
Noto Serif SC (SIL OFL 1.1) · Noto Sans SC (SIL OFL 1.1) · LXGW WenKai TC (SIL OFL 1.1)
SandboxPDF