• New on CTAN: LuaCJK

    From CTAN Announcements@petra@ctan.org to ctan-ann on Thu Nov 12 17:19:24 2026
    From Newsgroup: comp.text.tex

    Mingyu Xia submitted the

    LuaCJK

    package.

    Version: 0.0.1 2026-11-11
    License: lppl1.3c

    Summary description: A LuaTeX CJK typesetting package

    Announcement text: ------------------------------------------------------------------------

    - Provide the CJK font family interface (`\setCJKmainfont`,
    `\setCJKsansfont`, `\setCJKmonofont`, `\setCJKfamilyfont`,
    `\CJKfamily`, `\newCJKfontfamily`, `\CJKfontspec`);
    an undeclared family warns once.

    - Provide `LuaCJK-listings`, which keeps CJK characters in place
    inside a `listings` block and counts each of them as two columns;
    LuaCJK loads it automatically with `listings`.

    - Ship `ctex-engine-luacjk.def` as the LuaTeX backend for `ctex`,
    selected with the option `engine = luacjk`; like `ctex`'s own
    backend it refuses `CJKfntef` and points at `LuaCJKfntef`.

    - Refuse to load with `luatexja`.

    - Provide `\LuaCJKversion`, which prints the version of the package.

    - Provide the `PunctStyle` key with the `quanjiao`, `plain`,
    `banjiao`, `kaiming`, `CCT`, and `hangmobanjiao` styles.
    Under a style with a fixed width the advance of an opening or
    middle mark moves its ink with it.

    - Provide `\LuaCJKEditPunctStyle` to edit the punctuation sets
    of the current style, and `AllowBreakBetweenPuncts`.

    - Provide `\LuaCJKsetwidth` and `\LuaCJKsetkern` for per-mark
    widths and per-pair gaps that override the selected punctuation style.

    - Provide `\LuaCJKDeclareSubCJKBlock` with `\LuaCJKCancelSubCJKBlock`
    and `\LuaCJKRestoreSubCJKBlock`, so a range of characters can
    use its own font inside a family.

    - Provide `\LuaCJKDeclareCharClass`, `\LuaCJKDeclarePunctClass`,
    and `\LuaCJKResetCharClass` to override the class of a code-point
    range. The classes carry the names of `xeCJK` (`FullLeft`,
    `FullRight`, `HalfLeft`, `HalfRight`, `NormalSpace`, `CJStarter`,
    `CM`, `Boundary`), the reset also restores the normal-spaced set,
    and the built-in table covers the CJK blocks of Unicode 15 and 16.

    - Provide `\LuaCJKDeclarePunctStyle` for a punctuation style
    of your own, with the keys `compress-adjacent`, `adjacent-ratio`,
    and `keep-open-close`.

    - Provide `AutoFakeBold`, `AutoFakeSlant`, `EmboldenFactor`,
    and `SlantFactor`; a family that sets `BoldFont` or `ItalicFont`
    is not emboldened or slanted.

    - Provide `\LuaCJKsetup`, and accept the same keys as package
    options, for example `\usepackage[PunctStyle = banjiao]{LuaCJK}`;
    an unknown key warns.

    - Every setting travels with the characters: a snapshot of the
    options is recorded on the glyphs, so a group that ends before
    its paragraph decides how its own text is set.

    - Provide `\LuaCJKdisable` and `\LuaCJKenable` to suspend the
    typographic adjustments while keeping CJK font selection;
    the state is recorded per node.

    - Provide `\LuaCJKShipoutHook`, which runs code through the
    standard `shipout/before` hook.

    - Provide `\LuaCJKnobreak` and the `PunctWidth` option;
    neither this prohibition nor that of `\LuaCJKVerbAddon` depends
    on `PunctKinsoku`, which controls only the punctuation rules.

    - Provide `\LuaCJKVerbAddon` and `\LuaCJKOffVerbAddon`, which make
    one CJK character as wide as two spaces of the current monospaced
    font and forbid breaks between CJK characters, so columns in code
    listings stay aligned.

    - Suspend the adjustments inside `\verb` and the verbatim-like
    environments (`verbatim`, `fancyvrb`, `listings`); the `Verb` option
    (`true`, `env`, `env+`, `false`) controls what is suspended there.

    - Provide `PunctFamily`, which sets a separate CJK family for
    the punctuation marks.

    - Provide `\defaultCJKfontfeatures` and `\addCJKfontfeatures`.

    - Provide `\setCJKfallbackfamilyfont` and `AutoFallBack` for
    characters that the selected CJK font does not have.

    - Provide `\songti`, `\heiti`, `\fangsong`, `\kaishu`, `\lishu`,
    and `\youyuan` as shorthands for the families `zhsong`,
    `zhhei`, `zhfs`, `zhkai`, `zhli`, and `zhyou`.

    - Provide `\normalspacedchars` so that slashes, backslashes,
    and hyphens take no glue on either side.

    - Ignore the zero-width format characters (U+200B, U+200C,
    U+200D, U+2060, U+180E) and the variation selectors at the
    input, so that they neither take glue nor separate two CJK
    characters.

    - Provide the `LocalConfig` option, which reads `luacjk.cfg`
    or `luacjk-<name>.cfg` at the end of the package.

    - Provide the `LoadFandol` option, which supplies Fandol fonts
    when the document declares none.

    - Provide `CJLineBreak`, which forbids a line break before the
    characters whose Unicode `Line_Break` property is `CJ`.

    - Provide `KaiMingPunct`, `MiddlePunct`, `LongPunct`, and
    `NoBreakLongPunct`, each with `+` and `-` forms, to edit the
    punctuation character sets.

    - A character the font lacks leaves no placeholder: the `.notdef`
    or private-use glyph a font substitutes for it is removed.

    - Provide `LatinPunct`, which keeps the shared quotation marks,
    the middle dot, and the ellipses in the Latin font instead
    of the CJK font.

    - Glue, kerns, and penalties inserted by the package carry the
    attributes of the neighbouring node, so a decoration such
    as `\CJKunderdot` covers CJK/CJK and CJK/Latin boundaries
    without a gap.

    - Provide CJK/CJK and CJK/Latin spacing with `CJKglue`, `CJKecglue`,
    `CJKspace`, and `xCJKecglue`; a value keeps its stretch and
    shrink orders. A source space between two CJK characters
    becomes the inter-character glue, so the boundary keeps its
    break opportunity and its stretch, and no glue is inserted
    between two long punctuation marks.

    - A mark keeps its break opportunity beside suspended text:
    the boundary glue at a mark has no width.

    - Provide `PunctKinsoku` line-breaking prohibitions: closing
    punctuation cannot start a line and opening punctuation
    cannot end a line.

    - Provide `CJKmath` and `\setCJKmathfont` for CJK characters in
    math mode, including nested math lists such as fractions.
    The family is registered as a math family, so a character in a
    script or a fraction keeps the size of that math style;
    with `CJKmath` off, a CJK character in math mode warns once.

    - Provide `PunctBoundWidth`, which leaves only the given advance
    inside the line and hangs the rest of the mark into the margin:
    at the end of a line, at its start, and when the mark ends a
    box such as `\mbox`. Only the lines of the paragraph itself
    are shifted.

    - Provide `CheckSingle` and `WidowPenalty`, which stop a single
    CJK character from ending up alone on the last line of a paragraph.

    - Provide `LuaCJKfntef`, a `lua-ul` based companion package
    providing `\CJKunderline`, `\CJKunderdot`, and `\CJKsout`.
    `\CJKunderline` takes `thickness`, `depth`, `format` for the
    color of the rule, and any other key of `lua-ul`; the geometry
    defaults to `depth = 0.2em` and `thickness = 0.4pt`, and `top`
    and `bottom` override the computed values.

    - Every decoration takes the same key set: `color`, `gap`, `height`,
    `symbol`, `sep`, `textformat`, and `hidden`, which keeps the
    dimensions of the text and draws no glyph. A bare color name is
    accepted, so `[red]` and `[subtract]` both work, and a key that
    a command does not use is ignored. Every decoration accepts
    `selectable`, `false` by default: a decoration symbol is then
    wrapped in an `ActualText` sequence that readers drop from
    the text they copy or select. Every decoration also accepts
    `subtract` (inset at both ends) and `skip` (leave out the punctuation).
    `\CJKsout` strikes at `height = 0.3em`, through the middle of
    a CJK glyph; `0.5ex` gives the Latin position.

    - Provide `\CJKunderdblline`, `\CJKunderwave`, and `\CJKxout`;
    the wave and the slash stay in phase along a line, their patterns
    scale with the font size, a decoration does not open up its line,
    and it fills its span exactly.

    - Provide `\LuaCJKemdescent`, the depth of the em box of the
    current font, so that an object of height `1em` placed at that
    depth covers the one-em square of a CJK character in any font.

    - Provide `\CJKunderanyline` and `\CJKunderanysymbol` for arbitrary
    rules and repeated symbols; `\CJKunderanysymbol` puts one symbol
    per em, centered in the cell, its depth measured from the
    baseline to the top of the symbol.

    (more changes are listed in the changelog:
    https://github.com/myhsia/LuaCJK/blob/main/CHANGELOG.md)

    ------------------------------------------------------------------------

    The packagerCOs Catalogue entry can be viewed at
    https://ctan.org/pkg/luacjk

    The packagerCOs files themselves can be inspected at
    https://mirrors.ctan.org/macros/luatex/latex/luacjk/

    ------------------------------------------------------------------------

    Thanks for the upload.

    For the CTAN Team
    Petra R|+be-Pugliese

    ------------------------------------------------------------------------

    CTAN is run entirely by volunteers and supported by TeX user groups.
    Please join a user group or donate to one, see https://ctan.org/lugs
    --- Synchronet 3.22a-Linux NewsLink 1.2