I just tried the same prompt with Claude Sonnet 4.5. (Using a generic "programming" system prompt. It's a bit long, so I won't paste it here, but I can share it if you're interested.)
This creates a Typst document with:
- US Letter page size (8.5" × 11")
- 2-column layout
- Sample text (replace `#lorem(100)` with your actual content)
------------------
Which compiled to PDF without errors using Typst CLI v0.13.1. The two column layout is not visible with `lorem(100)`, but `lorem(1000)` shows it clearly.
I'm surprised you got 20 compile errors for what should be a very simple document.
So I would call this a success. I doubt Claude is that much better than ChatGPT (GPT-5?).
I'm not saying that this invalidates your experience, but I would suggest experimenting with different strategies and LLMs. Try some prompt variations, feeding it more (or less) context, higher-quality context, documentation, etc. These tools are highly sensitive and unreliable, but can be coerced into producing helpful results with some care and patience.
EDIT: I was curious, so I tried the same with ChatGPT-4o using OpenRouter's default system prompt. It produced this:
------------------
// Set US letter page size
#set page(width: 8.5in, height: 11in)
// Create two-column layout using grid
#layout(grid: (
columns: 2,
gutter: 0.5in, // space between columns
))
// Example content
= My Two-Column Document
This is some text in the first paragraph. It will flow into two columns across the page.
== Section One
Here is more content that will automatically be distributed between the two columns. Typst handles the balancing and splitting of content across columns for you.
== Section Two
You can continue to add as much content as you'd like, and it will remain in the two-column format automatically.
------------------
This failed to compile because of a single error with `#layout`. Still, Typst errors are clear, and I could've probably fixed it easily myself by referencing the documentation.
Then I tried the same model with my custom generic programming system prompt, and it produced this:
------------------
#set page(
width: 8.5in,
height: 11in,
margin: 1in,
columns: 2,
column-gap: 0.5in,
)
= Title
Here is some example text in the first paragraph. It will flow into two columns automatically.
== Section
More text continues here, and Typst will manage the column layout accordingly.
------------------
Which is better, but still failed to compile because `column-gap` is not a valid argument. Simply removing it compiled without errors.
I still would've consulted the official documentation to determine whether this is idiomatic code or not, but these are not terrible results. As with all LLMs, you'll get the most out of them if you use them as assistants, rather than vibe coding tools.
It generated this:
------------------
This creates a Typst document with: - US Letter page size (8.5" × 11") - 2-column layout - Sample text (replace `#lorem(100)` with your actual content)------------------
Which compiled to PDF without errors using Typst CLI v0.13.1. The two column layout is not visible with `lorem(100)`, but `lorem(1000)` shows it clearly.
I'm surprised you got 20 compile errors for what should be a very simple document.
So I would call this a success. I doubt Claude is that much better than ChatGPT (GPT-5?).
I'm not saying that this invalidates your experience, but I would suggest experimenting with different strategies and LLMs. Try some prompt variations, feeding it more (or less) context, higher-quality context, documentation, etc. These tools are highly sensitive and unreliable, but can be coerced into producing helpful results with some care and patience.
EDIT: I was curious, so I tried the same with ChatGPT-4o using OpenRouter's default system prompt. It produced this:
------------------
------------------This failed to compile because of a single error with `#layout`. Still, Typst errors are clear, and I could've probably fixed it easily myself by referencing the documentation.
Then I tried the same model with my custom generic programming system prompt, and it produced this:
------------------
------------------Which is better, but still failed to compile because `column-gap` is not a valid argument. Simply removing it compiled without errors.
I still would've consulted the official documentation to determine whether this is idiomatic code or not, but these are not terrible results. As with all LLMs, you'll get the most out of them if you use them as assistants, rather than vibe coding tools.