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:
- 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.
- So should the captions of tables and figures (in case there is a very long caption).
- And, of course, the footnotes, quotes, quotations, etc., as well.
- 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.
- I can use
- I also want to avoid stretching the vertical skips around displayed math.
- 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
ctexdocumentation:{ \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% is1.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
ctexdocumentation:\dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }and the fact that\strutboxhas 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}
\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 02 '18 at 07:48\footnotesepshould work if you just put\footnotesep=1.25\footnotesepat 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 havetabulars outside oftableenvironments which shouldn't get stretched, too. – Skillmon Jun 02 '18 at 08:54\footnotetextsomewhere, you should redefine that one, too, with\let\oldfootnotetext\footnotetext\renewcommand\footnotetext[1]{\oldfootnotetext{\setstretch{1}#1}}– Skillmon Jun 02 '18 at 08:561.25appears a lot, I decide to wrap it in three separate commands (for customizing). However, I was too naive to assume that English and Chinese inputs produce the same footnote separation. Please take a look at the updated MWE’s (the second one, in particular). – Ruixi Zhang Jun 02 '18 at 16:50\footnote). What is still bothering you? – Skillmon Jun 02 '18 at 20:46\the\ccwd(width of em-box),\the\baselineskipand\the\ht\strutboxin footnote, I got9.03374pt,13.5506ptand9.48537ptin both MWE’s, which are expected (\footnotesizeis9bpinzihao=-4ctex classes; leading is1.5of9bp; height of\strutboxis.7*1.5of9bp). But\the\footnotesepin the 1st MWE yields8.4pt(.7of footnote leading in12ptstandardarticle), while in the 2nd9.8648pt. This deviation is caused by class optionscheme=plainand neither equals9.48537pt. – Ruixi Zhang Jun 02 '18 at 22:099.8648ptcomes from the class default optionlinespread=1.3(.7*1.2*1.3of9bp). It appears that\setlength\footnotesep{\ht\strutbox}need be issued somewhere, which should be a global update and should utilize\footnotelinespread. – Ruixi Zhang Jun 02 '18 at 23:17