[{"data":1,"prerenderedAt":33},["ShallowReactive",2],{"i-lucide:grip":3,"i-lucide:chevron-right":8,"i-lucide:moon":10,"i-lucide:sun":12,"i-lucide:languages":14,"i-lucide:chevron-down":16,"i-lucide:shield-check":18,"i-lucide:mail":20,"blog-body-ai-write-latex-formula-preview-en":22,"i-lucide:lightbulb":23,"i-lucide:graduation-cap":25,"i-lucide:file-text":27,"i-lucide:square-sigma":29,"i-lucide:star":31},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"5\" r=\"1\"\u002F>\u003Ccircle cx=\"19\" cy=\"5\" r=\"1\"\u002F>\u003Ccircle cx=\"5\" cy=\"5\" r=\"1\"\u002F>\u003Ccircle cx=\"12\" cy=\"12\" r=\"1\"\u002F>\u003Ccircle cx=\"19\" cy=\"12\" r=\"1\"\u002F>\u003Ccircle cx=\"5\" cy=\"12\" r=\"1\"\u002F>\u003Ccircle cx=\"12\" cy=\"19\" r=\"1\"\u002F>\u003Ccircle cx=\"19\" cy=\"19\" r=\"1\"\u002F>\u003Ccircle cx=\"5\" cy=\"19\" r=\"1\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m9 18l6-6l-6-6\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":13},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"4\"\u002F>\u003Cpath d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":15},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m5 8l6 6m-7 0l6-6l2-3M2 5h12M7 2h1m14 20l-5-10l-5 10m2-4h6\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":17},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m6 9l6 6l6-6\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":19},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\"\u002F>\u003Cpath d=\"m9 12l2 2l4-4\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":21},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"m22 7l-8.991 5.727a2 2 0 0 1-2.009 0L2 7\"\u002F>\u003Crect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\"\u002F>\u003C\u002Fg>","\u003Cblockquote>\n\u003Cp>When you cannot write LaTeX, what you need is not more commands to memorize. You need \u003Cstrong>the one expression AI just wrote to render immediately\u003C\u002Fstrong>. Do not let the model hand in the work in chat. Preview pass is what counts as written; the symbol palette is for your tweaks. Taking dollar signs or a full document into the renderer is the usual failure.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>\u003Cimg src=\"\u002Fblog\u002Fai-write-latex-formula-preview\u002Fcover.webp\" alt=\"Core argument illustration\">\u003C\u002Fp>\n\u003Ch2>Why does “ask ChatGPT for a formula” still leave you unsure it is right?\u003C\u002Fh2>\n\u003Cp>Because chat has no math engine. \u003Ccode>\\frac{a}{b}\u003C\u002Fcode> is a string of characters to you; whether the denominator is wrapped, whether a matrix environment is wrong, only shows up against a render. People paste the whole reply into Word and get source, not an expression.\u003C\u002Fp>\n\u003Cp>Models also have habits. To “work in Markdown,” they wrap \u003Ccode>$\u003C\u002Fcode> or \u003Ccode>$$\u003C\u002Fcode>. To “look like a paper,” they add \u003Ccode>\\documentclass\u003C\u002Fcode>. A single-formula preview needs neither: the first is a delimiter, the second is a different tool. Length: single-formula input caps around \u003Cstrong>5000 characters\u003C\u002Fstrong>. Paste the prose of a proof with it and it truncates; error messages get harder to read.\u003C\u002Fp>\n\u003Cp>Homework also has a semantic risk: reversed subscripts, swapped sum limits — syntax can still be legal. \u003Cstrong>KaTeX only checks whether it can draw, not physics or math meaning.\u003C\u002Fstrong> Preview is necessary, not sufficient.\u003C\u002Fp>\n\u003Ch2>How do I let AI write one formula and catch errors on the page?\u003C\u002Fh2>\n\u003Cp>Open the \u003Ca href=\"\u002Flatex\u002Fformula\u002F\">LaTeX formula editor\u003C\u002Fa>, turn on Connect your AI, and have the assistant read and write only \u003Ccode>formula.tex\u003C\u002Fcode>. Lock three constraints in the instruction: formula content only; no \u003Ccode>$\u003C\u002Fcode> \u002F \u003Ccode>$$\u003C\u002Fcode> \u002F \u003Ccode>\\(\u003C\u002Fcode> \u002F \u003Ccode>\\[\u003C\u002Fcode>; no full LaTeX document.\u003C\u002Fp>\n\u003Cp>One round can look like this — AI speeds prompt-to-commands; you check right\u002Fwrong on the preview:\u003C\u002Fp>\n\u003Cp>\u003Cstrong>You:\u003C\u002Fstrong>\u003Cbr>\nWrite “the integral of sin x from 0 to π equals 2” as one formula. Body only, no dollar signs. Write it to the current formula page.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Assistant:\u003C\u002Fstrong>\u003Cbr>\nWritten. Check whether the preview says render succeeded. Look at subscripts and limits against the problem; if something is off, point at it and I will only change this one expression.\u003C\u002Fp>\n\u003Cp>Do not imagine what the expression looks like drawn — chat on the left, an arrow to the formula page on the right, preview showing a successful render:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fblog\u002Fai-write-latex-formula-preview\u002F02-ai-flow.en.webp\" alt=\"Chat on the left, MeTool formula page on the right showing the integral preview\">\u003C\u002Fp>\n\u003Cp>KaTeX only checks whether it can draw, not whether it matches the problem. Cowriting here means commands can go to the assistant; right\u002Fwrong stays on a preview you watch. Setup: \u003Ca href=\"\u002Fblog\u002Fp\u002Fconnect-ai-to-online-tools\u002F\">How do I connect AI?\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>When the preview errors, send the red text and the error location back, and ask to change only this expression. Common pairs:\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>What the page shows\u003C\u002Fth>\n\u003Cth>Likely cause\u003C\u002Fth>\n\u003Cth>What you ask AI to do\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>It stripped \u003Ccode>$$\u003C\u002Fcode>, or warned not to wrap\u003C\u002Ftd>\n\u003Ctd>The model wrote a Markdown document\u003C\u002Ftd>\n\u003Ctd>Rewrite as a bare formula\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>It says this is document-level syntax\u003C\u002Ftd>\n\u003Ctd>\u003Ccode>\\documentclass\u003C\u002Fcode> and friends appeared\u003C\u002Ftd>\n\u003Ctd>Stop; switch to the paper editor\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Unclosed braces \u002F environments\u003C\u002Ftd>\n\u003Ctd>Nested matrices or fractions\u003C\u002Ftd>\n\u003Ctd>Only add the braces; do not rewrite the problem\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Render succeeded but it is not the problem\u003C\u002Ftd>\n\u003Ctd>Semantics wrong, syntax fine\u003C\u002Ftd>\n\u003Ctd>Restate the problem in plain language; still only this expression\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>The symbol palette on the right is useful for tweaks: Greek letters, fractions, matrix templates insert on click. You do not need another generation round to swap in \u003Ccode>\\alpha\u003C\u002Fcode>. Export PNG or SVG after the preview already passes; how to paste into Word \u002F PowerPoint is in \u003Ca href=\"\u002Fblog\u002Fp\u002Finsert-math-formula-word-ppt\u002F\">Write once, reuse everywhere\u003C\u002Fa>. Setup: \u003Ca href=\"\u002Fblog\u002Fp\u002Fconnect-ai-to-online-tools\u002F\">How do I connect AI?\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>If the same expression has to go to Slack, Docs, or an LMS, render it as an image first — \u003Ca href=\"\u002Fblog\u002Fp\u002Fmarkdown-formula-to-image\u002F\">How do I send a formula from my notes?\u003C\u002Fa>. Keep the two lines separate: check homework on this page; send to other people via an image export.\u003C\u002Fp>\n\u003Ch2>Single-formula check, or compile a whole paper?\u003C\u002Fh2>\n\u003Cp>One expression you need to see immediately → formula page. Multi-file \u003Ccode>.tex\u003C\u002Fcode>, a PDF, a table of contents → the editor compile page.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>What you have\u003C\u002Fth>\n\u003Cth>Which path\u003C\u002Fth>\n\u003Cth>Why\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>One integral or matrix in homework\u003C\u002Ftd>\n\u003Ctd>Formula page + AI write\u003C\u002Ftd>\n\u003Ctd>Fast; errors target this expression\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A crisp formula image for a kickoff deck\u003C\u002Ftd>\n\u003Ctd>Formula page, export SVG\u003C\u002Ftd>\n\u003Ctd>No need to compile the whole paper\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A course paper with a bibliography\u003C\u002Ftd>\n\u003Ctd>\u003Ca href=\"\u002Flatex\u002Fedit\u002F\">LaTeX editor\u003C\u002Fa>\u003C\u002Ftd>\n\u003Ctd>Needs an engine, packages, pages\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>The model emitted a whole homework \u003Ccode>.tex\u003C\u002Fcode>\u003C\u002Ftd>\n\u003Ctd>Do not paste into the formula page\u003C\u002Ftd>\n\u003Ctd>It will truncate or fail as one math expression\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>TikZ figures, rare packages\u003C\u002Ftd>\n\u003Ctd>Local TeX or a full-project compile\u003C\u002Ftd>\n\u003Ctd>KaTeX is not full TeX\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Boundaries: the connection drops with the tab. The formula page does not do cross-references and does not run XeLaTeX. AI speeds “from the problem statement to the commands.” Whether symbols match the problem still needs you to look at the preview. Pasting an unpublished exam into the model you use is a separate risk, unrelated to the tool, but worth a pass before you submit.\u003C\u002Fp>\n\u003Ch2>Wrap-up\u003C\u002Fh2>\n\u003Cp>When you cannot write LaTeX, give “write the commands” to AI and keep “is it right?” on the KaTeX preview. Do not let the model hand in the work alone in chat. Bare formula only — no dollar signs, no full document. Errors → fix this one expression. Export or copy after the preview passes. Whole homework files and paper projects switch to the compile page; do not force them into a single-formula box.\u003C\u002Fp>\n",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":24},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M15 14c.2-1 .7-1.7 1.5-2.5c1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5c.7.7 1.3 1.5 1.5 2.5m0 4h6m-5 4h4\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":26},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0zM22 10v6\"\u002F>\u003Cpath d=\"M6 12.5V16a6 3 0 0 0 12 0v-3.5\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":28},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"\u002F>\u003Cpath d=\"M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":30},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Crect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\"\u002F>\u003Cpath d=\"M16 8.9V7H8l4 5l-4 5h8v-1.9\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":32},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z\"\u002F>",1787198018689]