             The unicodehat package
          Precomposed Unicode circumflex letters in mathematics

File:       README
Author:     Moritz R. Schäfer
Repository: https://gitlab.com/m0m097/latex-pkgs
Bugs:       https://gitlab.com/m0m097/latex-pkgs/-/issues

DESCRIPTION
===========

Maps all precomposed Unicode Latin letters bearing a single circumflex
accent to the corresponding hatted letters in mathematics, while
preserving the original characters in text. Intended for directly typed
quantum-mechanical operator notation.

Copyright:  (C) 2024--2026 Moritz R. Schäfer
Licence:    lppl1.3c

USAGE
=====

   Compile with LuaLaTeX or XeLaTeX:

   \documentclass{article}
   \usepackage{fontspec}
   \usepackage{unicodehat}
   \begin{document}
   Text: Ĥ. Mathematics: $Ĥ = Ê$.
   \end{document}

   The 26 mappings cover 13 basic Latin letters in both cases. Only
   precomposed characters are supported: H followed by U+0302 (COMBINING
   CIRCUMFLEX ACCENT) is not equivalent input to Ĥ (U+0124). For combining
   sequences with LuaLaTeX, use luamathaccents:
   https://ctan.org/pkg/luamathaccents

FILES IN DISTRIBUTION
=====================

   README                 This file.
   unicodehat.dtx  Documented source.
   unicodehat.ins  Docstrip installer (generated by make).
   unicodehat.sty  Runtime package file.
   unicodehat.pdf  User manual and implementation.

BUILDING
========

   In this directory, run:

      make sty   Extract the runtime .sty file.
      make doc   Build the manual using LuaLaTeX and latexmk.
      make       Build the distribution archive using ctanify.

   The repository generates the installer from templates/template.ins.
   From a distribution archive, extract the runtime file with:

      latex unicodehat.ins

   Build the manual with:

      latexmk -lualatex unicodehat.dtx

BASIC INSTALLATION
==================

   Place unicodehat.sty in a directory searched by TeX.
   On a TDS compliant system, use:

      <texmf>/tex/latex/unicodehat/
         unicodehat.sty

      <texmf>/source/latex/unicodehat/
         unicodehat.ins
         unicodehat.dtx

      <texmf>/doc/latex/unicodehat/
         README
         unicodehat.pdf
