I've run out of letters and I would like to use the Hiragana ''ro'' in a latex document. How can I produce it in the simplest way?
-
Thanks for the information. Is there also a way to use the Katana alphabet, single selected letters only? – Mike Ruge Nov 03 '21 at 22:04
-
@ Mike Ruge Welcome to TeX.SE. If you have another question please post it on the main question side. It will not be seen here. I just saw it coincidentally. Also please do not forget to provide a MWE to clarify your problem. You may also refer to this question and describe why the answers here did not helped you with your problem. – Roland Nov 03 '21 at 23:57
4 Answers
I'm not sure people reading your document will understand the symbol or know how to pronounce it. However, here's a way without loading the whole CJKutf8
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{newunicodechar}
\newunicodechar{ろ}{\text{\usefont{U}{min}{m}{n}\symbol{'215}}}
\DeclareFontFamily{U}{min}{}
\DeclareFontShape{U}{min}{m}{n}{<-> udmj30}{}
\begin{document}
$a+ろ=c$
\end{document}

If you have problems in typing the character directly, just define a command for it:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\newcommand{\hiraro}{\text{\usefont{U}{min}{m}{n}\symbol{'215}}}
\DeclareFontFamily{U}{min}{}
\DeclareFontShape{U}{min}{m}{n}{<-> udmj30}{}
\begin{document}
$a+\hiraro=c$
\end{document}
Here's the complete table of the udmj30 font, if you want to extend the usage to other Hiragana:

In case you don't have udmj30 (probably due to an incomplete TeX distribution), you can try dmjhira:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\newcommand{\hiraro}{\text{\usefont{U}{min}{m}{n}\symbol{'115}}}
\DeclareFontFamily{U}{min}{}
\DeclareFontShape{U}{min}{m}{n}{<-> dmjhira}{}
\begin{document}
$a+\hiraro=c$
\end{document}
Here's the table of the font:

The syntax is \symbol{'<octal number>} or \symbol{"<hexadecimal number>} or also \symbol{<decimal number>}. Just look up the table for the correct number.
- 1,121,712
-
Thanks. I've found the following error while compiling: Package newunicodechar Error: ASCII character requested – user17786 Apr 15 '14 at 11:00
-
-
-
Thanks. It now says that the font udmj30 is not loadable. But Malipivo's slutins is working fine. – user17786 Apr 15 '14 at 12:28
-
-
-
In case your TeX installation complains about missing files/fonts, have a look here https://tex.stackexchange.com/questions/75166/error-in-tex-live-font-not-loadable-metric-tfm-file-not-found I solved running
tlmgr install wadalab– seldon Jan 18 '20 at 14:48
This example works with lua-, xe-, pdf- and with plain latex (followed by dvips and ps2pdf conversion).
% run: *latex mal-japanese.tex
% or
% latex mal-japanese.tex
% dvips mal-japanese.dvi
% ps2pdf mal-japanese.ps
\documentclass{article}
\pagestyle{empty}
\begin{document}
% pdftex testfont
% --> dmjhira
% --> \table\bye
\font\maljapanese=dmjhira at 2ex % This is a matter of taste.
Some text {\maljapanese\char"4D} before $a+\textrm{\maljapanese\char"4D}=c$ some text {\maljapanese\char"4D} after.
\end{document}

- 13,287
-
In case your TeX installation complains about missing files/fonts, have a look here https://tex.stackexchange.com/questions/75166/error-in-tex-live-font-not-loadable-metric-tfm-file-not-found I solved running
tlmgr install wadalab– seldon Jan 18 '20 at 14:48

% arara: lualatex
\documentclass{article}
\usepackage{luatexja-fontspec}
\setmainjfont{MS Mincho}
\newcommand{\HiraganaRo}{ろ}
\begin{document}
\[\HiraganaRo = 42\]
In the formula I use the symbol \HiraganaRo{} which is taken from the Japanese Hiragana alphabet.
\end{document}
- 43,807
This code uses the ろ symbol from your TrueType or OpenType font of choice. I chose Harano Aji Mincho, which comes libre with TeX Live, or here.
\documentclass{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{newunicodechar}
\newfontfamily\japanesefont{HaranoAjiMincho}[
Scale=MatchUppercase,
% Set other features, such as ligatures and forms, here.
Script=Kana,
Language=Japanese]
\newcommand\jpRo{\textup{\japanesefont ろ}}
\newunicodechar{ろ}{\jpRo}
\begin{document}
% You probably want to change your section title format to
% something like \large\bfseries\boldmath, not insert
% \boldmath commands.
\section*{\boldmath The Symbol (ろ = 42)}
This paper uses the symbol (ろ = 42).
\end{document}
The above definition will, as you see, appear bold like the surrounding text and math when you use \boldmath\bfseries, but will stay upright even when the surrounding text is italicized, such as in a theorem statement. If you are not using \boldmath and you want all math symbols to appear in normal weight in the header, as in AMS style, change the definition of \jpRo to
\newcommand\jpRo{\textnormal{\japanesefont ろ}}
In hindsight, if you ever need ロ in the future, it would have been better to call this something like \hiriganaRo or \jpHgRo. Either way, it’s an ASCII macro you can use.
- 44,045
