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

sile-typesetter / sile / 7246678005

18 Dec 2023 10:19AM UTC coverage: 67.096% (-7.5%) from 74.62%
7246678005

push

github

web-flow
chore(deps): Bump actions/upload-artifact from 3 to 4 (#1940)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

10583 of 15773 relevant lines covered (67.1%)

3150.6 hits per line

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

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

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

6
local outputBackground = function (color)
7
  local page = SILE.getFrame("page")
×
8
  local backgroundColor = SILE.color(color)
×
9
  SILE.outputter:pushColor(backgroundColor)
×
10
  SILE.outputter:drawRule(page:left(), page:top(), page:right(), page:bottom())
×
11
  SILE.outputter:popColor()
×
12
end
13

14
function package:_init ()
×
15
  base._init(self)
×
16
  self:loadPackage("color")
×
17
end
18

19
function package:registerCommands ()
×
20

21
  self:registerCommand("background", function (options, _)
×
22
    options.color = options.color or "white"
×
23
    options.allpages = options.allpages or true
×
24
    outputBackground(options.color)
×
25
    if options.allpages and options.allpages ~= "false" then
×
26
      local oldNewPage = SILE.documentState.documentClass.newPage
×
27
      SILE.documentState.documentClass.newPage = function (self_)
×
28
        local page = oldNewPage(self_)
×
29
        outputBackground(options.color)
×
30
        return page
×
31
      end
32
    end
33
  end, "Draws a solid background color <color> on pages after initialization.")
×
34

35
end
36

37
package.documentation = [[
38
\begin{document}
39
\use[module=packages.background]
40
The \autodoc:package{background} package allows you to set the color of the canvas background (by drawing a solid color block the full size of the page on page initialization).
41
The package provides a \autodoc:command{\background} command which requires at least one parameter, \autodoc:parameter{color=<color specification>}, and sets the background of the current and all following pages to that color.
42
If you want to set only the current page background different from the default, use the parameter \autodoc:parameter{allpages=false}.
43
The color specification in the same as specified in the \autodoc:package{color} package.
44

45
\background[color=#e9d8ba,allpages=false]
46

47
So, for example, \autodoc:command{\background[color=#e9d8ba,allpages=false]} will set a sepia tone background on the current page.
48
\end{document}
49
]]
×
50

51
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