aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2024-12-06 13:41:44 +0800
committerAaron LI <aly@aaronly.me>2024-12-06 13:41:44 +0800
commitd0630a0f0ea5652b9a712977df74d8a192989ee1 (patch)
treed5b4699fdadfb460c77412ff5419b1377a459d80
parenteffa434e1d0bb8c142e6be778afcfd0ebcf0fd03 (diff)
downloadresume-d0630a0f0ea5652b9a712977df74d8a192989ee1.tar.bz2
class: Explain why \ignorespaces is required for CJK abstract
-rw-r--r--resume.cls7
1 files changed, 5 insertions, 2 deletions
diff --git a/resume.cls b/resume.cls
index 3603b5a..5661bb9 100644
--- a/resume.cls
+++ b/resume.cls
@@ -352,8 +352,11 @@
\phantomsection
\addcontentsline{toc}{section}{\ifdef{\@zh}{摘要}{Abstract}}
\ifdef{\@zh}{%
- \onehalfspacing\hspace{2em}%
- \ignorespaces% remove the beginning glue to make the indentation correct
+ % Use "\ignorespaces" to remove the beginning space, which becomes a
+ % glue between western and CJK characters, to make the indentation
+ % correct.
+ % Credit: https://tex.stackexchange.com/a/331456
+ \onehalfspacing\hspace{2em}\ignorespaces
}{}%
}{%
\par