General ⇒ spacing after periods
spacing after periods
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
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
spacing after periods
try the effect of this value for example:
Code: Select all
\xspaceskip8pt
Btw. the spacing between words and also after punctuation marks has no fixed length, it may be stretched or shrinked by TeX algorithms.
Stefan
Re: spacing after periods
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
spacing after periods
In the meantime why don't you try to set \xspaceskip to a bigger value to see the effect.
Stefan
Re: spacing after periods
Another question: how can I display the current value of xspaceskip? (I vaguely remember using some command like \value except that didn't seem to work.)
And another: After reading the section in the TeXbook, the bottom of pg75 explains how TeX calculates spacing by using some parameters specific to the font. For example, he gives the values of the parameters for cmr 10, where normal space = 3.33333 pt, normal stretch = 1.66666 pt, normal shrink = 1.11111 pt, and extra space = 1.11111 pt. Where would I find information like this on the font I am using? (I am using txfonts package.) I presume I would need this info in order to pick an appropriate xspaceskip so that the "double space after the period" requirement could be fulfilled. I checked the pdf help doc, the sty file, and the tex file for txfonts, but could not find mention of those parameters. I am not sure which other files to look at. I see tfm, vf, afm, and pfb files but am not sure how to check/open them.
Thanks for your patience and continued help!
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
spacing after periods
\the\xspaceskip prints the value in the pdf (dvi) output. \showthe\xspaceskip does the same but in the logfile. The default value should be 0.0pt.
Stefan
Re: spacing after periods
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
spacing after periods
Code: Select all
\documentclass[a4paper,10pt]{article}\usepackage{txfonts}\begin{document}\begin{description}\item[interword space] \the\fontdimen2\font\item[interword stretch] \the\fontdimen3\font\item[interword shrink] \the\fontdimen4\font\item[extra space] \the\fontdimen7\font\item[xspaceskip] \the\xspaceskip\end{description}\end{document}
Stefan
Re: spacing after periods
- Stefan Kottwitz
- Site Admin
- Posts: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
spacing after periods
yes, I understand it this way too: \xspaceskip replaces interword space (if it's nonzero and f>=2000). \spaceskip would still be calculated using f. f is set by \sfcode. The value of f for different symbols is set default like this:
Code: Select all
\sfcode‘\.3000\sfcode‘\?3000\sfcode‘\!3000\sfcode‘\:2000\sfcode‘\;1500\sfcode‘\,1250
Another good source is the freely available book TeX by Topic by by Victor Eijkhout, see Chapter 20 Spacing.
Stefan