Skip to content

Choose the look of the PDF in Settings: paper, text size, typeface, margins, accent, numbering, date - #18

Merged
triggeredcode merged 3 commits into
mainfrom
pdf-style
Oct 12, 2026
Merged

triggeredcode merged 3 commits into
mainfrom
pdf-style

Conversation

@triggeredcode

Copy link
Copy Markdown
Owner

What

A new PDF look group in Settings. Everything defaults to the look PDFs always had.

Choice Options
Paper Auto (Letter in North America, A4 elsewhere), A4, Letter
Text size 10, 11, 12 pt
Typeface Latin Modern (the house style), Palatino, Times, Helvetica (TeX Gyre faces that come with the PDF engine)
Margins Narrow, Normal, Wide
Accent colour None, navy, teal, crimson, forest, plum (title and headings)
Headings Numbered or plain
Date under the title Show or hide
  • @lucid/kit: renderDocument takes a style; the choices go into the preamble of main.tex after the house style, so lucid.sty stays one fixed file, and a document without a style is byte for byte what it was. Figures are fitted to about the text area the style gives.
  • Desktop: kept in settings.json (an older file gets the house style), checked on save, applied to the next PDF at once.
  • A typeface other than Latin Modern is fetched the first time it is used (the Settings text says so).

Checked

  • Unit tests for the LaTeX each choice writes; Tectonic tests compile every typeface and all choices together and read back the embedded fonts, the A4 page size, the missing numbers and date.
  • New e2e pdf-look.spec.ts: chooses A4, 12 pt, Times, navy, plain, no date in the real window, makes a real PDF and reads those things back (mutation-checked: fails when the engine ignores the look).
  • Looked at real PDFs in three looks (house, Palatino/navy/narrow/A4, Helvetica/teal/wide/plain).
  • The guide's Settings picture (light and dark) is taken again, and the block-numbers e2e is scoped to its own group (the date has Show/Hide too).
  • Full e2e: 95 passed. Each commit passes typecheck, lint, format and unit tests.

Not in this PR

Editing the style file itself (the full template) and a dictation delay setting: next.

🤖 Generated with Claude Code

triggeredcode and others added 3 commits October 12, 2026 17:11
…, accent colour, numbering and date

renderDocument takes a style. The choices are written into the preamble of main.tex after the house style, so lucid.sty stays one
fixed file, and a document with no style is exactly what it was. The typefaces are Latin Modern (the house style) and three
TeX Gyre faces (Palatino, Times, Helvetica) that the PDF engine brings along. Figures are fitted to about the size of the text area
the style gives. Unit tests cover the LaTeX each choice writes, and the Tectonic tests compile every typeface and all choices together
and check the embedded fonts, the A4 page size, the missing numbers and the missing date.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Settings has a "PDF look" group: paper (Auto picks Letter or A4 by the country of the computer), text size, typeface, margins,
accent colour, numbered or plain headings, and the date under the title. The choices are kept in settings.json (a file from before
has the house style), checked when saved, handed to the PDF engine at once, and the diagrams are fitted to the text area they give.
The defaults are the look PDFs always had. An end-to-end test chooses A4, 12 pt, Times, navy, plain headings and no date, makes a
real PDF and reads the paper, the embedded font, the missing number and the missing date back from it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Settings picture of the guide (light and dark) is taken again with the new group, and its list says what each choice does.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@triggeredcode
triggeredcode merged commit 59c3cb0 into main Oct 12, 2026
4 checks passed
@triggeredcode
triggeredcode deleted the pdf-style branch October 12, 2026 15:40
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.

1 participant