version 3.0 first commit
authorThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Sat, 20 Jun 2026 11:36:22 +0000 (11:36 +0000)
committerThomas Walker Lynch <eknp9n@reasoningtechnology.com>
Sat, 20 Jun 2026 11:36:22 +0000 (11:36 +0000)
21 files changed:
developer/authored/RT/core/block_visibility_during_layout.js [new file with mode: 0644]
developer/authored/RT/core/body_visibility_hidden.js [deleted file]
developer/authored/RT/core/body_visibility_visible.js [deleted file]
developer/authored/RT/core/loader.js
developer/authored/RT/core/utility.js
developer/authored/RT/document/setup.js [deleted file]
developer/authored/RT/document/style_manual.html
developer/authored/RT/element/TOC.js
developer/authored/RT/element/chapter.js
developer/authored/RT/element/citation.js [deleted file]
developer/authored/RT/element/code.js
developer/authored/RT/element/constraint.js
developer/authored/RT/element/crossref.js
developer/authored/RT/element/endnote.js [new file with mode: 0644]
developer/authored/RT/element/math.js
developer/authored/RT/element/symbol.js
developer/authored/RT/element/term.js
developer/authored/RT/element/title.js
developer/authored/RT/layout/article_tech_ref.js
developer/document/counter_tags.txt [new file with mode: 0644]
shared/authored/version

diff --git a/developer/authored/RT/core/block_visibility_during_layout.js b/developer/authored/RT/core/block_visibility_during_layout.js
new file mode 100644 (file)
index 0000000..8513f01
--- /dev/null
@@ -0,0 +1,19 @@
+// block_visibility_during_layout.js
+
+// 1. Hide the document immediately upon execution in the <head>
+document.documentElement.style.visibility = "hidden";
+
+// 2. Define the restoration function
+const restore_visibility = function() {
+    document.documentElement.style.visibility = "";
+    document.removeEventListener("RT_layout_complete", restore_visibility);
+    window.removeEventListener("load", restore_visibility);
+};
+
+// 3. Listen for a specific completion signal from the layout engine
+document.addEventListener("RT_layout_complete", restore_visibility);
+
+// 4. Structural Safety Net: If the layout engine fails or is never loaded, 
+//    restore visibility on the final window 'load' event so the page doesn't remain blank.
+window.addEventListener("load", restore_visibility);
+
diff --git a/developer/authored/RT/core/body_visibility_hidden.js b/developer/authored/RT/core/body_visibility_hidden.js
deleted file mode 100644 (file)
index d6a178a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
-  Targets the root element to ensure total blackout during load.
-*/
-function body_visibility_hidden(){
-  const gate = document.createElement('style');
-  gate.id = 'rt-visibility-gate';
-  gate.textContent = 'html{visibility:hidden !important; background:black !important;}';
-  document.head.appendChild(gate);
-}
-
-window.StyleRT = window.StyleRT || {};
-window.StyleRT.body_visibility_hidden = body_visibility_hidden;
diff --git a/developer/authored/RT/core/body_visibility_visible.js b/developer/authored/RT/core/body_visibility_visible.js
deleted file mode 100644 (file)
index ff1c4b6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-  Restores visibility by removing the visibility gate.
-*/
-function body_visibility_visible(){
-  const gate = document.getElementById('rt-visibility-gate');
-  if (gate){
-    gate.remove();
-  }
-  document.body.style.visibility = 'visible';
-}
-
-window.StyleRT = window.StyleRT || {};
-window.StyleRT.body_visibility_visible = body_visibility_visible;
index 3f4ee68..5334d08 100644 (file)
@@ -1,27 +1,22 @@
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.include = function(path_identifier){
-  let parts_seq = path_identifier.split('/');
-  let namespace = parts_seq[0];
-  
-  let module_path = parts_seq.slice(1).join('/');
+window.RT.load = function(module_path){
+  let target_module = module_path;
 
-  if(module_path === 'theme'){
+  if(target_module === 'theme'){
     let saved_theme = localStorage.getItem('RT_theme_preference');
     if(!saved_theme){
       saved_theme = 'dark_gold';
-      localStorage.setItem('RT_theme_preference' ,saved_theme);
+      localStorage.setItem('RT_theme_preference'saved_theme);
     }
-    module_path = 'theme/' + saved_theme;
+    target_module = 'theme/' + saved_theme;
   }
 
-  let base_path = window.StyleRT_namespaces[namespace];
-  if(!base_path){
-    console.error("Namespace not found: " + namespace);
-    return;
+  let resolved_path = window.RT.dirpr_library + '/' + target_module;
+
+  if(!resolved_path.endsWith('.js')){
+    resolved_path = resolved_path + '.js';
   }
 
-  let full_path = base_path + '/' + module_path + '.js';
-  // FIXED: No backslashes in the closing script tag
-  document.write('<script src="' + full_path + '"></script>');
+  document.write('<script src="' + resolved_path + '"></script>');
 };
index b070510..d6f2ddd 100644 (file)
@@ -1,11 +1,11 @@
 /*
-  General utilities for the StyleRT library.
+  General utilities for the RT Style library.
 */
 
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
 // --- DEBUG SYSTEM ---
-window.StyleRT.debug = {
+window.RT.debug = {
 
   // all debug messages enabled
 /*
@@ -26,19 +26,18 @@ window.StyleRT.debug = {
 
   log: function(token, message) {
     if (this.active_tokens.has(token)) {
-      console.log(`[StyleRT:${token}]`, message);
+      console.log(`[RT:${token}]`, message);
     }
   },
 
   warn: function(token, message) {
     if (this.active_tokens.has(token)) {
-      console.warn(`[StyleRT:${token}]`, message);
+      console.warn(`[RT:${token}]`, message);
     }
   },
   
-  // New: Always log errors regardless of token, but tag them
   error: function(token, message) {
-    console.error(`[StyleRT:${token}] CRITICAL:`, message);
+    console.error(`[RT:${token}] CRITICAL:`, message);
   },
   
   enable: function(token) { this.active_tokens.add(token); console.log(`Enabled: ${token}`); },
@@ -46,10 +45,10 @@ window.StyleRT.debug = {
 };
 
 // --- UTILITIES ---
-window.StyleRT.utility = {
+window.RT.utility = {
   // --- FONT PHYSICS ---
   measure_ink_ratio: function(target_font, ref_font = null) {
-    const debug = window.StyleRT.debug;
+    const debug = window.RT.debug;
     debug.log('layout', `Measuring ink ratio for ${target_font}`);
 
     const canvas = document.createElement('canvas');
@@ -73,7 +72,6 @@ window.StyleRT.utility = {
     const target_m = get_metrics(target_font);
     
     const ratio = ref_m.ascent / target_m.ascent;
-    // debug.log('layout', `Ink Ratio calculated: ${ratio.toFixed(3)}`);
 
     return { 
       ratio: ratio,
@@ -83,8 +81,6 @@ window.StyleRT.utility = {
 
   // --- COLOR PHYSICS ---
   is_color_light: function(color_string) {
-    const debug = window.StyleRT.debug;
-    
     // 1. HSL Check
     if (color_string.startsWith('hsl')) {
       const numbers = color_string.match(/\d+/g);
@@ -97,7 +93,6 @@ window.StyleRT.utility = {
     // 2. RGB Check
     const rgb = color_string.match(/\d+/g);
     if (!rgb) {
-      // debug.warn('color_layout', `Failed to parse color: "${color_string}". Defaulting to Light.`);
       return true; 
     }
 
diff --git a/developer/authored/RT/document/setup.js b/developer/authored/RT/document/setup.js
deleted file mode 100644 (file)
index 343de0f..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-window.RT_REPO_ROOT = "../../../../";
-document.write('<script src="' + window.RT_REPO_ROOT + 'shared/style_directory_dict.js"></script>');
-document.write('<script src="' + window.RT_REPO_ROOT + 'developer/authored/RT/core/loader.js"></script>');
-document.write('<script src="' + window.RT_REPO_ROOT + 'developer/authored/RT/core/body_visibility_hidden.js"></script>');
index 16ea4cd..5a10b4e 100644 (file)
@@ -3,12 +3,23 @@
   <head>
     <meta charset="UTF-8">
     <title>RT Style System: Reference Manual</title>
-    <script src="setup.js"></script>
+    
     <script>
-      window.StyleRT.include('RT/theme');
-      window.StyleRT.include('RT/layout/article_tech_ref');
+      window.RT = window.RT || {};
+
+      // !! document author !!  This must point, relative to the document directory, to the RT library:
+      window.RT.dirpr_library = "../consumer/release/RT";
+
+      document.write('<script src="' + window.RT.dirpr_library + '/core/loader.js"><\\/script>');
+    </script>
+    <script>
+      window.RT.load('core/utility');
+      window.RT.load('core/block_visibility_during_layout');
+      window.RT.load('theme');
+      window.RT.load('layout/article_tech_ref');
     </script>
   </head>
+
   <body>
 
     <RT-article>
@@ -16,7 +27,7 @@
 
       <RT-TOC level="1"></RT-TOC>
 
-      <h1>Table of custom tags</h1>
+      <RT-chapter>Table of custom tags</RT-chapter>
 
       <h2>Style tag reference</h2>
 
         </tbody>
       </table>
 
-      <h1>Architecture overview</h1>
+      <RT-chapter>Architecture overview</RT-chapter>
       <p>
         The <RT-term>RT Style System</RT-term> is a client-side, JavaScript-driven publishing framework designed to turn raw HTML into high-readability technical documentation. Unlike standard CSS frameworks, RT uses JavaScript to handle complex layout tasks like <RT-neologism>ink-ratio balancing</RT-neologism> and dynamic pagination.
       </p>
         `setup.js` points at the style files and is installation specific.</p>
         
 
-      <h1>Semantic tags</h1>
+      <RT-chapter>Semantic tags</RT-chapter>
       <p>
         The system relies on a specific set of custom tags in the <RT-code>RT-</RT-code> namespace to separate meaning from presentation.
       </p>
         Use <RT-code>&lt;RT-cite&gt;</RT-code> with the <RT-code>ref</RT-code> attribute to insert bibliographic citations. This ensures formatting remains consistent and separates citation data from standard prose.
       </p>
       <RT-code>
-        ... formalized as Basic Law V <RT-cite ref="Gottlob Frege, Grundgesetze, 1903"></RT-cite>.
+        ... formalized as Basic Law V <RT-endnote ref="Gottlob Frege, Grundgesetze, 1903"></RT-endnote>.
       </RT-code>
 
       <h3>Dynamic cross referencing</h3>
         Use <RT-code>&lt;RT-index&gt;</RT-code> at the end of the document to compile a glossary. Similar to the TOC compiler, this tag scans the DOM for automatic definition anchors produced by the term module and generates an alphabetized list of defined terms and neologisms.
       </p>
 
-      <h1>Navigation and layout</h1>
+      <RT-chapter>Navigation and layout</RT-chapter>
 
       <h2>Automatic table of contents</h2>
       <p>
         For major document divisions, use <RT-code>&lt;RT-chapter&gt;</RT-code>. The semantic processor translates this tag into an <RT-code>&lt;RT-page-break&gt;</RT-code> followed by an <RT-code>&lt;h1 class="RT-chapter"&gt;</RT-code>. This ensures the chapter starts on a new page, inherits standard typography, and is automatically indexed by the TOC engine.
       </p>
 
-      <h1>Debugging</h1>
+      <RT-chapter>Debugging</RT-chapter>
 
       <h2>Debug tokens</h2>
       <p>
         For example, the term system (<RT-code>RT_term.js</RT-code>) uses the <RT-code>term</RT-code> token. When that token is enabled, the module will print messages describing how terms were detected and which term definitions were assigned IDs.
       </p>
 
-      <h1>Themes</h1>
+      <RT-chapter>Themes</RT-chapter>
       <p>
         The system supports hot swapping themes by changing the script import in the head.
       </p>
         <li><strong>Light:</strong> <RT-code>style/theme_light_gold.js</RT-code></li>
       </ul>
 
-      <h1>Manifest</h1>
+      <RT-chapter>Manifest</RT-chapter>
       <RT-code>
         1. style_orchestrator.js    (Example/default footer script)
         2. utility.js               (Math/Color physics)
         window.StyleRT.style_orchestrator();
       </script>
 
-      <h1>RT conventions</h1>
+      <RT-chapter>RT conventions</RT-chapter>
       <p> Headings are first letter capitalized. Remaining words are as they would be in English prose.</p>
 
-      <h1>Exercises</h1>
+      <RT-chapter>Exercises</RT-chapter>
 
       <ol>
         <li>
index fb6b10a..2f3bc6f 100644 (file)
@@ -18,10 +18,10 @@ Next heading 2                3
 
 */
 
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.TOC = function(){
-  const debug = window.StyleRT.debug || { log: function(){} };
+window.RT.TOC = function(){
+  const debug = window.RT.debug || { log: function(){} };
   const TOC_seq = document.querySelectorAll('rt-toc');
 
   TOC_seq.forEach( (container ,TOC_index) => {
index 1cbf76e..42ba956 100644 (file)
@@ -2,10 +2,10 @@
   Processes <RT-chapter> tags.
   Transforms the tag into an <RT-page-break> followed by an <h1> with the RT-chapter class.
 */
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.chapter = function(){
-  const debug = window.StyleRT.debug || { log: function(){} };
+window.RT.chapter = function(){
+  const debug = window.RT.debug || { log: function(){} };
 
   document.querySelectorAll('RT-chapter').forEach( (el ,index) => {
     if(debug.log) debug.log('chapter' ,`Processing chapter ${index + 1}`);
diff --git a/developer/authored/RT/element/citation.js b/developer/authored/RT/element/citation.js
deleted file mode 100644 (file)
index 857862e..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-window.StyleRT = window.StyleRT || {};
-
-window.StyleRT.citation = function(){
-  const citations = document.querySelectorAll('rt-cite');
-  if(citations.length === 0) return;
-
-  const article = document.querySelector('rt-article');
-  if(!article) return;
-
-  // 1. Ensure the H1 is a direct child of the article so the TOC can see it
-  let endnotesHeader = document.getElementById('endnotes-header');
-  if (!endnotesHeader) {
-    endnotesHeader = document.createElement('h1');
-    endnotesHeader.id = 'endnotes-header';
-    endnotesHeader.innerText = 'Endnotes';
-    article.appendChild(endnotesHeader);
-  }
-
-  // 2. Locate or generate the endnotes list container
-  let endnoteContainer = document.querySelector('rt-endnotes');
-  if(!endnoteContainer) {
-    endnoteContainer = document.createElement('rt-endnotes');
-    article.appendChild(endnoteContainer);
-  }
-  
-  // 3. Ensure the list structure exists
-  if(!endnoteContainer.querySelector('ol')) {
-    endnoteContainer.innerHTML = '<ol></ol>';
-  }
-  
-  const list = endnoteContainer.querySelector('ol');
-
-  // Process each inline citation
-  citations.forEach((cite, index) => {
-    const refNum = index + 1;
-    const refText = cite.getAttribute('ref') || cite.innerHTML;
-    
-    cite.innerHTML = `<a href="#note-${refNum}" id="cite-${refNum}">[${refNum}]</a>`;
-    cite.style.cursor = 'pointer';
-    cite.style.color = 'var(--rt-brand-link)';
-    cite.style.textDecoration = 'none';
-
-    // Append the corresponding entry into the endnotes list
-    const li = document.createElement('li');
-    li.id = `note-${refNum}`;
-    li.innerHTML = `${refText} <a href="#cite-${refNum}" style="text-decoration:none;">&#8617;</a>`;
-    list.appendChild(li);
-  });
-  
-  // Style the container
-  endnoteContainer.style.display = 'block';
-  endnoteContainer.style.marginTop = '1rem';
-  endnoteContainer.style.borderTop = '1px solid var(--rt-surface-3)';
-  endnoteContainer.style.paddingTop = '1rem';
-};
index 7e6dca8..0a97f16 100644 (file)
@@ -5,7 +5,7 @@
   Removes common indent from lines of code.
 */
 function code() {
-  const RT = window.StyleRT;
+  const RT = window.RT;
   const U = RT.utility;
   const debug = RT.debug;
 
@@ -125,5 +125,5 @@ function code() {
   debug.log('code', 'Render cycle complete.');
 }
 
-window.StyleRT = window.StyleRT || {};
-window.StyleRT.code = code;
+window.RT = window.RT || {};
+window.RT.code = code;
index dc4b596..c33b7b0 100644 (file)
@@ -1,7 +1,7 @@
 // developer/authored/RT/element/constraint.js
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.constraint = function(){
+window.RT.constraint = function(){
   document.querySelectorAll('rt-constraint').forEach( (el) => {
     el.style.display = 'block';
     el.style.borderLeft = '4px solid var(--rt-state-warning)';
index f0b2c60..aaea2bc 100644 (file)
@@ -1,7 +1,7 @@
 // developer/authored/RT/element/crossref.js
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.crossref = function(){
+window.RT.crossref = function(){
   document.querySelectorAll('rt-crossref').forEach( (el) => {
     el.style.color = 'var(--rt-brand-link)';
     el.style.textDecoration = 'underline';
diff --git a/developer/authored/RT/element/endnote.js b/developer/authored/RT/element/endnote.js
new file mode 100644 (file)
index 0000000..dd887b3
--- /dev/null
@@ -0,0 +1,55 @@
+window.RT = window.RT || {};
+
+window.RT.end_note = function(){
+  const citations = document.querySelectorAll('rt-cite');
+  if(citations.length === 0) return;
+
+  const article = document.querySelector('rt-article');
+  if(!article) return;
+
+  // 1. Ensure the H1 is a direct child of the article so the TOC can see it
+  let endnotesHeader = document.getElementById('endnotes-header');
+  if (!endnotesHeader) {
+    endnotesHeader = document.createElement('h1');
+    endnotesHeader.id = 'endnotes-header';
+    endnotesHeader.innerText = 'Endnotes';
+    article.appendChild(endnotesHeader);
+  }
+
+  // 2. Locate or generate the endnotes list container
+  let endnoteContainer = document.querySelector('rt-endnotes');
+  if(!endnoteContainer) {
+    endnoteContainer = document.createElement('rt-endnotes');
+    article.appendChild(endnoteContainer);
+  }
+  
+  // 3. Ensure the list structure exists
+  if(!endnoteContainer.querySelector('ol')) {
+    endnoteContainer.innerHTML = '<ol></ol>';
+  }
+  
+  const list = endnoteContainer.querySelector('ol');
+
+  // Process each inline citation
+  citations.forEach((cite, index) => {
+    const refNum = index + 1;
+    const refText = cite.getAttribute('ref') || cite.innerHTML;
+    
+    cite.innerHTML = `<a href="#note-${refNum}" id="cite-${refNum}">[${refNum}]</a>`;
+    cite.style.cursor = 'pointer';
+    cite.style.color = 'var(--rt-brand-link)';
+    cite.style.textDecoration = 'none';
+
+    // Append the corresponding entry into the endnotes list
+    const li = document.createElement('li');
+    li.id = `note-${refNum}`;
+    li.innerHTML = `${refText} <a href="#cite-${refNum}" style="text-decoration:none;">&#8617;</a>`;
+    list.appendChild(li);
+  });
+  
+  // Style the container
+  endnoteContainer.style.display = 'block';
+  endnoteContainer.style.marginTop = '1rem';
+  endnoteContainer.style.borderTop = '1px solid var(--rt-surface-3)';
+  endnoteContainer.style.paddingTop = '1rem';
+};
index 1e2ae8f..51d86a7 100644 (file)
@@ -31,5 +31,5 @@ function math(){
   document.head.appendChild(script);
 }
 
-window.StyleRT = window.StyleRT || {};
-window.StyleRT.math = math;
+window.RT = window.RT || {};
+window.RT.math = math;
index 748ad75..7199fda 100644 (file)
@@ -1,7 +1,7 @@
 // developer/authored/RT/element/symbol.js
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.symbol = function(){
+window.RT.symbol = function(){
   document.querySelectorAll('rt-symbol').forEach( (el) => {
     el.style.fontFamily = '"Courier New", Courier, monospace';
     el.style.fontWeight = '600';
index 4ebc634..1cc779c 100644 (file)
@@ -5,10 +5,10 @@
   - Automatically generates IDs for first occurrences for future indexing.
 */
 
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.term = function() {
-  const RT = window.StyleRT;
+window.RT.term = function() {
+  const RT = window.RT;
 
   const debug = RT.debug || {
     log: function() {}
index db821af..bfb8d4e 100644 (file)
@@ -5,10 +5,10 @@
   Usage: 
   <RT-title title="..." author="..." date="..." copyright="..."></RT-title>
 */
-window.StyleRT = window.StyleRT || {};
+window.RT = window.RT || {};
 
-window.StyleRT.title = function() {
-  const debug = window.StyleRT.debug || { log: function(){} };
+window.RT.title = function() {
+  const debug = window.RT.debug || { log: function(){} };
   
   document.querySelectorAll('rt-title').forEach(el => {
     const title = el.getAttribute('title') || 'Untitled Document';
index 9e7386b..fc7034b 100644 (file)
@@ -1,6 +1,6 @@
-// debug messsages don't work here, because RT/core/utility isn't loaded until after the function runs.
+// debug messages don't work here, because core/utility isn't loaded until after the function runs.
 (function(){
-  const RT = window.StyleRT = window.StyleRT || {};
+  const RT = window.RT = window.RT || {};
   const debug = RT.debug || { log: function(){} };
 
   debug.log('scroll', "1. Initializing script.");
   // 4. The Lock
   let is_layout_locked = true;
 
-  // 5. Declare Dependencies
-  RT.include('RT/element/chapter');
-  RT.include('RT/element/citation');
-  RT.include('RT/core/utility');
-  RT.include('RT/element/math');
-  RT.include('RT/element/code');
-  RT.include('RT/element/term');
-  RT.include('RT/element/TOC');
-  RT.include('RT/element/title');
-  RT.include('RT/element/theme_selector');
-  RT.include('RT/element/symbol');
-  RT.include('RT/element/constraint');
-  RT.include('RT/element/crossref');
-
-
-  RT.include('RT/layout/paginate_by_element');
-  RT.include('RT/layout/page_fixed_glow');
-  RT.include('RT/layout/paginate_by_element');
-
-  RT.include('RT/core/body_visibility_visible');
+  // Helper to ensure we only signal completion once
+  function unlock_layout() {
+    if (!is_layout_locked) return;
+    is_layout_locked = false;
+    debug.log('scroll', "10. Layout fully unlocked. Emitting completion signal.");
+    document.dispatchEvent(new Event("RT_layout_complete"));
+  }
 
+  // 5. Declare Dependencies
+  RT.load('element/chapter');
+  RT.load('element/endnote');
+  RT.load('element/math');
+  RT.load('element/code');
+  RT.load('element/term');
+  RT.load('element/TOC');
+  RT.load('element/title');
+  RT.load('element/theme_selector');
+  RT.load('element/symbol');
+  RT.load('element/constraint');
+  RT.load('element/crossref');
+
+  RT.load('layout/paginate_by_element');
+  RT.load('layout/page_fixed_glow');
 
   // 6. The Typography Layout
   RT.article = function(){
       style.color = "var(--rt-content-main)";
     }
 
-    window.StyleRT = window.StyleRT || {};
-    window.StyleRT.config = window.StyleRT.config || {};
-    window.StyleRT.config.page = window.StyleRT.config.page || {};
-    window.StyleRT.config.page.height_limit = 900; 
+    window.RT = window.RT || {};
+    window.RT.config = window.RT.config || {};
+    window.RT.config.page = window.RT.config.page || {};
+    window.RT.config.page.height_limit = 900; 
 
     const style_node = document.createElement("style");
     style_node.innerHTML = `
         max-width: 100%;
         height: auto;
         display: block;
-        margin: 1.5rem auto; /* Centers the image */
+        margin: 1.5rem auto;
       }
-
     `;
     document.head.appendChild(style_node);
   };
   function run_semantics(){
     debug.log('scroll' ,`4. run_semantics starting.`);
     if(RT.theme) RT.theme();     
-    if(RT.citation) RT.citation();
+    if(RT.endnote) RT.endnote();
     RT.article(); 
     if(RT.title) RT.title(); 
     if(RT.term) RT.term();
     if(RT.TOC) RT.TOC();
     if(RT.paginate_by_element) RT.paginate_by_element();
     if(RT.page) RT.page();
-    if(RT.body_visibility_visible) RT.body_visibility_visible();
     
     debug.log('scroll', `6. Pagination complete.`);
 
   function enforce_scroll(target, use_hash, attempts) {
     if (attempts > 15) {
       debug.log('scroll', "8. Scroll enforcement timed out. Unlocking.");
-      is_layout_locked = false;
+      unlock_layout();
       return;
     }
 
              debug.log('scroll', `9a. Browser late-stage rebellion detected. Re-enforcing.`);
              enforce_scroll(target, use_hash, attempts + 1);
          } else {
-             is_layout_locked = false;
-             debug.log('scroll', "10. Layout fully unlocked.");
+             unlock_layout();
          }
        }, 100);
     } else {
   });
 
   // 10. Bind to DOM Ready
-  document.addEventListener( 'DOMContentLoaded' ,run_semantics );
+  document.addEventListener('DOMContentLoaded', run_semantics);
 
 })();
+
diff --git a/developer/document/counter_tags.txt b/developer/document/counter_tags.txt
new file mode 100644 (file)
index 0000000..b9ba678
--- /dev/null
@@ -0,0 +1,6 @@
+
+1.
+
+<RT-counter name="figure" style="Natural" initial="1" separator=".">
+
+name can be any string
index 4284d43..45626d4 100755 (executable)
@@ -1,5 +1,5 @@
 echo "Harmony v2.2 2026-03-06"
-echo "RT-style-JS_public v2.1 2026-06-01"
+echo "RT-style-JS_public v3.1 2026-06-20 10:39:27 Z"