Generalcustom TOC

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
tresfresh
Posts: 11
Joined: Wed Oct 08, 2008 2:37 pm

custom TOC

Post by tresfresh »

Hi all,
desperately need help for my thesis. I need to put a grey box at the top of the contents page (TOC) with some text in it. The box should either cover the heading of the page, or more space. Ideally, the result should look like the attached file.
Thanks, for your help good people,
Chris
Attachments
sample.JPG
sample.JPG (81.12 KiB) Viewed 2526 times

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

custom TOC

Post by Stefan Kottwitz »

Hi Chris,

welcome to the board!
You could use the textpos package. Here is a compilable example showing how you could put this gray box at the top:

Code: Select all

\documentclass[a4paper,10pt]{book}
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{\paperwidth}
\usepackage{color}
\definecolor{gray}{rgb}{0.7,0.7,0.7}
\textblockcolor{gray}
\pagestyle{empty}
\begin{document}
\begin{textblock}{1}(0,0)
\rule{0pt}{2.5cm}
\end{textblock}
\end{document}
Stefan
LaTeX.org admin
tresfresh
Posts: 11
Joined: Wed Oct 08, 2008 2:37 pm

custom TOC

Post by tresfresh »

Hi Stefan,
thank you for your prompt reply.This shows me, that am at the right place here.
But still, could you please tell me how to combine this with the "\addtocontents" command? am still new to latex, you know. What about putting some text in the box?
Again, thank you very much
Regards, Chris
tresfresh
Posts: 11
Joined: Wed Oct 08, 2008 2:37 pm

Re: custom TOC

Post by tresfresh »

Does anyone know how to obtain the two boxes in the page? the gray and the black with the text altogether.
Thanks, Chris
Post Reply