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

sile-typesetter / sile / 6915746301

18 Nov 2023 07:02PM UTC coverage: 56.433% (-12.3%) from 68.751%
6915746301

push

github

web-flow
Merge 8b3fdc301 into f64e235fa

8729 of 15468 relevant lines covered (56.43%)

932.75 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

© 2026 Coveralls, Inc