Vai al contenuto principale
Ricetta numero 143

Ricettario · Capitolo 9 · Pubblicazioni complete

Un bollettino settimanale: i primi rapporti sull’AIDS

Due rapporti CDC del 1981 ricomposti in un bollettino US Letter: testata, casi con etichette in linea, stili Reported by ed Editorial Note, note numerate.

  • Esempio in inglese: non c’è ancora un’edizione italiana
  • Formato 215,9 × 279,4 mm
  • 2 colonne, Intercolonna di 6,3 mm
  • IBM Plex Serif 9,5/13
  • IBM Plex Sans Condensed
  • Libre Franklin
  • 6 pagine
  • Livello
  • Postext 1.65.0
  • Impaginato in 303 ms
  • 180 righe di codice

In breve

Un bollettino di sanità pubblica del 1981, ricomposto su carta formato lettera. Ogni tipo di paragrafo (i casi, l’elenco dei medici segnalatori, il commento della redazione) ha il suo aspetto, e i riferimenti si numerano da soli.

Che cosa comporrai

Sei pagine di un bollettino epidemiologico settimanale in formato US Letter, che ristampano i due rapporti con cui i Centers for Disease Control descrissero per la prima volta quella che sarebbe stata chiamata AIDS: cinque casi di polmonite da Pneumocystis a Los Angeles (5 giugno 1981) e i casi di sarcoma di Kaposi che seguirono (3 luglio 1981). La testata è un progetto originale nello spirito di un bollettino governativo dell’epoca, una fascia blu con un logotipo condensato sopra due colonne in Plex Serif. Ogni voce di un rapporto ha il suo stile: i casi clinici sotto etichette numerate in grassetto, la riga Reported by in piccolo corsivo, la Editorial Note, i riferimenti tra parentesi e un elenco numerato. Il testo, i riferimenti e le tabelle sono come li stampò il CDC; la cronologia e la tabella dei casi a pagina 2 sono un’aggiunta della redazione.

Questa ricetta risponde a

  • Come compongo un bollettino settimanale: una testata, casi clinici, una nota editoriale e riferimenti numerati?
  • Come cito le opere e costruisco la bibliografia in APA, IEEE o un altro stile citazionale?
  • Come creo una tabella con righe di intestazione, celle unite, larghezze delle colonne e allineamento per cella?
  • Come ricompongo con Postext un articolo open access da arXiv o PubMed Central, mantenendo citazioni, figure e riga della licenza?

La risposta breve

script.js · righe 84–104nel codice completo
// :::paragraphs{style="…"} wraps the blocks of each voice; **Patient 1:** is a run-in label.
const voice = (id, family, size, lead, extra) => ({ id, fontFamily: family, fontSize: pt(size),
  lineHeight: pt(lead), color: col('ink'), boldColor: col('ink'), ...extra });
const aside = { textAlign: 'left', firstLineIndent: pt(0), snapToGrid: false };
const paragraphStyles = [
  // Case histories and the Editorial Note: the body texture, bold labels in the accent.
  voice('case', TEXT, 9.5, LEAD, { boldColor: col('accent'), boldFontWeight: 600 }),
  voice('editorial', TEXT, 9.5, LEAD, { boldColor: col('accent'), boldFontWeight: 600 }),
  // "Reported by …": the authors' line, italic small type in the condensed sans, off the grid.
  voice('reported', LABEL, 7.8, 10.2, { ...aside, italic: true, color: col('muted'),
    hyphenation: false, marginTop: pt(4), marginBottom: pt(6) }),
  // A line the reprint adds, in the label face and the accent: never taken for 1981 text.
  voice('editor', LABEL, 8, 10.6, { ...aside, italic: true, color: col('accent'),
    marginTop: pt(3), marginBottom: pt(5) }),
  voice('colophon', LABEL, 7.4, 9.6, { ...aside, color: col('muted'), marginTop: pt(LEAD) }),
];
// MMWR cited (1) in citation order, and each report (its H1 is a chapter) counted from 1.
registerCitationEngine(createCiteprocEngine({ styles: STYLES, locales: LOCALES }));
const citations = { style: 'american-medical-association', marker: 'parentheses',
  numbering: 'chapter', bibliography: { scope: 'chapter', fontSize: em(0.86),
    lineHeight: pt(10.6), entrySpacing: pt(1.5), labelAlign: 'right' } };

Ingredienti

Tipo
IBM Plex Serif, Libre Franklin, IBM Plex Sans Condensed (SIL OFL 1.1)
Risorse
  • Figure 1, timeline of the five cases, drawn in code from the dates in the case reports (Ignacio Ferro, originale)

Preparazione

#1 · Uno stile di paragrafo per ogni voce

Il codice è la risposta breve qui sopra. Un rapporto di bollettino è scritto in più registri: i casi clinici, l’elenco di chi li ha segnalati, il commento della redazione. Se racchiudi ogni parte in :::paragraphs{style="…"}, le dai un aspetto senza toccare le parole, così la riga Reported by scende a un corsivo condensato da 7,8 pt fuori dalla griglia della linea di base, mentre i casi clinici conservano la tessitura del testo con le loro etichette **Patient 1:** nel colore d’accento. Le citazioni sono scritte [@walzer1974]; american-medical-association con marker: 'parentheses' le stampa come (1) ed elenca le opere in ordine di citazione, come faceva il settimanale, numbering: 'chapter' conta da 1 le citazioni di ogni rapporto e scope: 'chapter' mette sotto ciascuno il suo elenco con gli stessi numeri.

#2 · Una testata che apre il primo rapporto

script.js · righe 38–65nel codice completo
// Kicker and dateline are attributes of each report's H1; {titleText} read with inlineMarks
// keeps the italic genus. The July report opens where June ends, under a double rule.
const reportHead = (y, size) => [
  text('kicker', '{attr.kicker}', LABEL, 8.5, { ...caps(8.5), color: col('accent'),
    placement: at('container', 'top-left', 0, y, MEASURE) }),
  text('title', '{titleText}', DISPLAY, size, { fontWeight: 800, lineHeight: 1.08,
    inlineMarks: true, placement: at('#kicker', 'below', 0, 2.2, MEASURE) }),
  text('dateline', '{attr.dateline}', LABEL, 9, { color: col('muted'),
    placement: at('#title', 'below', 0, 2, MEASURE) }),
];
const masthead = { enabled: true, minHeight: mm(72), slot: { elements: [
  { kind: 'box', id: 'band', style: { backgroundColor: col('accent') }, placement: {
    anchor: { to: 'page', edge: 'top-left' }, size: { width: 'fill', height: mm(49) } } },
  // The series line, the reprint's number, its description and contents are the first H1's.
  text('series', '{attr.series}', LABEL, 8,
    { ...caps(8), color: col('paper'), placement: at('page', 'top-left', SIDE, 11, 120) }),
  text('number', '{attr.reprint}', LABEL, 8, { ...caps(8), color: col('paper'), align: 'right',
    placement: at('page', 'top-right', -SIDE, 11, 50) }),
  text('wordmark', 'Surveillance Notes', DISPLAY, 50, { fontWeight: 800, color: col('paper'),
    letterSpacing: pt(-1), lineHeight: 1, placement: at('page', 'top-left', SIDE - 1, 18) }),
  text('issue', '{attr.issue}', TEXT, 9.5,
  { lineHeight: 1.3, placement: at('container', 'top-left', 0, 29, 92) }),
  text('contents', '{attr.contents}', LABEL, 8, { inlineMarks: true, lineHeight: 1.3,
    placement: at('container', 'top-right', 0, 29, 76), align: 'left' }),
  rule('rule-a', 46.5, 2), rule('rule-b', 48, 0.5), ...reportHead(52, 23),
] } };
const opener = { enabled: true, minHeight: mm(26), slot: { elements: [rule('rule-a', 0, 2),
  rule('rule-b', 1.5, 0.5), ...reportHead(5, 18)] } };

La testata è la grafica dello stile di titolo del primo rapporto, quindi si stampa una sola volta, a pagina 1, e le testatine saltano quella pagina (pages: 'body'). L’occhiello e la riga della data vengono da attributi dell’H1 di ciascun rapporto, e il titolo è {titleText}: un elemento di testo con inlineMarks: true conserva il corsivo del genere nel titolo. Il rapporto di luglio si apre con gli stessi tre elementi sotto un doppio filetto. Il suo stile di titolo occupa tutta la larghezza con spanBreak: false, così il titolo si apre dove finisce il rapporto di giugno: le colonne sopra finiscono alla pari e il testo prosegue su entrambe le colonne sotto, come il settimanale faceva seguire un rapporto all’altro.

#3 · Tre tabelle da testo separato da tabulazioni

script.js · righe 439–472nel codice completo
const NUMBER = /^[\d,.()% –]*$/; // a column of counts aligns right, its heading centred
const table = (tsv, headerRows, columnWidths) => {
  const model = parseTSV(tsv, { headerRows });
  const numeric = model.rows[0].map((_, c) => model.rows.slice(headerRows)
    .every((row) => NUMBER.test(row[c].content)));
  return { ...model, columnWidths, rows: model.rows.map((cells, r) => cells.map((cell, c) =>
    (numeric[c] ? { ...cell, align: r < headerRows ? 'center' : 'right' } : cell))) };
};
// Two header rows, as the weekly printed them: "25th week ending" spans two columns.
const notifiable = [[0, 0, 1, 0], [0, 1, 0, 2], [0, 3, 1, 3], [0, 4, 0, 6]]
  .reduce((m, [r1, c1, r2, c2]) => mergeCells(m, { start: { row: r1, col: c1 },
    end: { row: r2, col: c2 } }), table(NOTIFIABLE, 2, [3.6, 1, 1, 1, 1.1, 1.1, 1.1]));
const added = 'Compiled for this reprint from the case reports; not part of the 1981 report.';
const res = (id, typeId, kind, placement, more) => ({ id, typeId, kind, placement,
  createdAt: 0, updatedAt: 0, ...more });
const resources = [
  res('fig-timeline', 'figure', 'svg', { position: 'bottom', span: 'page' }, {
    svg: { fileId: 'timeline.svg', width: 1780, height: 490 },
    caption: 'The five patients, September 1980 to May 1981, by month. The illness before '
      + 'the pneumonia is counted back from the month of diagnosis, as each report gives it.',
    note: `Drawn by the editors. ${added}`,
    altText: 'A timeline of five rows, one per patient: Pneumocystis pneumonia diagnosed '
      + 'between February and April 1981, two deaths in March and May.' }),
  res('tbl-cases', 'table', 'table', { position: 'top', span: 'page' }, {
    caption: 'The five case reports at a glance.', note: added,
    table: { model: table(CASES, 1, [0.7, 0.45, 1, 2.2, 2.4, 1.5]) } }),
  res('tbl-complaints', 'table', 'table', { position: 'bottom' }, {
    caption: 'Presenting complaints in 20 patients with Kaposi’s sarcoma',
    table: { model: table(COMPLAINTS, 1, [2, 1.15]) } }),
  res('tbl-notifiable', 'table', 'table', { position: 'here' }, {
    caption: 'Summary — cases of specified notifiable diseases, United States',
    note: 'Cumulative totals include revised and delayed reports through previous weeks.',
    table: { model: notifiable, styleId: 'weekly' } }),
];

Ogni tabella è uno slot di contenuto con testo separato da tabulazioni, il formato che copia un foglio di calcolo, e parseTSV lo trasforma in un modello. Una colonna di conteggi si allinea a destra con l’intestazione centrata; quattro chiamate a mergeCells costruiscono l’intestazione su due righe del riepilogo delle malattie notificabili. Il tipo tabella fa ripartire il contatore a ogni H1 (resetOn: 'h1'), così ogni rapporto ha la sua «Table 1», come nel 1981.

#4 · Un solo blu, collegato ovunque

script.js · righe 17–21nel codice completo
const palette = { ink: '#1c1f24', accent: '#1f3f74', tint: '#e6eaf1', rule: '#a7b1c2',
  muted: '#566070', paper: '#ffffff' };
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.accent })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));

La fascia, le etichette, i numeri di pagina, le intestazioni delle tabelle e il grafico usano tutti la stessa voce della tavolozza, così chi sostituisce accent con il colore del proprio bollettino ricolora le sei pagine in un colpo solo.

La ricetta completa

Sandbox
// ═══ Postext Cookbook · Nº 143 · A weekly bulletin report: the first AIDS reports ═══
// https://postext.dev/en/cookbook/outbreak-report-bulletin
// Code: MIT · Text: CDC, MMWR 1981;30:250–252 and 305–308 (public domain) · Chart: original
// Fonts: IBM Plex Serif, Libre Franklin, Plex Sans Condensed (OFL) · Needs postext ≥ 1.34.0
import {
  buildDocumentWithFonts, renderPageToCanvas, registerCitationEngine, registerResourceImage,
  defaultResourceTypes, parseTSV, mergeCells, inlineSvgFonts,
} 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 = 'outbreak-report-bulletin';

// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: a federal blue on office white, every colour linked by id
const palette = { ink: '#1c1f24', accent: '#1f3f74', tint: '#e6eaf1', rule: '#a7b1c2',
  muted: '#566070', paper: '#ffffff' };
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = Object.entries({ ...palette, 'main-color': palette.accent })
  .map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } }));
// #endregion
const [TEXT, DISPLAY, LABEL] = ['IBM Plex Serif', 'Libre Franklin', 'IBM Plex Sans Condensed'];
const [TRIM_W, TRIM_H, TOP, BOTTOM, SIDE, GUTTER] = [215.9, 279.4, 22, 20, 19, 6.35];
const MEASURE = TRIM_W - 2 * SIDE; // US Letter, two columns of 86 mm
const LEAD = 13; // pt: 9.5 pt Plex Serif, as a bulletin sets two columns of Letter

const text = (id, content, family, size, extra) => ({ kind: 'text', id, content, align: 'left',
  fontFamily: family, fontSize: pt(size), color: col('ink'), overflow: 'wrap', ...extra });
const at = (to, edge, x, y, width) => ({ anchor: { to, edge }, offset: { x: mm(x), y: mm(y) },
  ...(width && { size: { width: mm(width), height: 'auto' } }) });
const caps = (size, extra) => ({ fontFamily: LABEL, fontSize: pt(size), fontWeight: 600,
  letterSpacing: pt(size * 0.18), textTransform: 'uppercase', ...extra });
const rule = (id, y, thickness) => ({ kind: 'rule', id, color: col('accent'),
  thickness: pt(thickness), placement: at('container', 'top-left', 0, y, MEASURE) });

// #region masthead: the bulletin's band, issue strip and contents over the first report
// Kicker and dateline are attributes of each report's H1; {titleText} read with inlineMarks
// keeps the italic genus. The July report opens where June ends, under a double rule.
const reportHead = (y, size) => [
  text('kicker', '{attr.kicker}', LABEL, 8.5, { ...caps(8.5), color: col('accent'),
    placement: at('container', 'top-left', 0, y, MEASURE) }),
  text('title', '{titleText}', DISPLAY, size, { fontWeight: 800, lineHeight: 1.08,
    inlineMarks: true, placement: at('#kicker', 'below', 0, 2.2, MEASURE) }),
  text('dateline', '{attr.dateline}', LABEL, 9, { color: col('muted'),
    placement: at('#title', 'below', 0, 2, MEASURE) }),
];
const masthead = { enabled: true, minHeight: mm(72), slot: { elements: [

Lo script.js composto funziona così com’è: incollalo nello script modulo di qualsiasi pagina, oppure apri la ricetta su CodePen. Cartella della ricetta su GitHub ↗ (si apre in una nuova scheda)

Varianti

#Numeri dei riferimenti in apice

La maggior parte delle riviste mediche mette i numeri in apice invece che tra parentesi.

-const citations = { style: 'american-medical-association', marker: 'parentheses',
+const citations = { style: 'american-medical-association', marker: 'superscript',

#Comincia ogni rapporto su una pagina nuova

Una collana di ristampe che archivia i rapporti separatamente apre ciascuno su una pagina nuova.

-    { id: 'report', span: 'page', spanBreak: false, advancedDesign: opener },
+    { id: 'report', span: 'page', advancedDesign: opener },

#Usa l’elenco Vancouver

Un articolo medico in stile Vancouver modifica lo stile elsevier-vancouver incluso per la forma dei riferimenti NLM.

Errori frequenti

  • Senza numbering: 'chapter' i numeri dei riferimenti proseguono lungo tutto il documento e scope: 'chapter' divide soltanto gli elenchi: il rapporto di luglio citerebbe le opere 4 e da 6 a 23 dove il settimanale stampava da 1 a 19.
  • La nota del 1981 Paired specimens not run in parallel è segnata con un asterisco: footnotes.numberFormat: 'symbols' compone *, †, ‡ e li fa ripartire su ogni pagina. Di questi segni solo l’asterisco è nel file latin di un carattere Fontsource (la croce è in latin-ext, la doppia croce in nessuno dei due), quindi una pagina con due o tre note ha bisogno di un carattere che li contenga, oppure di symbols: ['*', '§', '¶'].
  • La formulazione del 1981 resta come fu stampata, compresa la terminologia dell’epoca, e il colophon lo dichiara. Una ristampa non corregge nulla del testo che riproduce; ciò che aggiunge la redazione (la cronologia, la tabella dei casi, la riga in corsivo blu sotto il primo paragrafo) è composto con un suo stile e segnalato.

Crediti

Testo
  • "Pneumocystis Pneumonia — Los Angeles", MMWR 1981;30(21):250–252, and "Kaposi's Sarcoma and Pneumocystis Pneumonia Among Homosexual Men — New York City and California", MMWR 1981;30(25):305–308, re-set in full from the printed issues; Table 1 of the first report and Figure 1 added by the editors from the case reports. "All material in the MMWR Series is in the public domain and may be used and reprinted without special permission; citation as to source, however, is appreciated." · Centers for Disease Control (CDC) · pubblico dominio
Immagini
  • Figure 1, timeline of the five cases, drawn in code from the dates in the case reports · Ignacio Ferro · originale
Font
IBM Plex Serif (SIL OFL 1.1) · Libre Franklin (SIL OFL 1.1) · IBM Plex Sans Condensed (SIL OFL 1.1)
SandboxPDF