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 would like to be able to determine the line spacing in the following example:

enter image description here

The line spacing is clearly not good. My TeX code looks as follows:

\HRule \\[0.5cm]
{ \fontsize{30pt}{10cm}\neosanslight This is some random text with not enough line spacing} 
\vspace{0.3cm}
\HRule \\[1.5cm]

I thought that the second argument to the \fontsize command would determine the line spacing, but no matter what I set it to, it does not change.

My definition of the custom font looks like this:

\newfontfamily{\neosanslight}[
UprightFont={* Light},
ItalicFont={* Light Italic}]{NeoSans}

I am using XeLaTeX to be able to use the custom font.

Does anyone have suggestions for a solution?

share|improve this question
add comment

1 Answer

up vote 11 down vote accepted

It's a well known problem: the paragraph you're typesetting uses the baseline skip current outside the braces, because the end of paragraph is seen after the closing brace, which ends the scope of the \fontsize declaration. Just add \par before the closing brace:

\HRule \\[0.5cm]
{\fontsize{30pt}{10cm}\neosanslight This is some random text with not enough line spacing\par} 
\vspace{0.3cm}
\HRule \\[1.5cm]
share|improve this answer
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.