3

My goal

I recently started using the ctex classes to convert some of my English articles into Chinese. Regarding the line spacing, I would like to achieve the following:

  1. The body text should have a leading 150% of the font size.
    • Here, leading refers to as the distance between two consecutive Latin baselines, which equals the distance between two consecutive ideographic baselines of the CJK characters. On the other hand, the em-box has a size given by the font size.
  2. So should the captions of tables and figures (in case there is a very long caption).
  3. And, of course, the footnotes, quotes, quotations, etc., as well.
  4. However, I do not want the rows of my tables to be stretched, since usually Chinese only appears in the header and the table contents are just numbers.
    • I can use \renewcommand{\arraystretch}{<factor>}% for stretching.
  5. I also want to avoid stretching the vertical skips around displayed math.
  6. Added (June 4, 2018): Since math formulae are mostly in Latin/Greek, the leading for them should obey the English typesetting rules, i.e., 120%.

My question

How can I achieve the above descriptions? I would appreciate a solution which allows me to set the line spacing of body text, captions, footnotes, etc., separately.

Why would I want this?

Unlike English typesetting, where a leading 120–145% of the font size is recommended, Chinese (or Japanese, Korean) often requires a leading 150–180% of the font size. This is because CJK glyphs have much less side-bearings compared to their Latin counterparts, and need more space to breathe (except for newspapers where the recommendation is 125–133% for Chinese).

This is fundamentally different from an ugly university-style requirement. A normal Chinese footnote should have slightly larger leading than just 120% of font size.

Also, note how I have avoided using terms like single spacing, 1.5 spacing, etc. I think professionals use point size for leading, or at least use its ratio to the font size, rather than some obscure <multiple> spacing.


Attempt 1

First, I tried \linespread{1.25}\selectfont:

  • According to Code Line 3747 of the ctex documentation: { \dim_to_decimal:n { (#2) * \c_six / \c_five } }, the initial leading is set at 120% of every corresponding font size. And, 150% divided by 120% is 1.25.

But this spreads everything!

Same with the leading package: It just saves me from doing calculations. In a \documentclass[zihao=-4]{ctexart} document, the \normalsize command sets font size at 12bp, so I can issue \leading{18bp}. But since \leading uses \linespread internally, this also spreads everything.


Attempt 2

Then, I found this answer suggesting a combination of the setspace and caption packages:

% Preamble
%\usepackage{setspace}
\usepackage[nodisplayskipstretch]{setspace} % In my case
\setstretch{1.25} % 1.5/1.2 = 1.25
\usepackage{caption}
\captionsetup{font={stretch=1.25}}

which covers my goals 1, 2, 4 and 5. For footnotes, I found this question where

% Preamble
\let\oldfootnote\footnote
%\renewcommand{\footnote}[1]{\oldfootnote{\onehalfspacing #1}}
\renewcommand{\footnote}[1]{\oldfootnote{\setstretch{1.25} #1}} % In my case

was suggested by the OP. This works fine until there is a second footnote on the same page. The two blocks of footnotes will have an inconsistent separation. I think I also have to adjust \footnotesep to get uniform spacing in footnotes, but by how much?

  • According to Code Line 3905 of the ctex doc­u­menta­tion: \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox } and the fact that \strutbox has a default height of .7\baselineskip. I guess \setlength{\footnotesep}{.875\baselineskip} will do the job?
  • Edited (June 2, 2018): Apparently something else is at work when setting the footnote separation. See the two different MWE’s below.

Minimal working examples

Edited (June 2, 2018): I was too naive to assume the same typesetting output for English and Chinese inputs. The following English/Latin MWE illustrates that \footnotesep needs to be increased:

\documentclass[zihao=-4,scheme=plain]{ctexart} % Do not use Chinese headings
\usepackage{blindtext} % Use Latin blind text, in case you don't have Chinese font.
\usepackage{booktabs}
\newcommand*{\bodytextlinespread}{1.25} % 1.5/1.2 = 1.25
\newcommand*{\captionlinespread} {1.25} % 1.5/1.2 = 1.25
\newcommand*{\footnotelinespread}{1.25} % 1.5/1.2 = 1.25
% Set body text line spacing without stretching displayed math.
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{\bodytextlinespread}
% Patch caption line spacing.
\usepackage{caption}
\captionsetup{font={stretch=\captionlinespread}}
% Patch footnote line spacing.
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{%
  \oldfootnote{\setstretch{\footnotelinespread} #1}}
  % The mistakenly added space before #1 should have been dropped.
\begin{document}
\blindtext\footnote{\blindtext}
\[
e^{i \pi} + 1 = 0.
\]
Aha! Another footnote\footnote{\blindtext}.
\begin{table}[h]
\caption[Short caption]{A table with a really really really really
 really really really really really really really really really 
 really really really long caption.}
\centering%
\begin{tabular}{c c}
\toprule
Chinese & Word \\
\midrule
  $10$  & $20$ \\
  $10$  & $20$ \\
\bottomrule
\end{tabular}
\end{table}
\blindtext
\begin{quote}
\blindtext
\end{quote}
\blindtext
\end{document}

But a Chinese MWE suggests that \footnotesep should be decreased (the difference is subtle, but visible):

\documentclass[zihao=-4]{ctexart} % Use Chinese headings
\usepackage{zhlipsum} % Use Chinese dummy text.
\usepackage{booktabs}
\newcommand*{\bodytextlinespread}{1.25} % 1.5/1.2 = 1.25
\newcommand*{\captionlinespread} {1.25} % 1.5/1.2 = 1.25
\newcommand*{\footnotelinespread}{1.25} % 1.5/1.2 = 1.25
% Set body text line spacing without stretching displayed math.
\usepackage[nodisplayskipstretch]{setspace}
\setstretch{\bodytextlinespread}
% Patch caption line spacing.
\usepackage{caption}
\captionsetup{font={stretch=\captionlinespread}}
% Patch footnote line spacing.
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{%
  \oldfootnote{\setstretch{\footnotelinespread} #1}}
  % The mistakenly added space before #1 should have been dropped.
\begin{document}
\zhlipsum*[1]\footnote{\zhlipsum*[2]}
\[
e^{i \pi} + 1 = 0.
\]
Aha! Another footnote\footnote{\zhlipsum*[3]}. \zhlipsum*[4]
\begin{table}[h]
\caption[Short caption]{A table with a really really really really
 really really really really really really really really really 
 really really really long caption.}
\centering%
\begin{tabular}{c c}
\toprule
Chinese & Word \\
\midrule
  $10$  & $20$ \\
  $10$  & $20$ \\
\bottomrule
\end{tabular}
\end{table}
\zhlipsum*[5]
\begin{quote}
\zhlipsum*[6]
\end{quote}
\zhlipsum*[7]
\end{document}
  • Welcome to TeX.SE! – Mico Jun 2 '18 at 6:11
  • Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Skillmon Jun 2 '18 at 7:48
  • @Skillmon MWE added. – Ruixi Zhang Jun 2 '18 at 8:26
  • The \footnotesep should work if you just put \footnotesep=1.25\footnotesep at the end of your preamble. Also you have a white space too much in your \footnote. It should be \renewcommand\footnote[1]{\oldfootnote{\setstretch{1.25}#1}}. And perhaps you want to include \usepackage{etoolbox}\AtBeginEnvironment{tabular}{\setstretch{1}} if you have tabulars outside of table environments which shouldn't get stretched, too. – Skillmon Jun 2 '18 at 8:54
  • And in case you need to use \footnotetext somewhere, you should redefine that one, too, with \let\oldfootnotetext\footnotetext\renewcommand\footnotetext[1]{\oldfootnotetext{\setstretch{1}#1}} – Skillmon Jun 2 '18 at 8:56

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.