Skip to content

Releases: filip-cokesh/mdprint

v0.10.0

Choose a tag to compare

@filip-cokesh filip-cokesh released this 27 Oct 19:00
c33f727

Added

  • [toc] numbering = false turns off the "2.1" counters in the TOC, for
    documents whose headings carry their own numbers (#17).
  • [toc] depth (1–6, default 3) sets the deepest heading level in the
    TOC (#17).
  • --toc-pages warns about TOC / list entries whose anchor is missing in
    the measured PDF instead of silently leaving them without a number (#17).

Fixed

  • Print: code blocks were double-spaced — the newline between per-line
    spans added an empty line under pre-wrap (#16).
  • Print: the line-continuation backslash in bash blocks was set on its own
    line — syntect gives it the class line, which matched the print rule
    for mdprint's line spans (#15).

Security

  • rustls 0.23.46 (used by --fetch) after a Dependabot security alert.
  • Release binaries carry GitHub build provenance attestations
    (gh attestation verify mdprint-<version>-<target>.zip --repo filip-cokesh/mdprint); CI actions are pinned to commit SHAs and the
    crate is published via crates.io Trusted Publishing.

Changed

  • Dependencies: comrak 0.55, minijinja 3, toml 1.1, base64 0.23 and patch
    updates; output is unchanged apart from the fixes above.
  • Demo documents and PDFs in docs/ regenerated.

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 22 Oct 07:24

Added

  • Equation numbering (LaTeX syntax): \label{eq:x} anywhere in a
    display formula gives it a number, typeset by KaTeX as \tag on the
    right. By default only labelled equations are numbered
    ([equations] numbering = "labeled"); "all" numbers every $$…$$
    with \notag / \nonumber as opt-out. An equation with its own \tag
    keeps it.
  • Cross-references in text: \ref{x} → bare number, \eqref{eq:x}
    → "(3)", \autoref{x} → localized prefix + number ("rovnice (3)",
    "Obr. 2", "Tab. 1" / "Eq. (3)", "Fig. 2", "Table 1" / "Gl. (3)",
    "Abb. 2", "Tab. 1"), all as links. Figures take a label via
    ![…](img.png){#fig:x}; unknown or duplicate labels fail the build
    with the source line.
  • Table captions: a paragraph starting with Table: / Tabulka: /
    Tabelle: immediately before a table becomes its caption above the
    table ("Tab. 1: …"), optionally labelled with a trailing {#tbl:x}.
    Prefix configurable via [tables] prefix.
  • List of figures / list of tables (--lof, --lot; front matter
    lof: / lot:; [figures] list, [tables] list) at the end of the
    document, on a new page in print. With --toc-pages they get measured
    page numbers from the same headless render as the TOC.
  • Figures, captioned tables and numbered equations carry id anchors
    (label, or fig-N / tab-N / eq-N).

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 04 Oct 11:47

Fixed

  • Headless browser could hang on macOS (--pdf, --toc-pages): a
    fresh browser profile touched the Keychain and never finished. The
    browser now starts with a mock keychain and without background
    services; a complete PDF that stops growing is accepted even if the
    process does not exit, and failures quote the browser's own output.
    0.8.0 was not published to crates.io because of this

v0.8.0 (superseded by v0.8.1)

Pre-release

Choose a tag to compare

@github-actions github-actions released this 04 Oct 11:34

Warning

Superseded by v0.8.1 — please use that instead.
On macOS the headless browser used by --pdf and --toc-pages could hang (fresh profile waiting on the Keychain).
0.8.0 was never published to crates.io; cargo install mdprint gives 0.8.1.

Added

  • Page numbers in print: "3 / 8" bottom right on every page (CSS
    @page margin box, Chrome/Edge 131+). On by default; turn off with
    --no-page-numbers or page_numbers = false
  • Page references in the table of contents (--toc-pages): the
    document is laid out in headless Chrome/Edge in all three font sizes,
    the page of every heading is read from the PDF's named destinations
    and written into the TOC with dot leaders. Print shows the set that
    matches the selected font size. Without a browser mdprint warns and
    keeps the TOC without numbers
  • PDF export: --pdf writes <name>.pdf next to the HTML in the
    configured font size, --pdf=all writes one PDF per font size
  • Initial font size: --font-size, font_size in front matter or
    [print] sets which A/A/A option starts selected (and the --pdf size)
  • [print] section in mdprint.toml (page_numbers, toc_pages,
    font_size, browser); browser path also via --browser or
    MDPRINT_BROWSER

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 02 Oct 18:29

Fixed

  • Broken math layout: fractions, sub/superscripts, limits and \vec
    arrows overlapped or were misplaced, because the embedded KaTeX 0.18 CSS
    uses prefixed class names (.katex-sizing, .katex-strut, …) that the
    katex-rs 0.2 renderer did not emit. A regression test now checks that
    every layout-critical class emitted by the renderer has a CSS rule

Changed

  • Math renderer upgraded to katex-rs 0.3.0, which matches KaTeX 0.18
    (embedded CSS and fonts stay at KaTeX 0.18.5)

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 18:56

Added

  • Dark theme for code blocks: in dark mode, fenced code is now
    highlighted with Base16 Ocean Dark on a matching dark panel instead of
    staying a light island. Print always keeps the light InspiredGitHub
    theme, whatever the on-screen mode

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 18:48

Added

  • Configurable math size: a [math] section in mdprint.toml with
    inline and display (em relative to the surrounding text, range
    0.5–2.0; defaults 0.95/1.0 stay calibrated for Libertinus). The
    page-fit shrink of over-wide formulas in print scales along, so
    enlarged math still fits the page

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 12 Sep 18:26

Added

  • Font-size switcher (A/A/A next to the theme toggle, CSS-only, no
    JavaScript): small (−12.5 %) / default / large (+15 %) type. The choice
    applies to screen and print alike (large prints at 12 pt, small at
    9.5 pt), the selected A is shown bold, and the controls themselves never
    appear in print. Line wrapping and hyphenation reflow naturally — soft
    hyphens are part of the text, so no re-rendering is needed

Changed

  • Tooltips of the theme and font-size switchers are localized (cs/en/de);
    the theme tooltip was previously hard-coded Czech

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 11 Sep 11:40

Added

  • Footer links in template packs ([[links]] in pack.toml): label,
    URL and an optional SVG/PNG icon from the pack folder, rendered as a row
    of links in the branded footer. Icons are inlined as data URIs; monochrome
    icons are inverted to white in dark mode. Icon paths get the same
    inside-the-pack guard as fonts
  • A forkable starter pack:
    mdprint-pack-starter

v0.3.3

Choose a tag to compare

@github-actions github-actions released this 07 Sep 07:32

Fixed

  • Tall glyphs in display math (integral signs, sum limits) could get
    clipped on screen at certain zoom levels: the horizontal-scroll container
    (overflow-y: hidden) cut off glyph ink extending past its 0.1em
    padding. The scroll container now carries generous inner vertical
    padding (with the outer margin reduced to keep the rhythm), so glyph
    ink always fits inside the clip edge