Improve LaTeX editor save, compile, and editing assistance#99
Open
SmallSpider0 wants to merge 5 commits into
Open
Improve LaTeX editor save, compile, and editing assistance#99SmallSpider0 wants to merge 5 commits into
SmallSpider0 wants to merge 5 commits into
Conversation
Add debounced autosave, Ctrl/Cmd+S handling, save failure status, lifecycle protection, and race-safe dirty-state handling for the LaTeX editor. Update localized UI strings and workflow docs.
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.
Summary
Ctrl/Cmd+Sor theSavebutton saves the active LaTeX file and, by default, starts one PDF compile after the save succeeds.Auto compile on savetoggle so users can disable manual-save-triggered compilation per LaTeX project..texand.bibfiles no longer render as plaintext.Root Cause
The LaTeX editor previously depended mainly on manual save and compile actions. This made it easy to lose recent edits if the user refreshed, switched files, or forgot to save before compiling. It also allowed save/compile ordering problems where the build could use stale content or the wrong main file.
At the editor layer, Monaco was mounted with
plaintextand only bare custom language IDs were registered at runtime. As a result, Monaco had no useful tokenizer, comment configuration, bracket/autoclose behavior, or rich completion behavior for LaTeX and BibTeX.Fix
Ctrl/Cmd+Shandling for the LaTeX editor.SaveandCtrl/Cmd+Ssave first.Auto compile on savetoggle, defaulting to enabled.main_file_idinto LaTeX compile requests so the selected main file is compiled consistently.Testing
git diff --checknpm --prefix src/ui run buildpython -m compileall src/deepscientist