I am doing work on Yi (Nuosu) language, and would like to incorporate the Yi script into my work in LaTeX. I have looked around and can't find a package that gives support for Yi script. Is there a package? If not, is there any way I can have LaTeX recognize the Yi Unicode?
To add to the answer, do you need a mapping file? e.g., with mapping latin to yi, you can type jjo
and it produces ꐥ
.
If you need to do only a few syllables, you can define individual macros for them, like \newcommand\yipuo{^^^^a044}
.
Mapping is useful when you need to type a lot of text and do not have a keyboard or input method editor for the script.
A mapping file looks like this:
; TECkit mapping for TeX input conventions <-> Unicode characters
LHSName "latin-to-yi" ;
RHSName "UNICODE"
pass(Unicode)
;=====================================
U+006A U+006A U+006F <> U+A425
U+0064 U+0064 U+0075 <> U+A14D
U+0061 U+0070 <> U+A00B
;===================================
(I called the file latin-to-yi.map
)
and it is compiled into a .tec
binary file with teckit_compile
.
Then the mapping is called into play with the Mapping=
filename option when the font is declared.
Like this:
% compile with xelatex
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\newfontface\yi[Mapping=latin-to-yi]{Noto Sans Yi}
\begin{document}
{\yi jjo ddu ap jjo }: everything’s fine, there’s nothing the matter
% from https://www.babelstone.co.uk/Yi/lesson_01.html
\end{document}
which produces:
-
Thank you! I've tried to download teckit, but I don't know how to use teckit_compile. Is there a tutorial on the stackexchange you could direct me towards? – Jackirab Jan 16 '20 at 19:08
-
1@Jackirab Asking a separate question will probably get a faster answer. I haven't seen any tutorials.
Teckit_compile.exe
is a program. It takes a plain-text mapping file as input, and you compile the.map
file into a binary.tec
file by doingteckit_compile foo.map
(if your.map
file is calledfoo.map
) on your command line. – Cicada Jan 18 '20 at 6:39 -
1@Jackirab Some questions I've found useful are: tex.stackexchange.com/questions/176709/… tex.stackexchange.com/questions/446546/… tex.stackexchange.com/questions/218318/how-add-my-own-ligature/… tex.stackexchange.com/questions/3458/… – Cicada Jan 18 '20 at 6:39
Your requirements are somewhat vague, but if what you need are some short texts written in the Yi script, here is how you can do it with babel
3.38, just released, and luatex
:
\documentclass{article}
\usepackage[english]{babel}
\babelprovide[import=ii, onchar=ids fonts]{yi}
\babelfont[yi]{rm}{FandolSong}
\begin{document}
Thus ꆏꂴꐊ (ne miep qo) “You walk in front of me” and ꉢꊁꐊ (nga wax qo)
“I’ll follow directly behind you”.
\end{document}
(Also from babelstone.co.uk.)
babel
seems not (yet) to offer very much help with Nuosu, although it does recognize sichuanyi
. However, for short texts or isolated words, something like this suffices:
% compile with lualatex or xelatex
\documentclass{article}
\usepackage{fontspec}
\setmainfont{Noto Serif}
\newfontface\yi{NotoSansYi-Regular.ttf}
\begin{document}
{\yi ꐥꅍꀋꐥ}: everything’s fine, there’s nothing the matter
% from https://www.babelstone.co.uk/Yi/lesson_01.html
\end{document}
luatex
orxetex
, but I don’t know enough about the language to make a meaningful test. – Thérèse Jan 14 '20 at 18:00