Με λίγα λόγια
Μια σελίδα πράξεων για παιδιά εννέα χρονών στα ισπανικά, αγγλικά, γαλλικά και γερμανικά. Κάθε χώρα γράφει τη διαίρεση με δικό της τρόπο, και το φύλλο την ακολουθεί· ένας διακόπτης δείχνει το αντίτυπο του δασκάλου με όλες τις απαντήσεις.
Τι θα στοιχειοθετήσετε
Την ενότητα 3 ενός βιβλίου αριθμητικής για την τετάρτη τάξη, The four operations, σε τέσσερις εκδόσεις. Μια σειρά νοερών πράξεων σε τρεις στήλες, ύστερα προσθέσεις, αφαιρέσεις και πολλαπλασιασμοί γραμμένοι ένα ψηφίο σε κάθε τετράγωνο με μια σειρά τετράγωνα για το αποτέλεσμα, και ύστερα διαίρεση και ένα πρόβλημα σε τετραγωνισμένο χαρτί. Στη διαίρεση χωρίζουν οι εκδόσεις: το αγγλικό φύλλο βάζει τον διαιρέτη έξω από την αγκύλη ⟌ με το πηλίκο από πάνω· το ισπανικό και το γαλλικό βάζουν τον διαιρέτη σε ένα L δεξιά από τον διαιρετέο και το πηλίκο από κάτω του· το γερμανικό γράφει 864 : 4 = σε μία γραμμή με χώρο για τις πράξεις από κάτω, και τα γινόμενά του με τελεία. Η υποδιαστολή των νοερών πράξεων, κόμμα ή τελεία, ακολουθεί κι αυτή τη γλώσσα. Ένας διακόπτης πάνω από τις σελίδες μετατρέπει το φύλλο του μαθητή στο αντίτυπο του δασκάλου, με κάθε απάντηση τυπωμένη σε πορτοκαλί στο τετράγωνό της.
Αυτή η συνταγή απαντά
- Πώς στοιχειοθετώ την κάθετη διαίρεση όπως τη γράφουν τα σχολεία κάθε χώρας;
- Πώς φτιάχνω βιβλίο του εκπαιδευτικού με τις απαντήσεις τυπωμένες στις θέσεις τους από το βιβλίο του μαθητή;
Η σύντομη απάντηση
// `- 864 : 4` in the Markdown is one operation; the style sets it digit by digit in squares
// of 7.2 mm, a cell for each figure of the answer. Long division follows the country: the
// divisor in an L right of the dividend in Spain and France (potence), `864 : 4 =` on one
// line in Germany, the bracket ⟌ in English-speaking schools.
const calculo = {
id: 'calculo',
number: { shape: 'disc', background: col('accent'), fontFamily: LABEL, fontWeight: 700 },
instruction: { bold: true, color: col('ink') },
grid: { cell: mm(9), fontFamily: TEXT, fontSize: pt(15), rule: col('rule'),
color: col('ink') },
arithmetic: { columns: 4,
division: t({ es: 'potence', fr: 'potence', de: 'inline', en: 'bracket' }) },
blank: { look: 'box', width: em(3.2), color: col('rule'), weight: pt(0.8) },
area: { kind: 'grid', spacing: mm(5), color: col('rule'), weight: pt(0.4) },
answers: { color: col('accent'), fontFamily: LABEL }, // the teacher's copy, in the accent
marginTop: mm(7), marginBottom: mm(2), itemSpacing: em(0.5),
};
Υλικά
- Λειτουργίες
- Πράξεις κάθεταΈκδοση του εκπαιδευτικούΣτιλ ασκήσεωνΑσκήσειςΚενά και τράπεζες λέξεωνΑνοιχτές ερωτήσεις και χώροι γραφήςΣχεδιασμένες εναρκτήριες σελίδεςΙδιότητες επικεφαλίδωνΣημασιολογική χρωματική παλέταΣυλλαβισμός και γλώσσα του εγγράφουΣελίδες σε καμβάΕξαγωγή PDFΣτιλ παραγράφων
- Χρησιμοποιεί επίσης
- Στήλες σε πλαίσιο ή στο κείμενοΛύσειςΓραμματοσειρές ενσωματωμένες στο PDF
- Γραμματοσειρές
- Fira Sans, Lexend (SIL OFL 1.1)
- Αρχεία
- Κανένα: κάθε εικόνα σχεδιάζεται με κώδικα
Προετοιμασία
#1 · Γράψτε τις πράξεις ως γραμμές του Markdown
// `- 864 : 4` in the Markdown is one operation; the style sets it digit by digit in squares
// of 7.2 mm, a cell for each figure of the answer. Long division follows the country: the
// divisor in an L right of the dividend in Spain and France (potence), `864 : 4 =` on one
// line in Germany, the bracket ⟌ in English-speaking schools.
const calculo = {
id: 'calculo',
number: { shape: 'disc', background: col('accent'), fontFamily: LABEL, fontWeight: 700 },
instruction: { bold: true, color: col('ink') },
grid: { cell: mm(9), fontFamily: TEXT, fontSize: pt(15), rule: col('rule'),
color: col('ink') },
arithmetic: { columns: 4,
division: t({ es: 'potence', fr: 'potence', de: 'inline', en: 'bracket' }) },
blank: { look: 'box', width: em(3.2), color: col('rule'), weight: pt(0.8) },
area: { kind: 'grid', spacing: mm(5), color: col('rule'), weight: pt(0.4) },
answers: { color: col('accent'), fontFamily: LABEL }, // the teacher's copy, in the accent
marginTop: mm(7), marginBottom: mm(2), itemSpacing: em(0.5),
};
Ένα :::exercise{type="arithmetic"} δέχεται μία πράξη σε κάθε στοιχείο λίστας, - 864 ÷ 4, με τα σύμβολα που γράφει η χώρα του (÷, :, ×, ·). Η μηχανή υπολογίζει το αποτέλεσμα, το πηλίκο και το υπόλοιπο, και το στιλ αποφασίζει πώς σχεδιάζεται η πράξη: τετράγωνα 7,2 mm, και το arithmetic.division επιλεγμένο ανά έκδοση με το t(). Οι δεκαδικοί διαβάζονται με το σημάδι της έκδοσης (12.75 + 8.5) και οι υποδιαστολές τους στέκονται η μία κάτω από την άλλη· ένας διψήφιος πολλαπλασιαστής τυπώνει μια σειρά για κάθε μερικό γινόμενο, και η διαίρεση κρατά μια σειρά πράξεων για κάθε βήμα στο ισπανικό φύλλο, όπου η αφαίρεση γίνεται με το μυαλό, και δύο στα άλλα. Μια σειρά νοερών πράξεων είναι μια συνηθισμένη άσκηση συμπλήρωσης κενών της οποίας η λίστα κάθεται σε μια ομάδα :::columns{count=3}, με κάθε [[70]] ένα κουτάκι τόσο φαρδύ όσο τα άλλα.
#2 · Η κεφαλή του φύλλου
const at = (to, edge, x = 0, y = 0, size) => ({ anchor: { to, edge },
offset: { x: mm(x), y: mm(y) }, ...(size && { size }) });
const field = (id, attr, x, width) => [
{ kind: 'text', id, content: `{attr.${attr}}`, fontFamily: LABEL, fontSize: pt(9.5),
fontWeight: 600, color: col('muted'), align: 'left',
placement: at('container', 'top-left', x, 26) },
{ kind: 'rule', id: `${id}-line`, direction: 'horizontal', thickness: pt(0.75),
color: col('rule'), placement: at('container', 'top-left', x + 17, 31, { width: mm(width) }) },
];
const head = { enabled: true, minHeight: mm(36), slot: { elements: [
{ kind: 'box', id: 'band', style: { backgroundColor: col('accent'), borderRadius: mm(3) },
placement: at('container', 'top-left', 0, 0, { width: 'fill', height: mm(19) }) },
{ kind: 'text', id: 'unit', content: '{attr.unidad}', fontFamily: LABEL, fontSize: pt(9),
fontWeight: 700, color: col('accent'), align: 'center', verticalAlign: 'middle',
textTransform: 'uppercase', letterSpacing: pt(1.2), lineHeight: 1.1,
box: { backgroundColor: col('paper'), borderRadius: mm(3.5) },
placement: at('container', 'top-left', 5, 5, { width: mm(26), height: mm(9) }) },
{ kind: 'text', id: 'title', content: '{titleText}', fontFamily: LABEL, fontSize: pt(21),
fontWeight: 700, color: col('paper'), align: 'left', lineHeight: 1.1,
placement: at('container', 'top-left', 37, 5.2) },
...field('name', 'nombre', 0, 100), ...field('date', 'fecha', 124, 38),
] } };
Η επικεφαλίδα επιπέδου 1 της ενότητας σχεδιάζει την πορτοκαλί ζώνη, την κάψουλα και τον τίτλο, και τα πεδία ονόματος και ημερομηνίας από τα χαρακτηριστικά της (nombre="Name" fecha="Date"), έτσι κάθε έκδοση τα ονομάζει στη δική της γλώσσα.
#3 · Εναλλαγή ανάμεσα στο φύλλο του μαθητή και στο αντίτυπο του δασκάλου
const form = document.getElementById('controls');
const labels = t({ es: ['Alumno', 'Profesor'], en: ['Pupil', 'Teacher'],
fr: ['Élève', 'Enseignant'], de: ['Schüler', 'Lehrkraft'] });
form.querySelectorAll('label span').forEach((span, k) => { span.textContent = labels[k]; });
function render() {
// The same config, edited in place: the next build sees the edition the form asks for.
config.exercises.edition = form.elements.edition.value;
const doc = buildDocument({ markdown }, config); // the faces are loaded by now
showPages(doc, { title });
document.querySelectorAll('#pt-actions a, [data-postext-pdf]').forEach((old) => old.remove());
offerPdf(() => renderToPdf(doc, { fontProvider: fontsourceProvider }),
`${RECIPE}-${LANG}-${config.exercises.edition}.pdf`);
}
form.addEventListener('change', render);
render();
Το exercises.edition: 'teacher' τυπώνει κάθε απάντηση στη θέση της στο χρώμα που δίνει το answers.color, εδώ το χρώμα έμφασης: τα κουτάκια των νοερών πράξεων, τα ψηφία κάθε αποτελέσματος, το πηλίκο και το υπόλοιπο, την υποδειγματική απάντηση του προβλήματος. Η φόρμα πάνω από τις σελίδες επεξεργάζεται τη διαμόρφωση επί τόπου και κατασκευάζει ξανά· οι γραμματοσειρές έχουν ήδη φορτωθεί, έτσι αρκεί το απλό buildDocument. Η λήψη κατασκευάζει πρώτα και τα δύο φύλλα, έτσι οι δημοσιευμένες σελίδες δείχνουν το φύλλο του μαθητή και ύστερα του δασκάλου.
Η πλήρης συνταγή
// ═══ Postext Cookbook · Nº 170 · Column arithmetic as each country writes it ═══════
// https://postext.dev/en/cookbook/column-arithmetic-by-country
// Code: MIT · Text: original (CC BY 4.0) · Pictures: none
// Fonts: Fira Sans, Lexend (SIL OFL 1.1) · Needs postext ≥ 1.66.0
import { buildDocumentWithFonts, buildDocument, renderPageToCanvas } from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'en'; // @lang: the language of the worksheet ('es' | 'en' | 'fr' | 'de')
const RECIPE = 'column-arithmetic-by-country';
// ─── 1 · Design ─────────────────────────────────────────────────────────────
// #region palette: ink, one orange accent, a pale tint, the grey of squared paper
const palette = {
ink: '#1f2328', accent: '#c4511c', tint: '#fbeee6', rule: '#b9c0c8', muted: '#5f6670',
paper: '#ffffff',
};
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' } },
];
// #endregion
const [TEXT, LABEL] = ['Fira Sans', 'Lexend'];
// #region answer: operations in squares, long division as the edition's schools set it
// `- 864 : 4` in the Markdown is one operation; the style sets it digit by digit in squares
// of 7.2 mm, a cell for each figure of the answer. Long division follows the country: the
// divisor in an L right of the dividend in Spain and France (potence), `864 : 4 =` on one
// line in Germany, the bracket ⟌ in English-speaking schools.
const calculo = {
id: 'calculo',
number: { shape: 'disc', background: col('accent'), fontFamily: LABEL, fontWeight: 700 },
instruction: { bold: true, color: col('ink') },
grid: { cell: mm(9), fontFamily: TEXT, fontSize: pt(15), rule: col('rule'),
color: col('ink') },
arithmetic: { columns: 4,
division: t({ es: 'potence', fr: 'potence', de: 'inline', en: 'bracket' }) },
blank: { look: 'box', width: em(3.2), color: col('rule'), weight: pt(0.8) },
area: { kind: 'grid', spacing: mm(5), color: col('rule'), weight: pt(0.4) },
answers: { color: col('accent'), fontFamily: LABEL }, // the teacher's copy, in the accent
marginTop: mm(7), marginBottom: mm(2), itemSpacing: em(0.5),
};
// #endregion
// #region head: the unit pill, the title and the lines for a name and a date
const at = (to, edge, x = 0, y = 0, size) => ({ anchor: { to, edge },
offset: { x: mm(x), y: mm(y) }, ...(size && { size }) });
const field = (id, attr, x, width) => [
<form id="controls" aria-label="Edition">
<label><input type="radio" name="edition" value="student" checked> <span></span></label>
<label><input type="radio" name="edition" value="teacher"> <span></span></label>
</form>
<main id="pages"></main>
/* The edition switch above the desk: two pills in the sheet's orange. */
#controls {
display: flex; justify-content: center; gap: 8px; padding: 14px 16px; background: #16181d;
font: 600 14px/1.2 Lexend, system-ui, sans-serif;
}
#controls label {
display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px;
border-radius: 22px; color: #f4f1ea; border: 1px solid #5f6670; cursor: pointer;
}
#controls label:has(input:checked) { background: #c4511c; border-color: #c4511c; }
#controls input { accent-color: #fff; }
Το συντεθειμένο script.js εκτελείται ως έχει: επικολλήστε το στο module script οποιασδήποτε σελίδας ή ανοίξτε τη συνταγή στο CodePen. Φάκελος της συνταγής στο GitHub ↗ (ανοίγει σε νέα καρτέλα)
Παραλλαγές
#Οι απαντήσεις ανάποδα στο κάτω μέρος
Μια συνήθεια των βιβλίων με γρίφους: το κλειδί κάθε άσκησης, γυρισμένο 180° από κάτω της.
- exercises: { edition: 'student' }, // the switch above the pages sets 'teacher'
+ exercises: { edition: 'student', solutions: { placement: 'inverted', layout: 'key' } },#Διαίρεση κάτω από την αγκύλη σε κάθε έκδοση
Και τα ιαπωνικά και κινεζικά σχολεία χρησιμοποιούν την αγκύλη· η προεπιλογή για μια γλώσσα που δεν παραθέτετε είναι η δική της.
- division: t({ es: 'potence', fr: 'potence', de: 'inline', en: 'bracket' }) },
+ division: 'bracket' },Συνήθη λάθη
- Μια διαίρεση με δεκαδικό, όπως
4.8 ÷ 0.2, δεν διαβάζεται και τυπώνεται όπως είναι γραμμένη. Κρατήστε την στα κενά των νοερών πράξεων, όπου η απάντηση είναι κείμενο.
Ευχαριστίες
- Συνταγή
- Ignacio Ferro
- Κείμενο
- Πρωτότυπο κείμενο, CC BY 4.0
- Γραμματοσειρές
- Fira Sans (SIL OFL 1.1) · Lexend (SIL OFL 1.1)
- Κώδικας
- MIT, όπως το Postext
Επεξεργασία αυτού του κειμένου ↗ (ανοίγει σε νέα καρτέλα)Φάκελος της συνταγής στο GitHub ↗ (ανοίγει σε νέα καρτέλα)


