You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. 之前的环境变量根本影响`\isGraduateTF`结果,始终用`#2`。这次将`if_eq`从 token list 的换成 string 的,并将`\GRADUATE`从`n`(token list)改为`V`(value of the command)。
> …we can choose between `\tl_if_eq:` (from token list library) and `\str_if_eq:` (from string library). Unless **it is absolutely necessary, it is recommended to use string library’s comparision functions**. That i1s because `\tl_if_eq:` not only checks if the characters are the same, but it also checks if the category code of each character is the same. As a result, two seemingly identical variables can result in `False` outcome when using `\tl_if_eq:`.
>
> —[LaTeX3: Programming in LaTeX with Ease | Alan Xiang’s Blog](https://www.alanshawn.com/tech/2020/10/04/latex3-tutorial.html)
2. 命令内部不能使用`lstlisting`环境。这里用`\lstinputlisting`绕开了。
这种情况只在`\isGraduateTF`的`#1`里有,之前测不到。
% Verbatim material can't be placed in a macro argument because then the material got already parsed by TeX and the switching to verbatim mode comes to late.
0 commit comments