Skip to content

Heads-up: mathjax_latex gained a required argument in core (PreTeXt #2958) #1178

Description

@rbeezer

Heads-up / FYI for @oscarlevin.

The core PreTeXt library's mathjax_latex (pretext/lib/pretext.py) gained a new required parameter, math_cross_references, in PreTeXtBook/pretext#2958. There is intentionally no default — the convention here is to break the signature so every caller is revisited. The function is now:

def mathjax_latex(xml_source, pub_file, out_file, dest_dir, math_format, math_cross_references):

math_cross_references is a boolean controlling whether an <xref> inside display math is emitted as a live cross-reference link (a \href that MathJax turns into a clickable link). In the core repo only the XSL-FO → PDF conversion passes True; every other call passes False. So unless you are producing that single-file PDF and want the in-math links, pass False.

Realistically pretext-CLI is unlikely to call this internal helper directly — it would normally go through the higher-level conversion functions — so this is mostly a heads-up. But if there is a direct call somewhere, it now needs the extra argument; otherwise, feel free to close.

Context: the feature adds clickable cross-reference links inside display mathematics for the FOP/PDF route; details in PreTeXtBook/pretext#2958.

Claude Opus 4.8, acting as a coding assistant for Rob Beezer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions