跳到主要内容
食谱编号89

排版食谱 · 第5章 · 图书结构

用芝加哥注释体排历史论文

一篇四页的历史论文:正文写[@key, 87],引文按芝加哥注释体排成页脚注,首次完整、再次简略,文末附参考文献。

本页内容
输出
Canvas · PDF
难度
中级
Postext
已用Postext 1.65.0测试
需要≥ 1.25.0 · postext-pdf ≥ 1.25.0
许可证
更新于2026年10月11日
代码MIT · 文本CC BY 4.0
  • 英文样例:尚无中文版本
  • 成品尺寸156 × 234 mm
  • 1栏
  • Crimson Pro 11/14
  • IBM Plex Sans Condensed
  • 4页
  • 难度
  • Postext 1.57.1
  • 排版用时607 ms
  • 131行代码

简单来说

一篇讲英国各城镇如何改用伦敦时间的论文。作者引用的每一处文献都变成页脚的编号注释,参考文献列在文末。

成品一览

一份期刊技术史丛书的抽印本:约1,100词的论文,讲1840至1880年间英国各城镇如何放弃本地正午、改用伦敦时间。页面156 × 234 mm,左右镜像,正文Crimson Pro 11/14 pt,首页上半部是一条铁路绿色带。作者把每条文献写成代号[@howse1980, 87],Postext按芝加哥注释-书目体把每处引用排成页脚的编号注释。某部著作第一次出现时注出作者、书名和出版社,之后都用简略形式。作者自己的说明性注释与引文注释共用一套编号,参考文献放在全文最后。

这道食谱解答

  • 怎样按芝加哥注释体把引用排成脚注,并让后续引用用简略形式?
  • 怎样按APA、IEEE或其他引用样式引用文献并生成参考文献表?

简短回答

script.js · 第32–49行在完整代码中
// The text cites with [@howse1980, 87]; a note style turns every citation into a
// footnote. The first note for a work gives it in full, later ones in the short form
// (author, short title, page), and the bibliography lists the works by author.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
  style: 'chicago-notes-bibliography', // CMOS 18th edition, notes and bibliography
  notes: 'footnote', // each citation in a note at the foot of the page
  link: true, // a note's citation jumps to its bibliography entry
  bibliography: { fontSize: em(0.92), lineHeight: pt(13), hangingIndent: em(1.8),
    entrySpacing: pt(3) },
};
// The citation notes share the numbering and the look of the author's own [^notes].
const footnotes = {
  placement: 'column', numbering: 'chapter',
  fontSize: pt(8.5), lineHeight: pt(10.75), spaceBetween: pt(2),
  textAlign: 'left', // ragged: the gap after a note's number stays the same in every note
  separator: { width: 0.3, lineWidth: pt(0.5), color: col('rule') },
};

用料

类型
Crimson Pro, IBM Plex Sans Condensed(SIL OFL 1.1)
素材
无:所有图片都用代码绘制

做法

#1 · 每处引用一条注

代码就是上面的简短回答。chicago-notes-bibliography是注释体样式:正文里的引用只留下一个上标数字,内容进入页脚注释,与作者自己的[^注]统一编号;notes: 'footnote'把这一点写明。citeproc-js记录哪些著作已经引用过,所以注3是Derek Howse, Greenwich Time and the Discovery of the Longitude (Oxford University Press, 1980), 87,再次引用同一本书的注4是Howse, Greenwich Time and the Discovery of the Longitude, 90–91。内置样式是《芝加哥手册》第18版,它不再用Ibid.,而是重复简略形式,所以注11和注12都印简略形式。

#2 · 作者注里也能引用

写在[^注]里的引用留在该注之内、随文排出;如果是该著作第一次出现,就排完整形式:注1是作者的一句话加上Schivelbusch的完整出处。每条引用都以样式自带的句点结尾,所以以引用收尾的注释在Markdown里不要再加句点。

#3 · 前缀、后缀与定位

[see @simmons1991, 346–47; and @bartky2000, chap. 9]把see放在第一部著作前,两部之间用分号隔开,各自保留页码或章节。单独的数字表示页码;chap.和cap.在两种语言里都表示章。定位之后的文字是后缀:[@howse1980, 82–84, on the mail-coach timepieces]把这句话印在页码之后。

#4 · 章首放在色带里

script.js · 第53–74行在完整代码中
const BAND = 122; // mm from the trim's top
const opener = {
  enabled: true,
  minHeight: mm(BAND - MARGIN.top + 9), // the text starts 9 mm under the band
  slot: { elements: [
    { kind: 'box', id: 'band', style: { backgroundColor: col('green') },
      placement: { ...at('page', 'top-left'), size: { width: 'fill', height: mm(BAND) } } },
    { kind: 'text', id: 'kicker', content: '{attr.kicker}', fontFamily: LABEL, fontWeight: 600,
      fontSize: pt(7.5), letterSpacing: pt(1.4), textTransform: 'uppercase', color: col('tint'),
      align: 'left', placement: at('container', 'top-left', 0, 4) },
    { kind: 'text', id: 'years', content: '{attr.years}', fontFamily: TEXT, fontWeight: 300,
      fontSize: pt(54), lineHeight: 1, color: col('tint'), align: 'left',
      placement: at('container', 'top-left', -1, 16) },
    { kind: 'text', id: 'title', content: '{titleText}', fontFamily: TEXT, fontWeight: 600,
      fontSize: pt(25), lineHeight: 1.08, color: col('paper'), align: 'left', overflow: 'wrap',
      placement: { ...at('container', 'top-left', 0, 47),
        size: { width: mm(112), height: 'auto' } } },
    { kind: 'text', id: 'byline', content: '{attr.byline}', fontFamily: LABEL, fontWeight: 600,
      fontSize: pt(9), letterSpacing: pt(0.6), color: col('tint'), align: 'left',
      placement: at('container', 'top-left', 0, 92) },
  ] },
};

色带从裁切边向下122 mm,正文从它下方9 mm处开始。年份取自标题属性years="1840–1880",用54 pt的Crimson Pro Light排出,卡片上的数字与标题一样醒目;署名属性同时供偶数页的书眉使用。

script.js · 第16–23行在完整代码中
const palette = {
  ink: '#211d1a', green: '#24493d', tint: '#dfe8e2', rule: '#b7b0a4', muted: '#6a645b',
  paper: '#fbf9f4',
};
// col() links a colour to its palette entry; the hex is the value the entry holds today.
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.green })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));

完整食谱

沙盒
// ═══ Postext Cookbook · Nº 089 · A history essay with Chicago notes ═══════════════
// https://postext.dev/en/cookbook/history-essay-chicago-notes
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Crimson Pro, IBM Plex Sans Condensed (SIL OFL 1.1) · Needs postext ≥ 1.25.0
import {
  buildDocumentWithFonts, 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 sample document ('en' | 'es')
const RECIPE = 'history-essay-chicago-notes';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: a railway green for the opener band, ink and warm paper for the rest
const palette = {
  ink: '#211d1a', green: '#24493d', tint: '#dfe8e2', rule: '#b7b0a4', muted: '#6a645b',
  paper: '#fbf9f4',
};
// col() links a colour to its palette entry; the hex is the value the entry holds today.
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.green })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
// #endregion
const TEXT = 'Crimson Pro', LABEL = 'IBM Plex Sans Condensed';
const TRIM = { width: 156, height: 234 }; // a journal offprint, trimmed like a trade book
const MARGIN = { top: 22, bottom: 22, inner: 20, outer: 17 };
const LEAD = 14; // pt
const at = (to, edge, x = 0, y = 0) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) } });

// #region answer: Chicago notes and bibliography, one note per citation
// The text cites with [@howse1980, 87]; a note style turns every citation into a
// footnote. The first note for a work gives it in full, later ones in the short form
// (author, short title, page), and the bibliography lists the works by author.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = {
  style: 'chicago-notes-bibliography', // CMOS 18th edition, notes and bibliography
  notes: 'footnote', // each citation in a note at the foot of the page
  link: true, // a note's citation jumps to its bibliography entry
  bibliography: { fontSize: em(0.92), lineHeight: pt(13), hangingIndent: em(1.8),
    entrySpacing: pt(3) },
};
// The citation notes share the numbering and the look of the author's own [^notes].
const footnotes = {
  placement: 'column', numbering: 'chapter',
  fontSize: pt(8.5), lineHeight: pt(10.75), spaceBetween: pt(2),
  textAlign: 'left', // ragged: the gap after a note's number stays the same in every note
  separator: { width: 0.3, lineWidth: pt(0.5), color: col('rule') },

组合好的script.js可以直接运行:把它粘贴到任何页面的模块脚本中,或在CodePen上打开这道食谱。 GitHub上的食谱文件夹 ↗ (在新标签页中打开)

变化

#把注释放到文末

有些期刊把注释集中在论文之后;引文仍保留完整和简略两种形式。

-  placement: 'column', numbering: 'chapter',
+  placement: 'chapterEnd', numbering: 'chapter',

#恢复Ibid.

芝加哥格式第17版在重复上一条著作时印Ibid.。从Zotero样式库取来该样式的.csl文件,把内容放进一个字符串,作为自定义样式使用。

-  style: 'chicago-notes-bibliography', // CMOS 18th edition, notes and bibliography
+  style: 'custom', customStyle: CHICAGO_17TH_CSL, // the XML of the .csl file

常见问题

  • 以引用结尾的注释不要再加句点:样式已经加了一个,Postext不会把两个合并,注释末尾就会出现两个句点。
  • 在注释体样式里,不带方括号的@howse1980只在句中留下注号,变成As ¹ says,没有作者名。请自己写出作者名,再用方括号引用:As Howse says,[@howse1980]。

致谢

文本
原创文字, CC BY 4.0
字体
Crimson Pro (SIL OFL 1.1) · IBM Plex Sans Condensed (SIL OFL 1.1)
沙盒PDF