2

I'm setting baselineskip to a multiple of 4 times the fontsize and it's having not much of a difference from 1.2. At 1.2 the text collides as well.

I'm making a flashcard app, so the text should be easy on the eyes. It doesn't have to be compressed like newspaper text.

\documentclass[varwidth]{standalone}
\usepackage{lmodern}

\begin{document}{\fontsize{60}{240}\selectfont
I have baselineskip set to 4 in the fontsize macro, as you can see it doesn't seem to be doing much.  It would be nice to have some spaces in between these beautiful lines.  Thank you.}
\end{document}

Here's a picture of the output and my app:

enter image description here

  • 1
    this is a faq you ended the size change before the end of the paragraph, and it is the value of \baselineskip at the end of the paragraph that is used. – David Carlisle Jan 2 '18 at 20:42
  • @DavidCarlisle not sure what you mean. I have {} around the content – Shine On You Crazy Diamond Jan 2 '18 at 20:43
  • exactly. If you remove those, you will get the correct space, see tex.stackexchange.com/questions/139873/… – David Carlisle Jan 2 '18 at 20:43
  • despite it being a FAQ and that answer being an answer, i can't find a good duplicate question and your question is clear with a good small example so i think I'll answer it here:-) – David Carlisle Jan 2 '18 at 20:53
  • try this for a duplicate: [Font sizes and line height: how/when/why do \Huge, \LARGE, etc. affect one or the other? ](tex.stackexchange.com/q/36495/579] – barbara beeton Jan 2 '18 at 23:37
4

When you do

\fontsize{60}{240}\selectfont

the current font is changed and the current value of \baselineskip is set to 240pt, however TeX breaks paragraphs into lines at the end of the paragraph, and the inter-line space is added then so the value of \baselineskip is not used unless it is in scope at the end of the paragraph.

here you first have } (at which point \baselineskip resets to its original value) and then have the end of the paragraph.

In general you should always have a blank line or \par before the } that closes a group for a font change so that a suitable lien spacing is used. An exception being something like {\large this} which intentionally squeezes a large word into the existing baseline spacing.

In this particular case, where there is no following text, a simpler solution is simply to omit the {...}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.