2

I am writing text in Maltese, and UNICODE char U+0127 ħ is not supported by default. To bypass this I redefined the hbar to be upright, as instructed here: https://tex.stackexchange.com/questions/527065/how-to-typeset-upright-ħ

\AtBeginDocument{\renewcommand*{\hbar}{{\mkern-1mu\mathchar'26\mkern-8mu\mathrm{h}}}} 

The issue is that the spacing between the \hbar and the previous character is not sufficient, as seen in the figures.

enter image description here

enter image description here

enter image description here

Is there a way for me to edit the definition of the \hbar or otherwise, in order to introduce correct spacing please?

2 Answers2

4

The character is in the default latin modern font used by lualatex or xelatex, so with lualatex for example

enter image description here

\documentclass{article}

\begin{document}

nagħmel

\end{document}

with pdftex you can define the character to use the crossed h from the tipa package for phonetic symbols

enter image description here

\documentclass{article}
\usepackage{tipa}
\DeclareUnicodeCharacter{0127}{\textcrh}
\begin{document}

nagħmel

\end{document}

David Carlisle
  • 757,742
3

I suggest you use lualatex, in a modern distribution you can simply do:

\documentclass{article}
\usepackage{babel}
\babelprovide[import, main]{maltese}
\begin{document}
% text from https://en.wikipedia.org/wiki/Maltese_language
L-Unjoni hija bbażata fuq il-valuri tar-rispett għad-dinjità tal-bniedem,
il-libertà, id-demokrazija, l-ugwaljanza, l-istat tad-dritt u r-rispett
għad-drittijiet tal-bniedem, inklużi d-drittijiet ta' persuni li jagħmlu parti
minn minoranzi. Dawn il-valuri huma komuni għall-Istati Membri f'soċjetà fejn
jipprevalu l-pluraliżmu, in-non-diskriminazzjoni, it-tolleranza, il-ġustizzja,
is-solidarjetà u l-ugwaljanza bejn in-nisa u l-irġiel.
\end{document}

Maltese text rendering

Rmano
  • 40,848
  • 3
  • 64
  • 125