0

Hope somebody can explain why in the following code (1) creates a "smarter" in-paragraph spacing than (2)?

\documentclass{article}
\usepackage{lipsum}

\begin{document}

{\small\lipsum[1]\LARGE\lipsum[1]\small\lipsum[1]\par} %(1)

\clearpage

{\small\lipsum[1]\LARGE\lipsum[1]\par} %(2)

\end{document}

Result of (1) enter image description here

Result of (2) enter image description here

Max
  • 305
  • This is identical to your previous question, I don't know what else I could add. – David Carlisle Jan 25 '19 at 10:51
  • Define smarter? In (1) you have \small in effect at the \par, which sets the line spacing for the entire paragraph to the line spacing for \small. In (2) this is the line spacing for \LARGE that is in effect at the \par. – daleif Jan 25 '19 at 10:51
  • @daleif: In (1) the leading small text has proportional spacing while in (2) the same text is affected by LARGE spacing which is less smart. – Max Jan 25 '19 at 10:55
  • Latex is doing exactly what it is suppose to do. As mentioned the line space for the entire paragraph is determined at the end of the paragraph. You have two different sizes at the end if the paragraph so two different results. What exactly is your question? – daleif Jan 25 '19 at 10:57
  • @Max the spacing in (2) is far more acceptable than the spacing in (1) !!! so your "smart" description seems strange. (1) is essentially just error recovery: you have specified large text on a small baseline, so it does not fit so tex giives up using \baselineskip and even spacing and just stacks things vertically with no attempt to make a reasonable layout. – David Carlisle Jan 25 '19 at 10:58
  • @David: this is really not the same question. Or I didn't fully understand your answer to my previous one. At least this one is more focusing on one single point. I'm not spamming. – Max Jan 25 '19 at 11:00
  • it may not be the same question but it is the same answer: the baseline spacing used is the one in force at the end of the paragraph, the only thing extra here is that you have specified impossible constraints as the supplied text can not be broken in to lines at the specified baseline spacing. – David Carlisle Jan 25 '19 at 11:01
  • I'm not abusing LaTeX. I'm simply trying to understand how it works (something close to its underlying algorithm) by trialing and asking. – Max Jan 25 '19 at 11:06
  • By saying 'smart', I mean the space being adaptive (or proportionate) to the text size. Of course this is not necessarily correct definition. – Max Jan 25 '19 at 11:08
  • yes there is no harm in asking but (especially in the form you ask here) this is a common question and has several existing answers so closing as duplicate is to be expected. That is the way the site works, it is not a criticism if a question is closed as duplicate, rather the opposite duplicate questions increase the search exposure to that subject and highlight the existing answers. – David Carlisle Jan 25 '19 at 11:08
  • @daleif: Please note the difference of spacing for the leading small text for both (1) and (2). My questions, in another way, is why for the large text the spacing is automatically increased to accommodate the large text but not able to decrease the space for the smaller one in (1) to make it 'smarter' (to my standard only though)? This might be something obvious but not so to me for now. – Max Jan 25 '19 at 11:43
  • It is not enlarged, it is simply because of the very large size of the font that it appears the spacing is larger in the large part of (1), remember that tall stuff on a line affects the line spacing of that particullar line (this is often noticable with "bad" math constructs", this ieffect if very clear on the fist line of (1) under \LARGE – daleif Jan 25 '19 at 11:53
  • Try adding this to the example: \lineskiplimit=-\maxdimen (seen in TeXByTopic), then the linespacing are not stretched because of "tall stuff", it has no effect on (2) but clearly affect (1). – daleif Jan 25 '19 at 12:02
  • which is same as I told @Max in the linked chat:-) – David Carlisle Jan 25 '19 at 12:15
  • Thanks all for your tolerance of my stupid question. I'm very sure I know nothing about the art of typography. Just for completeness of this conversation @David's comments in our chat is kept here for reference of myself and other people like me - Max the "smarter" layout is something that tex (and human typesetters) go to great lengths to avoid. Uneven line spacing being something that sends shivers of fear down a typesetter's back:-) – Max Jan 25 '19 at 23:15

0 Answers0