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

sile-typesetter / sile / 14908152066

08 May 2025 01:49PM UTC coverage: 61.309% (-5.7%) from 67.057%
14908152066

push

github

alerque
chore(registries): Touchup command registry deprecation shims

1 of 2 new or added lines in 2 files covered. (50.0%)

1379 existing lines in 46 files now uncovered.

13556 of 22111 relevant lines covered (61.31%)

11834.23 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")
7✔
2

3
local package = pl.class(base)
7✔
4
package._name = "raiselower"
7✔
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 ()
7✔
21
   self.commands:register("raise", function (options, content)
21✔
22
      local height = SU.cast("measurement", options.height)
3✔
23
      raise(height:absolute(), content)
6✔
24
   end, "Raises the contents of the command by the amount specified in the <height> option")
10✔
25

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

32
package.documentation = [[
33
\begin{document}
34
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.
35

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

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

42
The previous paragraph was generated by:
43

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

50
return package
7✔
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

© 2025 Coveralls, Inc