Hi all,
could someone please tell me how to create 2 overlapping boxes? the second box should cover about 50% of the first box with the rest stretching out.
Thanks, Chris
General ⇒ overlapping boxes
- Stefan Kottwitz
- Site Admin
- Posts: 10283
- Joined: Mon Mar 10, 2008 9:44 pm
overlapping boxes
Hi Chris,
what kind of boxes do you mean? Framed boxes, colors, just LaTeX/TeX boxes containing text, or what?
For instance you could print a box, use negative space like \hspace{-2cm} and put the next box there. Or use the textpos package to place boxes at arbitrary positions.
Stefan
what kind of boxes do you mean? Framed boxes, colors, just LaTeX/TeX boxes containing text, or what?
For instance you could print a box, use negative space like \hspace{-2cm} and put the next box there. Or use the textpos package to place boxes at arbitrary positions.
Stefan
LaTeX.org admin
overlapping boxes
Hi Stefan,Stefan_K wrote:Hi Chris,
what kind of boxes do you mean? Framed boxes, colors, just LaTeX/TeX boxes containing text, or what?
For instance you could print a box, use negative space like \hspace{-2cm} and put the next box there. Or use the textpos package to place boxes at arbitrary positions.
Stefan
basically, am trying to realize the gray box at the top with and oval box partly overlapping it with some text ("Contents" )like in the included file.
Thanks , Chris
- Attachments
-
- sample.JPG (81.12 KiB) Viewed 12314 times
- Stefan Kottwitz
- Site Admin
- Posts: 10283
- Joined: Mon Mar 10, 2008 9:44 pm
overlapping boxes
Hi Chris,
try this compilable example:
Stefan
try this compilable example:
Code: Select all
\documentclass[a4paper,10pt]{book}
\usepackage[absolute]{textpos}
\setlength{\TPHorizModule}{\paperwidth}
\usepackage{color}
\usepackage{courier}
\pagestyle{empty}
\usepackage{tikz}
\begin{document}
\begin{textblock}{0.3}(0.45,.9)
\begin{tikzpicture}
\node[rectangle,draw,rounded corners=15pt,fill=black]
{\rule[-5pt]{0pt}{24pt}\color{white}\ttfamily\Huge\bfseries\,TABLE OF CONTENTS\,};
\end{tikzpicture}
\end{textblock}
\textblockcolor{gray}
\begin{textblock}{1}(0,0)
\rule{0pt}{2.5cm}
\end{textblock}
\end{document}
LaTeX.org admin
Re: overlapping boxes
Stefan,
you are just so wonderful!
Stay blessed, Chris
you are just so wonderful!
Stay blessed, Chris
- Stefan Kottwitz
- Site Admin
- Posts: 10283
- Joined: Mon Mar 10, 2008 9:44 pm
overlapping boxes
Hi Chris,
I've just made a test using TikZ and titlesec together to produce chapter headings like the one above, see: Fancy chapter headings with TikZ. I've used kpfonts instead of courier/monospaced, but that's not important.
Stefan
I've just made a test using TikZ and titlesec together to produce chapter headings like the one above, see: Fancy chapter headings with TikZ. I've used kpfonts instead of courier/monospaced, but that's not important.
Stefan
LaTeX.org admin
Re: overlapping boxes
Hi Stefan,
the example is perfect! just tried it. Thanks!
Regards, Chris
the example is perfect! just tried it. Thanks!
Regards, Chris