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

sile-typesetter / sile / 6713098919

31 Oct 2023 10:21PM UTC coverage: 52.831% (-21.8%) from 74.636%
6713098919

push

github

web-flow
Merge d0a2a1ee9 into b185d4972

45 of 45 new or added lines in 3 files covered. (100.0%)

8173 of 15470 relevant lines covered (52.83%)

6562.28 hits per line

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

0.0
/packages/ifattop/init.lua
1
local base = require("packages.base")
×
2

3
local package = pl.class(base)
×
4
package._name = "ifattop"
×
5

6
function package:registerCommands ()
×
7

8
  self:registerCommand("ifattop", function (_, content)
×
9
    SILE.typesetter:leaveHmode()
×
10
    if #(SILE.typesetter.state.outputQueue) == 0 then
×
11
      SILE.process(content)
×
12
    end
13
  end)
14

15
  self:registerCommand("ifnotattop", function (_, content)
×
16
    SILE.typesetter:leaveHmode()
×
17
    if #(SILE.typesetter.state.outputQueue) ~= 0 then
×
18
      SILE.process(content)
×
19
    end
20
  end)
21

22
end
23

24
package.documentation = [[
25
\begin{document}
26
This package provides two commands: \autodoc:command{\ifattop} and \autodoc:command{\ifnotattop}.
27
The argument of the command is processed only if the typesetter is at the top of a frame or is not at the top of a frame respectively.
28
\end{document}
29
]]
×
30

31
return package
×
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