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

sile-typesetter / sile / 6916312961

18 Nov 2023 09:12PM UTC coverage: 62.199% (-6.6%) from 68.751%
6916312961

push

github

web-flow
Merge a29a0997b into f64e235fa

9647 of 15510 relevant lines covered (62.2%)

6520.8 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