# How to set line–spacing to 22bp?

I want to set the whole line space to 22bp as is required in Word. How to customize it in the .cls file?

This is the mwe and I want to change in the cls file， the ctexbook is a Chinese class and the main fontsize is 12pt.

\setlengh{\baselineskip}{22bp}


I wrote this in my .cls file and find the outpdf line space is very different than Word.

ps. I really want to set in .cls template file not in normal document file.

• Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – DG' Apr 9 '17 at 15:21
• Welcome to TeX.SE. What's the main document font size? Incidentally, what do you mean by "as is required in Word"? It would be news to me that MS Word, by itself, imposes any line-spacing requirements. – Mico Apr 9 '17 at 15:21
• \usepackage{leading} and then \leading{22bp} – clemens Apr 9 '17 at 15:30

It depends on the main point size:

• 10pt: \linespread{1.8402}
• 11pt: \linespread{1.624}
• 12pt: \linespread{1.523}

The command should be issued in the preamble.

If you use the setspace package, then issue

\setstretch{<value>}


where the <value> is one of the above ones.

My experiment shows a baseline skip of 22.08234pt, with 10pt size; of 22.0863pt, with 11pt size; of 22.08342pt with 12pt size.

The actual value of 22bp is 22.0825pt, so those values are quite accurate: the differences cannot be measured with a ruler.

The computation is simple. The default baselineskip is

• 10pt: 12pt
• 11pt: 13.6pt
• 12pt: 14.5pt

So it's just a matter of computing

(22 * 72.27)/(72 * <baseline skip>)


in order to obtain the required \baselinestretch factor to be fed either to \linespread or \setstretch, because with

(22 * 72.27)/72


we get the value of 22bp in points.

How can you find out the normal baseline skip to which apply the computation above? Without doing anything special about line spacing, add, just after \begin{document} the line

\the\baselineskip


and look at the printout. It will show at the beginning of the document the <baseline skip> to be used in the formula above.

• For the uninitiated readers, you may want to mention how you obtained the factors 1.8402, 1.624, and 1.523. :-) – Mico Apr 9 '17 at 15:55
• @Mico Right; done. – egreg Apr 9 '17 at 16:02
• thank you very much，the default baselinelineskip only with 10，11，12 fontsize ，I can i know the other fontsize baselineskip say 14pt? – user130774 Apr 9 '17 at 16:24
• @user130774 - You need to look up the default baselineskip values set in the ctexbook document class that correspond to various font size choices. – Mico Apr 9 '17 at 17:21
• @user130774 I added a method – egreg Apr 9 '17 at 19:29

(updated the answer to incorporate two additional pieces of information: That the document class is ctexbook and that the main document font size is 12pt)

There's no need to modify the document class file. It suffices to provide the instructions

\fontsize{12pt}{22bp}\selectfont


immediately after \begin{document}.

Note that if your code (or packages that are loaded in the preamble) feature command that change the font size or the baseline skip in a non-local manner, these commands will override the \fontsize{12pt}{22bp}\selectfont instruction. An example of a local-scope font size-changing command would be {\Large ...}; without the curly braces, the scope of \Large would not be delimited.

A full MWE (to be compiled via XeLaTeX or LuaLaTeX):

\documentclass[12pt]{ctexbook}
\usepackage{fontspec}
\begin{document}
\fontsize{12pt}{22bp}\selectfont
Hello World.
\end{document}

• Shouldn't you mention that this will only work provided neither the OP nor any commands the OP calls change the font size? (It is the same answer as the deleted one below, as far as I can tell.) – cfr Apr 10 '17 at 3:18
• @cfr - I would have thought that this was more or less obvious, but you may well be right that it's not. (Note that I did write that these commands should be executed after \begin{document}.) I'll add a sentence or two on this subject. – Mico Apr 10 '17 at 5:06
• But you'll have smaller skip when you have \Large than when the font is at its default size. That is, it won't be 22bp generally, even if you restrict size changes locally by scope. – cfr Apr 10 '17 at 16:59
• @cfr - I don't have the slightest idea what the OP wants to do with his/her document -- other than set a font size of 12pt and a baseline skip of 22bp`. For all I know, there may not be any other font size and baseline skip changes at all. Unless the OP tells me otherwise, I'll let the answer rest as it is. – Mico Apr 10 '17 at 18:15