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

sile-typesetter / sile / 7232859119

16 Dec 2023 03:49PM UTC coverage: 66.878% (-7.7%) from 74.62%
7232859119

push

github

web-flow
Merge 05d75c2a3 into 8686730e4

0 of 4 new or added lines in 1 file covered. (0.0%)

1201 existing lines in 56 files now uncovered.

10550 of 15775 relevant lines covered (66.88%)

3347.52 hits per line

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

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

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

6
local function raise (height, content)
7
  SILE.typesetter:pushHbox({
24✔
8
    outputYourself = function (_, typesetter, _)
9
      typesetter.frame:advancePageDirection(-height)
24✔
10
    end
11
  })
12
  SILE.process(content)
12✔
13
  SILE.typesetter:pushHbox({
24✔
14
    outputYourself = function (_, typesetter, _)
15
      if (type(typesetter.state.cursorY)) == "table" then
12✔
16
        typesetter.state.cursorY = typesetter.state.cursorY.length
×
17
      end
18
      typesetter.frame:advancePageDirection(height)
12✔
19
    end
20
  })
21
end
22

23
function package:registerCommands ()
17✔
24

25
  self:registerCommand("raise", function (options, content)
38✔
26
    local height = SU.cast("measurement", options.height)
12✔
27
    raise(height:absolute(), content)
24✔
28
  end, "Raises the contents of the command by the amount specified in the <height> option")
31✔
29

30
  self:registerCommand("lower", function (options, content)
38✔
UNCOV
31
    local height = SU.cast("measurement", options.height)
×
UNCOV
32
    raise(-height:absolute(), content)
×
33
  end, "Lowers the contents of the command by the amount specified in the <height> option")
19✔
34

35
end
36

37
package.documentation = [[
38
\begin{document}
39
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.
40

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

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

47
The previous paragraph was generated by:
48

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

55
return package
17✔
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