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

sile-typesetter / sile / 9322841962

31 May 2024 06:41PM UTC coverage: 47.763% (-8.9%) from 56.674%
9322841962

push

github

web-flow
Merge 71aa6f2a1 into bb89a7e79

8081 of 16919 relevant lines covered (47.76%)

246.83 hits per line

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

0.0
/classes/tplain.lua
1
--- tplain document class.
2
-- @use classes.tplain
3

4
-- Basic! Transitional! In development! Not very good! Don't use it!
5
local plain = require("classes.plain")
×
6

7
local class = pl.class(plain)
×
8
class._name = "tplain"
×
9

10
class.defaultFrameset.content = {
×
11
   left = "8.3%pw",
12
   top = "11.6%ph",
13
   gridsize = 10,
14
   linegap = 7,
15
   linelength = 50,
16
   linecount = 30,
17
}
18

19
-- The classes tplain and tbook inherit from plain and book respectively but also
20
-- have this bit in common; this makes it accessible
21
function class:_t_common ()
×
22
   self:loadPackage("font-fallback")
×
23
   self:loadPackage("hanmenkyoshi")
×
24
   self:registerPostinit(function (class_)
×
25
      class_:bidiDisableTypesetter(SILE.typesetter)
×
26
      class_:bidiDisableTypesetter(SILE.typesetters.base)
×
27
   end)
28
   self.defaultFrameset.content.tate = self.options.layout == "tate"
×
29
   self:declareHanmenFrame("content", self.defaultFrameset.content)
×
30
   SILE.settings:set("document.parindent", SILE.types.node.glue("10pt"))
×
31
end
32

33
function class:_init (options)
×
34
   plain._init(self, options)
×
35
   class._t_common(self)
×
36
end
37

38
function class:declareOptions ()
×
39
   plain.declareOptions(self)
×
40
   self:declareOption("layout", function (_, value)
×
41
      if value then
×
42
         self.layout = value
×
43
         if value == "tate" then
×
44
            self:loadPackage("tate")
×
45
         end
46
      end
47
      return self.layout
×
48
   end)
49
end
50

51
function class:setOptions (options)
×
52
   options.layout = options.layout or "yoko"
×
53
   plain.setOptions(self, options)
×
54
end
55

56
return class
×
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