This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
To obtain a quantitative measure of the word space sizes, this code prints a character in the margin indicating a size category | |
for the word spaces of that line. It hijacks the margin character functionality. | |
At line 427 of n7.c, replace these two lines | |
else if (admod == 0 && spreadwarn && adsp >= spreadlimit) | |
errprint("spreadlimit exceeded, %gm", (double)adsp/EM); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// experimental penalty() function for n7.c | |
// Rename the existing function to x_penalty() or something similar so that it won't be executed | |
// and then add the following function | |
static double | |
penalty(int k, int s, int h, int h2, int h3) | |
{ | |
double t, d, p1, p2, p3 ; | |
int scaletype, calctype ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.do xflag 3 | |
. | |
\# | |
\# This troff source file formats two paragraphs, an easy one and a more | |
\# difficult one, varying the minimum space size and the hyphenation penalty | |
\# to show the interaction of the word space size ratio (the badness function) | |
\# and the hyphenation penalty, and the effect on the formatted output. | |
\# | |
\# This file demonstrates how the Heirloom badness function has | |
\# a strong tendency to pack as many characters on a line as it can in order |