## LaTeX forum ⇒ General ⇒ Cannot create multiple tables of content Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
tableofconfusion
Posts: 4
Joined: Sun Sep 18, 2016 5:44 pm

### Cannot create multiple tables of content

Dear forum members,

after two days of forum searching and trying this and that I'm running out of time, and so I decided to post my problem here. I have restarted using LATEX 20 years after writing my thesis with Version 2.09.

Currently I am writing a large document in two languages (german in the left column, english in the right) using package 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 a minimum example code - I cannot show the original one since it contains company Know-how. I think that all the included packages are necessary for the original code.

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}

Thanks a lot in advance for any help!!!

Tags:

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
tableofconfusion wrote:I think that all the included packages are necessary for the original code.

I doubt that for example: why do you use the parskip package in addition to KOMA-Script's parskip option? The package is not needed. And this is just one example.

Removing all of the packages one by one shows the cause of the problem – this combination:

\usepackage{lastpage}\usepackage{tableof}

Interestingly enough this combination works:

\usepackage{tableof}\usepackage{lastpage}

So of you really need the lastpage package then load it after tableof.

Regards

PS: I'd really would advice to go through every package and check wether you really need it. Another example: fancyhdr and KOMA-Script classes don't go very well together (there is even a warning message in the log saying so). KOMA-Script has its own package called scrlayer-scrpage which works nicely with KOMA-Script classes.
site moderator & package author

tableofconfusion
Posts: 4
Joined: Sun Sep 18, 2016 5:44 pm
Dear Clemens,

thank you very much for the quick answer!! Now you caught me - parskip is really not necessary. You're right, there may be more redundancies in the preamble, thanks for the hint!

What I really need is the lastpage package, because my company has ist own "style" for such documents including page numbering like "37 of 144".

Your suggestion to change the order of tableof and lastpage really had a positive effect on the test file above, but not the desired one on my original file where I use the paracol environment. I think I'll give up for today...

By the way, running Latex on my original file works once, but running it a second time in order to create the toc file makes Texmaker hang up. Something seems to be wrong with tableof combined with my other packages. Tomorrow I'm going to check which can be omitted, but I'm scared there will be many left.

Have a nice evening!

toctoc

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
tableofconfusion wrote:What I really need is the lastpage package, because my company has ist own "style" for such documents including page numbering like "37 of 144".

There are alternatives: http://tex.stackexchange.com/a/32471/5049

Regards
site moderator & package author

tableofconfusion
Posts: 4
Joined: Sun Sep 18, 2016 5:44 pm
Thanks!

Coming back to my paracol problem: Another solution could be putting the different tocs into boxes placed side by side, but I think there is no box type which can contain a toc, right? At least it does not work with parboxes and minipages.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

tableofconfusion
Posts: 4
Joined: Sun Sep 18, 2016 5:44 pm
Dear all,

the issue has been solved here:

http://tex.stackexchange.com/questions/330200/packages-tableof-and-paracol-multiple-tables-of-content-dont-work,

so the topic can be closed. Thanks to all who helped me such a lot in the past 20 hours!

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm

Not that it really were important but Jean-François suggests the exact same solution I did: changing the package loading order!
site moderator & package author