[{"data":1,"prerenderedAt":31},["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-latex-paper-cowriting-en":22,"i-lucide:lightbulb":23,"i-lucide:graduation-cap":25,"i-lucide:pen-line":27,"i-lucide:star":29},{"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>Letting AI edit a paper is not pasting the whole file into chat and letting it finish alone. It is \u003Cstrong>having it edit files in the project you have open, then compile on the same page\u003C\u002Fstrong> — the PDF is generated in the browser; you read layout and logs. The assistant saying it is done is not the same as a PDF already existing.\u003C\u002Fp>\n\u003C\u002Fblockquote>\n\u003Cp>\u003Cimg src=\"\u002Fblog\u002Fai-latex-paper-cowriting\u002Fcover.webp\" alt=\"Core argument illustration\">\u003C\u002Fp>\n\u003Ch2>Why does editing a paper in chat scatter the structure?\u003C\u002Fh2>\n\u003Cp>Because a LaTeX paper is usually not one file. Main document, chapters, \u003Ccode>.bib\u003C\u002Fcode>, template, images each have paths; \u003Ccode>\\input\u003C\u002Fcode> and \u003Ccode>\\includegraphics\u003C\u002Fcode> depend on that tree. A chat window is one text blob. After the model edits, citation paths, figures, and custom commands easily stop lining up.\u003C\u002Fp>\n\u003Cp>Compile is a separate job. Changing source is not the same as getting a PDF: XeLaTeX has to run (especially with CJK), missing packages, unresolved cross-references, missing images all show up in the log. “I already fixed it” in chat only means the model emitted new text. \u003Cstrong>It does not mean this page has compiled successfully.\u003C\u002Fstrong>\u003C\u002Fp>\n\u003Cp>What you can do converting \u003Ccode>.tex\u003C\u002Fcode> to PDF without installing an environment is in \u003Ca href=\"\u002Fblog\u002Fp\u002Flatex-to-pdf-online\u002F\">LaTeX to PDF online\u003C\u002Fa>. The pipeline from writing formulas to submitting is in \u003Ca href=\"\u002Fblog\u002Fp\u002Flatex-paper-workflow\u002F\">LaTeX paper workflow\u003C\u002Fa>. This article only adds one link: how an assistant joins \u003Cstrong>this project’s\u003C\u002Fstrong> edits and compiles.\u003C\u002Fp>\n\u003Ch2>How do I let AI edit files against the project and trigger compile?\u003C\u002Fh2>\n\u003Cp>Open the \u003Ca href=\"\u002Flatex\u002Fedit\u002F\">LaTeX editor\u003C\u002Fa>, import a single file or a whole project, turn on Connect your AI, keep the tab open. The assistant should find the entry file first, then read the \u003Ccode>.tex\u003C\u002Fcode> \u002F \u003Ccode>.bib\u003C\u002Fcode> it needs to change, \u003Cstrong>prefer local replace\u003C\u002Fstrong>, and avoid one overwrite that wipes a paragraph you just tuned.\u003C\u002Fp>\n\u003Cp>One round can look like this — AI speeds one section; you decide pass\u002Ffail on the preview and the log:\u003C\u002Fp>\n\u003Cp>\u003Cstrong>You:\u003C\u002Fstrong>\u003Cbr>\nOnly change the introduction: explain how the capacitor voltage decays after the RC circuit is switched off. Leave equation numbers. Then compile on the current page.\u003C\u002Fp>\n\u003Cp>\u003Cstrong>Assistant:\u003C\u002Fstrong>\u003Cbr>\nLocal replace on the introduction is done, and compile is started. Check the right-hand preview and the log — if layout is off, point at the paragraph; if a package is missing, send the log and I will only fix that.\u003C\u002Fp>\n\u003Cp>Do not imagine the compile result — chat on the left, an arrow to the paper page on the right, source and preview already updated from that introduction round:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"\u002Fblog\u002Fai-latex-paper-cowriting\u002F02-ai-flow.en.webp\" alt=\"Chat on the left, MeTool LaTeX page on the right showing the preview\">\u003C\u002Fp>\n\u003Cp>Lightweight preview fonts may differ from the final PDF; that is an engine difference, not this round breaking the paper. Cowriting here means the paper is still alive in the project; you can still read the PDF and change details. Setup: \u003Ca href=\"\u002Fblog\u002Fp\u002Fconnect-ai-to-online-tools\u002F\">How do I let my current AI operate a web tool?\u003C\u002Fa>.\u003C\u002Fp>\n\u003Cp>Constraints on this page are project facts, not UI decoration:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Text files (\u003Ccode>.tex\u003C\u002Fcode>, \u003Ccode>.bib\u003C\u002Fcode>, common style files) can be read and written; a single file over the relay should stay under about \u003Cstrong>180 KiB\u003C\u002Fstrong> (envelope ~200 KiB). Larger chapters: edit in chunks.\u003C\u002Fli>\n\u003Cli>Images, fonts, and existing PDFs appear in the file tree but are \u003Cstrong>read-only\u003C\u002Fstrong>: bytes stay in the browser; the assistant cannot see pixels and cannot overwrite them over MCP.\u003C\u002Fli>\n\u003Cli>No remote delete, move, rename, or changing the entry file. Change structure on the page yourself, or have the assistant only edit citation paths.\u003C\u002Fli>\n\u003Cli>\u003Ccode>compile_document\u003C\u002Fcode> only \u003Cstrong>starts\u003C\u002Fstrong> compile and returns immediately — the browser may still be fetching the XeLaTeX engine. Whether the PDF is ready is when that item in the artifact list becomes ready, or when you read the on-page log.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>You can say:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>“Only the third paragraph of the introduction. Do not touch equation numbers.”\u003C\u002Fli>\n\u003Cli>“Change this bib entry’s year to 2024, then compile.”\u003C\u002Fli>\n\u003Cli>“The log says an environment is unclosed. Only fix that.”\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>After a successful compile, have the assistant list downloadable items: source is TEX for a single-file project, ZIP for multi-file; PDF is a separate item. You pick, then trigger the browser save. Setup: \u003Ca href=\"\u002Fblog\u002Fp\u002Fconnect-ai-to-online-tools\u002F\">How do I let my current AI operate a web tool?\u003C\u002Fa>. Whether CJK fonts and packages are enough still depends on the engine built into this page, not on the model promising “any template will pass.”\u003C\u002Fp>\n\u003Ch2>Which papers fit on-page cowriting, and which need local TeX?\u003C\u002Fh2>\n\u003Cp>Short drafts, ordinary templates, edits that need to see a PDF again and again — on-page cowriting. Heavy projects — a local distribution.\u003C\u002Fp>\n\u003Ctable>\n\u003Cthead>\n\u003Ctr>\n\u003Cth>Situation\u003C\u002Fth>\n\u003Cth>Better fit\u003C\u002Fth>\n\u003Cth>Why\u003C\u002Fth>\n\u003C\u002Ftr>\n\u003C\u002Fthead>\n\u003Ctbody>\n\u003Ctr>\n\u003Ctd>Homework, a course paper, a single draft\u003C\u002Ftd>\n\u003Ctd>Editor + AI local edits + compile\u003C\u002Ftd>\n\u003Ctd>Fast preview, no environment to install\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>A borrowed laptop, cannot install TeX Live\u003C\u002Ftd>\n\u003Ctd>Online project\u003C\u002Ftd>\n\u003Ctd>Local install is about 4–7 GB\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Hundreds of pages, deep subdirs, rare packages\u003C\u002Ftd>\n\u003Ctd>Local TeX\u003C\u002Ftd>\n\u003Ctd>The online engine may miss packages; the relay is a poor fit for giant files\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Lots of raw images the AI should “see and edit”\u003C\u002Ftd>\n\u003Ctd>You change figures on the page; AI only edits text\u003C\u002Ftd>\n\u003Ctd>Binaries are read-only\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>Only one formula as an image\u003C\u002Ftd>\n\u003Ctd>Formula editor page\u003C\u002Ftd>\n\u003Ctd>No need to compile the whole paper\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftbody>\n\u003C\u002Ftable>\n\u003Cp>Boundaries: one connection per current tab; after you close the page the assistant cannot keep compiling. Do not let the model invent image filenames that are not in the tree — missing figures fail compile. Cross-references sometimes need another compile pass; that is old TeX behavior, see \u003Ca href=\"\u002Fblog\u002Fp\u002Flatex-rerun-cross-references\u002F\">Why LaTeX has to run twice\u003C\u002Fa>. Whether an unpublished manuscript goes into the model you use is between you and your school or journal; the tool cannot decide that.\u003C\u002Fp>\n\u003Ch2>Wrap-up\u003C\u002Fh2>\n\u003Cp>AI editing a LaTeX paper should face the project, not the chat log: list files, locally edit text, start compile, read logs and the PDF. Do not dump the whole paper on the model to finish alone. Images stay read-only in the browser; downloads go through the local dialog. Short drafts and ordinary typesetting are worth cowriting this way; heavy projects and rare packages still belong on local TeX Live. The model saying it is done is not the same as a PDF already existing.\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},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M13 21h8m.174-14.188a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":30},"\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>",1787198018591]