Skip to content

Loading luamml breaks math hat alignment #21

@ed359

Description

@ed359

Loading luamml changes math hat alignment in some interesting way that depends on whether one uses \hat f or \hat{f} syntax. The issue persists over various fonts, but it's easiest to see with the following minimal example.

% !TEX program = lualatex
\documentclass{article}

\usepackage{unicode-math}
\usepackage{luamml}

\begin{document}

$\hat f$ should look exactly like $\hat{f}$

\end{document}

Here's a screenshot of the output, showing the misalignment of the second syntax for the f-with-hat.

Image

Commenting out the line \usepackage{luamml} results in the correct appearance of the second f-with-hat.

I'm compiling on a mac January 26 2026 with a fully-updated texlive 2025 install, some relevant lines from the log include

This is LuaHBTeX, Version 1.22.0 (TeX Live 2025)  (format=lualatex 2026.1.23)  26 JAN 2026 15:27
...
Package: luamml 2025-10-20 v0.7.0 Automatically generate presentational MathML 

I encountered this issue while experimenting with tagging. Originally I triggered it by including \DocumentMetadata with tagging=on and other settings that caused luamml to be loaded.

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