3

ISO 15919 requires two Tamil letters, ற and ழ, to have lines below the letters like ṟ and ḻ in Romanized transliteration.

I want to use Minion Pro for this document because it is used elsewhere but it does not contain these glyphs.

I have tried generating these in accordance with this schema.

However, it does not work: a failed minimum working example is shown below:

\documentclass{article}
\usepackage{fontspec}
\usepackage{newunicodechar}
\setmainfont{Minion Pro} % Does not have the glyphs Ḻ  ḻ Ṟ  ṟ

% See egreg's example at:
% https://tex.stackexchange.com/questions/84523/how-to-generate-compounded-diacritical-fonts-for-sanskrit-with-xetex-and-luatex

\makeatletter
\let\d\relax
\DeclareRobustCommand{\d}[1]
   {\hmode@bgroup
    \o@lign{\relax#1\crcr\hidewidth\ltx@sh@ft{-1ex}.\hidewidth}\egroup}
\let\.\relax
\DeclareRobustCommand{\.}[1]{\accent"02D9#1}
\DeclareRobustCommand{\MACRON}[1]{\accent"AF#1}
\DeclareRobustCommand{\MACRONBELOW}[1]{\accent"0331#1} % Added by Chandra
\makeatother

\newunicodechar{Ḻ}{\MACRONBELOW{L}}
\newunicodechar{ḻ}{\MACRONBELOW{l}}
\newunicodechar{Ṟ}{\MACRONBELOW{R}}
\newunicodechar{ṟ}{\MACRONBELOW{r}}

\begin{document}
%
Ḻ  ḻ Ṟ  ṟ

\underline{R} ā
%
\end{document}

The "tofu" results "Tofu latter and comparison between underling and macron. are shown in the attached image. \underline{R} does work but the line below is thin compared to the line above in a properly formed a-macron: see image for comparison.

The accents.sty package does provide the \underaccent command but it works in math mode and I need something for text outside of math.

I am looking for a way to generate these letters repeatably and conveniently. How could I go about this, please?

chandra
  • 3,084

1 Answers1

4

Minion Pro has a very short supply of accents and combining characters.

Here's a workaround for the macron below.

\documentclass{article}
\usepackage{fontspec}
\usepackage{newunicodechar}
\setmainfont{Minion Pro} % Does not have the glyphs Ḻ  ḻ Ṟ  ṟ

\DeclareRobustCommand{\MACRONBELOW}[1]{%
  \leavevmode\vtop{%
    \halign{%
      \hfil##\hfil\cr
      #1\cr
      \noalign{\nointerlineskip}
      \raisebox{-1.25ex}[.3ex][0pt]{\char"AF}\cr  
    }%
  }%
}

\newunicodechar{Ḻ}{\MACRONBELOW{L}}
\newunicodechar{ḻ}{\MACRONBELOW{l}}
\newunicodechar{Ṟ}{\MACRONBELOW{R}}
\newunicodechar{ṟ}{\MACRONBELOW{r}}

\begin{document}

Ḻ  ḻ Ṟ  ṟ \fboxsep=0pt\fbox{Ḻ}

L l R r

L l R r

\end{document}

enter image description here

egreg
  • 1,121,712
  • That is swell; thank you @egreg. Am I right in guessing that you have constructed the macron below by translating the regular macron downwards, presumably because the U+0331 does not exist in Minion Pro. How might I find out if a combining character is missing from a font? – chandra Sep 27 '17 at 18:45
  • @chandra On my system I have a utility that can display a Unicode character together with the fonts having it – egreg Sep 27 '17 at 19:36
  • May I suggest, @egreg, that you create a LaTeX package for diacritics embodying what's here, here (https://tex.stackexchange.com/questions/84523/how-to-generate-compounded-diacritical-fonts-for-sanskrit-with-xetex-and-luatex) and here (https://tex.stackexchange.com/questions/20789/tex-accents-do-not-seem-to-work-with-fontspec-and-xe-lua-latex) with the definitions of the characters as well. It would be a boon to those who need those characters. – chandra Aug 04 '19 at 09:47
  • @egreg You are my hero (one of a great), no words to say.... – MadyYuvi Jun 05 '21 at 09:14