Skip to content

Fall back to browser print-to-PDF when remote LaTeX compilers are unavailable#18

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-latex-engine-issue
Draft

Fall back to browser print-to-PDF when remote LaTeX compilers are unavailable#18
Copilot wants to merge 2 commits intomainfrom
copilot/fix-latex-engine-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 12, 2026

On GitHub Pages (static hosting), the /api/* compiler proxies don't exist. When VITE_USE_WASM_LATEX=false, the export flow tries latexonline.cc and rtex, both fail, and the user gets an error alert with no fallback. The print-to-PDF fallback only existed inside the WASM code path.

Changes

  • src/App.jsx: When both latexonline.cc and rtex fail or are disabled, fall back to exportViaBrowserPrint() instead of showing an error dialog
  • .github/workflows/deploy-pages.yml: Set VITE_USE_WASM_LATEX to 'false' — no WASM engine module is configured, so 'true' just triggers the "No in-browser LaTeX engine configured" message unnecessarily

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

…ailable on GitHub Pages

When VITE_USE_WASM_LATEX=false and deployed to GitHub Pages (static hosting),
both latexonline.cc and rtex proxy endpoints are unavailable. Previously this
showed an error; now it gracefully falls back to browser print-to-PDF.

Also set VITE_USE_WASM_LATEX=false in deploy-pages.yml since no WASM engine
module is configured, avoiding the confusing "No in-browser LaTeX engine
configured" message.

Co-authored-by: InMDev <48659591+InMDev@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix in-browser LaTeX engine configuration issue Fall back to browser print-to-PDF when remote LaTeX compilers are unavailable Mar 12, 2026
Copilot AI requested a review from InMDev March 12, 2026 21:04
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