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

sile-typesetter / sile / 9400953783

06 Jun 2024 12:32PM UTC coverage: 62.819% (-11.3%) from 74.124%
9400953783

push

github

alerque
Merge branch 'develop'

1752 of 2644 new or added lines in 109 files covered. (66.26%)

2019 existing lines in 84 files now uncovered.

10830 of 17240 relevant lines covered (62.82%)

3306.33 hits per line

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

87.76
/outputters/base.lua
1
--- SILE outputter class.
2
-- @interfaces outputters
3

4
local outputter = pl.class()
49✔
5
outputter.type = "outputter"
49✔
6
outputter._name = "base"
49✔
7

8
function outputter:_init ()
49✔
9
   self.hooks = {}
49✔
10
   return self
49✔
11
end
12

13
function outputter:registerHook (category, func)
49✔
14
   if not self.hooks[category] then
1✔
15
      self.hooks[category] = {}
1✔
16
   end
17
   table.insert(self.hooks[category], func)
1✔
18
end
19

20
function outputter:runHooks (category, data)
49✔
21
   if not self.hooks[category] then
49✔
22
      return nil
48✔
23
   end
24
   for _, func in ipairs(self.hooks[category]) do
2✔
25
      data = func(self, data)
2✔
26
   end
27
   return data
1✔
28
end
29

30
function outputter.newPage () end
49✔
31

32
function outputter:finish ()
49✔
NEW
33
   self:runHooks("prefinish")
×
34
end
35

36
function outputter.getCursor () end
49✔
37

38
function outputter.setCursor (_, _, _, _) end
49✔
39

40
function outputter.setColor () end
49✔
41

42
function outputter.pushColor () end
49✔
43

44
function outputter.popColor () end
49✔
45

46
function outputter.drawHbox (_, _, _) end
49✔
47

48
function outputter.setFont (_, _) end
49✔
49

50
function outputter.drawImage (_, _, _, _, _, _) end
49✔
51

52
function outputter.getImageSize (_, _) end
49✔
53

54
function outputter.drawSVG () end
49✔
55

56
function outputter.drawRule (_, _, _, _, _) end
49✔
57

58
function outputter.debugFrame (_, _, _) end
49✔
59

60
function outputter.debugHbox (_, _, _) end
49✔
61

62
function outputter.setLinkAnchor (_, _, _) end -- Unstable API
49✔
63

64
function outputter.beginLink (_, _, _) end -- Unstable API
50✔
65

66
function outputter.endLink (_, _, _, _, _, _, _) end -- Unstable API
49✔
67

68
function outputter.setMetadata (_, _, _) end
49✔
69

70
function outputter.setBookmark (_, _, _) end
49✔
71

72
function outputter.drawRaw (_) end
49✔
73

74
function outputter:getOutputFilename ()
49✔
75
   local fname
76
   if SILE.outputFilename then
49✔
77
      fname = SILE.outputFilename
49✔
78
   elseif SILE.input.filenames[1] then
×
79
      fname = pl.path.splitext(SILE.input.filenames[1])
×
80
      if self.extension then
×
81
         fname = fname .. "." .. self.extension
×
82
      end
83
   end
84
   if not fname then
49✔
85
      SU.error("Cannot guess output filename without an input name")
×
86
   end
87
   return fname
49✔
88
end
89

90
return outputter
49✔
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