Ticket #44916

Ruby baseline for non-CJK characters

Open Date: 2022-06-23 20:43 Last Update: 2022-08-06 08:55

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

Details

(sorry for English)

I did not find a way to align baselines for ruby texts when they have ascender or descender portions (especially for non-CJK characters). Is there an option I missed, or is it a potential feature to add?

I know that ruby and pxrubrica packages don’t have this baseline mismatch (but ruby does not work well in my multi-CJK-font document).

Here is a MWE:

% !TEX program = lualatex

\documentclass{article}

\usepackage{luatexja-ruby}

\begin{document}

\ruby{コギト}{Cogito}  % too high
\ruby{コイト}{Coito}  % too low
\\
\ruby{ノ}{no}  % too low
\ruby{ト}{TO}  % too low
\ruby{ヨ}{yo}  % too high
\ruby{ぢ}{dji}  % too high
\\
\ruby[intergap=-1.5]{ノ}{no}  % too low
\ruby[intergap=-1.5]{ト}{TO}  % too low
\ruby[intergap=-1.5]{ヨ}{yo}  % too high
\ruby[intergap=-1.5]{ぢ}{dji}  % too high

\end{document}

Ticket History (3/7 Histories)

2022-06-23 20:43 Updated by: benjamingalliot
  • New Ticket "Ruby baseline for non-CJK characters" created
2022-06-23 20:51 Updated by: benjamingalliot
  • Details Updated
2022-06-24 05:10 Updated by: benjamingalliot
  • Details Updated
2022-06-24 12:01 Updated by: h7k
Comment

Sorry for late reply.

baselines for ruby texts when they have ascender or descender portions

Thanks for the report. For now, there is no option for it (I didn't take that into account), but I'd like to add option(s) for it.

Possible workaround: using \smash[b] and intergap option

\ltjruby[intergap=-0.06]{コギト}{\smash[b]{Cogito}}
\ltjruby[intergap=-0.06]{コイト}{\smash[b]{Coito}}

2022-06-24 23:19 Updated by: benjamingalliot
Comment

Thanks for answer! It seems the \smash command’s optional argument is not analysed, so [b] is visible in ruby. But by removing it, and adjusting intergap, it worked:

\ltjruby[intergap=0.1]{コギト}{\smash{Cogito}}
\ltjruby[intergap=0.1]{コイト}{\smash{Coito}}
2022-07-03 11:26 Updated by: h7k
  • Resolution Update from None to Fixed
Comment

I just uploaded the new version (20220703.0) to CTAN.

luatexja-ruby now has "rubydepth" key.

  • Its default value is 0.12, which means that the ruby depth will be fixed at 0.12 times of the ruby "fullwidth".
  • If its value is negative, the ruby depth is its natural depth (as previous versions).

I hope this will solve the issue.

2022-08-06 08:55 Updated by: h7k
  • 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