Graphics, Figures & Tableshow to split the table of contents

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

how to split the table of contents

Post by thedreamshaper »

I am using a standard

Code: Select all

\tableofcontents
command but i need it to take up less space, i figure it should be able to be split so that instead of 1 line on a page i could have two. That is two vertical lines of chapters rather than just the one.

Any ideas guys :) ?

Thanks
Last edited by thedreamshaper on Sat Sep 18, 2010 1:03 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

how to split the table of contents

Post by Montag »

your description of the problem is a bit confusing ... but maybe this is it :)

in the preamble:

Code: Select all

\usepackage{multicol}
in the document:

Code: Select all

\begin{multicols*}{2}
\tableofcontents
\end{multicols*}
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

Re: how to split the table of contents

Post by thedreamshaper »

Hehe thanks, i guess i could have been more explicit, though you got it right. exept what it does is make the two columns(as i asked) but it continous on the next page, so basickly while my table of contents is now down two 2 pages, it splits it so that the first(left) column is contioned on the next page rather than on the same. How can i force it to continue at the same page ?


Thanks
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

how to split the table of contents

Post by localghost »

The multitoc package is your friend.

Code: Select all

\documentclass[10pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage[toc]{multitoc}
\usepackage{blindtext}

\begin{document}
  \tableofcontents
  \Blinddocument
\end{document}

Thorsten
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

how to split the table of contents

Post by thedreamshaper »

Thanks Thorsten but i am afraid i didnt get a table of contents, it just sorta messed up my document (and removed the table of contents entirely). Could it be because of some of the other packages i am using ?

Code: Select all

\usepackage[top=2.0cm,left=2.0cm,right=1.5cm,bottom=2.0cm,headheight=12.5 pt]{geometry}
\usepackage[ansinew]{inputenc}
\usepackage{graphicx}
\usepackage{amssymb,amsmath}
\usepackage[compact]{titlesec}
\usepackage{tabularx}
\usepackage{multicol}
\usepackage[left=1in,top=1in,right=1in,nohead,nofoot,a4paper]{geometry}
\usepackage{amsmath, amsthm, amssymb}
\usepackage{ulem} 
\usepackage{listings} 
\usepackage{textcomp}  
'
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

how to split the table of contents

Post by localghost »

What shall we do now with this completely useless code snippet? You are not new to the forum so you should know that a minimal example is absolutely essential [1]. And please echo possible error messages exactly from the log file. From what you posted nothing can be seen to give specific help. But perhaps you can answer the question why you are loading the geometry package twice and also with different options. By the way, it works for me with your package combination after this correction.

[1] View topic: Avoidable mistakes
Montag
Posts: 340
Joined: Wed Jul 15, 2009 9:25 am

how to split the table of contents

Post by Montag »

thedreamshaper wrote:Hehe thanks, i guess i could have been more explicit, though you got it right. exept what it does is make the two columns(as i asked) but it continous on the next page, so basickly while my table of contents is now down two 2 pages, it splits it so that the first(left) column is contioned on the next page rather than on the same. How can i force it to continue at the same page ?


Thanks
You know, in English the "i" is written "I", unless your whole text is in small letters.

My last idea would be

Code: Select all

\begin{multicols}{2}
\tableofcontents
\end{multicols}
I honestly still don't get what exactly you would like to achieve, so what I'm writing is more of a hint. :-/ Please regard the rules. .)
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

how to split the table of contents

Post by thedreamshaper »

Thanks Enrico, that actually did it :) the layout is still not as "pretty" as i would like, but it is essentially what i need.

This is what it looks like at the moment.
ToCmulticolumn.jpg
ToCmulticolumn.jpg (175.11 KiB) Viewed 12357 times
ps. I did not know about the small letters thing :)
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

Re: how to split the table of contents

Post by thedreamshaper »

ps.

Although the question is solved i would still appreciate any tips on how to improve the layout :)
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: how to split the table of contents

Post by localghost »

An alternative has already been given to you. If something doesn't work, you should know what to do. If not, read the reference in my last post.
Post Reply