0

I'm writing an essay of which content should be showed in Chinese and English. The Chinese content is showed perfect as the main language, but the English content cannot show the 'Chapter' at the beginning of each title of chapter.

Mine(wrong)

enter image description hereOthers(Correct)

enter image description here

Only Chapter needs this, while Section or subsection do not need this.

In my main page:

\begin{document}
\pagenumbering{Roman}\setcounter{page}{1}
\tableofcontents

\maketableofcontents  %Chinese 

\tableofengcontents    %English 
\cleardoublepage
\end{document}

In the definition of content page:

%—————————English Contents—————————————
\makeatletter
\newcommand\engcontentsname{Contents}
\newcommand\tableofengcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\engcontentsname
        \@mkboth{%
           \MakeUppercase\engcontentsname}{\MakeUppercase\engcontentsname}}%
    \@starttoc{toe}% !!!!Define a new contents!!!!
    \if@restonecol\twocolumn\fi
    }
\newcommand\addengcontents[2]{%
    \addcontentsline{toe}{#1}{\protect\numberline{\csname the#1\endcsname}#2}}
\makeatother

\newcommand\echapter[1]{\addengcontents{chapter}{#1}}
\newcommand\esection[1]{\addengcontents{section}{#1}}
\newcommand\esubsection[1]{\addengcontents{subsection}{#1}}
\newcommand\esubsubsection[1]{\addengcontents{subsubsection}{#1}}
%—————————English Contents—————————————

I suppose the 'Chapter' should be inserted in the somewhere above?

If anyone could help me. Thanks very much!!

1 Answer 1

0

The tocloft package can help, read the documentation (texdoc tocloft).

After the end of your English Contents add

\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter } % put Chapter before number
\addtolength{\cftchapnumwidth}{4em} % Extra space for Chapter

This worked with my rendering of your code into an MWE (shown below) which of course didn't process \maketableofcontents as you had shown no code for that. I have no idea about your Chinese chapter titles if they will be affected.

% engchintocprob.tex  SE 539522

\documentclass{report}

%—————————English Contents—————————————
\makeatletter
\newcommand\engcontentsname{Contents}
\newcommand\tableofengcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\engcontentsname
        \@mkboth{%
           \MakeUppercase\engcontentsname}{\MakeUppercase\engcontentsname}}%
    \@starttoc{toe}% !!!!Define a new contents!!!!
    \if@restonecol\twocolumn\fi
    }
\newcommand\addengcontents[2]{%
    \addcontentsline{toe}{#1}{\protect\numberline{\csname the#1\endcsname}#2}}
\makeatother

\newcommand\echapter[1]{\addengcontents{chapter}{#1}}
\newcommand\esection[1]{\addengcontents{section}{#1}}
\newcommand\esubsection[1]{\addengcontents{subsection}{#1}}
\newcommand\esubsubsection[1]{\addengcontents{subsubsection}{#1}}
%—————————English Contents—————————————

\usepackage{tocloft}
\renewcommand{\cftchappresnum}{Chapter }
\addtolength{\cftchapnumwidth}{4em}

\begin{document}
\pagenumbering{Roman}\setcounter{page}{1}
\tableofcontents
\maketableofcontents  %Chinese 

\tableofengcontents    %English 
\cleardoublepage
\echapter{First}

\end{document}

You must log in to answer this question.

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