First an MWE is as follows.
\documentclass{ctexart}
\usepackage{imakeidx}
\usepackage[colorlinks,linkcolor=blue]{hyperref}
\makeatletter
\def\imki@progdefault{zhmakeindex}
\makeatother
\makeindex
\begin{document}
测试三角形\index{三角形}
测试二次曲线\index{二次曲线}
向量\index{向量}
共线\index{共线}
简比\index{简比}
\printindex
\end{document}
As you see, I use zhmakeindex
to make Chinese index with imakeidx
as above. Before compiling the tex
file, I download the bin
file from the link since when I input uname -a
in the terminal on my Macbook Pro it produces the information as follows
Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021;
root:xnu-4903.278.70~1/RELEASE_X86_64 x86_64
and then add the bin
file into the following folder where the makeindex
locates
/usr/local/texlive/2022/bin/universal-darwin/
I compile the tex
file by XeLaTeX with -shell-escape
option, but it says
sh: /Library/TeX/texbin/zhmakeindex: Permission denied
and produces the index page on which the index entries are in occurrence order but not in Chinese pinyin alphabet order.
So what's wrong or what I missed? Not install Go programming language on my Macbook, or something else?
sudo chmod a+x /Library/TeX/texbin/zhmakeindex
zhmakeindex
, the Go language is needed, so should I install it before assigning executable permission?pdflatex -shell-escape
, becausezhmakeindex
is not in the list of programs allowed in restricted shell-escape.