15

I use the makeidx in the extreport and the command \printindex to print the index out. The Index name (index in English) was translated to Vietnamese automatically into "Chỉ mục". I want to change "Chỉ mục" into "Tra cứu theo vần", which is much easier to understand in Vietnamse, my native language. So how can I do?

This is my MWE :

\documentclass[11pt,twoside]{extreport}
\usepackage[paperwidth=16cm,paperheight=24cm]{geometry}
\usepackage{amsmath,amsxtra,amssymb,latexsym,  amscd,amsfonts,enumerate,ifthen,stmaryrd,amsthm,amstext}
\usepackage[mathscr]{eucal}
\usepackage{graphics, graphpap,extsizes}
\usepackage[pdftex]{graphicx}
\usepackage{xspace}
\usepackage{mathrsfs}
\usepackage{makeidx}
\usepackage{indentfirst}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{vietnam}
\usepackage{perpage} 

\makeindex 

\begin{document}
\section*{Chuyển sang tứ giác} \index{hình vuông} 
\index{đối xứng trục}       

\index{đối xứng quay}

 Nhóm đối xứng \index{Nhóm đối xứng, i.e the symmetric group} của một tứ giác. 
\index{how can I do?} Ok let's see. 
\newpage 
\printindex
\end{document}

Here is the picture : enter image description here

2 Answers 2

20

You can either put

\renewcommand\indexname{Tra cứu theo vần}

after \begin{document} or

\AtBeginDocument{\renewcommand\indexname{Tra cứu theo vần}}

in the preamble.

Note that placing the former in the preamble doesn't work since vietnam.sty has a line

\AtBeginDocument{\captionsvietnam\datevietnam}

which loads vietnamise names...

1
  • thanks a lot! it works \documentclass[12pt,a4paper]{article} \usepackage[utf8]{vietnam} \AtBeginDocument{\renewcommand\refname{Tài liệu tham khảo}}
    – Black Mild
    Apr 23, 2020 at 16:38
5

You can use the imakeidx package:

\documentclass[11pt,twoside]{report}

\usepackage{imakeidx}
\usepackage{indentfirst}
\usepackage[utf8]{inputenc}
\usepackage[utf8]{vietnam}

\makeindex[title=Tra cứu theo vần]

\begin{document}
\section*{Chuyển sang tứ giác} \index{hình vuông}
\index{đối xứng trục}

\index{đối xứng quay}

 Nhóm đối xứng \index{Nhóm đối xứng, i.e the symmetric group} của một tứ giác.
\index{how can I do?} Ok let's see.

\newpage

\printindex
\end{document}

This will also free you from the burden of running MakeIndex, because the package does it by itself. Moreover it allows building as many indices as you want.

1
  • I find this imakeidx package solution more powerful than the traditional \renewcommand\indexname{} option (though I am not I fan of abusing the use of extra packages). In the latter case, the renaming of the index is separated from the call to \makeindex, even worse it is in the body of the document, whereas with imakeidx, it all remains compact, together: It results in better portability to other documents, and less chances to mess up. +1 Dec 13, 2023 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .