Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix thsp unit conversion #85

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions examples/lefevre-tuor-idril-styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,47 @@ blockquote:
before:
skip: "smallskip"

code:
origin: "resilient.book"
style:
font:
family: "Hack"
size: "1.4ex"

defn-base:
origin: "resilient.defn"
style:

defn-desc:
inherit: "defn-base"
origin: "resilient.defn"
style:
paragraph:
after:
skip: "smallskip"
before:
vbreak: false

defn-term:
inherit: "defn-base"
origin: "resilient.defn"
style:
font:
weight: 700
paragraph:
after:
vbreak: false
before:
skip: "smallskip"

dropcap:
origin: "resilient.book"
style:
font:
family: "Zallman Caps"
special:
lines: 2

epigraph:
origin: "resilient.epigraph"
style:
Expand Down Expand Up @@ -884,3 +925,12 @@ url:
font:
language: "und"

verbatim:
inherit: "code"
origin: "resilient.verbatim"
style:
paragraph:
align: "obeylines"
before:
skip: "smallskip"

3 changes: 2 additions & 1 deletion examples/lefevre-tuor-idril.sil
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
\set[parameter=document.baselineskip, value=1.2em]
\set[parameter=document.lineskip, value=0em]
\set[parameter=epigraph.width, value=75%fw]
\set[parameter=typesetter.italicCorrection, value=true]
%
\language[main=fr]
\font[family=EB Garamond, size=12pt]
Expand All @@ -30,7 +31,7 @@ local class = SILE.documentState.documentClass
class:registerCommand("initial", function (options, content)
SILE.settings:temporarily(function()
local blSkip = SILE.settings:get("document.baselineskip")
SILE.settings:set("document.baselineskip", SILE.nodefactory.vglue(SILE.length(blSkip.height.length)))
SILE.settings:set("document.baselineskip", SILE.types.node.vglue(SILE.types.length(blSkip.height.length)))
SILE.call("dropcap", { lines = 2, family = "Zallman Caps", join = true },
{ options.letter })
SILE.process(content)
Expand Down
2 changes: 1 addition & 1 deletion examples/sile-resilient-manual.silm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sile:
textsubsuper.fake: false
autodoc.highlighting: true
document.baselineskip: 1.2em
# typesetter.italicCorrection: true # Not yet available in SILE 0.14.x
typesetter.italicCorrection: true
packages:
- autodoc-resilient # REQUIRED FOR RESILIENT, do not use regular autodoc
- background # Some of the packages below might not be required...
Expand Down
2 changes: 1 addition & 1 deletion packages/resilient/styles/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function package:_init (options)
SILE.registerUnit("thsp", {
relative = true,
definition = function (value)
return value * 0.5 * utils.interwordSpace()
return value * 0.5 * utils.interwordSpace():tonumber()
end
})
self:readStyles()
Expand Down