User Preview: Compile & Deliver PDF
Compile the project and deliver the PDF to the user in chat.
SOP
Compile — Call
latex_compilewithmain_fileset to the project's main .tex file path (e.g.main.texorsubdir/main.tex). Useread_fileto locate it first if unsure.- If compilation fails, report the errors to the user and stop.
Send PDF — Extract the PDF filename from the
latex_compileresult and callsend_fileto deliver it.- Use a brief caption summarizing the result (e.g. success, warning count).
Report — Inform the user the PDF has been sent. Mention warning count if any.
- If the user requests changes, make edits and re-run this flow.
Notes
- The PDF path is relative to the project core directory, typically
main.pdf. - If
latex_compilereports warnings, mention the count in the caption — no need to list each one. - Never attempt to send a PDF without compiling first.