class Language
The language object is the first argument to most of the other functions in the lang
library.
Reference:
- Corresponding C source code: texlang.c#L55-62
😱 Types incomplete or incorrect? 🙏 Please contribute!
methods
Language.id
@return - The number returned is the internal language
id number this object refers to.
😱 Types incomplete or incorrect? 🙏 Please contribute!
Return the current internal language
id number.
Example:
Reference:
- Corresponding C source code: llanglib.c#L50-L56
- https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-languages.tex#L956-960
Language.hyphenation
Add hyphenation exceptions.
Example:
local l = lang.new()
l:hyphenation("man-u-script")
print(l:hyphenation()) -- man-u-script
l:hyphenation("ca-tas-tro-phe")
print(l:hyphenation()) -- man-u-script ca-tas-tro-phe
Reference:
- Corresponding C source code: llanglib.c#L86-L104
- https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-languages.tex#L968-980
Language.hyphenation
Get the hyphenation exceptions.
Example:
Reference:
- Corresponding C source code: llanglib.c#L86-L104
- https://gitlab.lisn.upsaclay.fr/texlive/luatex/-/blob/f52b099f3e01d53dc03b315e1909245c3d5418d3/manual/luatex-languages.tex#L968-980
Language.clear_hyphenation
Clear the set of hyphenation exceptions.
Example:
local l = lang.new()
print(l:hyphenation()) -- nil
lang.hyphenation(l, "man-u-script")
lang.hyphenation(l, "ca-tas-tro-phe")
print(lang.hyphenation(l)) -- man-u-script ca-tas-tro-phe
lang.clear_hyphenation(l)
print(lang.hyphenation(l)) -- nil
Reference:
- Corresponding C source code: llanglib.c#L215-L221
😱 Types incomplete or incorrect? 🙏 Please contribute!
Language.patterns
@param
patterns
- For example .ab3a .abb2 .ab5erk
😱 Types incomplete or incorrect? 🙏 Please contribute!
Add additional patterns for this language object.
Reference:
- Corresponding C source code: llanglib.c#L58-L76
Language.patterns
@return pattterns
- For example .ab3a .abb2 .ab5erk
😱 Types incomplete or incorrect? 🙏 Please contribute!
Return the current set of patterns.
Reference:
- Corresponding C source code: llanglib.c#L58-L76