Перейти к основному содержанию
Рецепт номер 89

Рецепты · Глава 5 · Структура книги

Исторический очерк со сносками по Чикаго

Очерк на четыре страницы: ссылки [@key, 87] становятся чикагскими сносками внизу страницы, первый раз полными, дальше краткими, и списком литературы.

На этой странице
Вывод
Canvas · PDF
Уровень
Средний
Postext
Проверено с Postext 1.65.0
Требуется ≥ 1.25.0 · postext-pdf ≥ 1.25.0
Лицензия
Обновлено 11 окт. 2026 г.
Код: MIT · Текст: CC BY 4.0
  • Образец на английском: русского издания пока нет
  • Обрезной формат 156 × 234 мм
  • 1 колонка
  • Crimson Pro 11/14
  • IBM Plex Sans Condensed
  • 4 страницы
  • Уровень
  • Postext 1.57.1
  • Свёрстано за 607 мс
  • Строк кода: 131

Коротко

Очерк о том, как британские города перешли на лондонское время. Каждый источник, на который ссылается автор, становится нумерованной сноской внизу страницы, а список работ стоит в конце.

Что получится

Оттиск из серии журнала по истории техники: очерк примерно в 1100 слов о том, как между 1840 и 1880 годами британские города отказались от своего полудня ради лондонского. Страница 156 × 234 мм, зеркальные поля, Crimson Pro 11/14 пт, на верхней половине первой страницы полоса железнодорожного зелёного. Автор записывает каждый источник ключом, [@howse1980, 87], а Postext ставит его нумерованной сноской внизу страницы в чикагском стиле «сноски и список». Первая сноска на работу даёт автора, название и издателя, каждая следующая краткую форму. Собственные рассуждения автора в сносках берут номера из того же ряда, а список литературы закрывает очерк.

Рецепт отвечает на вопросы

  • Как набрать ссылки сносками в стиле Chicago, с краткими формами при повторе?
  • Как ссылаться на источники и собирать список литературы в 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]; 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-е издание Chicago Manual, которое отказывается от Ibid. и повторяет краткую форму, поэтому сноски 11 и 12 печатают её дважды.

#2 · Сноски автора тоже ссылаются

Ссылка внутри [^note] остаётся в этой сноске и набирается в строке, полностью, если работа появляется впервые: сноска 1 — фраза автора и полная ссылка на Шивельбуша. Каждая ссылка кончается точкой стиля, поэтому сноске, которая завершается ссылкой, собственная точка в 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 мм от обреза, а текст начинается в 9 мм под ним. Даты берутся из атрибута заголовка, years="1840–1880", и набраны Crimson Pro Light 54 пт, так что на карточке видна цифра величиной с заголовок; атрибут с именем автора питает и колонтитул на левых полосах.

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' } }));

Рецепт целиком

Sandbox
// ═══ 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. для сноски, которая повторяет предыдущую работу. Вставьте файл .csl этого стиля из репозитория стилей Zotero в строку и используйте как собственный стиль.

-  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].

Источники и лицензии

Рецепт
Ignacio Ferro
Текст
Оригинальный текст, CC BY 4.0
Шрифты
Crimson Pro (SIL OFL 1.1) · IBM Plex Sans Condensed (SIL OFL 1.1)
SandboxPDF