Closed cykerway closed 4 years ago
Adding columns=fullflexible
in \lstset
fixed this problem. Probably a bug in listings
not xeCJK
.
listings
decides to set columns=[c]fixed
by default. This is not a bug.
See https://github.com/CTeX-org/forum/issues/7 and this question on TeX.SX.⟨...⟩
from listings.pdf
), and xetex's codepoint degeneration (see #286 and this answer on TeX.SX). Also, PDF readers may behave differently when copying from the same PDF, see #400.
The problem is exactly as posted here: https://tex.stackexchange.com/a/178708/4288
The package shouldn't introduce extra spaces in code block, otherwise when users copy-paste the code they may get incorrect result. For example:
print("一二三")
is not the same asprint("一 二 三")
.