{"action":"created","issue":{"url":"https://api.github.com/repos/n-t-roff/heirloom-doctools/issues/22","labels_url":"https://api.github.com/repos/n-t-roff/heirloom-doctools/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/n-t-roff/heirloom-doctools/issues/22/comments","events_url":"https://api.github.com/repos/n-t-roff/heirloom-doctools/issues/22/events","html_url":"https://github.com/n-t-roff/heirloom-doctools/issues/22","id":95829305,"number":22,"title":"Paragraph adjust \"badness\" calculation","user":{"login":"reffort","id":13387711,"avatar_url":"https://avatars.githubusercontent.com/u/13387711?v=3","gravatar_id":"","url":"https://api.github.com/users/reffort","html_url":"https://github.com/reffort","followers_url":"https://api.github.com/users/reffort/followers","following_url":"https://api.github.com/users/reffort/following{/other_user}","gists_url":"https://api.github.com/users/reffort/gists{/gist_id}","starred_url":"https://api.github.com/users/reffort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reffort/subscriptions","organizations_url":"https://api.github.com/users/reffort/orgs","repos_url":"https://api.github.com/users/reffort/repos","events_url":"https://api.github.com/users/reffort/events{/privacy}","received_events_url":"https://api.github.com/users/reffort/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":27,"created_at":"2015-07-18T14:24:45Z","updated_at":"2015-08-05T08:28:45Z","closed_at":null,"body":"I'd like to propose a change to the way the line breaking \"badness\" value is calculated in paragraph adjust mode.  The current calculation occasionally produces a line or cluster of lines that have obviously loose spacing followed by one or more lines that have obviously tight spacing (or vice versa).  That's the sort of thing that paragraph adjustment is supposed to minimize.  The change I suggest corrects this behavior.\r\n\r\nIt is a minor change to line 1765 in function penalty() in n7.c.\r\n\r\nThe current line is:\r\n\r\n\tt = t >= 0 ? t * 5 / 3 : -t;\r\n\r\n\r\nThe proposed new line is:\r\n\r\n\tt = t >= 0 ? t * 2 : t * -2 ;\r\n\r\n\r\nThe current calculation is heavily skewed to favor really tight lines that have a space size at or near the value defined by the .minss request if the space size for the line being considered cannot be near the normal size. These small word spaces (which fall into the \"very tight\" class in TeX parlance) are actually favored more than word spaces that are on the looser side of the \"normal\" class.  When the input text needs help the most, the badness curve acts much like a word processor and the result is uneven word spacing.\r\n\r\nThe factors I'm proposing produce badness values that are symmetrical about the normal space size and favor neither loose nor tight lines.  The curve assigns a much higher penalty to tighter-than-normal spaces than does the current curve, and a modestly higher penalty to looser-than-normal spaces.  The penalties assigned to looser and tighter space sizes are evenly balanced, and this significantly reduces the occurrence of obvious loose-tight lines."},"comment":{"url":"https://api.github.com/repos/n-t-roff/heirloom-doctools/issues/comments/127913638","html_url":"https://github.com/n-t-roff/heirloom-doctools/issues/22#issuecomment-127913638","issue_url":"https://api.github.com/repos/n-t-roff/heirloom-doctools/issues/22","id":127913638,"user":{"login":"n-t-roff","id":8519991,"avatar_url":"https://avatars.githubusercontent.com/u/8519991?v=3","gravatar_id":"","url":"https://api.github.com/users/n-t-roff","html_url":"https://github.com/n-t-roff","followers_url":"https://api.github.com/users/n-t-roff/followers","following_url":"https://api.github.com/users/n-t-roff/following{/other_user}","gists_url":"https://api.github.com/users/n-t-roff/gists{/gist_id}","starred_url":"https://api.github.com/users/n-t-roff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n-t-roff/subscriptions","organizations_url":"https://api.github.com/users/n-t-roff/orgs","repos_url":"https://api.github.com/users/n-t-roff/repos","events_url":"https://api.github.com/users/n-t-roff/events{/privacy}","received_events_url":"https://api.github.com/users/n-t-roff/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T08:28:45Z","updated_at":"2015-08-05T08:28:45Z","body":"So we agree to implement the TeX curve? So if you wish you may prepare the final source files for testing and eventually commiting.\r\n\r\nFor Heirloom compatibility I suggest a simple number register (or request) which is set to a boolean value.\r\n\r\nI opened a new issue for the space adjustment problem (#24). You may not get a mail notification for that issue, so please have a look at it at github.\r\n\r\nFor the other issues I also suggest to open a dedicated issue. I'll have a look at it nethertheless, but if there is further discussion it is better to have it in an separate thread."}}