• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sile-typesetter / sile / 8288578143

14 Mar 2024 09:39PM UTC coverage: 64.155% (-10.6%) from 74.718%
8288578143

Pull #1904

github

alerque
chore(core): Fixup ec6ed657 which didn't shim old pack styles properly
Pull Request #1904: Merge develop into master (commit to next release being breaking)

1648 of 2421 new or added lines in 107 files covered. (68.07%)

1843 existing lines in 77 files now uncovered.

10515 of 16390 relevant lines covered (64.15%)

3306.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.47
/packages/raiselower/init.lua
1
local base = require("packages.base")
10✔
2

3
local package = pl.class(base)
10✔
4
package._name = "raiselower"
10✔
5

6
local function raise (height, content)
7
  SILE.typesetter:pushHbox({
6✔
8
    outputYourself = function (_, typesetter, _)
9
      typesetter.frame:advancePageDirection(-height)
6✔
10
    end
11
  })
12
  SILE.process(content)
3✔
13
  SILE.typesetter:pushHbox({
6✔
14
    outputYourself = function (_, typesetter, _)
15
      typesetter.frame:advancePageDirection(height)
3✔
16
    end
17
  })
18
end
19

20
function package:registerCommands ()
10✔
21

22
  self:registerCommand("raise", function (options, content)
22✔
23
    local height = SU.cast("measurement", options.height)
3✔
24
    raise(height:absolute(), content)
6✔
25
  end, "Raises the contents of the command by the amount specified in the <height> option")
14✔
26

27
  self:registerCommand("lower", function (options, content)
22✔
UNCOV
28
    local height = SU.cast("measurement", options.height)
×
UNCOV
29
    raise(-height:absolute(), content)
×
30
  end, "Lowers the contents of the command by the amount specified in the <height> option")
11✔
31

32
end
33

34
package.documentation = [[
35
\begin{document}
36
If you don’t want your images, rules, or text to be placed along the baseline, you can use the \autodoc:package{raiselower} package to move them up and down.
37

38
It provides two simple commands, \autodoc:command{\raise} and \autodoc:command{\lower}, which both take a \autodoc:parameter{height=<dimension>} parameter.
39
They will respectively raise or lower their argument by the given height.
40
The raised or lowered content will not alter the height or depth of the line.
41

42
Here is some text raised by \raise[height=3pt]{three points}; here is some text lowered by \lower[height=4pt]{four points}.
43

44
The previous paragraph was generated by:
45

46
\begin[type=autodoc:codeblock]{raw}
47
Here is some text raised by \raise[height=3pt]{three points}; here is some text lowered by \lower[height=4pt]{four points}.
48
\end{raw}
49
\end{document}
50
]]
10✔
51

52
return package
10✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc