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
General ⇒ custom TOC
custom TOC
- Attachments
-
- sample.JPG (81.12 KiB) Viewed 2474 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10347
- Joined: Mon Mar 10, 2008 9:44 pm
custom TOC
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:
Stefan
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}
LaTeX.org admin
custom TOC
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
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
Re: custom TOC
Does anyone know how to obtain the two boxes in the page? the gray and the black with the text altogether.
Thanks, Chris
Thanks, Chris