3

I am writing a large document in two languages (german in the left column, english in the right) using paracol. Now, after the first ~100 pages, I'm trying to create a Table of Contents also in two columns (german - english) and I thought that package tableof could help here, but it doesn't. I'm kind of confused ... maybe somebody can help me?

Here is an example code - I cannot show the original one since it contains company know-how, and I think that all the included packages are necessary.

Chapters and sections are tagged b (both), d (german) and e (english).

\documentclass[10pt,a4paper,parskip]{scrreprt}  
\usepackage[english, ngerman]{babel}  
\usepackage{selinput}  
\SelectInputMappings{adieresis={ä},germanbls={ß},}  
\usepackage[T1]{fontenc}  
\usepackage{amsmath}  
\usepackage{amsfonts}  
\usepackage{amssymb}  
\usepackage{graphicx}  
\usepackage{tabularx}  
\usepackage{geometry}  
\usepackage{setspace}  
\usepackage[right]{eurosym} 
\usepackage[usenames,dvipsnames]{color}  
\usepackage{colortbl}  
\usepackage{paralist}  
\usepackage{booktabs}  
\usepackage{array}  
\usepackage{parskip}  
\usepackage{picins}  
\usepackage[subfigure,titles]{tocloft}  
\usepackage[pdfpagelabels=true, colorlinks=true, allcolors=blue]{hyperref}  
\usepackage{nomencl}  
\makenomenclature  
\usepackage{makeidx}  
\makeindex  
\usepackage{natbib}  
\usepackage{multirow}  
\usepackage{bm}  
\usepackage{float}  
\usepackage{pdfpages}  
\usepackage{longtable}  
\usepackage{csquotes}  
\usepackage{mdwtab, tabularx}  
\usepackage{lastpage}  
\usepackage[super]{nth}  
\usepackage{paracol}  
\usepackage[printonlyused]{acronym}  
\usepackage{fancyhdr}  
\usepackage{mathtools,amssymb,diagbox,multirow}  
\usepackage{enumitem}  
\usepackage{caption}  
\usepackage[lang=english,font=it]{bicaption}  
\usepackage[format=hang]{subcaption}  
\pagestyle{fancy}  
\fancyhf{}  
\usepackage{marginnote}  
\usepackage{eso-pic}  
\usepackage{watermark}  
\usepackage{tableof}  
\AtBeginDocument{\tofOpenTocFileForWrite}  

\begin{document}  
\bibliographystyle{plain}  
\pagestyle{fancy}  
\fancypagestyle{plain}{}  
\fancyhf{}  
%  
\part{Erster Teil\\ First Part}  
\tableof{b}   
\tableof{d}  
\tableof{e}  
%  
\toftagthis{b}  
\chapter{Das erste Kapitel \\ The first chapter}  
\begin{sloppypar}  
\begin{paracol}{2}  
\begin{leftcolumn}  
Ein bißchen deutscher Text, der das erste Kapitel einleitet, bevor es mit dem ersten Abschnitt losgeht.  
\end{leftcolumn}  
\begin{rightcolumn}  
A little bit of english text supposed to prepare the reader for the first section.  
\end{rightcolumn}  
%  
\begin{leftcolumn}  
\toftagthis{d}  
\section{Der erste Abschnitt im ersten Kapitel}  
Der Text zum ersten Abschnitt.  
\end{leftcolumn}  
\begin{rightcolumn}  
\toftagthis{e}  
\section{The first section of the first chapter}  
Text in the first section.  
\end{rightcolumn}  
%  
\begin{leftcolumn}  
\toftagthis{d}  
\section{Der zweite Abschnitt im ersten Kapitel}  
Text im zweiten Abschnitt.  
\end{leftcolumn}  
\begin{rightcolumn}  
\toftagthis{e}  
\section{The second section in the first chapter}  
Text belonging to the second section.  
\end{rightcolumn}  
\end{paracol}  
\end{sloppypar}  
%  
\toftagthis{b}  
\chapter{Das zweite Kapitel \\ The second chapter}  
\begin{sloppypar}  
\begin{paracol}{2}  
\begin{leftcolumn}  
\toftagthis{d}  
\section{Der erste Abschnitt im zweiten Kapitel}  
Das zweite Kapitel beginnt mit diesem Abschnitt.  
\end{leftcolumn}  
\begin{rightcolumn}  
\toftagthis{e}  
\section{The first section of the second chapter}  
The second chapter starts with this section.  
\end{rightcolumn}  
\end{paracol}  
\end{sloppypar}  
\end{document}    

The pdf shows only the first (b) table of Contents, whatever I try.

Thanks a lot in advance for any help!!!

  • Welcome to TeX.SX! You can highlight code in your post using back-ticks. To highlight code-blocks, either indent them by four spaces or use the {} on the gui. Also, when asking questions rather than posting large chunks of code, as you have done, it is better if you can reduce your code to a minimal working example because this makes it easier for people to help you -- and much more likely that they will! – Andrew Sep 18 '16 at 15:44
  • Welcome to TeX SE! And nice nickname. :D – Alenanno Sep 18 '16 at 16:12
  • All tocs are there you just can't see them. Try \tableof{b} \hrule \tableof{d} \hrule \tableof{e} \hrule – touhami Sep 18 '16 at 17:22
  • Crosspost and Crosspost – Johannes_B Sep 19 '16 at 5:59
  • I said it is ok to crosspost, as long as you provide the links. These are the rules of LaTeX-community and goLaTeX, because it is the way nettiquette works. – Johannes_B Sep 19 '16 at 6:00
4

Your example is very far from being a minimal one and as a result the formulation of your question may be misleading. Something else than tableof and paracol is causing a problem (a serious one indeed as during testing I often ended in staled LaTeX compilations). Here it works:

\documentclass[10pt,a4paper,parskip]{scrreprt}
\usepackage[english, ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{paracol}
\usepackage{tableof}
\AtBeginDocument{\tofOpenTocFileForWrite}

\begin{document}
\bibliographystyle{plain}
\pagestyle{fancy}
\fancypagestyle{plain}{}
\fancyhf{}
%
\part{Erster Teil\\ First Part}
\tableof{b}

\vspace{3ex}
\hrule height 1pt
\vspace{3ex}

\begin{paracol}2
  \begin{leftcolumn}
    \centerline{\textbf{Deutsch}}
    \tableof{d}
  \end{leftcolumn}
  \begin{rightcolumn}
    \centerline{\textbf{English}}
    \tableof{e}
  \end{rightcolumn}
\end{paracol}
%
\toftagstart{b}
\chapter{Das erste Kapitel \\ The first chapter}
\begin{sloppypar}
\begin{paracol}{2}
\begin{leftcolumn}
Ein bißchen deutscher Text, der das erste Kapitel einleitet, bevor es mit dem
ersten Abschnitt losgeht.
\end{leftcolumn}
\begin{rightcolumn}
A little bit of english text supposed to prepare the reader for the first section.
\end{rightcolumn}
%
\begin{leftcolumn}
\toftagthis{d}
\section{Der erste Abschnitt im ersten Kapitel}
Der Text zum ersten Abschnitt.
\end{leftcolumn}
\begin{rightcolumn}
\toftagthis{e}
\section{The first section of the first chapter}
Text in the first section.
\end{rightcolumn}
%
\begin{leftcolumn}
\toftagthis{d}
\section{Der zweite Abschnitt im ersten Kapitel}
Text im zweiten Abschnitt.
\end{leftcolumn}
\begin{rightcolumn}
\toftagthis{e}
\section{The second section in the first chapter}
Text belonging to the second section.
\end{rightcolumn}
\end{paracol}
\end{sloppypar}
% you can try this:
% \toftagthis{d,e}
\chapter{Das zweite Kapitel \\ The second chapter}
\begin{sloppypar}
\begin{paracol}{2}
\begin{leftcolumn}
\toftagthis{d}
\section{Der erste Abschnitt im zweiten Kapitel}
Das zweite Kapitel beginnt mit diesem Abschnitt.
\end{leftcolumn}
\begin{rightcolumn}
\toftagthis{e}
\section{The first section of the second chapter}
The second chapter starts with this section.
\end{rightcolumn}
\end{paracol}
\end{sloppypar}
\end{document}

enter image description here

Now the culprit is among the things I commented out:

% \usepackage{selinput}
% \SelectInputMappings{adieresis={ä},germanbls={ß},}
% \usepackage{amsmath}
% \usepackage{amsfonts}
% \usepackage{amssymb}
% \usepackage{graphicx}
% \usepackage{tabularx}
% \usepackage{geometry}
% \usepackage{setspace}
% \usepackage[right]{eurosym}
% \usepackage[usenames,dvipsnames]{color}
% \usepackage{colortbl}
% \usepackage{paralist}
% \usepackage{booktabs}
% \usepackage{array}
% \usepackage{parskip}
% %\usepackage{picins}
% %\usepackage[subfigure,titles]{tocloft}
% \usepackage[pdfpagelabels=true, colorlinks=true, allcolors=blue]{hyperref}
% \usepackage{nomencl}
% \makenomenclature
% \usepackage{makeidx}
% \makeindex
% \usepackage{natbib}
% \usepackage{multirow}
% \usepackage{bm}
% \usepackage{float}
% \usepackage{pdfpages}
% \usepackage{longtable}
% \usepackage{csquotes}
% \usepackage{mdwtab, tabularx}
% \usepackage{lastpage}
% \usepackage[super]{nth}
% \usepackage[printonlyused]{acronym}
% \usepackage{fancyhdr}
% \usepackage{mathtools,amssymb,diagbox,multirow}
% \usepackage{enumitem}
% \usepackage{caption}
% \usepackage[lang=english,font=it]{bicaption}
% \usepackage[format=hang]{subcaption}
% \pagestyle{fancy}
% \fancyhf{}
% \usepackage{marginnote}
% \usepackage{eso-pic}
% \usepackage{watermark}

Proceed by dichotomy to identify the package(s) which badly interact.


edit

some change of ordering of the packages makes your mwe compile:

\documentclass[10pt,a4paper,parskip]{scrreprt}
\usepackage[english, ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{fancyhdr}
\usepackage{paracol}
\usepackage{tableof}
\AtBeginDocument{\tofOpenTocFileForWrite}

\usepackage{selinput}
\SelectInputMappings{adieresis={ä},germanbls={ß},}


\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{geometry}
\usepackage{setspace}
\usepackage[right]{eurosym}

\usepackage[usenames,dvipsnames]{color}
\usepackage{colortbl}
\usepackage{paralist}
\usepackage{booktabs}
\usepackage{array}
\usepackage{parskip}
%\usepackage{picins}
\usepackage[subfigure,titles]{tocloft}
\usepackage[pdfpagelabels=true, colorlinks=true, allcolors=blue]{hyperref}
\usepackage{nomencl}
\makenomenclature
\usepackage{makeidx}
\makeindex


\usepackage{natbib}
\usepackage{multirow}
\usepackage{bm}
\usepackage{float}
\usepackage{pdfpages}
\usepackage{longtable}
\usepackage{csquotes}
\usepackage{mdwtab, tabularx}
\usepackage{lastpage}
\usepackage[super]{nth}
\usepackage[printonlyused]{acronym}
\usepackage{fancyhdr}
\usepackage{mathtools,amssymb,diagbox,multirow}
\usepackage{enumitem}
\usepackage{caption}
\usepackage[lang=english,font=it]{bicaption}
\usepackage[format=hang]{subcaption}
\pagestyle{fancy}
\fancyhf{}
\usepackage{marginnote}
\usepackage{eso-pic}
\usepackage{watermark}


\begin{document}
\bibliographystyle{plain}
\pagestyle{fancy}
\fancypagestyle{plain}{}
\fancyhf{}
%
\part{Erster Teil\\ First Part}
\tableof{b}

\vspace{3ex}
\hrule height 1pt
\vspace{3ex}

\begin{paracol}2
  \begin{leftcolumn}
    \centerline{\textbf{Deutsch}}
    \tableof{d}
  \end{leftcolumn}
  \begin{rightcolumn}
    \centerline{\textbf{English}}
    \tableof{e}
  \end{rightcolumn}
\end{paracol}
%
\toftagstart{b}
\chapter{Das erste Kapitel \\ The first chapter}
\begin{sloppypar}
\begin{paracol}{2}
\begin{leftcolumn}
Ein bißchen deutscher Text, der das erste Kapitel einleitet, bevor es mit dem
ersten Abschnitt losgeht.
\end{leftcolumn}
\begin{rightcolumn}
A little bit of english text supposed to prepare the reader for the first section.
\end{rightcolumn}
%
\begin{leftcolumn}
\toftagthis{d}
\section{Der erste Abschnitt im ersten Kapitel}
Der Text zum ersten Abschnitt.
\end{leftcolumn}
\begin{rightcolumn}
\toftagthis{e}
\section{The first section of the first chapter}
Text in the first section.
\end{rightcolumn}
%
\begin{leftcolumn}
\toftagthis{d}
\section{Der zweite Abschnitt im ersten Kapitel}
Text im zweiten Abschnitt.
\end{leftcolumn}
\begin{rightcolumn}
\toftagthis{e}
\section{The second section in the first chapter}
Text belonging to the second section.
\end{rightcolumn}
\end{paracol}
\end{sloppypar}
% you can try this:
% \toftagthis{d,e}
\chapter{Das zweite Kapitel \\ The second chapter}
\begin{sloppypar}
\begin{paracol}{2}
\begin{leftcolumn}
\toftagthis{d}
\section{Der erste Abschnitt im zweiten Kapitel}
Das zweite Kapitel beginnt mit diesem Abschnitt.
\end{leftcolumn}
\begin{rightcolumn}
\toftagthis{e}
\section{The first section of the second chapter}
The second chapter starts with this section.
\end{rightcolumn}
\end{paracol}
\end{sloppypar}
\end{document}

No idea why. picins is commented-out as it does not exist on my installation.

  • The comments to the question contain links to a crosspost to LC, where Clemens also tried to figure out the problem. – Johannes_B Sep 19 '16 at 6:05
  • jfbu's solution works perfectly, many thanks! So the question is answered, we can close the topic and all related ones in two other forums. – tableofconfusion Sep 19 '16 at 7:59
  • @tableofconfusion interesting: yesterday you told me this solution wouldn't work in your real life document! – clemens Sep 19 '16 at 9:24
  • Sorry, Clemens, maybe it's because I am working on different computers (office and private). I also have changed and discarded a lot in my preamble, after all I'm glad that it's working now. – tableofconfusion Sep 19 '16 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.