Με λίγα λόγια
Ένα δεμένο βιβλίο από σειρά δώδεκα τόμων, με τα φύλλα του για το τυπογραφείο: το σκληρό εξώφυλλο στα χρώματα της σειράς με τον αριθμό του τόμου, και οι δύο φόρζες μέσα του, με τα εξώφυλλα και τους τίτλους και των δώδεκα βιβλίων.
Τι θα στοιχειοθετήσετε
Ο Απατηλός γάμος, η ενδέκατη από τις δώδεκα Παραδειγματικές νουβέλες του Θερβάντες, ως τόμος XI μιας σειράς που τυπώνει μία νουβέλα σε κάθε δεμένο τόμο. Οι 26 σελίδες στοιχειοθετούνται σε Crimson Pro 11/15,2 σε σελίδα 120 × 185 mm. Από αυτές η buildCover φτιάχνει τρία φύλλα για το βιβλιοδετείο: το τυπωμένο σκληρό εξώφυλλο, στο βαθυκόκκινο της σειράς με μια χρυσή κορνίζα γύρω από τον πίνακα και τον αριθμό σε χρυσό δακτύλιο, και τη μπροστινή και την πίσω φόρζα, που μοιράζονται τη σειρά: οι τόμοι I έως VI ανοίγουν το βιβλίο και οι VII έως XII το κλείνουν, κάθε μισό ως πίνακες στην κολλημένη φόρζα και ως αριθμημένος κατάλογος στην ελεύθερη. Δίπλα στον γραμμωτό κώδικα, που φέρει το ISBN του τόμου, το εξώφυλλο τυπώνει το ISBN του πλήρους έργου.
Αυτή η συνταγή απαντά
- Πώς τυπώνω έναν τόμο μιας σειράς με το ISBN της σειράς και τους άλλους τίτλους της στις φόρζες;
Η σύντομη απάντηση
// The collection is data of the book, beside its versions. The volume's barcode carries its
// own ISBN, and the collection's `isbn` prints as a line above the bars. `catalogue` lists
// the twelve titles with their cover pictures, and `volume` names the one this book is: the
// endpapers set the list and the pictures from it (section 4), this volume marked in both.
const collection = {
name: t({ en: 'Exemplary Novels', es: 'Novelas ejemplares' }),
isbn: '978-84-0000-200-8',
catalogue: [
work('The Little Gipsy Girl', 'La gitanilla', 'gitanilla'),
work('The Generous Lover', 'El amante liberal', 'amante'),
work('Rinconete and Cortadillo', 'Rinconete y Cortadillo', 'rinconete'),
work('The Spanish-English Lady', 'La española inglesa', 'espanola'),
work('The Licentiate Vidriera', 'El licenciado Vidriera', 'vidriera'),
work('The Force of Blood', 'La fuerza de la sangre', 'fuerza'),
work('The Jealous Estremaduran', 'El celoso extremeño', 'celoso'),
work('The Illustrious Scullery-Maid', 'La ilustre fregona', 'fregona'),
work('The Two Damsels', 'Las dos doncellas', 'doncellas'),
work('The Lady Cornelia', 'La señora Cornelia', 'cornelia'),
work('The Deceitful Marriage', 'El casamiento engañoso', 'casamiento'),
work('The Dialogue of the Dogs', 'El coloquio de los perros', 'coloquio'),
],
};
collection.volume = collection.catalogue[VOLUME - 1].id;
const production = {
collection,
// A printed case with a flat spine: the case sheet and two endpapers, no jacket.
versions: [{ id: 'hardcover', name: t({ en: 'Hardcover', es: 'Tapa dura' }),
binding: 'case-flat', isbn: '978-84-0000-198-8', isbnAddOn: '90000' }],
};
Υλικά
- Λειτουργίες
- Εκδόσεις εκτύπωσης, ISBN και ράχηΦύλλο εξωφύλλου για εκτύπωσηΕξώφυλλα, σελίδες τίτλου και κολοφώνεςΣτιλ επικεφαλίδωνΣχεδιασμένες εναρκτήριες σελίδεςΚείμενο, γραμμές και πλαίσια στις σχεδιάσεις σελίδαςΜεταδεδομένα εγγράφουΣτιλ παραγράφωνΤρέχουσες κεφαλίδες και αριθμοί σελίδαςΕικόνες και πίνακες ως πόροιΣημασιολογική χρωματική παλέταΕξαγωγή PDFΣελίδες σε καμβά
- Χρησιμοποιεί επίσης
- Χαρτί, βιβλιοδεσία, γραφείο και φως (Folio)Ιδιότητες επικεφαλίδωνΧρώμα χαρτιούΚεφαλίδες ανά ρόλο σελίδαςΓραμματοσειρές ενσωματωμένες στο PDFΤρέχουσες κεφαλίδες ανά ενότηταΚεφάλαια χωρίς αρίθμηση
- Γραμματοσειρές
- Crimson Pro, Cormorant Garamond, Josefin Sans (SIL OFL 1.1)
- Αρχεία
amante-320.jpgcasamiento-1000.jpgcasamiento-320.jpgceloso-320.jpgcoloquio-320.jpgcornelia-320.jpgdoncellas-320.jpgespanola-320.jpgfregona-320.jpgfuerza-320.jpggitanilla-320.jpgrinconete-320.jpgvidriera-320.jpg- The front cover: a pale ensign leaning on his sword at the gate of the hospital of Valladolid, in oils (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 1, The Little Gipsy Girl, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 2, The Generous Lover, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 3, Rinconete and Cortadillo, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 4, The Spanish-English Lady, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 5, The Licentiate Vidriera, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 6, The Force of Blood, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 7, The Jealous Estremaduran, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 8, The Illustrious Scullery-Maid, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 9, The Two Damsels, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 10, The Lady Cornelia, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 11, The Deceitful Marriage, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
- The cover painting of volume 12, The Dialogue of the Dogs, on the endpapers, painted to match the front cover (Generated With Diffusion Models, πρωτότυπο)
Προετοιμασία
#1 · Η σειρά είναι δεδομένο του βιβλίου
Ο κώδικας είναι η σύντομη απάντηση παραπάνω. Το production.collection περιέχει τη σειρά: το όνομά της, το ISBN της, ένα catalogue με ένα id, έναν τίτλο και μια εικόνα για κάθε τόμο, και το volume, το id της καταχώρισης που είναι αυτό το βιβλίο. Το isbn της σειράς είναι αυτό που τυπώνει το Postext δίπλα στον γραμμωτό κώδικα: μια γραμμή σε μαύρο 6,5 pt πάνω από τις μπάρες, «ISBN του πλήρους έργου», στη γλώσσα του βιβλίου. Μια έκδοση που ορίζει δικό της workIsbn τυπώνει εκείνο. Και τα δύο ISBN είναι δειγματικοί αριθμοί του μπλοκ 978-84-0000, που δεν έχουν δοθεί σε κανένα βιβλίο. Οι έλεγχοι της διαμόρφωσης αναφέρουν ένα volume που δεν υπάρχει στον κατάλογο και ένα ISBN σειράς με λάθος ψηφίο ελέγχου.
#2 · Μία ενδυμασία για κάθε τόμο
// Every position is in mm from the top-left corner of its zone (the case's front is
// 116 × 191 mm: the 120 × 185 trim, set back 7 mm at the joint, 3 mm square round it).
const box = (id, zone, x, y, width, height, color, extra) => ({ id, kind: 'box', zone, x, y,
width, height, color: col(color), ...extra });
const picture = (id, zone, x, y, width, height, resourceId, extra) => ({ id, kind: 'image', zone,
x, y, width, height, resourceId, fit: 'cover', ...extra });
// `basis`: the spine drawn on; a thicker book stretches the bands and keeps the badge centred.
const spine = { basis: { width: 10, height: 191 } };
const livery = [
box('frame', 'front', 11.2, 59.2, 93.6, 105.6, 'gold'),
picture('art', 'front', 12, 60, 92, 104, 'cover-art'),
picture('badge', 'front', 51.5, 169, 13, 13, 'badge', { fit: 'contain' }),
box('head-band', 'spine', 0, 13, 10, 0.8, 'gold', spine),
box('foot-band', 'spine', 0, 160, 10, 0.8, 'gold', spine),
picture('spine-badge', 'spine', 1, 167, 8, 8, 'badge', { fit: 'contain', ...spine }),
// A paper label for the barcode, whose caption is set in black.
box('label', 'back', 53, 147, 61, 40, 'bone'),
];
Το σχέδιο του εξωφύλλου είναι το ίδιο αντικείμενο σε κάθε τόμο της σειράς· αλλάζουν μόνο το VOLUME, ο πίνακας και τα κείμενα. Κάθε στοιχείο τοποθετείται με βάση τη ζώνη στην οποία βρίσκεται, έτσι όταν ένας άλλος τόμος έχει περισσότερες σελίδες και παχύτερη ράχη, το εμπροσθόφυλλο μετακινείται μαζί με το τμήμα του. Στη ράχη, το basis καταγράφει τη ράχη των 10 mm πάνω στην οποία σχεδιάστηκαν οι ζώνες, και μια ράχη 8,3 mm ή 14 mm τεντώνει τις ζώνες στο πλάτος της και κρατά το σήμα στον άξονά της. Η γραμμή πάνω από τον γραμμωτό κώδικα στοιχειοθετείται σε μαύρο, γι' αυτό ο κώδικας κάθεται σε μια ανοιχτόχρωμη ετικέτα.
#3 · Κάθε φόρζα έχει δικό της σχέδιο
// The case takes the livery; each endpaper names a design in `sheets`. At the front the
// pastedown is the left page, at the back the right one: volumes I–VI open the book,
// VII–XII close it, the pictures always on the pastedown, in the case's colour. A catalogue
// element grids the titles' pictures in its box; `stroke` outlines this volume's.
const shelf = (first, last) => ({ id: `shelf-${first}`, kind: 'catalogue', zone: 'pastedown',
x: 26.5, y: 18, width: 67, height: 149, columns: 2, gap: 7, first, last,
stroke: { color: col('gold'), width: 0.8 } });
const endpaper = (first, last) => ({ background: col('endpaper'),
zones: { pastedown: col('case') }, elements: [shelf(first, last)],
verticalAlign: { flyleaf: 'middle' } });
const cover = {
background: col('case'),
elements: livery,
verticalAlign: { back: 'top' },
sheets: { endpaperFront: endpaper(1, 6), endpaperBack: endpaper(7, 12) },
};
Το cover.sheets δίνει σε ένα φύλλο ένα σχέδιο στη θέση εκείνου του εξωφύλλου: εδώ το endpaperFront και το endpaperBack, το καθένα με το φόντο του, την κολλημένη φόρζα στο χρώμα του εξωφύλλου και ένα στοιχείο catalogue. Το στοιχείο είναι ένα πλαίσιο σε μια ζώνη, που η μηχανή γεμίζει με τις εικόνες των τίτλων από το first ως το last, columns στο πλάτος με gap mm ανάμεσά τους, καθεμία να καλύπτει το κελί της. Ο τίτλος του οποίου το id είναι το collection.volume περιγράφεται με το stroke του στοιχείου· σε αυτές τις φόρζες αυτό είναι η χρυσή κορνίζα γύρω από τον τόμο XI. Η ενδυμασία μένει έξω από τις φόρζες, αφού κάθε φύλλο σχεδιάζει μόνο το δικό του σχέδιο. Ανοίγοντας το βιβλίο από μπροστά, η κολλημένη φόρζα είναι η αριστερή σελίδα, και στο τέλος είναι η δεξιά, έτσι οι εικόνες βρίσκονται πάντα πάνω στο χαρτόνι.
Οι τίτλοι προέρχονται από το Markdown του εξωφύλλου, που εξυπηρετεί κάθε φύλλο. Ένα πλαίσιο κειμένου που ονομάζει τα φύλλα του μπαίνει μόνο σε εκείνα:
:::frame{slot="flyleaf" sheet="endpaperBack"}
:::paragraphs{style="ad-head"}
Exemplary Novels
:::
::catalogue{numbers="I" first=7 last=12}
:::Το ::catalogue αντιπροσωπεύει τους τίτλους του καταλόγου, μία παράγραφο ο καθένας: τη θέση στο στιλ αρίθμησης που ορίζει το numbers, ένα διάστημα en και τον τίτλο. Οι γραμμές παίρνουν το στιλ παραγράφου cover-catalogue, και ο τρέχων τόμος το cover-catalogue-current· το pen αλλάζει το στιλ και των δύο, στο κέντρο σε Crimson Pro, τον τρέχοντα σε σκούρο κόκκινο. Το πλαίσιο κειμένου του οπισθόφυλλου ονομάζει case jacket, έτσι οι φόρζες το αφήνουν έξω.
#4 · Τρία φύλλα από ένα βιβλίο
const sheet = async (kind) => {
const built = buildCover({ config, version: 'hardcover', pages: book.pages,
markdown: coverText, metadata: book.metadata, resources, sheet: kind });
if (!('config' in built)) throw new Error(built.issues.map((i) => i.kind).join(', '));
// The barcode's digits name OCR-B, which no font server has: the label face sets them.
for (const [id, bytes] of Object.entries(built.files)) {
await loadSvg(id, new TextDecoder().decode(bytes)
.replace(/font-family="[^"]*"/g, 'font-family="Josefin Sans"'));
}
return { built, doc: await buildDocumentWithFonts(built.content, built.config, kitFonts(FONTS)) };
};
const sheets = [await sheet('cover'), await sheet('endpaperFront'), await sheet('endpaperBack')];
Η ίδια κλήση με sheet: 'cover', 'endpaperFront' και 'endpaperBack' φτιάχνει το σκληρό εξώφυλλο και τις δύο φόρζες, το καθένα ένα έγγραφο μίας σελίδας στο δικό του μέγεθος. Οι 26 σελίδες στρογγυλεύονται σε δύο τυπογραφικά των 16 σελίδων, 16 φύλλα των 240 µm· με 0,5 mm ανοχή το σώμα έχει πάχος 4,3 mm και η ράχη του εξωφύλλου 8,3 mm, με τα δύο χαρτόνια των 2 mm. Τα γράμματα ελέγχονται απέναντι στη ράχη του εξωφύλλου, που είναι φαρδύτερη από το ελάχιστο των 6 mm. Το PDF περιέχει τις 26 σελίδες, έπειτα το εξώφυλλο και τις φόρζες.
Η πλήρης συνταγή
// ═══ Postext Cookbook · Nº 198 · A volume of a collection, its endpapers the series ═══
// https://postext.dev/en/cookbook/collection-volume-endpapers
// Code: MIT · Text: Cervantes, tr. W. K. Kelly (public domain) · Art: diffusion models
// Fonts: Crimson Pro, Cormorant Garamond, Josefin Sans (SIL OFL 1.1) · Needs postext ≥ 1.93.0
//
// Volume XI of the twelve Exemplary Novels, one novella per hardcover: the series livery on
// the case, two ISBNs by the barcode, the twelve titles of the collection on the endpapers.
import {
buildDocumentWithFonts, renderPageToCanvas, registerResourceImage, inlineSvgFonts,
} from 'https://esm.sh/postext';
import { buildCover, workIsbnCaption } from 'https://esm.sh/postext/production';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'en'; // @lang: the language of the sample document ('en' | 'es')
const RECIPE = 'collection-volume-endpapers';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
const palette = { ink: '#2a211c', accent: '#7a2a22', muted: '#6c6258', paper: '#fbf7ee',
case: '#5e1c1a', gold: '#d2ae6a', bone: '#f1e8d4', endpaper: '#ece0c6' };
const col = (id) => ({ hex: palette[id], model: 'hex', paletteId: id });
const colorPalette = [
...Object.entries(palette).map(([id, hex]) => ({ id, name: id, value: { hex, model: 'hex' } })),
{ id: 'main-color', name: 'accent (defaults)', value: { hex: palette.accent, model: 'hex' } },
];
const VOLUME = 11; // this book's place in the collection
const roman = (n) => 'I II III IV V VI VII VIII IX X XI XII'.split(' ')[n - 1];
const work = (en, es, id) => ({ id, title: t({ en, es }), resource: `cat-${id}` });
// #region answer: the volume and its collection: two ISBNs and the series' catalogue
// The collection is data of the book, beside its versions. The volume's barcode carries its
// own ISBN, and the collection's `isbn` prints as a line above the bars. `catalogue` lists
// the twelve titles with their cover pictures, and `volume` names the one this book is: the
// endpapers set the list and the pictures from it (section 4), this volume marked in both.
const collection = {
name: t({ en: 'Exemplary Novels', es: 'Novelas ejemplares' }),
isbn: '978-84-0000-200-8',
catalogue: [
work('The Little Gipsy Girl', 'La gitanilla', 'gitanilla'),
work('The Generous Lover', 'El amante liberal', 'amante'),
work('Rinconete and Cortadillo', 'Rinconete y Cortadillo', 'rinconete'),
work('The Spanish-English Lady', 'La española inglesa', 'espanola'),
work('The Licentiate Vidriera', 'El licenciado Vidriera', 'vidriera'),
work('The Force of Blood', 'La fuerza de la sangre', 'fuerza'),
work('The Jealous Estremaduran', 'El celoso extremeño', 'celoso'),
work('The Illustrious Scullery-Maid', 'La ilustre fregona', 'fregona'),
work('The Two Damsels', 'Las dos doncellas', 'doncellas'),
work('The Lady Cornelia', 'La señora Cornelia', 'cornelia'),
work('The Deceitful Marriage', 'El casamiento engañoso', 'casamiento'),
Το συντεθειμένο script.js εκτελείται ως έχει: επικολλήστε το στο module script οποιασδήποτε σελίδας ή ανοίξτε τη συνταγή στο CodePen. Φάκελος της συνταγής στο GitHub ↗ (ανοίγει σε νέα καρτέλα)
Παραλλαγές
#Ντύστε το εξώφυλλο με κουβερτούρα
Σε σκληρό εξώφυλλο, το flaps προσθέτει μια κουβερτούρα (dust jacket), ένα τέταρτο φύλλο με δικά του αυτιά. Ο γραμμωτός κώδικας και το ISBN του έργου μεταφέρονται στο πίσω μέρος της κουβερτούρας, και το κείμενο παρουσίασης, του οποίου το πλαίσιο κειμένου ονομάζει jacket, πηγαίνει μαζί τους.
versions: [{ id: 'hardcover', name: t({ en: 'Hardcover', es: 'Tapa dura' }),
- binding: 'case-flat', isbn: '978-84-0000-198-8', isbnAddOn: '90000' }],
+ binding: 'case-flat', isbn: '978-84-0000-198-8', isbnAddOn: '90000', flaps: true }],#Στοιχειοθετήστε τον επόμενο τόμο
Για τον τόμο XII το σχέδιο μένει ως έχει: το VOLUME ονομάζει την καταχώριση του καταλόγου στο collection.volume, έτσι το σήμα, η χρυσή κορνίζα στις φόρζες και ο τονισμένος τίτλος την ακολουθούν. Το Markdown του εξωφύλλου, ο πίνακας και το ISBN είναι εκείνου του τόμου.
-const VOLUME = 11; // this book's place in the collection
+const VOLUME = 12; // this book's place in the collectionΣυνήθη λάθη
- Τα φύλλα έρχονται μετά τις σελίδες του βιβλίου στη λίστα της καταγραφής: το εξώφυλλο είναι η σελίδα 27, ο αριθμός σελίδων του βιβλίου συν ένα. Μια αλλαγή που προσθέτει σελίδα στο βιβλίο τα μετακινεί.
- Ο έλεγχος
contentInConfigτου Συνταγολογίου μετρά τη γραμμή που τυπώνει ηbuildCoverπάνω από τον γραμμωτό κώδικα ως κείμενο κρατημένο σε σχέδιο. Το pen την καταχωρίζει στοchecks.contentInConfig.allow, διατυπωμένη από τηworkIsbnCaption, τη συνάρτηση που χρησιμοποιεί η μηχανή. - Ένα στοιχείο
catalogueσχεδιάζει μόνο τις εικόνες. Ο κατάλογος των τίτλων είναι το::catalogueτου Markdown, έτσι ένα φύλλο χωρίς αυτή τη γραμμή δείχνει τους πίνακες χωρίς ονόματα από κάτω. - Τα ψηφία του γραμμωτού κώδικα ονομάζουν την OCR-B, που δεν τη διαθέτει κανένας διακομιστής γραμματοσειρών. Φορτώστε τον γραμμωτό κώδικα με ένα
font-familyπου το pen ήδη φορτώνει, αλλιώς το PDF αποτυγχάνει.
Ευχαριστίες
- Συνταγή
- Ignacio Ferro
- Κείμενο
- The Deceitful Marriage, translated by Walter K. Kelly, from The Exemplary Novels of Cervantes (London, Bohn’s Standard Library, 1846; 1881 reprint), Project Gutenberg eBook #14420 · Miguel de Cervantes · κοινό κτήμα
- El casamiento engañoso, from the Novelas ejemplares in the 1825 edition as transcribed on Wikisource · Miguel de Cervantes · κοινό κτήμα
- Εικόνες
- The front cover: a pale ensign leaning on his sword at the gate of the hospital of Valladolid, in oils · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 1, The Little Gipsy Girl, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 2, The Generous Lover, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 3, Rinconete and Cortadillo, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 4, The Spanish-English Lady, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 5, The Licentiate Vidriera, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 6, The Force of Blood, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 7, The Jealous Estremaduran, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 8, The Illustrious Scullery-Maid, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 9, The Two Damsels, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 10, The Lady Cornelia, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 11, The Deceitful Marriage, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- The cover painting of volume 12, The Dialogue of the Dogs, on the endpapers, painted to match the front cover · Generated With Diffusion Models · πρωτότυπο
- Γραμματοσειρές
- Crimson Pro (SIL OFL 1.1) · Cormorant Garamond (SIL OFL 1.1) · Josefin Sans (SIL OFL 1.1)
- Κώδικας
- MIT, όπως το Postext
Επεξεργασία αυτού του κειμένου ↗ (ανοίγει σε νέα καρτέλα)Φάκελος της συνταγής στο GitHub ↗ (ανοίγει σε νέα καρτέλα)


