template: Thai bilingual support, visuals, citations, and authoring spec#3
Conversation
- Thai font fallback in src/style.typ; CI installs fonts-thai-tlwg so -th sibling files render instead of showing tofu - editorial header (eyebrow, accent rule), two-tone section headings, brand/page footer, end-of-solution mark, and hyphenation - adaptive section menu with Answer / Idea / Application; equations are unnumbered by default - components: cite() for linked theorem references, diagram() for CeTZ figures, plus answer() and numbered() helpers - build-index: drop the difficulty column and skip -th siblings - docs/CONVENTIONS: bilingual sibling naming and a sourcing-results invariant
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughFour new Typst helper components ( ChangesAuthoring Overhaul
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/AUTHORING.md`:
- Around line 12-15: The fenced code block containing the "Problem Statement →
Answer → Setup & Notation → Idea → Solution → Verification → Reflection →
Application" statement is missing a language identifier, which violates the
MD040 linting rule. Add a language tag (such as `text`) immediately after the
opening triple backticks to specify the code block language and satisfy the
linter requirements.
- Line 103: The documentation at line 103 in AUTHORING.md references a `summary`
field that no longer exists in the current template metadata. Remove the mention
of the `summary` field from this line to prevent misleading authors about
available metadata fields. Keep only the accurate guidance about the fields that
are actually exposed in the current template.
In `@docs/CONVENTIONS.md`:
- Around line 69-72: The fenced code block in the CONVENTIONS.md file at the
location showing the example filenames (calc-001-gamma-integral.typ and
calc-001-gamma-integral-th.typ) is missing a language tag, which triggers the
MD040 linting rule. Add a language identifier after the opening triple backticks
of this code fence by specifying "text" as the language tag to indicate it is
plain text content.
- Around line 75-79: The phrase "so no script or CI change is needed" on line 75
is ambiguous and conflicts with the later mention of "CI installs them via
`fonts-thai-tlwg`". Clarify the scope by narrowing the statement to explicitly
indicate that no script or CI change is needed specifically for filename
validation (the make new numbering step), while acknowledging that font
installation via CI is already handled separately. Revise the wording to make it
clear that the "no change needed" only applies to the make new process, not to
the existing CI font installation.
In `@problems/_TEMPLATE.typ`:
- Line 6: The checklist comment on line 6 currently only references the
URL-based citation form with `cite(name, url:)`, but the template also supports
offline citations using `cite(name, ref: [...])`. Update the comment to
explicitly mention both citation forms so authors understand that either URL
citations or offline references (for books/papers) are acceptable citation
methods, removing the implication that only URL citations are supported.
In `@src/style.typ`:
- Around line 24-29: The comment in the font declaration block incorrectly
states that missing fonts are skipped with a harmless warning. Replace this
inaccurate statement with an accurate description of Typst's actual font
fallback behavior: when fallback is enabled (the default), missing fonts are
silently substituted with the best available match without generating warnings;
when fallback is disabled, missing glyphs render as replacement boxes instead.
Keep the accurate information about Norasi being provided by the fonts-thai-tlwg
package and the other font names.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f4834a9e-52c3-425c-a01d-1fd6134719d0
📒 Files selected for processing (9)
.github/workflows/ci.ymlREADME.mddocs/AUTHORING.mddocs/CONVENTIONS.mdproblems/_TEMPLATE.typscripts/build-index.shsrc/components.typsrc/style.typsrc/template.typ
What & why
Lays the foundation every problem file needs: Thai rendering, a consistent
visual language, a citation/diagram toolkit, and the authoring spec that
documents all of it. Without this,
-thsiblings show tofu, there's noenforced way to link theorems, and the header/footer are inconsistent.
Closes #2
Changes
Rendering
src/style.typ: Thai font fallback (fonts-thai-tlwg); CI installs it so-thsiblings render correctlysrc/template.typ: editorial header (eyebrow + accent rule), two-tone section headings, brand/page footer, end-of-solution mark, hyphenation; equations unnumbered by default; section menu adapts to what's usedToolkit (
src/components.typ)cite(name, url:/ref:)— link a named result; no-source → red[ref?]diagram(body, caption:)— CeTZ figure wrapperanswer(),numbered()helpersIndex + docs
scripts/build-index.sh: drops the difficulty column; skips-thsiblingsdocs/CONVENTIONS.md: bilingual sibling naming, sourcing-results invariantdocs/AUTHORING.md: full authoring spec (section order, quality bar, bilingual rules, tool reference)problems/_TEMPLATE.typ: updated for new environments and section menuChecklist
make compile P=<topic>-###(every problem file compiles standalone;mainstays green)make indexafter touching metadataNotes
_TEMPLATE.typis the best place to review how the new environments fit together.Screenshots of the rendered header/footer before and after are worth attaching.
Summary by CodeRabbit
New Features
Documentation
Chores