const overlay = is_text_light ? `rgba(255,255,255,${alpha})` : `rgba(0,0,0,${alpha})`;
const text_color = is_text_light ? '#ffffff' : '#000000';
- let exact_px = parseFloat(computed.fontSize) * metrics.ratio;
+ /* Two corrections, both applying to blocks and inline code alike. The ink
+ ratio corrects for the face; the size ratio corrects for the impression
+ a fixed pitch face makes at the same nominal size. Applying the second
+ only to blocks left inline code reading larger than the prose around
+ it, which is the more conspicuous of the two places to get it wrong,
+ since the comparison is immediate. */
+ const size_ratio = (RT.config && RT.config.code && RT.config.code.size_ratio) || 0.85;
+ let exact_px = parseFloat(computed.fontSize) * metrics.ratio * size_ratio;
let offset_px = metrics.baseline_diff * (exact_px / 100);
if(is_block){
- /* A fixed pitch face reads larger than a proportional one at the same
- size, since its widest glyphs set the measure. The tradition is a
- point or two smaller: eleven against twelve, sometimes ten. The ink
- ratio corrects for the face; this corrects for the impression. */
- exact_px *= ((RT.config && RT.config.code && RT.config.code.size_ratio) || 0.85);
let tagIndent = '';
const prevNode = el.previousSibling;
RT.Debug.enable('paginate') // one line per element with its reason
RT.Debug.enable('paginate_v') // per-child measurement inside a split
+
+Pass 0 — survey, no changes. I read the manuscript and report: what tags it uses, where it diverges from current conventions, what's broken, how big it is, what it needs that the engine doesn't have yet. You get an inventory before committing to anything.
+
+Pass 1 — mechanical conformance. RT code format, tag spellings, heading capitalization, the may/just rule. Mostly scriptable, entirely verifiable, no judgement about content.
+
+Pass 2 — structure. Sections, counters, TOC, and whatever the book needs that we haven't built — figures and theorem numbering being the obvious candidates for a computation theory text. This is where the engine likely grows.
+
+Pass 3 — render and fix. The real test bed. Expect layout faults we haven't seen, since a book exercises depths and lengths the manuals don't.
+
+Pass 4 — copy editing, a chapter at a time. Slowest, most judgement-dependent, and best done once everything else is stable.