• 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/unichar/init.lua
1
local base = require("packages.base")
×
2

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

6
function package:registerCommands ()
×
7

8
  self:registerCommand("unichar", function(_, content)
×
9
    local cp = content[1]
×
10
    if type(cp) ~= "string" then SU.error("Bad argument to \\unicode") end
×
11
    local hlist = SILE.typesetter.state.nodes
×
12
    local char = SU.utf8charfromcodepoint(cp)
×
13
    if #hlist > 1 and hlist[#hlist].is_unshaped
×
14
                  and pl.tablex.deepcompare(hlist[#hlist].options, SILE.font.loadDefaults({})) then
×
15
      -- Stack character with a preceeding unshaped node if its font is the
16
      -- same as the current one, so that combining characters (e.g. diacritics)
17
      -- and kerning works with \unichar'ed code points too.
18
      hlist[#hlist].text = hlist[#hlist].text .. char
×
19
    else
20
      SILE.typesetter:typeset(char)
×
21
    end
22
  end)
23

24
end
25

26
package.documentation = [[
27
\begin{document}
28
\use[module=packages.unichar]
29
SILE is Unicode compatible, and expects its input files to be in the UTF-8 encoding.
30
(The actual range of Unicode characters supported will depend on the supported ranges of the fonts that SILE is using to typeset.)
31
Some Unicode characters are hard to locate on a standard keyboard, and so are difficult to enter into SILE documents.
32

33
The \autodoc:package{unichar} package helps with this problem by providing the \autodoc:command{\unichar} command to enter Unicode codepoints.
34

35
\begin[type=autodoc:codeblock]{raw}
36
\unichar{U+263A}
37
\end{raw}
38

39
This produces: \font[family=Symbola]{\unichar{U+263A}}
40

41
If the argument to \autodoc:command{\unichar} begins with \code{U+}, \code{u+}, \code{0x}, or \code{0X}, then it is assumed to be a hexadecimal value.
42
Otherwise it is assumed to be a decimal codepoint.
43
\end{document}
44
]]
×
45

46
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