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

sile-typesetter / sile / 11534409649

26 Oct 2024 07:27PM UTC coverage: 33.196% (-28.7%) from 61.897%
11534409649

push

github

alerque
chore(tooling): Update editor-config key for stylua as accepted upstream

Our setting addition is still not in a tagged release, but the PR was
accepted into the default branch of stylua. This means you no longer
need to run my fork of Stylua to get this project's style, you just nead
any build from the main development branch. However the config key was
renamed as part of the acceptance, so this is the relevant adjustment.

5810 of 17502 relevant lines covered (33.2%)

1300.57 hits per line

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

93.42
/core/papersize.lua
1
local papersize = {
18✔
2
   letter = { 612, 792 },
18✔
3
   note = { 612, 792 },
18✔
4
   legal = { 612, 1008 },
18✔
5
   executive = { 522, 756 },
18✔
6
   halfletter = { 396, 612 },
18✔
7
   halfexecutive = { 378, 522 },
18✔
8
   statement = { 396, 612 },
18✔
9
   folio = { 612, 936 },
18✔
10
   quarto = { 610, 780 },
18✔
11
   ledger = { 1224, 792 },
18✔
12
   tabloid = { 792, 1224 },
18✔
13
   a0 = { 2383.9370337, 3370.3937373 },
18✔
14
   a1 = { 1683.7795457999998, 2383.9370337 },
18✔
15
   a2 = { 1190.551194, 1683.7795457999998 },
18✔
16
   a3 = { 841.8897728999999, 1190.551194 },
18✔
17
   a4 = { 595.275597, 841.8897728999999 },
18✔
18
   a5 = { 419.52756359999995, 595.275597 },
18✔
19
   a6 = { 297.6377985, 419.52756359999995 },
18✔
20
   a7 = { 209.76378179999998, 297.6377985 },
18✔
21
   a8 = { 147.40157639999998, 209.76378179999998 },
18✔
22
   a9 = { 104.88189089999999, 147.40157639999998 },
18✔
23
   a10 = { 73.70078819999999, 104.88189089999999 },
18✔
24
   b0 = { 2834.6457, 4008.1890197999996 },
18✔
25
   b1 = { 2004.0945098999998, 2834.6457 },
18✔
26
   b2 = { 1417.32285, 2004.0945098999998 },
18✔
27
   b3 = { 1000.6299320999999, 1417.32285 },
18✔
28
   b4 = { 708.661425, 1000.6299320999999 },
18✔
29
   b5 = { 498.89764319999995, 708.661425 },
18✔
30
   b6 = { 354.3307125, 498.89764319999995 },
18✔
31
   b7 = { 249.44882159999997, 354.3307125 },
18✔
32
   b8 = { 175.7480334, 249.44882159999997 },
18✔
33
   b9 = { 124.72441079999999, 175.7480334 },
18✔
34
   b10 = { 87.8740167, 124.72441079999999 },
18✔
35
   c2 = { 1298.2677305999998, 1836.8504136 },
18✔
36
   c3 = { 918.4252068, 1298.2677305999998 },
18✔
37
   c4 = { 649.1338652999999, 1003.4645777999999 },
18✔
38
   c5 = { 459.2126034, 649.1338652999999 },
18✔
39
   c6 = { 323.1496098, 459.2126034 },
18✔
40
   c7 = { 229.6063017, 323.1496098 },
18✔
41
   c8 = { 161.5748049, 229.6063017 },
18✔
42
   dl = { 311.81102699999997, 623.6220539999999 },
18✔
43
   comm10 = { 297, 684 },
18✔
44
   monarch = { 279, 540 },
18✔
45
   ansia = { 612, 792 },
18✔
46
   ansib = { 792, 1224 },
18✔
47
   ansic = { 1224, 1584 },
18✔
48
   ansid = { 1584, 2448 },
18✔
49
   ansie = { 2448, 3168 },
18✔
50
   arche = { 2592, 3456 },
18✔
51
   arche2 = { 1872, 2736 },
18✔
52
   arche3 = { 1944, 2808 },
18✔
53
   arche1 = { 2160, 3024 },
18✔
54
   archd = { 1728, 2592 },
18✔
55
   archc = { 1296, 1728 },
18✔
56
   archb = { 864, 1296 },
18✔
57
   archa = { 648, 864 },
18✔
58
   flsa = { 612, 936 },
18✔
59
   flse = { 612, 936 },
18✔
60
   csheet = { 1224, 1584 },
18✔
61
   dsheet = { 1584, 2448 },
18✔
62
   esheet = { 2448, 3168 },
18✔
63
}
64

65
setmetatable(papersize, {
36✔
66
   __call = function (self, size, landscape)
67
      local geometry
68
      local _, _, x, y = string.find(size, "(.+)%s+x%s+(.+)")
10✔
69
      if x and y then
10✔
70
         geometry = { SILE.types.measurement(x):tonumber(), SILE.types.measurement(y):tonumber() }
×
71
      else
72
         local preset_name = string.lower(size:gsub("[-%s]+", ""))
10✔
73
         geometry = self[preset_name]
10✔
74
      end
75
      if SU.boolean(landscape) then
20✔
76
         geometry[1], geometry[2] = geometry[2], geometry[1]
×
77
      end
78
      if geometry then
10✔
79
         return geometry
10✔
80
      end
81
      SU.error(string.format(
×
82
         [[
×
83
            Unable to parse papersize '%s'
84

85
            Custom sizes may be entered with 'papersize=<measurement> x <measurement>'.
86
            Predefined paper sizes include: %s
87
         ]],
88
         size,
89
         table.concat(pl.tablex.keys(papersize), ", ")
×
90
      ))
91
   end,
92
})
93

94
return papersize
18✔
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

© 2025 Coveralls, Inc