I am currently working on the Tikz package using the example found here:
http://www.texample.net/tikz/examples/b ... -and-math/
Where the following example works perfectly:
Code: Select all
\documentclass{article}\usepackage{lipsum} % To generate test text\usepackage{tikz}\usetikzlibrary{shapes,snakes}\begin{document}% Define box and box title style\tikzstyle{mybox} = [draw=red, fill=blue!20, very thick,rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]\tikzstyle{fancytitle} =[fill=red, text=white]\begin{tikzpicture}\node [mybox] (box){%\begin{minipage}{0.50\textwidth}\lipsum[11]\end{minipage}};\node[fancytitle, right=10pt] at (box.north west) {A fancy title};\end{tikzpicture}\end{document}
Code: Select all
\documentclass{article}\usepackage{lipsum} % To generate test text\usepackage{tikz}\usetikzlibrary{shapes,snakes}\begin{document}% Define Generic Box Styles\definecolor{Generic_border}{HTML}{005000}\definecolor{Generic_background}{HTML}{ccdecc}\tikzstyle{Generic_mybox} = [draw=Generic_border, fill=Generic_background, very thick,rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]\tikzstyle{Generic_fancytitle} =[draw=Generic_border, fill=Generic_background, rounded corners]% Define Summary Box Styles\definecolor{Summary_border}{HTML}{AA3F3C}\definecolor{Summary_background}{HTML}{EECFCE}\tikzstyle{Summary_mybox} = [draw=Summary_border, fill=Summary_background, very thick,rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]\tikzstyle{Summary_fancytitle} =[draw=Summary_border, fill=Summary_background, rounded corners]% Create Info Box command\newcommand{\infobox}[2]{\begin{tikzpicture}\node [Generic_mybox] (box){%\begin{minipage}{0.50\textwidth}#2\end{minipage}};\node[Generic_fancytitle, right=10pt] at (box.north west) {#1};\end{tikzpicture}}\infobox{Title}{\lipsum[11]}\infobox{Title}{\lipsum[11]}\end{document}
Code: Select all
\documentclass{article}\usepackage{lipsum} % To generate test text\usepackage{tikz}\usetikzlibrary{shapes,snakes}\begin{document}% Define Generic Box Styles\definecolor{Generic_border}{HTML}{005000}\definecolor{Generic_background}{HTML}{ccdecc}\tikzstyle{Generic_mybox} = [draw=Generic_border, fill=Generic_background, very thick,rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]\tikzstyle{Generic_fancytitle} =[draw=Generic_border, fill=Generic_background, rounded corners]% Define Summary Box Styles\definecolor{Summary_border}{HTML}{AA3F3C}\definecolor{Summary_background}{HTML}{EECFCE}\tikzstyle{Summary_mybox} = [draw=Summary_border, fill=Summary_background, very thick,rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]\tikzstyle{Summary_fancytitle} =[draw=Summary_border, fill=Summary_background, rounded corners]% Create Info Box command\newcommand{\infobox}[4]{\begin{tikzpicture}\node [#2] (box){%\begin{minipage}{0.50\textwidth}#2\end{minipage}};\node[#3, right=10pt] at (box.north west) {#1};\end{tikzpicture}}\infobox{Title, Generic_mybox, Generic_fancytitle}{\lipsum[11]}\infobox{Title, Summary_mybox, Summary_fancytitle}{\lipsum[11]}\end{document}
Any idea how I can get round this issue,
Thanks