Ticket #35137

「ά」(ギリシャ語)が空間になる

Open Date: 2015-05-12 11:03 Last Update: 2015-08-29 20:28

Reporter:
(Anonymous)
Owner:
(None)
Type:
Status:
Closed
Component:
(None)
MileStone:
(None)
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Remind
File:
None

Details

\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}

Ticket History (3/14 Histories)

2015-05-12 11:03 Updated by: None
  • New Ticket "「ά」(ギリシャ語)が空間になる" created
2015-05-12 12:17 Updated by: h7k
Comment

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}
2015-05-12 12:41 Updated by: kalle
Comment

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).

2015-05-12 16:57 Updated by: h7k
Comment

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}

2015-05-12 17:03 Updated by: kalle
Comment

Nice! Thanks, that looks great. :)

2015-05-12 17:59 Updated by: h7k
  • Ticket Close date is changed to 2015-05-12 17:59
  • Resolution Update from None to Remind
  • Status Update from Open to Closed
2015-05-12 18:04 Updated by: kalle
Comment
(This comment has been deleted)
2015-05-12 18:04 Updated by: kalle
Comment

\rubyを使って入力してみたら、ちょっとずれました。 \ruby{カタルシス}{κ\acutealpha θαρσις} これはやっぱりjacharrangeを使うべきですかね……

2015-05-12 18:49 Updated by: h7k
  • Status Update from Closed to Open
Comment

\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}
全角空白を使うのは気持ち悪いので,今後何とかするつもりです.

2015-05-12 18:58 Updated by: kalle
Comment

ありがとうございます!ltjtarticleでも綺麗に出ました。

2015-05-13 00:23 Updated by: kalle
Comment

\usepackagehiragino-pron{luatexja-preset}

このラインを使わなければ問題ないけれど、一応報告します。使うと、アクセントがまた微妙にずれてしまいます。

2015-05-13 05:30 Updated by: h7k
Comment

確認しました.ヒラギノだと,U+0301: Combining Acute Accent が縦組時に回転してしまうんですね(小塚でもそうでした).

それなら,luatexja-otf パッケージを読み込んだ上で,上記マクロ中の \ltjjachar769\UTF{0301} に置き換えてみてはいかがでしょうか.

2015-05-13 10:52 Updated by: kalle
Comment

それで直りました!ありがとうございます!

2015-08-29 20:28 Updated by: h7k
  • Ticket Close date is changed to 2015-08-29 20:28
  • Status Update from Open to Closed

Attachment File List

No attachments

Edit

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login