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 am writing some XeTeX code to display Chinese text with ruby (tone marks, translation or pronunciation) above and below the characters. If on any one line, I have ruby below, and then on the next line I have ruby above another character, the line spacing will automatically be stretched to about 2, even though I have specified 1.5 in the definitions.

Is there any way to forcefully set the line spacing, taking the risk myself that some of the Ruby text might overlap?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Well, in fact it does nothing to do with XeTeX or CJK. Just set \lineskiplimit to -\maxdimen to disable the effect of \lineskip.

Example:

\documentclass{article}
\usepackage{xeCJK}
\setCJKmainfont{SimSun}
\usepackage{ruby}
\renewcommand\rubysep{-0.2ex}
\begin{document}

\fontsize{12}{14.4}\selectfont
\setlength{\lineskiplimit}{-\maxdimen}

文字文字文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字文字%
\ruby{文}{wén}\ruby{字}{zì}%
文字文字文字文字文字文字文字文字文字文字文字
文字文字文字文字文字文字文字文字文字文字文字
\end{document}
share|improve this answer
    
I am not able to run your example (and I don't quite understand what the -\maxdimen} means. However, a solution that works well for me is to use: \renewcommand{\baselinestretch}{1.7} \setlength{\lineskiplimit}{-10cm} Like that, I can indeed decrease the line spacing to less than 2 as I wanted. Thanks! –  Carl Johan Jan 16 '12 at 10:01
    
\maxdimen is the maximum dimension in TeX, say, 16384pt. –  Leo Liu Jan 17 '12 at 10:46
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.