1. Purpose
This document demonstrates how SIDECAR can extend a clean TEXT source without mixing visual or rich-document details into the narrative text.
The source text stays simple. The richer behavior is delegated to the SIDECAR layer.
1.1 Supported Concept
The SIDECAR layer can inject richer elements into selected sections while the TEXT source keeps only sections, paragraphs, and simple lists.
The same mechanism can also reclassify a block range into another document object when that is more expressive than plain narrative paragraphs.
1.2 Supported Selector Families
This section summarizes the selector families used by the current injector design.
Section-relative placement uses position start or end when the injected element belongs naturally at a section boundary. Exact paragraph or block selectors remain available when precise placement is required.
2. Example Injection Targets
This chapter contains deliberately simple source text so the rendered example can visibly show what comes from TEXT and what comes from SIDECAR.
2.1 Section-relative Placement
The first paragraph is plain source text.
The second paragraph is also plain source text.
2.2 Figure, Code, and Table
This paragraph introduces a figure example.
This paragraph introduces a code block example.
injections:
- type: figure
src: SIDECAR/assets/imgs/sidecar-demo.svg
target:
section: "2.4"
position: end
This paragraph introduces a table example.
| Capability | Example |
|---|---|
| Section start | position: start |
| Section end | position: end |
| Exact paragraph | after_paragraph |
| Exact block | before_block / after_block |
| Reclassify | start_block + end_block |
2.3 Reclassification Example
This last paragraph stays outside the wrapped range and should remain a normal paragraph.
2.4 Empty Section Injection
3. Notes
The best way to understand SIDECAR is to compare the clean source with the rendered result.
A good demo keeps the TEXT source readable while SIDECAR shows how richer structure can be added around it.