Script Execution

MarkCharm Team

September 8, 2026

1 Computational Documents

MarkCharm can execute Python scripts at compile time and inject the results directly into the document.

1.1 Inline Computation

The factorial of 10 is **3,628,800**.

The value of pi to 10 decimal places is **3.1415926536**.

1.2 Dynamic Table Generation (Raw Output)

| n | n! | sqrt(n) |
|---|---:|--------:|
| 1 | 1 | 1.0000 |
| 2 | 2 | 1.4142 |
| 3 | 6 | 1.7321 |
| 4 | 24 | 2.0000 |
| 5 | 120 | 2.2361 |
| 6 | 720 | 2.4495 |
| 7 | 5,040 | 2.6458 |
| 8 | 40,320 | 2.8284 |
| 9 | 362,880 | 3.0000 |
| 10 | 3,628,800 | 3.1623 |

1.3 Rendered Table Generation (parse=true)

By adding parse=true to the execution block, the script's stdout is parsed as native MarkCharm syntax, rendering an actual HTML table:

n n! sqrt(n)
1 1 1.0000
2 2 1.4142
3 6 1.7321
4 24 2.0000
5 120 2.2361
6 720 2.4495
7 5,040 2.6458
8 40,320 2.8284
9 362,880 3.0000
10 3,628,800 3.1623

1.4 Date and System Info

This document was compiled on **2026-09-08 at 02:23**.

Scripts run in a sandboxed environment at compile time. Use --safe to disable execution for untrusted documents.