sharpType
23-08-2009, 22:41
Hallo,
ich habe mir jetzt mit tikzpicture und dem tikz package eine Important-Box gebastelt...Leider richtet sich diese nicht entsprechend der Linewidth zb in einer description aus. Sie ragt in den Rand hinein... kann man das irgendwie ändern?
Vermute das liegt an der Minipage....
Minimalbeispiel:
\documentclass[pdftex,
final,
10pt,
a4paper,
pagesize,
oneside,
titlepage,
ngerman,
svgnames,
parskip=full+]{scrreprt}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes,shadows}
\usepackage[explicit]{titlesec}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[left=2.8cm,right=1.75cm,top=2.25cm,bottom=2.25cm]{geometry}
\newenvironment{important}{%
\tikzstyle{mybox} = [drop shadow, draw=blue, fill=blue!20, very thick,%
rectangle, rounded corners=5pt, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=red, text=white, rounded corners=5pt]
\begin{tikzpicture}[transform shape, rotate=0, baseline=-3.5cm]
\node [mybox] (box) \bgroup
\begin{minipage}{\linewidth}
}
{
\end{minipage}
\egroup;
\node[drop shadow, fancytitle] at (box.north) {Wichtige Anmerkung};
\end{tikzpicture}
}
\begin{document}
Test Test Test TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest Test
\begin{description}
\item[Mail]Test Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test Text
\begin{important}
Wichtiger Text
\end{important}
\end{description}
Weiterer Text \ldots
\end{document}
Vielen dank
ich habe mir jetzt mit tikzpicture und dem tikz package eine Important-Box gebastelt...Leider richtet sich diese nicht entsprechend der Linewidth zb in einer description aus. Sie ragt in den Rand hinein... kann man das irgendwie ändern?
Vermute das liegt an der Minipage....
Minimalbeispiel:
\documentclass[pdftex,
final,
10pt,
a4paper,
pagesize,
oneside,
titlepage,
ngerman,
svgnames,
parskip=full+]{scrreprt}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes,shadows}
\usepackage[explicit]{titlesec}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage[left=2.8cm,right=1.75cm,top=2.25cm,bottom=2.25cm]{geometry}
\newenvironment{important}{%
\tikzstyle{mybox} = [drop shadow, draw=blue, fill=blue!20, very thick,%
rectangle, rounded corners=5pt, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=red, text=white, rounded corners=5pt]
\begin{tikzpicture}[transform shape, rotate=0, baseline=-3.5cm]
\node [mybox] (box) \bgroup
\begin{minipage}{\linewidth}
}
{
\end{minipage}
\egroup;
\node[drop shadow, fancytitle] at (box.north) {Wichtige Anmerkung};
\end{tikzpicture}
}
\begin{document}
Test Test Test TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest TestTest Test
\begin{description}
\item[Mail]Test Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test TextTest Text Test Text
\begin{important}
Wichtiger Text
\end{important}
\end{description}
Weiterer Text \ldots
\end{document}
Vielen dank