LyXwhat exactly is SmallSkip and etc.?

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
lyxrocks
Posts: 91
Joined: Sat Oct 23, 2010 5:59 pm

what exactly is SmallSkip and etc.?

Post by lyxrocks »

in lyx tutorial it says
SmallSkip, MedSkip and BigSkip are LaTeX sizes which depend on the font size of the document.
well, let's say if my font is 12(default i believe), then how much exactly are SmallSkip MedSkip and BigSkip? in terms of pt for example.

i tried googling it, but couldn't find a definite answer.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

what exactly is SmallSkip and etc.?

Post by cgnieder »

They are defined in the LaTeX kernel (a file called latex.ltx) like follows:

Code: Select all

\def\smallskip{\vspace\smallskipamount}
\def\medskip{\vspace\medskipamount}
\def\bigskip{\vspace\bigskipamount}
\newskip\smallskipamount \smallskipamount=3pt plus 1pt minus 1pt
\newskip\medskipamount   \medskipamount  =6pt plus 2pt minus 2pt
\newskip\bigskipamount   \bigskipamount =12pt plus 4pt minus 4pt
As you can see they're not depending on the font size.

Regards
site moderator & package author
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

what exactly is SmallSkip and etc.?

Post by Stefan Kottwitz »

You can print it out by this TeX code:

Code: Select all

\the\smallskipamount
Similar for the other skips. I attach a LyX document, all default, which prints those values.
skips-lyx.png
skips-lyx.png (3.36 KiB) Viewed 31077 times
skips-values.png
skips-values.png (7.28 KiB) Viewed 31077 times
Stefan
Attachments
skips.lyx
(1.86 KiB) Downloaded 701 times
LaTeX.org admin
lyxrocks
Posts: 91
Joined: Sat Oct 23, 2010 5:59 pm

Re: what exactly is SmallSkip and etc.?

Post by lyxrocks »

thank you guys so much!!!
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

what exactly is SmallSkip and etc.?

Post by scottkosty »

cgnieder wrote:They are defined in the LaTeX kernel (a file called latex.ltx) like follows:

As you can see they're not depending on the font size.

Regards
Interesting. But does whether LaTeX chooses to go for the upper part of the range (3pt plus 1pt) or the lower part of the range (3pt minus 1pt) depend on the font size? Or only on other factors that have nothing to do with the font size?
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

what exactly is SmallSkip and etc.?

Post by cgnieder »

You might know that TeX (and hence LaTeX) has different modes. Two of them being the horizontal and the vertical mode. TeX is in horizontal mode when it builds a paragraph and in vertical mode when it connects different paragraphs to build pages (roughly speaking).

This skips are added to the vertical list so they they may stretch or shrink according to LaTeX's page-building mechanism. They are used for example to avoid widows or orphans since they allow the page to stretch or shrink by the given amount at the place where they're used.

Regards
site moderator & package author
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

what exactly is SmallSkip and etc.?

Post by scottkosty »

cgnieder wrote:You might know that TeX (and hence LaTeX) has different modes. Two of them being the horizontal and the vertical mode. TeX is in horizontal mode when it builds a paragraph and in vertical mode when it connects different paragraphs to build pages (roughly speaking).

This skips are added to the vertical list so they they may stretch or shrink according to LaTeX's page-building mechanism. They are used for example to avoid widows or orphans since they allow the page to stretch or shrink by the given amount at the place where they're used.

Regards
Thanks cgnieder I did not know that. I would like to suggest a change to the text in User Guide that caused the initial confusion and curiosity. I will suggest adding a table related to what you and Stefan gave in your initial posts. But I'm not sure how to modify the text, which I reproduce below. Any ideas?
To add extra vertical space above or below a paragraph, use the Insert->Formatting->Vertical Space dialog. There you find the following sizes:

SmallSkip, MedSkip and BigSkip are LaTeX sizes which depend on the font size of the document. DefSkip is the skip adjusted in the dialog Document-> Document Settings for the paragraph separation. If you use indentation to separate paragraphs DefSkip is equal to MedSkip.
Note that all the LyX documentation is available online from http://wiki.lyx.org/LyX/DocumentationDevelopment
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

what exactly is SmallSkip and etc.?

Post by cgnieder »

I am not sure I want to recommend any text as I am no expert on the page building stuff at all. There is however quite some material to read in the texbook and in texbytopic.

As an addition to what I previously said:

\smallskip, \medskip, \bigskip and all other vertical rubber lengths depend on the material added to a page like paragraphs (and their possible shapes), graphics, tables… and on such things as the values of the \widowpenalty, the \clubpenalty. In a way they also depend on the font size as the font size influences line lengths and paragraph shapes which in turn influence the page…

Regards
site moderator & package author
scottkosty
Site Moderator
Posts: 542
Joined: Sat Sep 01, 2012 6:38 am

what exactly is SmallSkip and etc.?

Post by scottkosty »

cgnieder wrote:In a way they also depend on the font size as the font size influences line lengths and paragraph shapes which in turn influence the page…
Regards
This is why I'm not sure how to change the text. I guess I'll leave it.

Thanks,

Scott
Post Reply