Fall back to browser print-to-PDF when remote LaTeX compilers are unavailable#18
Draft
Fall back to browser print-to-PDF when remote LaTeX compilers are unavailable#18
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On GitHub Pages (static hosting), the
/api/*compiler proxies don't exist. WhenVITE_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 toexportViaBrowserPrint()instead of showing an error dialog.github/workflows/deploy-pages.yml: SetVITE_USE_WASM_LATEXto'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.