I am writing a document that contains several languages, including English and Japanese (polyglossia, xeLatex, Windows 7, TeXLive, TeXWorks).

For English, I prefer the classic Hoefler Text font, and since English is the main language, it unfortunately also influences the numerals that appear inside the Japanese environment. The resulting output is quite mismatched with the numerals appearing to have the wrong size and position inside horizontal texts, and producing the wrong spacing in vertical texts. Here is a minimal example:






 %Setting main fonts for English (Latin alphabet) text
 \setmonofont{Noto Mono}


 %%% CJK requires a different treatment

 \usepackage[CJK,overlap]{ruby} % use \ruby{kanji}{kana} to set Furigana

 % position and size of horizontal Furigana (global): below/right

 \XeTeXlinebreaklocale "ja"
 \XeTeXlinebreakskip=0em plus 0.1em minus 0.01em
 % we also drop paragraph indentation in order to get proper alignment

 Gothic,ItalicFont=Meiryo,Scale=1,FakeBold=0]{Kozuka Mincho Pro}
 \setCJKfamilyfont{cjk-vert}[Script=CJK,RawFeature=vertical]{Kozuka Gothic 
 Pro M} %vertical font assignment\
 \newCJKfontfamily\strokefont{KanjiStrokeOrders} %for kanji stroke orders
 \setCJKsansfont{Noto Sans CJK SC}



 \section{Japanese 1}

 \subsection{Horizontal and Vertical Furigana}


 \foreignlanguage{english}{An example of Furigana under the character on 
 this horizontal line} 3 \ruby{学}{がく}\ruby{生}{せい}. \par%

 \foreignlanguage{english}{An example of vertical text with vertical 
 \CJKfamily{cjk-vert} %setting font locally
 \doublespacing  %setting double space for vertical alignment
 \renewcommand{\rubysep}{-5ex} %setting ruby spacing locally
 \renewcommand{\rubysize}{0.5} %setting ruby size locally
 きのう、\textbf{ラース}は \ruby{山}{やま}\ruby{本}{もと}と あいました。 
「こんにちは、\ruby{山}{やま}\ruby{本}{もと}さん。おげんき 100 ですか。」


 \section{Japanese 2}


 \subsection{ご使用のまえに 1000} 

 本機は、AC(交流)100 V専用の機械です。絶対に100 V以上の電 圧やDC (直流)を加え



The resulting PDF is quite ugly.PDF
Note the number '3' before the horizontal Furigana in Section 1 is out of place on the line. Note the number '100' in the vertical minipage environment is both too small and weirdly situated, so the spacing above the number and below it is different. The number '1000' in the subsection heading also appears out of kilter. Finally, for the typical text in subsection 2.1, the number '100' again appears too small and simply incompatible with the rest of characters in that sentence.

Is it possible to define the numerals/digits for the Japanese environment separate from the main environment? Is it possible to resolve the discrepancy between horizontal and vertical alignment of the numbers?

Finally, although the numbering of the sections seems OK, I neither like the size of the numerals of subsections nor the horizontal spacing between the heading and the number. Is it possible to control this spacing?

Any help would be greatly appreciated!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.