Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers 3

up vote 5 down vote accepted

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}

mwe

share|improve this answer
    
This worked fine. Thanks –  user17786 Apr 15 at 12:26
add comment

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}

enter image description here

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:

enter image description here

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:

enter image description here

The syntax is \symbol{'<octal number>} or \symbol{"<hexadecimal number>} or also \symbol{<decimal number>}. Just look up the table for the correct number.

share|improve this answer
    
Thanks. I've found the following error while compiling: Package newunicodechar Error: ASCII character requested –  user17786 Apr 15 at 11:00
    
@user17786 Are you saving your file as UTF-8? –  egreg Apr 15 at 11:01
    
@user17786 I've added an alternative way. –  egreg Apr 15 at 12:13
    
Thanks. It now says that the font udmj30 is not loadable. But Malipivo's slutins is working fine. –  user17786 Apr 15 at 12:28
    
@user17786 I'll add the correction for using dmjhira –  egreg Apr 15 at 12:37
show 1 more comment

enter image description here

% 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}
share|improve this answer
    
This is great, but I use plain latex. –  user17786 Apr 15 at 11:01
1  
@user17786 Are you using latex or pdflatex? –  Malipivo Apr 15 at 11:15
    
good point. I'm using pdflatex. –  user17786 Apr 15 at 12:24
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.