Graphics, Figures & TablesCreating posters: fbox in tikz?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
vario
Posts: 3
Joined: Thu Jul 30, 2009 3:42 pm

Creating posters: fbox in tikz?

Post by vario »

Hi to everybody,

for my next poster I wanted to use LaTeX in combination with TikZ. I got a poster test layout, that uses \fbox to create nice boxes around individual sections.
To put arrows between the boxes and rounded corners I tried to replace \fbox with something similar in TikZ. Unfortunately it works only for a single paragraph, whereas fbox is fine with lots of text. Is there any way to fix this or an even better method to create nice boxes?

Thanks for any help!
Alexander

Here is the example:

Code: Select all

\documentclass{a0poster}
\usepackage[english,french,german]{babel}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}

\usepackage{tikz}
\usepackage{multicol}
\usepackage{blindtext}


\newcommand*{\tikzbox}[1]{%box width,top color,bottom color,content
\par
\begin{tikzpicture}
\node[rectangle,rounded corners,shade,top color=blue!20,bottom
color=blue!50,inner xsep=10pt,inner ysep=10pt,text width=\columnwidth,text
justified,anchor=south]{#1};
\end{tikzpicture}
\vspace{10pt}
}

\fboxrule10pt
\fboxsep10pt
\long\def\bluebox#1{{%
   \advance\columnwidth-2\fboxrule
   \advance\columnwidth-2\fboxsep
   \noindent\fcolorbox{blue}{white}{\parbox{\columnwidth}{#1}}}
   \vskip2ex}
   
\begin{document}
    \title{\veryHuge This is a great poster title}
    
    \author{Herr Münchhausen
    \\[.25em]
    \emph{Max \& Moritz Institute for the Research of everything, 
    Bielefeld, Germany}%
    }    
    \maketitle
    \thispagestyle{empty}

\begin{multicols}{3}

	\bluebox{
	\section*{Introduction}
		\blindtext
		
		\blindtext
	}
		
	\tikzbox{
	\section*{Methods}
		\blindtext
% with the next two lines not commented out it breaks
%			
%		\blindtext
	}

\end{multicols}

\end{document}

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Creating posters: fbox in tikz?

Post by localghost »

Defining a \parbox as the node might help.

Code: Select all

\node[%
  rectangle,
  rounded corners,
  shade,
  top color=blue!20,
  bottom color=blue!50,
  inner xsep=10pt,
  inner ysep=10pt,
  text width=\columnwidth,
  text justified,
  anchor=south
]{\parbox[t]{\linewidth}{#1}};

Best regards
Thorsten
User avatar
Stefan Kottwitz
Site Admin
Posts: 10330
Joined: Mon Mar 10, 2008 9:44 pm

Creating posters: fbox in tikz?

Post by Stefan Kottwitz »

Hi Alexander,

you could use the beamerposter package with its TikZ boxes.

Stefan
LaTeX.org admin
Post Reply