Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于CTeX标识 #326

Closed
Man-Ting-Fang opened this issue Dec 5, 2017 · 5 comments
Closed

关于CTeX标识 #326

Man-Ting-Fang opened this issue Dec 5, 2017 · 5 comments
Assignees

Comments

@Man-Ting-Fang
Copy link

目前\CTeX的定义中用了\ifincsname,但(e-)upTeX和ApTeX中没这个原语,无法使用。(pdfTeX、XeTeX、LuaTeX中都有,没问题。)

@Liam0205
Copy link
Contributor

Liam0205 commented Dec 5, 2017

\ifincsname 是 pdfTeX 在 e-TeX 基础上引入的 primitive。在 \csname ... \endcsname 中的时候,它为 true,否则为 false。

LuaTeX 作为 pdfTeX 的继任,自然也有它(部分新增的 primitive 被改名)。XeTeX 是直接在 e-TeX 上做的扩展,与 pdfTeX 并没有继任关系,但也保留了部分 pdfTeX 新增的 primitive。这其中包含了 \ifincsname

这是为什么在 pdfTeX/XeTeX/LuaTeX 里有这个 primitive 的原因。pTeX 系没有这个 primitive(ApTeX 可以让马起园加),在宏的层面我也不知道怎么做……

@Liam0205
Copy link
Contributor

Liam0205 commented Dec 5, 2017

按照 Joseph 的说法,如果没有原语支持,在宏的层面没法做到。

https://tex.stackexchange.com/questions/404663/how-to-test-if-a-macro-is-being-expanded-between-csname-endcsname-in-e

所以,似乎应该对 (e-)upTeX 和 ApTeX 采用不同的定义?

@louisstuart96
Copy link

或者退而求其次,在平时用 C\TeX 这样的定义,然后用 hyperref 的 PDF string disable。反正纯文本一般都是书签有需求。

@qinglee qinglee self-assigned this Dec 5, 2017
@qinglee
Copy link
Member

qinglee commented Dec 5, 2017

定义 \CTeX 的时候,还没有考虑到支持 pTeX 系列,加入 \ifincsname 也仅是向 hologo 学习而已,并不是很必要的功能,现在可以删掉。

@qinglee qinglee closed this as completed in 85a3ed9 Dec 5, 2017
@Man-Ting-Fang
Copy link
Author

非常感谢各位老师!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants