howtouseai101

Methodology

Document Typesetting & Conversion Methodology

howtouseai101 uses a deterministic, client-side Abstract Syntax Tree (AST) pipeline rather than fragile regex scraping or server-side headless browsers.

1. Clean Report Mode Pre-Processor

When Clean Report Mode is enabled, our pre-processor scans the pasted transcript while respecting fenced code blocks (so code comments are never altered). It removes common user turn markers (User:, You said:, Prompt:), assistant labels (Claude:, ChatGPT said:), raw reasoning tags (<think>...</think>), and repetitive conversational intros/outros.

2. LaTeX Normalization & Vector Math (KaTeX)

AI models output mixed math delimiters including \[...\], \(...\), $$...$$, and $...$. Before Markdown parsing, we protect fenced and inline code spans, normalize LaTeX blocks, distinguish currency dollar signs from inline equations, and render math directly to crisp HTML/CSS vector glyphs via KaTeX.

3. Publication-Grade Vector PDF Pagination

Rather than rasterizing your document into a blurry bitmap canvas, our PDF export relies on native browser vector printing paired with strict CSS Paged Media rules: break-after: avoid on all headings and break-inside: avoid on tables, table rows, code blocks, blockquotes, and display math containers.

4. Native Word (.docx) & Multi-Sheet Excel (.xlsx)

  • Word (.docx): We walk the Marked AST token stream and construct a clean Office Open XML binary in browser memory using the docx library—mapping Markdown headings to native Word Heading 1–4 styles and compiling pipe tables into cleanly bordered Word grids with zero gray background shading.
  • Google Docs Copy: Generates sanitized inline-styled HTML with explicit transparent backgrounds and collapsed table borders, written via the browser ClipboardItem API.
  • Excel (.xlsx): Extracts every table node in the Markdown AST, strips inline Markdown markers (**bold**, `code`), auto-calculates column widths, and writes each table to its own worksheet tab using SheetJS.