Skip to content

Commit

Permalink
refactor(classes): Reset parfillskip rather than hard-code it in just…
Browse files Browse the repository at this point in the history
…ified environment
  • Loading branch information
Didier Willis committed Nov 26, 2023
1 parent c91d9a7 commit 73d09f6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions classes/plain.lua
Expand Up @@ -296,12 +296,13 @@ function class:registerCommands ()
SILE.settings:temporarily(function ()
local lskip = SILE.settings:get("document.lskip") or SILE.nodefactory.glue()
local rskip = SILE.settings:get("document.rskip") or SILE.nodefactory.glue()
-- Keep the fixed part of the margins for nesting but remove the stretchability.
SILE.settings:set("document.lskip", SILE.nodefactory.glue(lskip.width.length))
SILE.settings:set("document.rskip", SILE.nodefactory.glue(rskip.width.length))
-- Reset parfillskip to its default value, in case the surrounding context
-- is ragged and cancelled it.
SILE.settings:set("typesetter.parfillskip", nil, false, true)
SILE.settings:set("document.spaceskip", nil)
-- HACK. This knows too much about parfillskip defaults...
-- (Which must be big, but smaller than infinity. Doh!)
SILE.settings:set("typesetter.parfillskip", SILE.nodefactory.glue("0pt plus 10000pt"))
SILE.process(content)
SILE.call("par")
end)
Expand Down

0 comments on commit 73d09f6

Please sign in to comment.