「ά」(ギリシャ語)が空間になる
By default, LuaTeX-ja typesets Greek and Cyrillic letters in the Japanese font. \ltjsetparameter{jacharrange=-2} changes this behavior.
\documentclass{ltjsarticle} % これは駄目:κ θαρσι?
...
\ltjsetparameter{jacharrange=-2} %%% Greek and Cyrillic letters in "alphabetic" font.
\begin{document}
\greekfont{κάθαρσις}
\end{document}
I see. I prefer the Japanese font. All I really need is to put an accent over the alpha letter, but this feature does not work when using ltjt*.
E.g.
κ\'αθαρσις
would solve it. But that puts the accent in the bottom right, due to the glyph rotation (I presume).
An accent over a Japanese character is not support by currrent LuaTeX-ja.
I prefer the Japanese font. I really need is to put an accent over the alpha letter
How about the following example?
\documentclass{ltjtarticle}
\newcommand{\acutealpha}{\rlap{%
% U+0301 (769, COMBINING ACUTE ACCENT) を重ね打ち.
% 横組の時は右に 1/4 全角だけずらす(目分量)
\ifnum\ltjgetparameter{direction}=3\else\hspace{0.25\zw}\fi
\ltjjachar769}\nobreak α}
\begin{document}
κ\acutealpha θαρσις
\end{document}
Nice! Thanks, that looks great. :)
\rubyを使って入力してみたら、ちょっとずれました。 \ruby{カタルシス}{κ\acutealpha θαρσις} これはやっぱりjacharrangeを使うべきですかね……
\acutealpha のマクロ定義を変えてみました(\rlap{ } で空白を補正し,また,全体を \mbox でくくりました).
\documentclass{ltjsarticle}
\usepackage{luatexja-ruby}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{CMU Serif}% ギリシャ文字もあるフォント
\newcommand{\acutealpha}{\mbox{%
\rlap{ }\rlap{% \rlap{ } は「和文ゴースト処理」
% 横組の時は右に 1/4 全角だけずらす(目分量)
\ifnum\ltjgetparameter{direction}=3\else\hspace{.25\zw}\fi
% U+0301 (769): Combining Acute Accent
\ltjjachar769}α}}
\begin{document}
\ruby{カタルシス}{κ\acutealpha θαρσις}
\ltjsetparameter{jacharrange=-2}
\ruby{カタルシス}{κάθαρσις}
\end{document}
全角空白を使うのは気持ち悪いので,今後何とかするつもりです.
ありがとうございます!ltjtarticleでも綺麗に出ました。
\usepackagehiragino-pron{luatexja-preset}
このラインを使わなければ問題ないけれど、一応報告します。使うと、アクセントがまた微妙にずれてしまいます。
確認しました.ヒラギノだと,U+0301: Combining Acute Accent が縦組時に回転してしまうんですね(小塚でもそうでした).
それなら,luatexja-otf パッケージを読み込んだ上で,上記マクロ中の \ltjjachar769 を \UTF{0301} に置き換えてみてはいかがでしょうか.
それで直りました!ありがとうございます!
\documentclass{ltjsarticle} % これは駄目:κ θαρσις %\documentclass{scrartcl} % これはOK:κάθαρσις (articleでもOK) \usepackage{fontspec} \newfontfamily\greekfont[Script=Greek, Scale=MatchUppercase, Ligatures=TeX]{Arial Unicode MS} \begin{document} \greekfont{κάθαρσις} \end{document}