Directory macros/latex/contrib/pdfmathaccents
pdfmathaccents
Version 1.0 (2026/07/27)
Type accented mathematical symbols directly in your source file using Unicode combining characters. With pdfmathaccents loaded, the two-character sequence x + U+0302 (combining circumflex accent) — which your editor displays as an accented letter — is typeset in math mode as \hat x, and likewise for fifteen other combining characters (grave, acute, tilde, macron, breve, dot, diaeresis, caron, ring, vector arrow, and more).
This is the pdfLaTeX companion of the luamathaccents package. Under LuaLaTeX, use luamathaccents instead; it supports more combining characters and is less invasive. pdfmathaccents works by making letters and digits math-active so that they can inspect the following token — pdfTeX cannot rewrite the input line the way LuaTeX does.
Usage
\usepackage{pdfmathaccents}
The conversion is active from that point on, in math mode, for base characters that are ASCII letters or digits. \PdfMathAccentsOff and \PdfMathAccentsOn disable and re-enable it mid-document.
Only decomposed (NFD) sequences are recognized. If a precomposed (NFC) accented character — the usual result of an editor silently normalizing a combining sequence — shows up in math mode, the package issues a warning naming the likely cause before the standard LaTeX error that follows.
See pdfmathaccents-doc.pdf for the full list of supported combining characters and some caveats.
Development happens at https://github.com/NittanyLion/pdfmathaccents; please report bugs there.
Installation
The package is contained in the single file pdfmathaccents.sty. For a TDS-compliant installation, place the files as:
tex/latex/pdfmathaccents/pdfmathaccents.stydoc/latex/pdfmathaccents/pdfmathaccents-doc.texdoc/latex/pdfmathaccents/pdfmathaccents-doc.pdfdoc/latex/pdfmathaccents/README.md
The documentation is built with pdflatex pdfmathaccents-doc.tex (run twice).
License
Copyright 2026 Joris Pinkse.
This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c of this license or (at your option) any later version. This work has the LPPL maintenance status "maintained"; the current maintainer is Joris Pinkse (pinkse@gmail.com).
Download the contents of this package in one zip archive (308.8k).
pdfmathaccents – Use Unicode combining accents in math input with pdfLaTeX
This package lets you type accented mathematical symbols directly in your source file using Unicode combining characters. With the package loaded, a base character (an ASCII letter or digit) followed by a supported combining character (for instance “x” + U+0302, combining circumflex accent) is typeset in math mode as the corresponding accent command (\hat x), and likewise for fifteen other combining characters.
It is the pdfLaTeX companion of the luamathaccents package: pdfTeX cannot rewrite the input line the way LuaTeX does, so this package instead makes letters and digits math-active so that they can inspect the following token.
| Package | pdfmathaccents |
| Repository | |
| Version | 1.0 2026-07-27 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Joris Pinkse |
| Maintainer | Joris Pinkse |
| Contained in | TeX Live as pdfmathaccents |
| Topics | Unicode Maths |