Giter Club home page Giter Club logo

Comments (5)

muzimuzhi avatar muzimuzhi commented on August 12, 2024

完全是猜的:看起来是做了「取消它们的定义、patch NFSS 内部命令、让默认字族用 patch 后的 NFSS 重新声明(也许是在用到它们的时候,也许是在 begindocument)」。\let\relax 是为了骗过 NFSS,让它认为某个字体尚未定义。例如 latex2e 里有多处这样的逻辑,

\xdef\font@name{\csname\curr@fontshape/\f@size\endcsname}%
\pickup@font
\font@name

其中 \pickup@font 里就使用是否为 \relax 来判断一个类似 \OT1/cmr/m/n/10 的 font selection command 是否有定义。

%% run `latexdef -s \pickup@font`
% latex.ltx, line 8564:
\def\pickup@font{%
    \expandafter \ifx \font@name \relax
       \define@newfont
    \fi}

(在 etex 的 \ifdefined/\ifcsname 广泛可使用之前,因为 \csname ... \endcsname 会把创建出来的未定义控制序列变成 \relax,在 tex 里无法可展开地区分一个需要拼出来的控制序列是真的未定义还是 \let 到了 \relax。这个历史包袱导致 latex 里经常不区分这两者,见 \@ifundefined。这也影响到了 expl3,见 https://github.com/latex3/latex3/issues/1150。)

似乎在BXjscls的mag=xreal时也见的到类似的宏片段。

找了一下,是这段,由 zr-tex8r/BXjscls@d12483b 添加

  \ifbxjs@TUenc
    \expandafter\let\csname TU/lmr/m/n/10\endcsname\relax
  \else
    \expandafter\let\csname OT1/cmr/m/n/10\endcsname\relax
  \fi

(依然是看起来)你的「为什么」是有意义的

同时这个文档类只支持LuaTeX引擎,默认用的主字体是TU/lmr,
为什么也要覆盖OT1/cmr呢?(不是cmunxx的OTF字体)。

我(可以说)完全没有用过 ltjsclasses,你对它的了解比我多,大概也比大部分非日语 latex 用户多,完全可以直接向 luatexja 提问(日文英文均可,用软件翻译也没问题的,勇敢一些)

If you have questions or recognize bugs/have feature requests, we would like you to create a thread in the forum or a ticket in the way which !OSDN.net supplies:

https://osdn.net/projects/luatex-ja/wiki/FrontPage(en)

如果担心 https://osdn.net/projects/luatex-ja 的活跃度不够,你可以同时在 tex.stackexchange.com 提问,在两个帖子里备注「同时在xx发帖,链接是xxx」就行。我猜 tex.stackexchange.com 上的主要也是非 ltjsclasses 用户,但了解 NFSS 的人更多。

from forum.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.