Banner

Donate

You find LaTeX Community useful? Please donate! Learn why!

Amount:

Partner Sites

goLaTeX
TeXblog
TeXnicCenter

Who is online

In total there are 18 users online :: 3 registered, 0 hidden and 15 guests (based on users active over the past 5 minutes)
Most users ever online was 108 on Tue Jun 08, 2010 3:33 pm

Users browsing this forum: Alexa [Bot], Google [Bot], Google Adsense [Bot] and 15 guests

overlapping boxes

LaTeX specific issues not fitting into one of the other forums of this category.

overlapping boxes

Postby tresfresh on Thu Oct 09, 2008 11:34 am

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
tresfresh
 
Posts: 11
Joined: Wed Oct 08, 2008 1:37 pm

Re: overlapping boxes

Postby Stefan_K on Thu Oct 09, 2008 2:20 pm

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
LaTeX Community Moderator
TeXblog.net
Stefan_K
Site Moderator
 
Posts: 2687
Joined: Mon Mar 10, 2008 8:44 pm
Location: Hamburg, Germany

Re: overlapping boxes

Postby tresfresh on Thu Oct 09, 2008 2:41 pm

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


Hi 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
sample.JPG (81.12 KiB) Viewed 1471 times
tresfresh
 
Posts: 11
Joined: Wed Oct 08, 2008 1:37 pm

Re: overlapping boxes

Postby Stefan_K on Thu Oct 09, 2008 9:34 pm

Hi Chris,

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}

Stefan
LaTeX Community Moderator
TeXblog.net
Stefan_K
Site Moderator
 
Posts: 2687
Joined: Mon Mar 10, 2008 8:44 pm
Location: Hamburg, Germany

Re: overlapping boxes

Postby tresfresh on Fri Oct 10, 2008 9:23 am

Stefan,
you are just so wonderful!
Stay blessed, Chris
tresfresh
 
Posts: 11
Joined: Wed Oct 08, 2008 1:37 pm

Re: overlapping boxes

Postby Stefan_K on Sun Oct 12, 2008 2:24 am

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
LaTeX Community Moderator
TeXblog.net
Stefan_K
Site Moderator
 
Posts: 2687
Joined: Mon Mar 10, 2008 8:44 pm
Location: Hamburg, Germany

Re: overlapping boxes

Postby tresfresh on Mon Oct 13, 2008 9:18 pm

Hi Stefan,
the example is perfect! just tried it. Thanks!
Regards, Chris
tresfresh
 
Posts: 11
Joined: Wed Oct 08, 2008 1:37 pm


Return to General

Who is online

Users browsing this forum: Alexa [Bot], Google [Bot], Google Adsense [Bot] and 15 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group