A deterministic, reactive, math-driven document system with a visual page-layout editor and an pdf-style document reader. Documents are saved as .syn files — a hybrid markup format where layout, logic, and styling coexist in one file. Styling is always embedded; there is no separate .strss file.
- Syntaxia & Structura is a hybrid markup/programming language combining HTML-like structure with Python-style semantics and C-style operators.
.syn files are self-contained — layout, logic, and styling are all embedded.
- Mandatory HTML-like tags for all code blocks
- Python-style indentation for internal blocks
- C-style operators:
+,-,*,/,%,==,!=,<,>,<=,>=,&,&&,|,||,! - Math symbols:
π(Pi),√(square root) - Explicit type conversion:
<>target_type==source_value<> - Script references/imports:
<@>other_script.syn</@>
| Tag | Purpose |
|---|---|
<@>filename.syn</@> |
Import/using another Syntaxia script |
<func name="...">...</func> |
Define a function |
<var name="..." type="...">value</var> |
Define variable |
<if condition="...">...</if> |
Conditional block |
<loop type="..." count="...">...</loop> |
Loop block |
<print>expression</print> |
Output to console or UI |
<>target_type==source_value<> |
Explicit type conversion |
Features
- Physical page canvas — A4, A3, A5, Letter, Legal, Tabloid
- Draw text boxes by clicking and dragging on any page
- Select tool — click to select, drag to move, right-click or Delete to remove
- Multi-page support — add and delete pages from the left panel
- Properties panel — text content, font size, alignment (L/C/R), text colour, background colour, variable binding
- HSV colour wheel picker with live hex
#RRGGBBinput - Zoom (
Ctrl+scrollor toolbar buttons), fit-to-page - Saves and opens
.synfiles - Shortcuts:
Ctrl+Ssave ·Ctrl+Oopen ·Ctrl+Nnew ·Deleteremove box ·Ttext-box tool
Features
- Opens with a file picker if launched without arguments
- Drag a
.synfile directly onto the window - Pages rendered as physical white sheets on a dark slate background
- Handles both StructArch layout format and modern Structura document format
- Modern format (headings, paragraphs, tables, math blocks) is automatically reflowed onto pages
- Zoom and scroll;
◀ ▶page navigation;Home/Endkeys jump to first/last page - Status bar shows document title, author, page count, and current zoom
| Name | Width × Height |
|---|---|
| A4 | 210 × 297 mm |
| A3 | 297 × 420 mm |
| A5 | 148 × 210 mm |
| Letter | 216 × 279 mm |
| Legal | 216 × 356 mm |
| Tabloid | 279 × 432 mm |
Requires MinGW (GCC 6+).
build.batOr manually:
g++ -std=c++14 -mwindows -O2 -static-libgcc -static-libstdc++ ^
-o StructArch.exe maker\structarch.cpp ^
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -luuid -lole32 -lshell32
g++ -std=c++14 -mwindows -O2 -static-libgcc -static-libstdc++ ^
-o SynReader.exe renderer\synreader.cpp ^
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -luuid -lole32 -lshell32Both executables are fully self-contained — no external DLL dependencies.
Chrome Extension — navigate to a .syn file in Chrome and it renders inline.
npm Package — <SynDocument src={content} /> React component for web embedding.
<structura version="1.0.4">
<head>
<@>math_utils.syn</@>
<style>
#Global {
Palette: Temple16;
Grid: 80x25;
Resolution: 640x480;
Surface: BLUE; /* Classic Setup Blue */
}
/* The Physics HUD style */
#Field[name="distance"] {
Surface: BLACK;
Glyph: GREEN; /* Radar/Monitor Green */
Border: DOUBLE;
At: 10CH, 5CH; /* Absolute position on the 80x25 grid */
}
/* Warning style if the object is moving too fast */
[Condition: speed > 50.0] {
Surface: RED;
Glyph: WHITE;
Signal: BLINK;
}
<<style ResultText>>
Font: "FixedSys";
Plane: 2; /* Sits above the background */
Shadow: DEEP;
<>/style>>
</style>
</head>
<func name="physics_demo">
<var name="speed" type="float">9.8</var>
<var name="time" type="float">5</var>
<var name="distance" type="float">speed * time + 0.5 * 9.8 * time * time</var>
<if condition="distance > 0 && speed > 0">
<print style="ResultText">Distance traveled: distance</print>
</if>
<print>Half of π: π / 2</print>
<print>Square root of 49: √49</print>
<var name="distance_int" type="int"><~>int==distance<~></var>
<print>Distance as integer: distance_int</print>
</func>
<call method="physics_demo" lock="true" />
</structura>
