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

xeCJK: 与 listings 结合使用时提示 ERROR #344

Closed
Liam0205 opened this issue Mar 12, 2018 · 2 comments
Closed

xeCJK: 与 listings 结合使用时提示 ERROR #344

Liam0205 opened this issue Mar 12, 2018 · 2 comments
Assignees
Labels

Comments

@Liam0205
Copy link
Contributor

该问题由 Boyuan Yang 在 https://t.me/chinesetex/3210 首先提出。

\documentclass{article}
\usepackage{xeCJK}
\usepackage{listings}
\begin{document}
\begin{lstlisting}[escapeinside={<:}{:>}]
#!/bin/sh
<:…:><:…:><:命:><:令:><:行:>
\end{lstlisting}
\end{document}

该问题在 xeCJK 3.5.0 中未见,在最新版本 3.6.1 中可见。应当是最近引入的 bug。

@hosiet
Copy link

hosiet commented Mar 12, 2018

补充一下错误信息:

(/usr/share/texlive/texmf-dist/tex/xelatex/xecjk/xeCJK-listings.sty)
(./test.aux) (/usr/share/texmf/tex/latex/tipa/t3cmr.fd)
! Missing number, treated as zero.
<to be read again> 
                   \c__xeCJK_xeCJK/FandolSong-Regular(0)/m/n/10/quanjiao/ski...
l.6 <:…:><:…
                :>
?

@qinglee
Copy link
Member

qinglee commented Mar 12, 2018

例子可以精简为:

\documentclass{article}

\usepackage{xeCJK}[2018/01/28 v3.6.0]

\begin{document}

…{}…  

\end{document}

只要长标点中间被断开就会出现这个问题,是由于 v3.6.0 没有保存长标点相关数据造成的。

@qinglee qinglee self-assigned this Mar 12, 2018
@qinglee qinglee added the bug label Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants