Saltar al contenido principal
Receta número 89

Recetario · Capítulo 5 · Estructura del libro

Un ensayo de historia con notas de Chicago

Un ensayo de historia de cuatro páginas cuyas citas [@clave, 87] salen como notas de Chicago al pie: completas la primera vez, breves después.

En esta página
Salida
Canvas · PDF
Postext
Probada con Postext 1.65.0
Requiere ≥ 1.25.0 · postext-pdf ≥ 1.25.0
Licencia
Actualizada el 11 oct 2026
Código MIT · Texto CC BY 4.0
  • Formato 156 × 234 mm
  • 1 columna
  • Crimson Pro 11/14
  • IBM Plex Sans Condensed
  • 4 páginas
  • Nivel
  • Postext 1.57.1
  • Compuesto en 569 ms
  • 131 líneas de código

En pocas palabras

Un ensayo sobre cómo las ciudades británicas adoptaron la hora de Londres. Cada fuente que cita la autora se convierte en una nota numerada al pie de la página, y la lista de obras va al final.

Lo que vas a componer

Una separata de la serie de historia de la técnica de una revista: un ensayo de unas 1.100 palabras sobre cómo las ciudades británicas dejaron su propio mediodía por el de Londres entre 1840 y 1880. La página mide 156 × 234 mm, con márgenes en espejo, en Crimson Pro de 11/14 pt, y una banda verde ferrocarril cubre la mitad superior de la primera. La autora escribe cada fuente como una clave, [@howse1980, 87], y Postext compone cada una como una nota numerada al pie en el estilo de notas y bibliografía de Chicago. La primera nota de una obra da autor, título y editorial; las siguientes, la forma breve. Las notas propias de la autora toman su número de la misma serie, y la bibliografía cierra el ensayo.

Esta receta responde a

  • ¿Cómo pongo las citas en notas al pie, al estilo de Chicago, con forma breve en las siguientes?
  • ¿Cómo cito obras y compongo la bibliografía en APA, IEEE u otro estilo de cita?

La respuesta corta

script.js · líneas 32–49en el código completo
// 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') },
};

Ingredientes

Tipografía
Crimson Pro, IBM Plex Sans Condensed (SIL OFL 1.1)
Recursos
Ninguno: todas las imágenes se dibujan en código

Elaboración

#1 · Una nota para cada cita

El código es la respuesta corta de arriba. chicago-notes-bibliography es un estilo de notas: una cita deja en el texto un número volado y sus palabras pasan a una nota al pie, numerada junto con las [^notas] de la autora; notes: 'footnote' lo dice de forma explícita. citeproc-js lleva la cuenta de las obras ya citadas, así que la nota 3 dice Derek Howse, Greenwich Time and the Discovery of the Longitude (Oxford University Press, 1980), 87 y la nota 4, que vuelve al mismo libro, Howse, Greenwich Time and the Discovery of the Longitude, 90–91. El estilo incluido es la 18.ª edición del Manual de Chicago, que abandona ibid. y repite la forma breve, de modo que las notas 11 y 12 la imprimen dos veces.

#2 · Las notas de la autora también citan

Una cita dentro de una [^nota] se queda en esa nota y se compone dentro de la línea, completa si es la primera vez que aparece la obra: la nota 1 es la frase de la autora seguida de la referencia completa de Schivelbusch. Toda cita termina con el punto del estilo, así que una nota que acaba en una cita no lleva punto propio en el Markdown.

#3 · Prefijos, sufijos y localizadores

[véase @simmons1991, 346–47; y @bartky2000, cap. 9] pone véase delante de la primera obra, separa las dos con punto y coma y conserva el localizador de cada una. Un número solo es una página; cap. y chap. indican un capítulo en cualquiera de los dos idiomas. El texto que sigue al localizador es un sufijo: [@howse1980, 82–84, sobre los relojes de las diligencias] imprime la frase detrás de las páginas.

#4 · La apertura va en una banda

script.js · líneas 53–74en el código completo
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) },
  ] },
};

La banda baja 122 mm desde el corte y el texto empieza 9 mm por debajo. Las fechas salen de un atributo del encabezado, years="1840–1880", en Crimson Pro Light de 54 pt, para que la tarjeta muestre una cifra tan grande como un título; el atributo de la firma alimenta además la cabecera de las páginas pares.

script.js · líneas 16–23en el código completo
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' } }));

La receta completa

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 = 'es'; // @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') },

El script.js compuesto funciona tal cual: pégalo como script de módulo en cualquier página o abre la receta en CodePen. Carpeta de la receta en GitHub ↗ (se abre en una nueva pestaña)

Variantes

#Lleva las notas al final

Algunas revistas reúnen las notas tras el ensayo; las citas conservan sus formas completa y breve.

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

#Vuelve a escribir ibid.

La 17.ª edición del estilo de Chicago imprime ibid. en la nota que repite la obra anterior. Pega el archivo .csl de ese estilo, del repositorio de estilos de Zotero, en una cadena y úsalo como estilo propio.

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

Errores frecuentes

  • No cierres con punto una nota que acaba en una cita: el estilo ya pone el suyo, y Postext no funde los dos, así que la nota terminaría con dos puntos.
  • En un estilo de notas, @howse1980 sin corchetes deja en la frase solo el número de la nota, Como ¹ dice, sin el nombre del autor. Escribe tú el nombre y cita entre corchetes: Como dice Howse,[@howse1980].

Créditos

Texto
Texto original, CC BY 4.0
Fuentes
Crimson Pro (SIL OFL 1.1) · IBM Plex Sans Condensed (SIL OFL 1.1)
SandboxPDF