I need a document line spacing 14pt.
I have tried using baselinestretch but, does not seem to be working.
Can anyone help?
I need a document line spacing 14pt.
I have tried using baselinestretch but, does not seem to be working.
Can anyone help?
This does the trick (at least for ordinary text), using the second parameter for \fontsize:
\documentclass[11pt]{article}
\usepackage [utf8]{inputenc}
\usepackage [T1]{fontenc}
\usepackage{lmodern} %
\usepackage{lipsum}
\usepackage{etoolbox}
\AtBeginDocument{\fontsize{11pt}{14pt}\selectfont}
\begin{document}
\lipsum[1]
\end{document}
Added:
As @David Carlisle suggests in his comment, it seems more judicious to replace \AtBeginDocument{....} with
\AtEndPreamble{%
\apptocmd{\normalsize}{\fontsize{11pt}{14pt}\selectfont}{}{}
}%
\normalsize as if you do it this way any \normalsize will reset it, and that can happen pretty much anywhere.
– David Carlisle
Jan 14 '17 at 14:51
etoolbox, rather than redefining the whole of \normalsize. Hope there's no side effects.
– Bernard
Jan 14 '17 at 15:19
If the main size is 10pt, the default baseline skip is 12pt, so you want it to increase by 1.66667:
\documentclass{article}
\linespread{1.16667}
\begin{document}
\the\baselineskip
\end{document}
If the main size is 11pt, with 13.6pt baselineskip, the factor should be 1.02941:
\documentclass[11pt]{article}
\linespread{1.02941}
\begin{document}
\the\baselineskip
\end{document}
The small differences from 14pt should be of no concern.
An “automatic version”:
\documentclass[11pt]{article}
\usepackage{xparse}
\ExplSyntaxOn
\AtBeginDocument
{
\linespread{ \fp_eval:n { 14pt/\baselineskip } }
\selectfont
}
\ExplSyntaxOff
\begin{document}
\the\baselineskip
\texttt{\meaning\baselinestretch}
\end{document}
This will set \baselinestretch to whatever is needed to accomplish a baseline skip of 14pt without any previous knowledge of how it is set by the class.
\documentclass{...}and ending by\end{document}how you try to use\baselinestretch. – Zarko Jan 14 '17 at 13:47\linespreadinstead of the lower level\baselinestretch. If you need exact 14pt leading, you can use\fontsize{12}{14}\selectfont, where the first argument is the font size and the second the leading. Note that,\selectfontis required after low level font selection macros, including\linespread, to make them in effect – Yan Zhou Jan 14 '17 at 13:49