+++ /dev/null
-/*
- Core/stage_manager.js
- Orchestrates the execution pipeline to resolve layout dependencies,
- manages MathJax async typesetting, and handles scroll restoration.
-*/
-
-window.RT = window.RT || {};
-window.RT.Element = window.RT.Element || new Set();
-window.RT.PageStyle = window.RT.PageStyle || new Set();
-window.RT.paginate = null;
-
-(function(){
- const debug = window.RT.Debug || { log: function(){}, warn: function(){}, error: function(){} };
-
- let target_y = 0;
- let is_reload = false;
- let is_layout_locked = false;
- let scroll_timer;
-
- function lock_layout() {
- is_layout_locked = true;
- document.documentElement.style.visibility = "hidden";
- }
-
- function unlock_layout() {
- if (!is_layout_locked) return;
- is_layout_locked = false;
-
- document.documentElement.style.visibility = "";
- window.removeEventListener("load", unlock_layout);
- document.dispatchEvent(new Event("RT_layout_complete"));
- }
-
- function configure_history(){
- if ('scrollRestoration' in history) {
- history.scrollRestoration = 'manual';
- }
- }
-
- function capture_scroll_target(){
- const raw_target = sessionStorage.getItem('RT_saved_y');
- target_y = raw_target !== null ? parseInt(raw_target ,10) : 0;
-
- if (window.performance) {
- const nav_entries = performance.getEntriesByType("navigation");
- if (nav_entries.length > 0) {
- is_reload = (nav_entries[0].type === "reload");
- } else if (performance.navigation) {
- is_reload = (performance.navigation.type === 1);
- }
- }
- }
-
- function enforce_scroll(target ,use_hash ,attempts){
- if (attempts > 15) {
- unlock_layout();
- return;
- }
-
- if (use_hash) {
- const hash_target = document.getElementById(window.location.hash.substring(1));
- if (hash_target) {
- hash_target.scrollIntoView();
- }
- } else {
- window.scrollTo(0 ,target);
- }
-
- let is_successful = use_hash ? true : (Math.abs(window.scrollY - target) < 5 || target === 0);
- if (is_successful && document.body.scrollHeight > 1000) {
- setTimeout(() => {
- if (!use_hash && Math.abs(window.scrollY - target) >= 5) {
- enforce_scroll(target ,use_hash ,attempts + 1);
- } else {
- unlock_layout();
- }
- }, 100);
- } else {
- setTimeout(() => enforce_scroll(target ,use_hash ,attempts + 1) ,50);
- }
- }
-
- function bind_window_events(){
- window.addEventListener('scroll' ,() => {
- if (is_layout_locked) return;
- clearTimeout(scroll_timer);
- scroll_timer = setTimeout(() => {
- sessionStorage.setItem('RT_saved_y' ,window.scrollY);
- }, 200);
- }, { passive: true });
-
- window.addEventListener('beforeunload' ,() => {
- lock_layout();
- });
- }
-
- // =========================================================
- // PIPELINE EXECUTION
- // =========================================================
-
- // Phase 2 & 3: Pagination and Page Styling
- function execute_phase_2_and_3(){
- debug.log('stage_manager', 'Phase 2: Executing Pagination');
- if (typeof window.RT.paginate === 'function') {
- try { window.RT.paginate(); }
- catch (e) { debug.error('stage_manager', "Pagination failed: " + e); }
- }
-
- debug.log('stage_manager', 'Phase 3: Executing PageStyle tasks');
- if (window.RT.PageStyle instanceof Set) {
- window.RT.PageStyle.forEach(task => {
- if (typeof task === 'function') {
- try { task(); }
- catch (e) { debug.error('stage_manager', "PageStyle task failed: " + e); }
- }
- });
- }
-
- // Now that final layout geometry exists, execute scroll mapping
- debug.log('scroll' ,`Pagination layout complete. Enforcing scroll target.`);
- let final_target = target_y;
- let use_hash = false;
- if (window.location.hash && !is_reload) {
- const hash_target = document.getElementById(window.location.hash.substring(1));
- if (hash_target) {
- use_hash = true;
- }
- }
-
- enforce_scroll(final_target ,use_hash ,0);
- }
-
- // Phase 1: Base Elements
- function process_elements_and_layout() {
- debug.log('stage_manager', 'Phase 1: Executing Element tasks');
-
- if (window.RT.Element instanceof Set && window.RT.Element.size > 0) {
- for (const element_fn of window.RT.Element) {
- if (typeof element_fn === 'function') {
- try { element_fn(); }
- catch (e) { debug.error('stage_manager', "Element task failed: " + e); }
- } else {
- debug.warn('stage_manager', 'Invalid element in RT.Element Set: ' + element_fn);
- }
- }
- }
-
- // Check for MathJax (Handles both v3 Promises and v2 Hub Queues)
- // We must wait for typesetting to finish before paginating, as equations change element heights.
- if (window.MathJax) {
- if (typeof window.MathJax.typesetPromise === 'function') {
- window.MathJax.typesetPromise().then(execute_phase_2_and_3).catch((err) => {
- debug.error('stage_manager', 'MathJax typeset failed: ' + err);
- execute_phase_2_and_3();
- });
- } else if (window.MathJax.Hub && window.MathJax.Hub.Queue) {
- MathJax.Hub.Queue(["Typeset", MathJax.Hub], execute_phase_2_and_3);
- } else {
- execute_phase_2_and_3();
- }
- } else {
- execute_phase_2_and_3();
- }
- }
-
-
- // Initial Execution Sequence
- lock_layout();
- configure_history();
- capture_scroll_target();
- bind_window_events();
-
- document.addEventListener('DOMContentLoaded', process_elements_and_layout);
-
- // Safety Net: restore visibility on load if the async layout engine hangs
- window.addEventListener("load", unlock_layout);
-
-})();
// see Theme/manifest, all themes are registered in the library by name
-RT.theme_library = RT.theme_library || {};
-
-// 'read' or 'write' the active theme fields, or 'load' a new theme
-RT.theme = (function() {
-
- const dictionary = {
- meta: { is_dark: false, name: "" },
- surface: { 0: "", 1: "", 2: "", 3: "", input: "", code: "", select: "" },
- content: { main: "", muted: "", subtle: "", inverse: "" },
- brand: { primary: "", secondary: "", tertiary: "", link: "" },
- border: { faint: "", regular: "", strong: "" },
- state: { success: "", warning: "", error: "", info: "" },
- syntax: { keyword: "", string: "", func: "", comment: "" },
- page: { width: "", min_height: "", padding: "", margin: "", bg_color: "", border_color: "", text_color: "", shadow: "" },
- custom_css: ""
- };
- function resolve_path(path_array) {
- let current = dictionary;
- for (let i = 0; i < path_array.length - 1; i++) {
- const step = path_array[i];
- if (current[step] === undefined) return null;
- current = current[step];
- }
- return { container: current, key: path_array[path_array.length - 1] };
+(function() {
+
+ if (!window.RT) {
+ console.error("RT not defined - was RT-Manuscript_make run?");
+ return;
}
- function apply_and_validate_theme(new_theme, fallback_color) {
- const debug = RT.Debug || { error: function(){} };
-
- // Pass 1: Walk the structure of the active dictionary
- function walk_current(curr, source, path) {
- for (const key in curr) {
- const current_path = path ? path + "." + key : key;
- if (typeof curr[key] === 'object' && curr[key] !== null) {
- walk_current(curr[key], source[key] || {}, current_path);
- } else {
- if (source[key] !== undefined && source[key] !== "") {
- curr[key] = source[key];
+ RT.theme_library = RT.theme_library || {};
+
+ // 'read' or 'write' the active theme fields, or 'load' a new theme
+ RT.theme = (function() {
+
+ const dictionary = {
+ meta: { is_dark: false, name: "" },
+ surface: { 0: "", 1: "", 2: "", 3: "", input: "", code: "", select: "" },
+ content: { main: "", muted: "", subtle: "", inverse: "" },
+ brand: { primary: "", secondary: "", tertiary: "", link: "" },
+ border: { faint: "", regular: "", strong: "" },
+ state: { success: "", warning: "", error: "", info: "" },
+ syntax: { keyword: "", string: "", func: "", comment: "" },
+ page: { width: "", min_height: "", padding: "", margin: "", bg_color: "", border_color: "", text_color: "", shadow: "" },
+ custom_css: ""
+ };
+
+ function resolve_path(path_array) {
+ let current = dictionary;
+ for (let i = 0; i < path_array.length - 1; i++) {
+ const step = path_array[i];
+ if (current[step] === undefined) return null;
+ current = current[step];
+ }
+ return { container: current, key: path_array[path_array.length - 1] };
+ }
+
+ function apply_and_validate_theme(new_theme, fallback_color) {
+ const debug = RT.Debug || { error: function(){} };
+
+ // Pass 1: Walk the structure of the active dictionary
+ function walk_current(curr, source, path) {
+ for (const key in curr) {
+ const current_path = path ? path + "." + key : key;
+ if (typeof curr[key] === 'object' && curr[key] !== null) {
+ walk_current(curr[key], source[key] || {}, current_path);
} else {
- debug.error('theme', `Missing key in loaded theme: ${current_path}. Assigning fallback.`);
- curr[key] = fallback_color;
+ if (source[key] !== undefined && source[key] !== "") {
+ curr[key] = source[key];
+ } else {
+ debug.error('theme', `Missing key in loaded theme: ${current_path}. Assigning fallback.`);
+ curr[key] = fallback_color;
+ }
}
}
}
- }
- // Pass 2: Walk the structure of the incoming theme dictionary
- function walk_new(source, curr, path) {
- for (const key in source) {
- const current_path = path ? path + "." + key : key;
- if (typeof source[key] === 'object' && source[key] !== null) {
- if (curr[key] === undefined) {
- debug.error('theme', `Unexpected structure in loaded theme: ${current_path} is an object.`);
+ // Pass 2: Walk the structure of the incoming theme dictionary
+ function walk_new(source, curr, path) {
+ for (const key in source) {
+ const current_path = path ? path + "." + key : key;
+ if (typeof source[key] === 'object' && source[key] !== null) {
+ if (curr[key] === undefined) {
+ debug.error('theme', `Unexpected structure in loaded theme: ${current_path} is an object.`);
+ } else {
+ walk_new(source[key], curr[key] || {}, current_path);
+ }
} else {
- walk_new(source[key], curr[key] || {}, current_path);
- }
- } else {
- if (curr[key] === undefined) {
- debug.error('theme', `Unexpected key in loaded theme: ${current_path}.`);
+ if (curr[key] === undefined) {
+ debug.error('theme', `Unexpected key in loaded theme: ${current_path}.`);
+ }
}
}
}
- }
- walk_current(dictionary, new_theme, "");
- walk_new(new_theme, dictionary, "");
- }
+ walk_current(dictionary, new_theme, "");
+ walk_new(new_theme, dictionary, "");
+ }
- return function(command, ...args) {
- if (command === 'read') {
- const target = resolve_path(args);
- return (target && target.container.hasOwnProperty(target.key)) ? target.container[target.key] : null;
- }
-
- if (command === 'write') {
- if (args.length < 2) return;
- const value = args.pop();
- const target = resolve_path(args);
- if (target && target.container.hasOwnProperty(target.key)) {
- target.container[target.key] = value;
+ return function(command, ...args) {
+ if (command === 'read') {
+ const target = resolve_path(args);
+ return (target && target.container.hasOwnProperty(target.key)) ? target.container[target.key] : null;
+ }
+
+ if (command === 'write') {
+ if (args.length < 2) return;
+ const value = args.pop();
+ const target = resolve_path(args);
+ if (target && target.container.hasOwnProperty(target.key)) {
+ target.container[target.key] = value;
+ }
+ return;
}
- return;
- }
- if (command === 'load') {
- const theme_name = args[0];
- const fallback = args[1] || "#FF00FF";
+ if (command === 'load') {
+ const theme_name = args[0];
+ const fallback = args[1] || "#FF00FF";
- if (!RT.theme_library.hasOwnProperty(theme_name)) {
- RT.Debug.error('theme', `Load aborted: Theme '${theme_name}' is not in the theme_library.`);
- return false;
- }
+ if (!RT.theme_library.hasOwnProperty(theme_name)) {
+ RT.Debug.error('theme', `Load aborted: Theme '${theme_name}' is not in the theme_library.`);
+ return false;
+ }
- apply_and_validate_theme(RT.theme_library[theme_name], fallback);
-
- // --- CSS Fallback for Pseudo-Elements and External Libraries ---
- let style_el = document.getElementById('rt-theme-custom-css');
- if (!style_el) {
- style_el = document.createElement('style');
- style_el.id = 'rt-theme-custom-css';
- document.head.appendChild(style_el);
+ apply_and_validate_theme(RT.theme_library[theme_name], fallback);
+
+ // --- CSS Fallback for Pseudo-Elements and External Libraries ---
+ let style_el = document.getElementById('rt-theme-custom-css');
+ if (!style_el) {
+ style_el = document.createElement('style');
+ style_el.id = 'rt-theme-custom-css';
+ document.head.appendChild(style_el);
+ }
+ // Write the string if it exists, otherwise clear the block
+ style_el.textContent = dictionary.custom_css || '';
+
+ return true;
}
- // Write the string if it exists, otherwise clear the block
- style_el.textContent = dictionary.custom_css || '';
-
- return true;
- }
- RT.Debug.error('theme', 'Invalid command passed to theme dictionary: ' + command);
- };
-})();
+ RT.Debug.error('theme', 'Invalid command passed to theme dictionary: ' + command);
+ };
+ })();
-RT.theme_preference = function(author_pref, default_color = "#FF00FF") {
- const reader_pref = localStorage.getItem('RT-Manuscript·theme_preference');
- const theme_to_load = reader_pref ? reader_pref : author_pref;
-
- RT.theme('load', theme_to_load, default_color);
-};
+ RT.theme_preference = function(author_pref, default_color = "#FF00FF") {
+ const reader_pref = localStorage.getItem('RT-Manuscript·theme_preference');
+ const theme_to_load = reader_pref ? reader_pref : author_pref;
+
+ RT.theme('load', theme_to_load, default_color);
+ };
+})();
<RT·article>
<RT·title
+ title="RT Style System: Reference Manual"
author="Thomas Walker Lynch"
date="2026-06-30 16:49Z"
- title="RT Style System: Reference Manual"
copyright="2026 Reasoning Technology">
</RT·title>
<RT·TOC level="1-2"></RT·TOC>
- <h1>Layout Environments</h1>
+ <h1>Leonardo·da·Vinci and other notes</h1>
+
+ <p>
+ The middle dot used as a namespace separator is the middle dot of typography. On macOS: Option + Shift + 9. On Windows: Hold Alt and type 0183 on the numeric keypadLinux: Compose Key followed by . and -. In Emacs it can be defined on a key, I have it on C-x g cdot, along with many other C-x g characters. It can also be
+ copied then pasted from the heading above.
+ </p>
+
+ <p>
+ <RT·term>Content</RT·term> is found between the opening HTML tag and the closing HTML tag. E.g. <RT·code><RT·noop></RT·code>This is content.<RT·code></RT·noop></RT·code>.
+ </p>
+
+ <p>
+ An <RT·term>attribute</RT·term> is a name value pair found within an opening HTML tag. E.g. <RT·code name="value"><RT·noop></RT·code><RT·code><RT·noop></RT·code>. Here the attribute name is <em>name</em> and the attribute value is <em>value</em>. This examples shows a <em>name</em> attribute.
+ </p>
+
+
+ <p>
+ All tags must be given in pairs, but not all have scoped content.
+ </p>
+
+
+ <h1>Manuscript Types</h1>
<p>
- These are the current top level semantic tag environments.
+ These are the current top level semantic tag environments. They affect the formatting of scoped content. This includes the custom semantic tags, and can also include standard HTML tags.
</p>
<table>
<tbody>
<tr>
<td><RT·code><RT·article></RT·code></td>
- <td>Standard technical document layout with dynamic pagination.</td>
+ <td>A technical article.</td>
</tr>
<tr>
<td><RT·code><RT·memo></RT·code></td>
</tr>
<tr>
<td><RT·code><RT·book></RT·code></td>
- <td>Multi chapter compilation layout (Upcoming).</td>
+ <td>Book layout. Does not yet exist, planned to be broken out of the article layout.</td>
</tr>
</tbody>
</table>
- <h2>Article Environment</h2>
- <p>
- The <RT·code><RT·article></RT·code> container provides the standard toolset for technical documentation, whitepapers, and specifications. It utilizes dynamic soft limit pagination and responsive ink ratio balancing.
- </p>
+ <h2>Article Manuscript</h2>
+
+ <p>Here is an example header for an article</p>
- <h3>Section Generators</h3>
+ <RT·code>
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>RT Manuscript: Reference Manual</title>
+ <script src="RT-Manuscript_locator.js"></script>
+ <script>
+ window.RT.theme_preference('inverse_wheat');
+ window.RT.load('Layout/paginate');
+ window.RT.load('Layout/article_tech_ref');
+ window.RT.load('Element/theme_selector');
+ </script>
+ </head>
+ <body>
+ <RT·theme-selector></RT·theme-selector>
+ <RT·article>
+ …
+ </RT·article>
+ </body>
+ </html>
+ </RT·code>
+
+ <h3>Decorators</h3>
<table>
<thead>
<tr>
</thead>
<tbody>
<tr>
- <td><RT·code><RT·title></RT·code></td>
+ <td><RT·code><RT·term></RT·code></td>
<td>
- Assembles the standardized title block and metadata header.<br>
+ Standard technical term. Decorates first occurrence and establishes an anchor. Author should mark all occurrences of the term.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
- <code>title</code>: (Default: "Untitled Document")<br>
- <code>author</code>: (Default: None)<br>
- <code>date</code>: (Default: None)<br>
- <code>copyright</code>: (Default: None)
+ <code>id</code>: (Default: Auto-generated from text content, e.g., "def-my-term")
</div>
</td>
</tr>
<tr>
- <td><RT·code><RT·TOC></RT·code></td>
+ <td><RT·code><RT·neologism></RT·code></td>
<td>
- Compiles an automatic table of contents by scanning heading depths.<br>
+ Technical term coined in this document. Decorates first occurrence and establishes an anchor. Author should mark all occurrences of the term.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
- <code>level</code>: Target heading level "N" or range "A-B". (Default: Context-aware. Looks backward for the nearest heading H(N) and targets H(N+1)).
+ <code>id</code>: (Default: Auto-generated from text content, e.g., "def-my-term")
</div>
</td>
</tr>
+ </tbody>
+ </table>
+
+ <h3>Layout Environments</h3>
+ <p>
+ This can be written inline with text, or as blocks.
+ </p>
+ <table>
+ <thead>
<tr>
- <td><RT·code><RT·endnotes></RT·code></td>
- <td>Inserts a compiled list of the endnotes.</td>
+ <th style="width: 25%;">Tag</th>
+ <th>Description & Arguments</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><RT·code><RT·code></RT·code></td>
+ <td>Code span or pre formatted code block with theme aware borders. Automatically dedents block content.</td>
+ </tr>
+ <tr>
+ <td><RT·code><RT·math></RT·code></td>
+ <td>Inline or block mathematics evaluated by MathJax.</td>
</tr>
</tbody>
</table>
- <h3>Semantic Tags</h3>
+
+ <h3>Generators</h3>
+
+ <p>The generators have no content between the opening and closing tags, rather generation is guided through attributes.</p>
+
<table>
<thead>
<tr>
</thead>
<tbody>
<tr>
- <td><RT·code><RT·term></RT·code></td>
+ <td><RT·code><RT·title></RT·code></td>
<td>
- Standard technical term. Decorates first occurrence and establishes an anchor. Author should mark all occurrences of the term.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
- <code>id</code>: (Default: Auto-generated from text content, e.g., "def-my-term")
+ <code>title</code>: (Default: "Untitled Document")<br>
+ <code>author</code>: (Default: None)<br>
+ <code>date</code>: (Default: None)<br>
+ <code>copyright</code>: (Default: None)
</div>
</td>
</tr>
<tr>
- <td><RT·code><RT·code></RT·code></td>
- <td>Code span or pre formatted code block with theme aware borders. Automatically dedents block content.</td>
- </tr>
- <tr>
- <td><RT·code><RT·math></RT·code></td>
- <td>Inline or block mathematics evaluated by MathJax.</td>
+ <td><RT·code><RT·TOC></RT·code></td>
+ <td>
+ Compiles an automatic table of contents by scanning heading depths.<br>
+ <div class="attr-list">
+ <strong>Attributes:</strong><br>
+ <code>level</code>: Target heading level "N" or range "A-B". (Default: Context-aware. Looks backward for the nearest heading H(N) and targets H(N+1)).
+ </div>
+ </td>
</tr>
<tr>
- <td><RT·code><RT·symbol></RT·code></td>
- <td>Technical symbol wrapper enforcing strict font weight and character spacing.</td>
+ <td><RT·code><RT·endnotes></RT·code></td>
+ <td>Inserts a numbered list of the endnotes. Citations to the endnotes found in th text are replaced by their numbers in square brackets.</td>
</tr>
</tbody>
</table>
- <h3>Declarative Counters</h3>
+
+ <h3>Counters</h3>
<p>
- The counter object establishes an isolated state machine. It separates the strict numerical sequence data from the visual formatting layer, permitting precise state queries alongside heavily customizable output formatting.
+ A counter is made with the make tag. A distinct name attribute is required.
+ When a step occurs witin the content of another step, there will be a nested count. There is one internal representation for a count, but there are many styles of presentation available when the count is read.
</p>
<table>
<thead>
<tr>
<td><RT·code><RT·Counter·make></RT·code></td>
<td>
- Initializes an empty named counter sequence.<br>
+ Initializes an empty named counter.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
- <code>counter</code>: Required identifier.<br>
- <code>style</code>: A comma-separated list defining the formatting at each depth. Valid options: "NaturalNumber", "CountingNumber", "Roman", "roman", "Alpha", "alpha". The keyword "outline" maps to a standard mixed array. (Default: "NaturalNumber")<br>
+ <code>counter</code>: Name of the counter.<br>
+ <code>style</code>: Either a single style, or a comma-separated list defining the formatting at each nesting level. The last format in the list applies to all yet higher nesting levels. Valid options: "NaturalNumber", "CountingNumber", "Roman", "roman", "Alpha", "alpha". The keyword "outline" maps to a standard mixed array. (Default: "NaturalNumber")<br>
<code>on-first-step</code>: The initial starting value, supplied in the format of the top-level style. (Default: "0")<br>
<code>separator</code>: The string joining depth sequence segments. (Default: ".")<br>
<code>separator-placement</code>: "embedded" or "embedded-after". (Default: "embedded")<br>
- <code>mode</code>: "scoped" (omits the rightmost sequence digit when reading outside a closed node) or "milestone" (reports the full completed sequence path). (Default: "scoped")
+ <code>mode</code>: "scoped" text between count scopes gets the count of the outer scope (like scope in code), or "milestone" between scopes continue with the prior scoped count (like sections of a document).
</div>
</td>
</tr>
<tr>
- <td><RT·code><RT·Counter·step></RT·code></td>
<td>
- Advances the counter state. When applied as a parent tag, the contents within its scope define a sub-level; the machine automatically pushes into a nested depth on entry and pops back to the parent container upon exit.<br>
+ <RT·code><RT·Counter·step></RT·code>
+ </td>
+ <td>
+ Count is available within scope. Th next scope will have one greater count. Any embedded steps will count at the next depth level.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
<code>counter</code>: Required identifier.
<tr>
<td><RT·code><RT·Counter·snapshot></RT·code></td>
<td>
- Clones the entire active state machine, including its current 0-indexed numerical array, operational status, and presentation configurations, saving it to a dictionary key.<br>
+ Clones count into a dictionary. Snapshots are processed by a separate document walk, so can can be referenced from anywhere.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
<code>counter</code>: Required identifier.<br>
<tr>
<td><RT·code><RT·Counter·read></RT·code></td>
<td>
- Recalls information from a snapshot and outputs it as innerHTML. A snapshot can be recalled from anywhere in the document.<br>
+ Accesses specified field from a snapshotted counter and renders it as innerHTML.<br>
<div class="attr-list">
<strong>Attributes:</strong><br>
<code>snapshot</code>: Required snapshot name.<br>
</tbody>
</table>
- <h3>Notation</h3>
+ <h3>Annotation</h3>
<table>
<thead>
<tr>
</thead>
<tbody>
<tr>
- <td><RT·code><RT·endnote></RT·code></td>
- <td>Tag pair contents added as an item to the endnote list. Replaces the inline text with an anchor link.</td>
+ <td>
+ <RT·code><RT·endnote></RT·code>
+ </td>
+ <td>Scoped contents added to the list of endnotes.</td>
+ </tr>
+ <tr>
+ <td>
+ <RT·code><RT·footnote></RT·code>
+ </td>
+ <td>Scoped contents moved to the bottom of the page.</td>
</tr>
</tbody>
</table>
- <h3>Pagination Control</h3>
+ <h3>Pagination</h3>
<table>
<thead>
<tr>
</tbody>
</table>
- <h2>Memo Environment</h2>
+ <h2>Memo environment</h2>
<p>
- The <RT·code><RT·memo></RT·code> container inherits all valid tags from the Article environment but overrides the global CSS to enforce a static, print ready monochrome aesthetic.
+ The <RT·code><RT·memo></RT·code> container inherits all valid tags from the Article environment but overrides the global CSS to enforce a static, print ready monochrome aesthetic. Yeah, at one time this was working.
</p>
- <h2>Book Environment</h2>
+ <h2>Book environment</h2>
<p>
- The <RT·code><RT·book></RT·code> container is reserved for multi chapter compilations. It introduces tags designed exclusively for macro level document orchestration.
+ The <RT·code><RT·book></RT·code> container is reserved for multi chapter compilations. It introduces tags designed exclusively for macro level document orchestration. (Does not currently exist, rather using the Article Tech Ref format.)
</p>
<h3>Book Specific Tags</h3>
--- /dev/null
+/*
+Currently built into the paginator
+
+*/
--- /dev/null
+/*
+ RT·noop.
+
+ Nothing need be done, as HTML ignores undefined tags.
+
+*/
+++ /dev/null
-/*
- Processes <rt·symbol> tags.
- Applies standard monospaced formatting to code symbols inline.
-*/
-
-(function() {
-
- if (!window.RT) {
- console.error("RT not defined - was RT-Manuscript_make run?");
- return;
- }
- if (!window.RT.Element) {
- console.error("RT.Element not defined - was the state_manager run?");
- return;
- }
-
- RT.Element.add( function() {
- const debug = window.RT.Debug || { log: function(){} };
- if (debug.log) debug.log('symbol', 'Processing symbols');
-
- document.querySelectorAll('rt·symbol').forEach( (el) => {
- el.style.fontFamily = '"Courier New", Courier, monospace';
- el.style.fontWeight = '600';
- el.style.padding = '0 0.1em';
- });
- });
-
-})();
*/
(function(){
- const RT = window.RT = window.RT || {};
+
+ if (!window.RT) {
+ console.error("RT not defined - was RT-Manuscript_make run?");
+ return;
+ }
// 1. The Explicit Element Roster
const required_elements = [
- 'counter',
- 'chapter',
- 'endnote',
- 'math',
- 'code',
- 'term',
- 'TOC',
- 'title',
- 'symbol',
- 'constraint',
- 'crossref'
+ 'chapter'
+ ,'code'
+ ,'counter'
+ ,'endnote'
+ ,'math'
+ ,'symbol'
+ ,'term'
+ ,'title'
+ ,'TOC'
];
// Shared utility functions
height: "auto",
display: "block",
margin: "1.5rem auto"
+ }],
+
+ [ 'RT·article table', {
+ width: "100%",
+ borderCollapse: "collapse",
+ marginBottom: "1.5rem"
+ }],
+
+ [ 'RT·article th, RT·article td', {
+ verticalAlign: "top",
+ padding: "0.75rem 1rem 0.75rem 0",
+ textAlign: "left"
}]
+
];
element_styles.forEach(rule => apply(rule[0], rule[1]));
*/
(function(){
- const RT = window.RT = window.RT || {};
+
+ if (!window.RT) {
+ console.error("RT not defined - was RT-Manuscript_make run?");
+ return;
+ }
// 1. Declare Dependencies
RT.load('Core/utility');
+++ /dev/null
-/*
- Processes <RT·article> tags and paginates their contents.
- Handles inline footnotes and element splitting to enforce page height limits.
-*/
-
-(function() {
-
- if (!window.RT) {
- console.error("RT not defined - was RT-Style_make run?");
- return;
- }
- if (!window.RT.Element) {
- console.error("RT.Element not defined - was the state_manager run?");
- return;
- }
-
- RT.Element.add( function() {
- const RT = window.RT;
- const debug = RT.Debug || { log: function(){}, error: function(){} };
- const page_conf = (RT.config && RT.config.page) ? RT.config.page : {};
- const page_height_limit = page_conf.height_limit || 1000;
-
- if (debug.log) debug.log('paginate', 'Running document pagination');
-
- let measureContainer = null;
-
- // =========================================================
- // 1. DOM Measurement Utilities
- // =========================================================
- function getElHeight(el) {
- const wasInDOM = el.parentNode !== null;
- if (!wasInDOM) document.body.appendChild(el);
- const rect = el.getBoundingClientRect();
- const style = window.getComputedStyle(el);
- const margin = parseFloat(style.marginTop) + parseFloat(style.marginBottom);
- if (!wasInDOM) el.remove();
- return (rect.height || 0) + (margin || 0);
- }
-
- function getMeasureContainer() {
- if (measureContainer && measureContainer.parentNode) return measureContainer;
- const article = document.querySelector('RT·article');
- if (!article) {
- const temp = document.createElement('div');
- temp.style.visibility = 'hidden';
- temp.style.position = 'absolute';
- temp.style.width = '100%';
- document.body.appendChild(temp);
- measureContainer = temp;
- return temp;
- }
- const container = document.createElement('div');
- const articleStyle = window.getComputedStyle(article);
- container.style.visibility = 'hidden';
- container.style.position = 'absolute';
- container.style.width = articleStyle.width;
- container.style.fontFamily = articleStyle.fontFamily;
- container.style.fontSize = articleStyle.fontSize;
- container.style.lineHeight = articleStyle.lineHeight;
- container.style.fontWeight = articleStyle.fontWeight;
- document.body.appendChild(container);
- measureContainer = container;
- return container;
- }
-
- function measureFragment(frag) {
- const container = getMeasureContainer();
- container.appendChild(frag);
- const h = getElHeight(frag);
- container.removeChild(frag);
- return h;
- }
-
- // =========================================================
- // STEP 1: PREPARE FOOTNOTES (Strip and tag)
- // =========================================================
- const article_seq = document.querySelectorAll('RT·article');
- if (article_seq.length === 0) {
- debug.error('pagination', 'No <RT·article> elements found. Pagination aborted.');
- return;
- }
-
- const footnote_registry = {};
- let footnote_counter = 1;
-
- Array.from(article_seq).forEach(article => {
- // Bulletproof extraction: immune to XML/HTML case-sensitivity parsing quirks
- const all_nodes = Array.from(article.querySelectorAll('*'));
- const raw_footnotes = all_nodes.filter(node => node.tagName.toLowerCase() === 'RT·footnote');
-
- raw_footnotes.forEach(fn => {
- const id = footnote_counter++;
- footnote_registry[id] = fn.innerHTML; // Save the payload
-
- // Trim any standard HTML whitespace immediately preceding the tag
- const prev = fn.previousSibling;
- if (prev && prev.nodeType === Node.TEXT_NODE) {
- prev.textContent = prev.textContent.replace(/\s+$/, '');
- }
-
- // Replace with a zero-height marker that rides along with the text
- const marker = document.createElement('RT·fn-marker');
- marker.setAttribute('data-id', id);
-
- if (fn.parentNode) {
- fn.parentNode.replaceChild(marker, fn);
- }
- });
- });
-
- // =========================================================
- // Splitting Logic (Clean and undisturbed)
- // =========================================================
- function isSplittable(el) {
- const tag = el.tagName;
- if (tag === 'UL' || tag === 'OL') {
- const items = Array.from(el.children).filter(c => c.tagName === 'LI');
- if (items.length === 0) return null;
-
- const itemHeights = items.map(li => getElHeight(li));
- const emptyClone = el.cloneNode(false);
- const overhead = getElHeight(emptyClone);
-
- el._splitInfo = { type: 'list', itemHeights, overhead, offset: 0 };
- return makeListSplitter(el, el._splitInfo);
- }
-
- if (tag === 'TABLE') {
- const thead = el.querySelector('thead');
- const tbody = el.querySelector('tbody');
- const rows = tbody ? Array.from(tbody.rows) : Array.from(el.rows);
- if (rows.length === 0) return null;
-
- const theadHeight = thead ? getElHeight(thead) : 0;
- const rowHeights = rows.map(row => getElHeight(row));
-
- const emptyClone = el.cloneNode(false);
- if (thead) emptyClone.appendChild(thead.cloneNode(true));
- emptyClone.appendChild(document.createElement('tbody'));
- const overhead = getElHeight(emptyClone) - theadHeight;
-
- el._splitInfo = { type: 'table', rowHeights, overhead, theadHeight, offset: 0 };
- return makeTableSplitter(el, el._splitInfo);
- }
- return null;
- }
-
- function makeListSplitter(el, info) {
- return (remaining) => {
- const children = Array.from(el.children).filter(c => c.tagName === 'LI');
- const start = info.offset;
-
- let bestCount = 0;
- let bestHeight = 0;
- const tempList = el.cloneNode(false);
-
- for (let i = 0; i < children.length; i++) {
- const itemClone = children[i].cloneNode(true);
- tempList.appendChild(itemClone);
- const fragHeight = measureFragment(tempList);
- if (fragHeight <= remaining) {
- bestCount = i + 1;
- bestHeight = fragHeight;
- } else {
- tempList.removeChild(itemClone);
- break;
- }
- }
-
- if (bestCount === 0) return { first: null, rest: el, firstHeight: 0 };
-
- const first = el.cloneNode(false);
- for (let i = 0; i < bestCount; i++) {
- first.appendChild(children[i].cloneNode(true));
- }
-
- let rest = null;
- if (bestCount < children.length) {
- rest = el.cloneNode(false);
- for (let i = bestCount; i < children.length; i++) {
- rest.appendChild(children[i].cloneNode(true));
- }
-
- if (el.tagName === 'OL') {
- const currentStart = parseInt(el.getAttribute('start'), 10) || 1;
- rest.setAttribute('start', currentStart + bestCount);
- }
-
- rest._splitInfo = {
- type: 'list',
- itemHeights: info.itemHeights,
- overhead: info.overhead,
- offset: start + bestCount
- };
- }
-
- return { first, rest, firstHeight: bestHeight };
- };
- }
-
- function makeTableSplitter(el, info) {
- const thead = el.querySelector('thead');
- const createShell = () => {
- const shell = el.cloneNode(false);
- if (thead) shell.appendChild(thead.cloneNode(true));
- const newTbody = document.createElement('tbody');
- shell.appendChild(newTbody);
- return shell;
- };
-
- return (remaining) => {
- const tbody = el.querySelector('tbody');
- const rows = tbody ? Array.from(tbody.rows) : Array.from(el.rows);
- const start = info.offset;
-
- let bestCount = 0;
- let bestHeight = 0;
- const tempTable = createShell();
- const tempBody = tempTable.querySelector('tbody');
-
- for (let i = 0; i < rows.length; i++) {
- tempBody.appendChild(rows[i].cloneNode(true));
- const h = measureFragment(tempTable);
- if (h <= remaining) {
- bestCount = i + 1;
- bestHeight = h;
- } else {
- tempBody.removeChild(tempBody.lastChild);
- break;
- }
- }
-
- if (bestCount === 0) return { first: null, rest: el, firstHeight: 0 };
-
- const first = createShell();
- const firstBody = first.querySelector('tbody');
- for (let i = 0; i < bestCount; i++) {
- firstBody.appendChild(rows[i].cloneNode(true));
- }
-
- let rest = null;
- if (bestCount < rows.length) {
- rest = createShell();
- const restBody = rest.querySelector('tbody');
- for (let i = bestCount; i < rows.length; i++) {
- restBody.appendChild(rows[i].cloneNode(true));
- }
-
- rest._splitInfo = {
- type: 'table',
- rowHeights: info.rowHeights,
- overhead: info.overhead,
- theadHeight: info.theadHeight,
- offset: start + bestCount
- };
- }
-
- return { first, rest, firstHeight: bestHeight };
- };
- }
-
- // =========================================================
- // STEP 2: NORMAL PAGINATOR
- // =========================================================
- function paginateArticle(article) {
- const raw_element_seq = Array.from(article.children).filter(el =>
- !['SCRIPT', 'STYLE', 'RT·PAGE'].includes(el.tagName)
- );
-
- if (raw_element_seq.length === 0) return;
-
- const page_seq = [];
- let current_batch_seq = [];
- let current_h = 0;
- let i = 0;
-
- while (i < raw_element_seq.length) {
- const el = raw_element_seq[i];
- const splitter = isSplittable(el);
-
- if (splitter) {
- const remaining = page_height_limit - current_h;
- const { first, rest, firstHeight } = splitter(remaining);
-
- if (first) {
- current_batch_seq.push(first);
- current_h += firstHeight;
-
- if (rest) {
- raw_element_seq.splice(i, 1, rest);
- } else {
- raw_element_seq.splice(i, 1);
- }
- } else {
- if (current_batch_seq.length === 0) {
- const frame = document.createElement('RT·scroll-frame');
- frame.style.display = 'block';
- frame.style.overflowY = 'auto';
- frame.style.maxHeight = page_height_limit + 'px';
- frame.appendChild(el);
- current_batch_seq.push(frame);
- i++;
- } else {
- page_seq.push(current_batch_seq);
- current_batch_seq = [];
- current_h = 0;
- raw_element_seq[i] = rest || el;
- }
- }
- continue;
- }
-
-
- // --- Ordinary (non-splittable) element ---
- const h = getElHeight(el);
- const is_RT_page_break = el.tagName && el.tagName.toLowerCase() === 'rt·page-break';
-
- if( (is_RT_page_break || current_h + h > page_height_limit) && current_batch_seq.length > 0 ){
- let backtrack_seq = [];
- let backtrack_h = 0;
-
- while (current_batch_seq.length > 0) {
- const last = current_batch_seq[current_batch_seq.length - 1];
- if (!/^H[1-6]/.test(last.tagName)) break;
- const popped = current_batch_seq.pop();
- backtrack_seq.unshift(popped);
- backtrack_h += getElHeight(popped);
- }
-
- if (current_batch_seq.length > 0) {
- page_seq.push(current_batch_seq);
- current_batch_seq = backtrack_seq;
- current_h = backtrack_h;
- } else {
- page_seq.push(backtrack_seq);
- current_batch_seq = [];
- current_h = 0;
- }
- }
-
- current_batch_seq.push(el);
- current_h += h;
- i++;
- }
-
- if (current_batch_seq.length > 0) {
- page_seq.push(current_batch_seq);
- }
-
- // Rebuild article with <RT·page> wrappers
- article.innerHTML = '';
- let p = 0;
- while (p < page_seq.length) {
- const batch = page_seq[p];
- const page_el = document.createElement('RT·page');
- page_el.id = `page-${p + 1}`;
- batch.forEach(item => page_el.appendChild(item));
- article.appendChild(page_el);
- p++;
- }
- }
-
- // Execute pagination
- Array.from(article_seq).forEach(article => paginateArticle(article));
-
- // =========================================================
- // STEP 3: RESOLVE FOOTNOTES & EXPAND PAGES
- // =========================================================
- Array.from(article_seq).forEach(article => {
- const rendered_pages = article.querySelectorAll('RT·page');
-
- Array.from(rendered_pages).forEach(page => {
- // Bulletproof extraction for the markers
- const all_page_nodes = Array.from(page.querySelectorAll('*'));
- const markers = all_page_nodes.filter(node => node.tagName.toLowerCase() === 'rt·fn-marker');
-
- if (markers.length === 0) return;
-
- // Construct the footer block for this page
- const fn_container = document.createElement('div');
- fn_container.className = 'RT·footnote-container';
- fn_container.style.borderTop = '1px solid var(--RT·border-default)';
- fn_container.style.marginTop = '2rem';
- fn_container.style.paddingTop = '1rem';
- fn_container.style.fontSize = '0.9em';
-
- markers.forEach(marker => {
- const id = marker.getAttribute('data-id');
- const html = footnote_registry[id];
-
- // Replace the invisible marker with the visible naked superscript link
- const sup = document.createElement('sup');
- sup.innerHTML = `<a href="#fn-${id}" id="fn-ref-${id}" style="color: var(--RT·brand-link); text-decoration: none;">${id}</a>`;
-
- if (marker.parentNode) {
- marker.parentNode.replaceChild(sup, marker);
- }
-
- // Append the actual text to the footer with a clean, print-ready number format
- const fn_line = document.createElement('div');
- fn_line.id = `fn-${id}`;
- fn_line.style.marginBottom = '0.5rem';
- fn_line.innerHTML = `<span style="padding-right: 0.5em; font-weight: 600;">${id}.</span>${html}`;
- fn_container.appendChild(fn_line);
- });
-
- // Attach the footer. The page organically stretches to fit.
- page.appendChild(fn_container);
- });
- });
-
- // Cleanup
- if (measureContainer && measureContainer.parentNode) {
- measureContainer.remove();
- measureContainer = null;
- }
- });
-
-})();
// Theme/golden_wheat.js
-window.RT = window.RT || {};
-window.RT.theme_library = window.RT.theme_library || {};
+(function(){
-window.RT.theme_library['golden_wheat'] = {
- meta: {
- is_dark: false,
- name: "golden_wheat"
- },
- surface: {
- 0: "oklch(0.95 0.02 90)",
- 1: "oklch(0.92 0.02 90)",
- 2: "oklch(0.97 0.01 90)",
- 3: "oklch(0.99 0 0)",
- input: "oklch(0.94 0.01 90)",
- code: "oklch(0.90 0.02 90)",
- select: "oklch(0.85 0.05 25)"
- },
- content: {
- main: "oklch(0.20 0.02 25)",
- muted: "oklch(0.35 0.03 25)",
- subtle: "oklch(0.55 0.02 25)",
- inverse: "oklch(0.92 0.02 90)"
- },
- brand: {
- primary: "oklch(0.40 0.15 25)",
- secondary: "oklch(0.45 0.14 25)",
- tertiary: "oklch(0.50 0.12 25)",
- link: "oklch(0.40 0.16 25)"
- },
- border: {
- faint: "oklch(0.85 0.02 90)",
- regular: "oklch(0.75 0.03 90)",
- strong: "oklch(0.50 0.08 25)"
- },
- state: {
- success: "oklch(0.45 0.10 130)",
- warning: "oklch(0.55 0.15 45)",
- error: "oklch(0.45 0.15 25)",
- info: "oklch(0.50 0.12 240)"
- },
- syntax: {
- keyword: "oklch(0.45 0.15 25)",
- string: "oklch(0.40 0.10 130)",
- func: "oklch(0.45 0.12 35)",
- comment: "oklch(0.60 0.02 90)"
- },
- page: {
- width: "6.5in",
- min_height: "9in",
- padding: "0.5in 1in",
- margin: "20px auto",
- bg_color: "oklch(0.95 0.02 90)",
- border_color: "oklch(0.85 0.02 90)",
- text_color: "oklch(0.20 0.02 25)",
- shadow: "0 4px 15px rgba(0,0,0,0.1)"
- },
- custom_css: `
+ if (!window.RT) {
+ console.error("RT not defined - was RT-Manuscript_make run?");
+ return;
+ }
+
+ // Prevent duplicate initialization
+ if (window.RT.theme_library instanceof Set) {
+ console.error("RT.theme_library missing,- was theme_make run?");
+ return;
+ }
+
+ window.RT.theme_library['golden_wheat'] = {
+ meta: {
+ is_dark: false,
+ name: "golden_wheat"
+ },
+ surface: {
+ 0: "oklch(0.95 0.02 90)",
+ 1: "oklch(0.92 0.02 90)",
+ 2: "oklch(0.97 0.01 90)",
+ 3: "oklch(0.99 0 0)",
+ input: "oklch(0.94 0.01 90)",
+ code: "oklch(0.90 0.02 90)",
+ select: "oklch(0.85 0.05 25)"
+ },
+ content: {
+ main: "oklch(0.20 0.02 25)",
+ muted: "oklch(0.35 0.03 25)",
+ subtle: "oklch(0.55 0.02 25)",
+ inverse: "oklch(0.92 0.02 90)"
+ },
+ brand: {
+ primary: "oklch(0.40 0.15 25)",
+ secondary: "oklch(0.45 0.14 25)",
+ tertiary: "oklch(0.50 0.12 25)",
+ link: "oklch(0.40 0.16 25)"
+ },
+ border: {
+ faint: "oklch(0.85 0.02 90)",
+ regular: "oklch(0.75 0.03 90)",
+ strong: "oklch(0.50 0.08 25)"
+ },
+ state: {
+ success: "oklch(0.45 0.10 130)",
+ warning: "oklch(0.55 0.15 45)",
+ error: "oklch(0.45 0.15 25)",
+ info: "oklch(0.50 0.12 240)"
+ },
+ syntax: {
+ keyword: "oklch(0.45 0.15 25)",
+ string: "oklch(0.40 0.10 130)",
+ func: "oklch(0.45 0.12 35)",
+ comment: "oklch(0.60 0.02 90)"
+ },
+ page: {
+ width: "6.5in",
+ min_height: "9in",
+ padding: "0.5in 1in",
+ margin: "20px auto",
+ bg_color: "oklch(0.95 0.02 90)",
+ border_color: "oklch(0.85 0.02 90)",
+ text_color: "oklch(0.20 0.02 25)",
+ shadow: "0 4px 15px rgba(0,0,0,0.1)"
+ },
+ custom_css: `
rt-article p, rt-article li { text-shadow: 0px 0px 0.5px rgba(0,0,0, 0.2); }
.MathJax, .MathJax_Display, .mjx-chtml {
color: oklch(0.20 0.02 25) !important;
stroke: oklch(0.20 0.02 25) !important;
}
`
-};
+ };
+
+})();
// Theme/inverse_wheat.js
-window.RT = window.RT || {};
-window.RT.theme_library = window.RT.theme_library || {};
+(function(){
-window.RT.theme_library['inverse_wheat'] = {
- meta: {
- is_dark: true,
- name: "inverse_wheat"
- },
- surface: {
- 0: "oklch(0.157 0 0)",
- 1: "oklch(0.198 0 0)",
- 2: "oklch(0.221 0 0)",
- 3: "oklch(0.240 0 0)",
- input: "oklch(0.210 0 0)",
- code: "oklch(0.204 0 0)",
- select: "oklch(0.358 0.073 88)"
- },
- content: {
- main: "oklch(0.927 0.050 97)",
- muted: "oklch(0.699 0.030 78)",
- subtle: "oklch(0.522 0.022 82)",
- inverse: "oklch(0.157 0 0)"
- },
- brand: {
- primary: "oklch(0.841 0.173 85)",
- secondary: "oklch(0.827 0.135 78)",
- tertiary: "oklch(0.795 0.081 66)",
- link: "oklch(0.865 0.177 90)"
- },
- border: {
- faint: "oklch(0.280 0.018 78)",
- regular: "oklch(0.386 0.028 82)",
- strong: "oklch(0.533 0.041 77)"
- },
- state: {
- success: "oklch(0.671 0.168 137)",
- warning: "oklch(0.767 0.159 68)",
- error: "oklch(0.591 0.172 24)",
- info: "oklch(0.661 0.078 232)"
- },
- syntax: {
- keyword: "oklch(0.825 0.146 72)",
- string: "oklch(0.804 0.132 122)",
- func: "oklch(0.756 0.134 39)",
- comment: "oklch(0.573 0.035 78)"
- },
- page: {
- width: "6.5in",
- min_height: "9in",
- padding: "0.5in 1in",
- margin: "20px auto",
- bg_color: "oklch(0.95 0.02 90)",
- border_color: "oklch(0.85 0.02 90)",
- text_color: "oklch(0.20 0.02 25)",
- shadow: "0 4px 15px rgba(0,0,0,0.1)"
- },
- custom_css: `
+ if (!window.RT) {
+ console.error("RT not defined - was RT-Manuscript_make run?");
+ return;
+ }
+
+ // Prevent duplicate initialization
+ if (window.RT.theme_library instanceof Set) {
+ console.error("RT.theme_library missing,- was theme_make run?");
+ return;
+ }
+
+ window.RT.theme_library['inverse_wheat'] = {
+ meta: {
+ is_dark: true,
+ name: "inverse_wheat"
+ },
+ surface: {
+ 0: "oklch(0.157 0 0)",
+ 1: "oklch(0.198 0 0)",
+ 2: "oklch(0.221 0 0)",
+ 3: "oklch(0.240 0 0)",
+ input: "oklch(0.210 0 0)",
+ code: "oklch(0.204 0 0)",
+ select: "oklch(0.358 0.073 88)"
+ },
+ content: {
+ main: "oklch(0.927 0.050 97)",
+ muted: "oklch(0.699 0.030 78)",
+ subtle: "oklch(0.522 0.022 82)",
+ inverse: "oklch(0.157 0 0)"
+ },
+ brand: {
+ primary: "oklch(0.841 0.173 85)",
+ secondary: "oklch(0.827 0.135 78)",
+ tertiary: "oklch(0.795 0.081 66)",
+ link: "oklch(0.865 0.177 90)"
+ },
+ border: {
+ faint: "oklch(0.280 0.018 78)",
+ regular: "oklch(0.386 0.028 82)",
+ strong: "oklch(0.533 0.041 77)"
+ },
+ state: {
+ success: "oklch(0.671 0.168 137)",
+ warning: "oklch(0.767 0.159 68)",
+ error: "oklch(0.591 0.172 24)",
+ info: "oklch(0.661 0.078 232)"
+ },
+ syntax: {
+ keyword: "oklch(0.825 0.146 72)",
+ string: "oklch(0.804 0.132 122)",
+ func: "oklch(0.756 0.134 39)",
+ comment: "oklch(0.573 0.035 78)"
+ },
+ page: {
+ width: "6.5in",
+ min_height: "9in",
+ padding: "0.5in 1in",
+ margin: "20px auto",
+ bg_color: "oklch(0.95 0.02 90)",
+ border_color: "oklch(0.85 0.02 90)",
+ text_color: "oklch(0.20 0.02 25)",
+ shadow: "0 4px 15px rgba(0,0,0,0.1)"
+ },
+ custom_css: `
img.rt-diagram { filter: invert(1) hue-rotate(180deg); }
`
-};
+ };
+
+})();
+
// Theme/wheat.js
-window.RT = window.RT || {};
-window.RT.theme_library = window.RT.theme_library || {};
+(function(){
-window.RT.theme_library['wheat'] = {
- meta: {
- is_dark: false,
- name: "wheat"
- },
- surface: {
- 0: "oklch(0.95 0.02 80)",
- 1: "oklch(0.92 0.02 80)",
- 2: "oklch(0.97 0.01 80)",
- 3: "oklch(0.99 0 0)",
- input: "oklch(0.96 0.01 80)",
- code: "oklch(0.92 0.01 80)",
- select: "oklch(0.88 0.06 80)"
- },
- content: {
- main: "oklch(0.25 0.02 60)",
- muted: "oklch(0.45 0.03 60)",
- subtle: "oklch(0.65 0.02 60)",
- inverse: "oklch(0.94 0.02 80)"
- },
- brand: {
- primary: "oklch(0.50 0.15 50)",
- secondary: "oklch(0.55 0.12 60)",
- tertiary: "oklch(0.60 0.10 45)",
- link: "oklch(0.50 0.16 50)"
- },
- border: {
- faint: "oklch(0.85 0.02 80)",
- regular: "oklch(0.75 0.02 80)",
- strong: "oklch(0.55 0.04 80)"
- },
- state: {
- success: "oklch(0.50 0.10 130)",
- warning: "oklch(0.60 0.15 50)",
- error: "oklch(0.50 0.15 25)",
- info: "oklch(0.55 0.10 240)"
- },
- syntax: {
- keyword: "oklch(0.50 0.14 50)",
- string: "oklch(0.45 0.10 130)",
- func: "oklch(0.50 0.10 320)",
- comment: "oklch(0.65 0.02 80)"
- },
- page: {
- width: "6.5in",
- min_height: "9in",
- padding: "0.5in 1in",
- margin: "20px auto",
- bg_color: "oklch(0.95 0.02 90)",
- border_color: "oklch(0.85 0.02 90)",
- text_color: "oklch(0.20 0.02 25)",
- shadow: "0 4px 15px rgba(0,0,0,0.1)"
- },
-};
+ if (!window.RT) {
+ console.error("RT not defined - was RT-Manuscript_make run?");
+ return;
+ }
+
+ // Prevent duplicate initialization
+ if (window.RT.theme_library instanceof Set) {
+ console.error("RT.theme_library missing,- was theme_make run?");
+ return;
+ }
+
+ window.RT.theme_library['wheat'] = {
+ meta: {
+ is_dark: false,
+ name: "wheat"
+ },
+ surface: {
+ 0: "oklch(0.95 0.02 80)",
+ 1: "oklch(0.92 0.02 80)",
+ 2: "oklch(0.97 0.01 80)",
+ 3: "oklch(0.99 0 0)",
+ input: "oklch(0.96 0.01 80)",
+ code: "oklch(0.92 0.01 80)",
+ select: "oklch(0.88 0.06 80)"
+ },
+ content: {
+ main: "oklch(0.25 0.02 60)",
+ muted: "oklch(0.45 0.03 60)",
+ subtle: "oklch(0.65 0.02 60)",
+ inverse: "oklch(0.94 0.02 80)"
+ },
+ brand: {
+ primary: "oklch(0.50 0.15 50)",
+ secondary: "oklch(0.55 0.12 60)",
+ tertiary: "oklch(0.60 0.10 45)",
+ link: "oklch(0.50 0.16 50)"
+ },
+ border: {
+ faint: "oklch(0.85 0.02 80)",
+ regular: "oklch(0.75 0.02 80)",
+ strong: "oklch(0.55 0.04 80)"
+ },
+ state: {
+ success: "oklch(0.50 0.10 130)",
+ warning: "oklch(0.60 0.15 50)",
+ error: "oklch(0.50 0.15 25)",
+ info: "oklch(0.55 0.10 240)"
+ },
+ syntax: {
+ keyword: "oklch(0.50 0.14 50)",
+ string: "oklch(0.45 0.10 130)",
+ func: "oklch(0.50 0.10 320)",
+ comment: "oklch(0.65 0.02 80)"
+ },
+ page: {
+ width: "6.5in",
+ min_height: "9in",
+ padding: "0.5in 1in",
+ margin: "20px auto",
+ bg_color: "oklch(0.95 0.02 90)",
+ border_color: "oklch(0.85 0.02 90)",
+ text_color: "oklch(0.20 0.02 25)",
+ shadow: "0 4px 15px rgba(0,0,0,0.1)"
+ },
+ };
+})();
import grp
import filecmp
-sys.path.insert(0, os.path.join(os.path.abspath("tool"), "build_component"))
+# Calculate the path relative to this script's location
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+# Assumes this script is in developer/tool/
+# sync_engine is in developer/tool/build_component
+sys.path.insert(0, os.path.join(SCRIPT_DIR, "build_component"))
import sync_engine
HELP = """usage: promote {write|clean|ls|diff|help|dry write}
print(f"{TM_perms} {TM_ownergrp:<{ogw}} {indent}{TM_name}")
def cmd_write(dry=False):
- assert_setup()
dst_root = cpath()
ensure_dir(dst_root, DEFAULT_DIR_MODE, dry=dry)
src_root = dpath("scratchpad")
)
def cmd_diff():
- assert_setup()
dst_root = cpath()
src_root = dpath("scratchpad")
print("No differences found. Consumer matches developer scratchpad.")
def cmd_clean():
- assert_setup()
consumer_root_dir = cpath()
if not os.path.isdir(consumer_root_dir):
return
except FileNotFoundError: pass
def CLI():
+ assert_setup()
+
+ repo_home = os.environ.get("REPO_HOME", ".")
+ dev_dir = os.path.join(repo_home, "developer")
+ os.chdir(dev_dir)
+
if len(sys.argv) < 2:
print(HELP)
return
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>Counter Status Machine Diagnostics (Outline Style)</title>
+ <script src="RT-Manuscript_locator.js"></script>
+ <script>
+ window.RT.theme_preference('inverse_wheat');
+ window.RT.load('Layout/paginate');
+ window.RT.load('Layout/article_tech_ref');
+ window.RT.load('Element/theme_selector');
+ </script>
+ <style>
+ .indent { margin-left: 2rem; border-left: 1px solid #444; padding-left: 1rem; }
+ .comment { color: #6a9955; }
+ .line { margin-bottom: 0.5rem; font-family: monospace; }
+ </style>
+ </head>
+ <body>
+ <RT·theme-selector></RT·theme-selector>
+ <RT·article>
+ <RT·title
+ author="Thomas Walker Lynch"
+ date="2026-06-30 08:28Z"
+ title="Counter Status Machine Diagnostics (Outline Style)">
+ </RT·title>
+
+ <div class="line"><span class="comment">// Initialize scoped counter with mixed outline styles</span></div>
+ <RT·Counter·make counter="A" style="Roman, Alpha, roman, CountingNumber" on-first-step="0" separator="." mode="scoped"></RT·Counter·make>
+ <div class="line">make("A"){} : </div>
+
+ <div class="line"><span class="comment">// attempt to snapshot an empty counter will generate an error in the console</span></div>
+ <div class="line">
+ snapshot() -> (
+ <RT·Counter·snapshot counter="A" snapshot="s1"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s1" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s1" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s1" key="count"></RT·Counter·read>"
+ )
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s2"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s2" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s2" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s2" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( preamble ,[0] , "0" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s3"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s3" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s3" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s3" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( preamble ,[0,0] , "0.A" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s4"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s4" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s4" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s4" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( between ,[0,0] , "0" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s5"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s5" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s5" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s5" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( preamble ,[0,1] , "0.B" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s6"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s6" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s6" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s6" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( between ,[0,1] , "0" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s7"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s7" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s7" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s7" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( between ,[0] , "" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s8"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s8" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s8" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s8" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( preamble ,[1] , "I" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s9"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s9" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s9" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s9" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( preamble ,[1,0] , "I.A" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s10"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s10" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s10" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s10" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( between ,[1,0] , "I" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s11"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s11" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s11" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s11" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( preamble ,[1,1] , "I.B" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s12"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s12" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s12" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s12" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( between ,[1] , "" )</span>
+ </div>
+
+ </RT·article>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>Counter Status Machine Diagnostics (Milestone Mode)</title>
+ <script src="RT-Manuscript_locator.js"></script>
+ <script>
+ window.RT.theme_preference('inverse_wheat');
+ window.RT.load('Layout/paginate');
+ window.RT.load('Layout/article_tech_ref');
+ window.RT.load('Element/theme_selector');
+ </script>
+ <style>
+ .indent { margin-left: 2rem; border-left: 1px solid #444; padding-left: 1rem; }
+ .comment { color: #6a9955; }
+ .line { margin-bottom: 0.5rem; font-family: monospace; }
+ </style>
+ </head>
+ <body>
+ <RT·theme-selector></RT·theme-selector>
+ <RT·article>
+ <RT·title
+ author="Thomas Walker Lynch"
+ date="2026-06-30 08:39Z"
+ title="Counter Status Machine Diagnostics (Milestone Mode)">
+ </RT·title>
+
+ <div class="line"><span class="comment">// Initialize milestone counter with outline style</span></div>
+ <RT·Counter·make counter="A" style="outline" on-first-step="0" separator="." mode="milestone"></RT·Counter·make>
+ <div class="line">make("A"){} : </div>
+
+ <div class="line"><span class="comment">// attempt to snapshot an empty counter will generate an error in the console</span></div>
+ <div class="line">
+ snapshot() -> (
+ <RT·Counter·snapshot counter="A" snapshot="s1"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s1" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s1" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s1" key="count"></RT·Counter·read>"
+ )
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s2"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s2" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s2" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s2" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( preamble ,[0] , "I" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s3"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s3" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s3" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s3" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( preamble ,[0,0] , "I.A" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s4"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s4" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s4" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s4" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( between ,[0,0] , "I.A" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s5"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s5" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s5" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s5" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( preamble ,[0,1] , "I.B" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s6"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s6" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s6" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s6" key="count"></RT·Counter·read>"
+ )
+ <span class="comment">// Expected: ( between ,[0,1] , "I.B" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s7"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s7" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s7" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s7" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( between ,[0] , "I" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s8"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s8" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s8" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s8" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( preamble ,[1] , "II" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s9"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s9" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s9" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s9" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( preamble ,[1,0] , "II.A" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s10"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s10" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s10" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s10" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( between ,[1,0] , "II.A" )</span>
+ </div>
+
+ <div class="line">step("A"){</div>
+ <RT·Counter·step counter="A">
+ <div class="indent">
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s11"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s11" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s11" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s11" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( preamble ,[1,1] , "II.B" )</span>
+ </div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+ </div>
+ </RT·Counter·step>
+ <div class="line">}</div>
+
+ <div class="line">
+ snapshot() == (
+ <RT·Counter·snapshot counter="A" snapshot="s12"></RT·Counter·snapshot>
+ <RT·Counter·read snapshot="s12" key="status"></RT·Counter·read> ,
+ [<RT·Counter·read snapshot="s12" key="count.list"></RT·Counter·read>] ,
+ "<RT·Counter·read snapshot="s12" key="count"></RT·Counter·read>"
+ ) <span class="comment">// Expected: ( between ,[1] , "II" )</span>
+ </div>
+
+ </RT·article>
+ </body>
+</html>