I am writing a dissertation and I need it to be in two languages (English and Spanish).
The organization is as follows:
- Table of contents
- Preface and Abstract appear in both languages
- Body of the dissertation: first, all the chapters appear in english (in part 1) and then all the chapters in Spanish (in part 2). The content of part 1 and part 2 is the same but translated. So, I decided to reset page numbering and chapter numbering when transitioning from Part 1 to Part 2.
I use both cleverer
and hyperlink
packages (this is a must).
Below, you can find a simplified version of the template utilized for the dissertation:
\documentclass[12pt, footinclude=true,headinclude=true, twoside=semi, headsepline=true, chapterprefix=false, appendixprefix=true, headings=big, numbers=enddot]{scrbook}
\usepackage[english, spanish]{babel}
\usepackage[utf8]{inputenc}
% MWE 21June16
% COMMENTS: Resetting chapter counter to 0 for each new part.
%=========================================
\usepackage{lipsum}
\usepackage{shorttoc}
\usepackage{etoc}
\usepackage{hyperref}
\usepackage[noabbrev,capitalise,nameinlink]{cleveref}
% Or
% \usepackage{chngcntr}
% \counterwithin{chapter}{part}
\begin{document}
%===========
\frontmatter
%===========
\selectlanguage{english}
\tableofcontents
\chapter{Preface/Prefacio}
.... some text ....
\chapter{Abstract/Resumen}
.... some text ....
%===========
\mainmatter
%===========
\part*{English version}
\chapter{English}\label{chapter1EN}
This is \Cref{chapter1EN}.
\chapter{English}\label{chapter2EN}
This is \Cref{chapter2EN}.
\chapter{English}\label{chapter3EN}
This is \Cref{chapter3EN}.
\chapter{English}\label{chapter4EN}
This is \Cref{chapter4EN}.
\selectlanguage{spanish}
\newpage
\setcounter{chapter}{0}
\pagenumbering{arabic}
\part*{Spanish version}
\chapter{Spanish}\label{chapter1ES}
This is \Cref{chapter1ES}.
\chapter{Spanish}\label{chapter2ES}
This is \Cref{chapter2ES}.
\chapter{Spanish}\label{chapter3ES}
This is \Cref{chapter3ES}.
\chapter{Spanish}\label{chapter4ES}
This is \Cref{chapter4ES}.
\end{document}
The issue is that all the references also "reset" and when clicking the link corresponding to label=chapter1ES
in both the text (in the portion of text corresponding to \Cref{chapter1ES}
) and in the TOC it refers to label=chapter1EN
.
Is there any way of resetting the page numbering and the chapter counter without affecting the labels and their references?