Hi all,

At the end of June, Hans uploaded a new lmtx version which included improvements to par building which he and Mikael had been working on in math mode. Hans suggested in the online chat that these improvements may be useful in typesetting novels. I was keen to try these since I have typset novels in the past.

I have ran some tests on two novels which I downloaded from the Gutenberg Project site as epubs and extracted them to get the original xhtml files which I then typeset in context. I made very little in the way of changes to the files so that my setup for xml was very simple.

Here are my setups for the layout of the novels showing some trackers that were used as well:

% XML setups here
\setpenalties\clubpenalties {1}{150}
\xmlprocessfile{mysetups}{/path to xhtml files/4439720318703948998_84-h-\recurselevel.htm.xhtml}{}

Below are the result showing the number of overfull boxes for these novels using the setups in the file spac-imp-tests.mkxl . See the manual Low Level - Lines

Test        Novel1   Novel2
Test1        70            35
Test2        30            8
Test3        62            23
Test4        89            40
Test5        28            9
Optional1 55            19
Quality      74            32
Decent      39            11

From these initial tests one can see that Test2 gave the lowest number of overfull boxes. So I edited test two, ran it, and the results are below.

Test        Novel1   Novel2

Test2b      11        0

My setup for test 2b is as follows:
\startsetups align:pass:test2b
    \pretolerance 100
    \tolerance    200
    \parpasses      3
        classes              \indecentparpassclasses
        threshold            0.025pt
        tolerance            800
        extrahyphenpenalty    50
        threshold            0.025pt
        tolerance            900
        adjustspacing          3
        adjustspacingstep      1
        adjustspacingshrink   10
        adjustspacingstretch  15
        threshold            0.025pt
        tolerance            1000
        adjustspacing          3
        adjustspacingstep      1
        adjustspacingshrink   20
        adjustspacingstretch  40
        emergencystretch     .25\bodyfontsize
%     \linebreakpasses\plusone
The only difference between test 2 and 2b are that I increased the tolerance in each of the three passes. In novel 2 this was successful in eliminating the overfull boxes but not in Novel 1 although I noticed that majority of overfull boxes were above 1pt with the largest about 12pt in Novel 1.

I am at the stage now where I need some kind of strategy to reduce/eliminate overfull boxes, other than changing the tolerance, and I'm hoping for some advice from the community. Suggestions for further reading particularly on the commands in \setupalignpass and their usage would be appreciated and on the best way to tackle overfull boxes.

Best Wishes

Keith McKay
If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net

Reply via email to