[texhax] could someone give me an explanation as to why fontsize fails with an overfull box

David Carlisle d.p.carlisle at gmail.com
Fri Jan 11 14:06:55 CET 2019


On Fri, 11 Jan 2019 at 12:39, Carlos <linguafalsa at gmail.com> wrote:

>
> Philip thank you so much. Much appreciated.
>
> Your examples made me tweak some more with the document and rather
> than having values such as \font = 1.12 or \font = 0.99 or \font =
> 1.05,  null it all out instead.

I was going to ask why you had such strange settings, you should
almost never have any use of \fontsize in a document.


>
> This issue has convinced me however, that every single time I've used
> `\fontsize` I've ran into some sort of problem. So the following is
> generalizing.

Again, if you are using \fontsize in a document something is wrong, somewhere.

>
> I tend to forget that TeX breaks characters into words, words into
> lines, lines into paragraphs into pages with glue holders in between.
> And I would understand if I were to have the same sample document with
> a textwidth of say 0.5in, I would expect to see some sort of
> consistency with different textwidth values. For example:
>
>
> \documentclass{article}
> %\documentclass[14pt]{extarticle}
>
> %\usepackage{MinionPro}
> \usepackage{mathptmx}
> %\usepackage{libertine}
> %\usepackage{fontspec}
>
> %\setmainfont{MinionPro}
>
> \overfullrule = 10pt
> \setlength{\parindent}{5.94pt}
>
> \setlength{\textwidth}{0.5in}
>
> \hfuzz=39pt
> \tolerance=-10
negative tolerance???
>
> \showoutput
> \begin{document}
>
> %\fontsize{14.09}{14}\selectfont
> \fontsize{14.0908}{17}\selectfont

.why setting the font size to these values, .00008pt is (just) within
teX's accuracy but is an impossibly small length (especially as using
any length at all is wrong here, why not simply \large (which is 14pt)


> %\fontsize{14.1}{17}\selectfont
> %\fontsize{16.09}{17}\selectfont
>
> %\tolerance=204
> %\tolerance=-1
> %\hfuzz=20pt
> \fontdimen 2 \font = 0.00 \fontdimen 2 \font
> \fontdimen 3 \font = 0.00 \fontdimen 3 \font
>
> The reason is that upon restarting the computer, there are also other programs
> that start running on the background, among them Antivirus programs and
> whatever other programs Windows deems necessary for the functionality of
> the system.\par
>
>
> \end{document}
>
>
> I would expect to see the word "resaon" in that case, hyphenated

why would you expect that?

TeX does a least cost minimisation over the whole paragraph to decide
where to break the lines, if you add

\tracingparagraphs=1

You can see it's process in action and in particular


@secondpass
[]\OT1/ptm/m/n/14.0908 The rea-
@\discretionary via @@0 b=* p=50 d=*
@@1: line 1.3- t=0 -> @@0
son is that



that is it considered a break point (of penalty 50) by hyphenating
rea-son  but in that did not lead to a lowest cost set of breaks when
the whole paragraph is considered.


>
>
> ....\hbox(0.0+0.0)x5.94
> ....\OT1/ptm/m/n/14.0908 T
> ....\OT1/ptm/m/n/14.0908 h
> ....\OT1/ptm/m/n/14.0908 e
> ....\glue 0.0 minus 0.84541
> ....\OT1/ptm/m/n/14.0908 r
> ....\OT1/ptm/m/n/14.0908 e
> ....\OT1/ptm/m/n/14.0908 a
> ....\discretionary
> ....\OT1/ptm/m/n/14.0908 -
> ....\glue(\rightskip) 0.0
> ...\penalty 250
> ...\glue(\baselineskip) 7.2283
>
> but if I were to have a
> \setlength{\textwidth}{2in} instead of a 0.5in of textwitdth
>
> I wonder then, why is that word in particular treated the same as
> before. But then again,  I tend to forget how it works on text mode.
>
> I do not see the \penalty as before, and much less the glue in
> between, but what I do see is an emdash or the dash with the
> discretionary,  no doubt empty as it is the latter,  attached to it.
>
> Then the hyphenated word 'restart-ing'
>
> ....\OT1/ptm/m/n/14.0908 r
> ....\OT1/ptm/m/n/14.0908 e
> ....\OT1/ptm/m/n/14.0908 s
> ....\OT1/ptm/m/n/14.0908 t
> ....\OT1/ptm/m/n/14.0908 a
> ....\OT1/ptm/m/n/14.0908 r
> ....\OT1/ptm/m/n/14.0908 t
> ....\discretionary
> ....\OT1/ptm/m/n/14.0908 -
> ....\glue(\rightskip) 0.0
> ...\penalty 250
> ...\glue(\baselineskip) 4.3397
>
>
> but then it failed to say recognize "other" with either the counterparts "o-ther" or better yet "oth-er" as the convention has it.

There are no hyphenation points on "other" (the English hyphenation
settings don't allow any word to break after one letter like o-ther)

David


More information about the texhax mailing list