Skip to content

Conversation

@rapjul
Copy link
Contributor

@rapjul rapjul commented Jan 20, 2026

  • Adds a Typst (Snippet) prompt
    • Includes strict rules for raw output, explicitly banning Markdown wrappers.
    • Includes a "False Friends" section to prevent common LaTeX hallucinations.
    • Includes rules for handling package imports, ambiguous text, and safe fonts.

So far I've found this prompt to work well to convert screenshots to Typst code snippets with Gemini 3 Flash.
As with any LLM prompt, there is probably still room for improvement.

I didn't want to include the prompt into the application as I thought that might be too much.
Hopefully this prompt can be included with the repo in a folder, as in this PR.
Otherwise I'm sure we can figure some other way to let people know about this prompt if they also use Typst.

typst-snippet-prompt.md

- Adds a Typst (Snippet) prompt
    - Includes strict rules for raw output, explicitly banning Markdown wrappers.
    - Includes a "False Friends" section to prevent common LaTeX hallucinations.
    - Includes rules for handling package imports, ambiguous text, and safe fonts.
Copilot AI review requested due to automatic review settings January 20, 2026 18:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a custom Typst snippet prompt to help users convert screenshots to Typst code. The prompt includes comprehensive rules for generating raw Typst output without Markdown wrappers, a "False Friends" section to prevent LaTeX hallucinations, and guidelines for handling package imports, illegible content, and graphics.

Changes:

  • Added a new "Custom Prompts" directory containing a Typst snippet prompt template
  • Updated .gitignore to exclude two directories (_antigravity/ and .agent/)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SamuelZ12 SamuelZ12 merged commit 0b2f3d8 into SamuelZ12:main Jan 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants