Closed zwz closed 1 year ago
You're using an outdated pygments
.
The C-family lexers in pygments
learnt support for unicode identifiers (see https://github.com/pygments/pygments/pull/1848) since pygments
2.11.0, released in Dec, 2021.
With latest pygments
is 2.14.0, released in Jan, 2023, your example gives (need either xelatex
or lualatex
)
(The thin red frame around
#
denotes an error token in default pygments
style.) You can check it on https://pygments.org/demo/ yourself.
Yes, I am using an old version.
Is the red frame around #
expected?
Is the red frame around
#
expected?
Yes. It marks an invalid (cpp) grammar.
With latest
pygments
is 2.14.0, released in Jan, 2023, your example gives (need eitherxelatex
orlualatex
)
https://github.com/CTeX-org/ctex-kit/issues/580 contains some solutions to suppress the spacing between 中文
and int
.
Thank you for the link.
Here is a MWE
And here is the result.![截屏2023-04-07 上午10 28 28](https://user-images.githubusercontent.com/897156/230528916-a663f2ef-41a1-429e-a71a-034aece8d153.png)
The 1st line
测试#
and 2nd line中文
are in boxes.