Skip to content

merge: develop → main#19

Merged
JheisonMB merged 30 commits into
mainfrom
develop
Jul 10, 2026
Merged

merge: develop → main#19
JheisonMB merged 30 commits into
mainfrom
develop

Conversation

@JheisonMB

Copy link
Copy Markdown
Collaborator

Release: all develop changes merged to main.

JheisonMB and others added 26 commits April 10, 2026 08:52
REGISTRY_REPO still targeted the old JheisonMB/texforge-templates, which only
resolved via GitHub's 301 redirect. Point it at UniverLab/texforge-templates.
Verified template list --all and template add download from the new registry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diagram pipeline (src/diagrams/mod.rs):
- Cache rendered PNGs by content hash ({env}-{hash}.png), skipping re-render of
  unchanged diagrams across rebuilds (notably under --watch).
- Build the resvg font database once via a shared OnceLock instead of per diagram
  (scanning /mnt/c/Windows/Fonts over WSL 9P was slow).
- Raise rasterization from 1.5x to 3x (~300 dpi at \linewidth) for print quality.
- Fix invalid default \includegraphics[\linewidth] -> width=\linewidth.

Windows / TLS:
- Use TECTONIC_BIN (tectonic.exe on Windows) for the managed binary path so the
  installed tectonic is actually located and executable.
- Switch reqwest off aws-lc-rs to rustls+ring (rustls-no-provider + ring provider
  installed in main), removing the C-toolchain dependency that broke Windows/musl
  builds. Verified aws-lc-sys leaves the tree and HTTPS downloads still work.

Build/assets:
- Output the PDF as <title>.pdf in the project root from a temp build dir.
- Unify sanitize_filename in utils; clean removes the output PDF + legacy build/.
- mirror_assets symlinks nested assets next to .tex files (absolute targets).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add a \begin{d2}...\end{d2} environment that renders like mermaid and graphviz:
same options (width, height, scale, pos, caption, label, keepaspectratio),
same hash-based PNG caching, same figure output.

- Render via d2-little (pure-Rust port of the d2lang pipeline, MPL-2.0) to SVG,
  then through the existing svg_to_png path. No external binary, matching the
  self-contained philosophy of the mermaid/graphviz renderers.
- D2 embeds its fonts as @font-face WOFF, which usvg ignores, so its text relies
  entirely on the sans-serif fallback. Harden configure_sans_serif_family to fall
  back to any available family so D2 text never silently disappears.
- Linter checks \begin{d2} blocks for unclosed envs and invalid pos, like the
  other diagram types.
- Verified end to end: D2 renders node/edge labels and the figure embeds in the
  compiled PDF (Image XObject), alongside mermaid in the same document.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Rewrite the formatter to indent by real nesting depth — environments
(\begin/\end) plus unbalanced braces/brackets — fixing nested
environments that were left flush-left while their content floated
deeper. The scan is comment- and escape-aware, paragraph text is never
reflowed, and verbatim-like environments pass through untouched. The
result is idempotent and non-semantic (formatted output yields a
byte-identical PDF body).

Also format .bib files: one field per line, 2-space indent, aligned `=`,
lowercased entry types and field names, trailing comma after every field.
Conservative — unparseable .bib files are returned unchanged rather than
risk corrupting references. Wire both into `texforge fmt` via
utils::find_bib_files.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`texforge template list` now queries the remote registry by default so
users discover available templates without knowing a flag exists. The old
`--all` flag is replaced by `--local`, which restricts output to installed
templates (and skips the network call).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Wire the existing (previously dead-code) placeholder resolver into
`texforge new`: parse the template's manifest, resolve {{name}} tokens
from defaults, project config, and user config, and substitute them in
generated .tex files. Lenient by design — unresolved tokens are left
untouched and non-.tex files (code samples, images) are copied verbatim,
so token-free templates like `general` are unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
docs: initial docs, SHA256 checksums, demo artifacts
@JheisonMB JheisonMB added the target:main Targets the main branch label Jul 10, 2026
chore: bump version to 0.7.0, fix d2-little yanked dep
@JheisonMB JheisonMB merged commit 043e8c7 into main Jul 10, 2026
4 checks passed
@JheisonMB JheisonMB deployed to production July 10, 2026 16:32 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target:main Targets the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant