Typeset a Devanagari Maths Worksheet
A complete Devanagari-and-mathematics worksheet source prepared for XeLaTeX, with a font fallback plan and notation audit.
Works on any free AI · Best tool: Any AI chat (ChatGPT, Claude, Gemini)
✅ How to use this effectively
- 1. Finalise content before typesetting.
- 2. Lock every maths token.
- 3. Compile with XeLaTeX.
- 4. Test the fallback font list.
- 5. Inspect line breaks and conjuncts.
🔧 If it is not right, reply with this: If Devanagari boxes or missing glyphs appear, keep the source unchanged and move through the supplied fallback fonts while recording which one compiles.
THE PROMPT
ROLE: Act as a multilingual XeLaTeX worksheet typesetter for Devanagari text and mathematics.
CONTEXT: Typeset [CHECKED WORKSHEET TEXT] for [CLASS] using [PAGE REQUIREMENTS] and [TERM CHOICES].
INPUTS — FILL EVERY PLACEHOLDER:
- [CHECKED WORKSHEET TEXT]
- [CLASS]
- [PAGE REQUIREMENTS]
- [TERM CHOICES]
SOURCE-BOUND TOOL FACTS AND EXACT URL WHITELIST:
- [OVERLEAF] Whitelist: https://www.overleaf.com/docs?encoded_snip={PERCENT_ENCODED_LATEX}. Overleaf requires a free account and sign-in before the imported project opens. Use pdflatex for the stated school-safe package set; use xelatex with fontspec only for multilingual documents. If the encoded URL exceeds 6,000 characters, output the full source plus manual paste steps instead of a broken link.
- [CODECOGS] Whitelist: https://latex.codecogs.com/png.image?{PERCENT_ENCODED_LATEX}. CodeCogs renders one equation image, not a document. Start permanent classroom PNGs with the encoded form of \dpi{150}, keep the URL short, and tell the teacher to download rather than hotlink it.
DO THIS:
1. Lock placeholders, notation, numbering, marks, units, and answer spaces before formatting.
2. Write a complete XeLaTeX document using fontspec for multilingual text.
3. Supply a short ordered font fallback list and a compilation test, without claiming any named font is installed.
4. State that opening an Overleaf project requires a free login and that the engine must be XeLaTeX.
5. Keep equations in maths mode and Devanagari prose in text mode.
6. Provide manual paste steps if a full encoded link would be too long.
WORKED LINK EXAMPLE — COPY THIS EXACT ENCODING PATTERN:
Example task: Keep sqrt(2) unchanged inside a Devanagari worksheet.
Expected result or check target: The surrounding instruction uses Devanagari while the calculator notation remains sqrt(2).
check this yourself
CHECK → https://latex.codecogs.com/png.image?%5Csqrt%7B2%7D
(paste-fallback: \sqrt{2})
Encoding note: The backslash and braces decode exactly to the LaTeX square-root fallback.
OUTPUT FORMAT:
1. Content Lock — immutable tokens and structure
2. XeLaTeX Source — complete document
3. Font Fallback Plan — ordered compile-and-switch steps
4. Overleaf Steps — login, engine, compile, and download
5. Visual QA List — glyphs, spacing, marks, and page breaks
QUALITY AND TOOL GUARDRAILS:
- Preserve every placeholder, notation token, number, mark value, and item label exactly.
- Use XeLaTeX and fontspec; never promise that a specific font is installed in Overleaf.
- Always provide a fallback font route and manual source-paste route.
- CodeCogs can preview equations only and cannot render the Devanagari worksheet.
- Do not transliterate when [TERM CHOICES] requires translated terminology.
- Copy every [PLACEHOLDER IN SQUARE BRACKETS] character-for-character in every template, code block and translated variant.
- Never output a desmos.com URL with parameters, a mathsolver.microsoft.com URL, an invented GeoGebra material ID, an invented DIKSHA code, an invented Khan topic path, or an unlisted quiz or simulation slug.
- Never describe an AI answer as verified. Every external check must be labelled “check this yourself” for the teacher or student to inspect personally.
- Do not invent exam facts, source citations, marks distributions, tool IDs or inaccessible links. Separate mathematical proof from computational checking.
=== TOOL-LINK OUTPUT CONTRACT — follow every rule exactly ===
1. You may output clickable links ONLY to: wolframalpha.com/input?i= · symbolab.com/solver?query= ·
geogebra.org/graphing|geometry|3d|cas?command= · math.stackexchange.com/search?q= · oeis.org/search?q= ·
artofproblemsolving.com/community/q1_ · khanacademy.org/search?page_search_query= ·
overleaf.com/docs?encoded_snip= · latex.codecogs.com/png.image? · docs.google.com/forms/...viewform?usp=pp_url
(Forms only with entry.N IDs I paste in) · plus any URL I give you or that appears in this prompt's whitelist table.
2. NEVER output: desmos.com links with query strings (they load blank), invented geogebra.org/m/ IDs, Khan topic
URLs, DIKSHA dial codes, Wolfram quiz/demo slugs not in my table, or mathsolver.microsoft.com (dead site).
3. Write queries in plain calculator syntax (x^2, sqrt(x), pi, 3/4) — never LaTeX — EXCEPT Overleaf and CodeCogs
payloads, which are LaTeX.
4. Percent-encode the query part: space→%20, +→%2B, ^→%5E, =→%3D, [→%5B, ]→%5D; in LaTeX payloads also
\→%5C, {→%7B, }→%7D, %→%25, #→%23, &→%26, newline→%0A. GeoGebra ?command= exception: encode ONLY + as %2B;
leave ( ) = ^ ; as typed.
5. One link per line, formatted exactly: CHECK → <full raw URL> (no markdown brackets, nothing after the URL).
6. Directly below every link, print: (paste-fallback: <the un-encoded query or commands>)
7. Before printing any link, silently decode your own URL and confirm it reproduces the query character-for-character;
rebuild it if not. If a URL would exceed 1,800 characters (Overleaf: 6,000), print only the paste-fallback.
8. Label every link "check this yourself" — never claim the link proves your answer is correct.
9. On phones these links must be opened in a browser, not an installed app — say this once at the end.