Skip to content

Commit 24a61f2

Browse files
committed
frontend/latex/output: add summary for included documents, figure out how to zoom the font size, and several minor tweaks
1 parent 2715f12 commit 24a61f2

File tree

8 files changed

+407
-102
lines changed

8 files changed

+407
-102
lines changed

src/AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This file provides guidance to Claude Code (claude.ai/code) and also Gemini CLI
1717
- All .js and .ts files are formatted by the tool prettier
1818
- Add suitable types when you write code
1919
- Follow DRY principles!
20+
- TypeScript: prefer `var1 ?? var2` for fallbacks. only use `var1 || var2` in explicit or-chains or when necessary.
2021
- Variable name styles are `camelCase` for local and `FOO_BAR` for global variables. React Components and Classes are `FooBar`. If you edit older code not following these guidelines, adjust this rule to fit the file's style.
2122
- Some older code is JavaScript or CoffeeScript, which will be translated to TypeScript
2223
- Use ES modules (import/export) syntax, not CommonJS (require)

src/packages/frontend/cspell.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@
1212
"bioinformatics",
1313
"CoCalc",
1414
"conat",
15+
"documentclass",
1516
"dplyr",
1617
"dstream",
18+
"emph",
1719
"errorstopmode",
1820
"formatjs",
1921
"geospatial",
@@ -54,20 +56,25 @@
5456
"SocketIO",
5557
"splitlines",
5658
"statsmodels",
59+
"subsection",
60+
"subsubsection",
5761
"syncdb",
5862
"syncdoc",
5963
"syncstring",
6064
"synctable",
6165
"synctables",
6266
"synctex",
67+
"textbf",
68+
"textit",
69+
"textsc",
6370
"tidymodels",
6471
"tidyverse",
6572
"tikz",
6673
"timetravel",
6774
"tolerations",
75+
"undelete",
6876
"xelatex",
6977
"xetex",
70-
"undelete",
7178
"undeleting"
7279
],
7380
"ignoreWords": [
@@ -79,6 +86,7 @@
7986
"flyouts",
8087
"immutablejs",
8188
"ipynb",
89+
"isabs",
8290
"isdir",
8391
"kernelspec",
8492
"LLM",

src/packages/frontend/frame-editors/frame-tree/title-bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ export function FrameTitleBar(props: FrameTitleBarProps) {
12151215
props.page == null ||
12161216
props.pages == null ||
12171217
manageCommands.isExplicitlyHidden("page") ||
1218-
props.type === "latex-output"
1218+
props.type === "output"
12191219
) {
12201220
// do not render anything unless both page and pages are set
12211221
// also don't render for latex output panels (they have their own page controls)

src/packages/frontend/frame-editors/latex-editor/actions.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1843,12 +1843,14 @@ export class Actions extends BaseActions<LatexEditorState> {
18431843

18441844
set_font_size(id: string, font_size: number): void {
18451845
if (this._is_output_panel(id)) {
1846-
// This is for the PDF viewer in output panel, not a regular frame.
1846+
// This is for the output panel UI, not a regular frame.
18471847
// We store its font size in the local_view_state.
18481848
const local_view_state = this.store.get("local_view_state");
18491849
this.setState({
18501850
local_view_state: local_view_state.setIn([id, "font_size"], font_size),
18511851
});
1852+
// Save the state change
1853+
this.save_local_view_state();
18521854
} else {
18531855
super.set_font_size(id, font_size);
18541856
this.update_gutters_soon();

src/packages/frontend/frame-editors/latex-editor/editor.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ const output: EditorDescription = {
191191
stop_build: true,
192192
download: false,
193193
download_pdf: true,
194+
decrease_font_size: true,
195+
increase_font_size: true,
194196
},
195197
buttons: set([
196198
"build",

0 commit comments

Comments
 (0)