باختصار
صفحة عمليات حسابية لأطفال في التاسعة بالإسبانية والإنجليزية والفرنسية والألمانية. لكل بلد طريقته في كتابة القسمة، والورقة تتبعها؛ ومفتاح يعرض نسخة المعلم وفيها كل الإجابات.
ما الذي ستنضده
الوحدة 3 من كراسة حساب للصف الرابع، العمليات الأربع، في أربع طبعات. صف من الحساب الذهني في ثلاثة أعمدة، ثم عمليات جمع وطرح وضرب مكتوبة بالطريقة العمودية، رقم في كل مربع وتحتها صف من المربعات للناتج، ثم القسمة الطويلة ومسألة على ورق مربعات. وفي القسمة تفترق الطبعات: الورقة الإنجليزية تضع المقسوم عليه خارج القوس ⟌ وخارج القسمة فوقه؛ والإسبانية والفرنسية تضعان المقسوم عليه في زاوية على يمين المقسوم وخارج القسمة تحته؛ والألمانية تكتب 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),
};
المكونات
- الميزات
- العمليات العموديةطبعة المعلمأنماط التمارينالتمارينالفراغات وبنوك الكلماتالأسئلة المفتوحة ومساحات الكتابةصفحات افتتاح مصمَّمةسمات العنوانلوحة ألوان دلاليةتقسيم الكلمات ولغة المستندصفحات على اللوحة (Canvas)التصدير إلى 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 مم، وarithmetic.division تُختار لكل طبعة بالدالة t(). أما صف الحساب الذهني فتمرين فراغات عادي توضع قائمته في مجموعة :::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),
] } };
يرسم عنوان المستوى الأول للوحدة الشريط البرتقالي والخانة والعنوان، ويرسم حقلي الاسم والتاريخ من سماته (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.59.0
import { buildDocumentWithFonts, buildDocument, renderPageToCanvas } from 'https://esm.sh/postext';
import { renderToPdf, decompressWoff2 } from 'https://esm.sh/postext-pdf';
const LANG = 'es'; // @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) لأي صفحة، أو افتح الوصفة على 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' },أخطاء شائعة
- لا تقبل العمليات إلا الأعداد الصحيحة: العملية التي فيها كسور عشرية مثل
12,5 + 3,75لا تُقرأ وتُطبع كما كُتبت. اترك الكسور العشرية في فراغات الحساب الذهني، حيث الإجابة نص.
الحقوق
- الوصفة
- Ignacio Ferro
- النص
- نص أصلي, CC BY 4.0
- الخطوط
- Fira Sans (SIL OFL 1.1) · Lexend (SIL OFL 1.1)
- الشيفرة
- MIT، مثل Postext
حرّر هذا الشرح ↗ (يفتح في تبويب جديد)مجلد الوصفة على GitHub ↗ (يفتح في تبويب جديد)


