4

I found these pretty boxes on texample.net:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes}
\usepackage{amsmath,amssymb}
\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}
    To calculate the horizontal position the kinematic differential
    equations are needed:
    \begin{align}
        \dot{n} &= u\cos\psi -v\sin\psi \\
        \dot{e} &= u\sin\psi + v\cos\psi
    \end{align}
    For small angles the following approximation can be used:
    \begin{align}
        \dot{n} &= u -v\delta_\psi \\
        \dot{e} &= u\delta_\psi + v
    \end{align}
\end{minipage}
};
\node[fancytitle, right=10pt] at (box.north west) {A fancy title};
\node[fancytitle, rounded corners] at (box.east) {$\clubsuit$};
\end{tikzpicture}%
%
\tikzstyle{mybox} = [draw=blue, fill=green!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=blue, text=white, ellipse]
%
\begin{tikzpicture}[transform shape, rotate=10, baseline=-3.5cm]
\node [mybox] (box) {%
\begin{minipage}[t!]{0.5\textwidth}
    Fermat's Last Theorem states that
    \[
        x^n + y^n = z^n
    \]
    has no non-zero integer solutions for $x$, $y$ and $z$ when $n > 2$.
\end{minipage}
};
\node[fancytitle] at (box.north) {Fermat's Last Theorem};
\end{tikzpicture}
%
\end{document}

I tried to do something like this:

enter image description here

I want the boxes to stay in the cornes of the page while the molecule stays in the center of the page. But I can't figure out how to manage this. What I got until now, is this:

\documentclass[12pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,decorations}
\usepackage{float}
\usepackage{chemfig}
\setdoublesep{0.357 em}
\setchemrel{0pt}{1.785 em}{2.785 em}
\setatomsep{1.785 em}
\setbondoffset{0.18265 em}
\setbondstyle{line width=0.0642}


\begin{document}


\tikzstyle{mybox} = [draw=black, fill=blue!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=black, text=white]
%
\begin{tikzpicture}
\node [mybox] (box){%
\begin{minipage}{0.5\textwidth}
    Hier werden die chemisch-physikalischen Eigenschaften gelistet sein.
    \end{minipage}
    };
\node[fancytitle, right=10pt] at (box.north west) {Physikalisch-chemische Eigenschaften};
\end{tikzpicture}
%
\tikzstyle{mybox} = [draw=blue, fill=green!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=blue, text=white, ellipse]
%
\begin{tikzpicture}
\node [mybox] (box) {%
\begin{minipage}{0.5\textwidth}
    Hier sollen die pharmakodynamischen Parameter stehen!
\end{minipage}
};
\node[fancytitle] at (box.north) {Pharmakodynamik};
\end{tikzpicture}
%
\begin{figure}[H]
\centering
\chemfig{*6(=(-[:-90]OH)-=-(-[:90]N(-[:150]H)-[:30](=O)-[:-30]CH_3)=-)}
\caption{Paracetamol}
\end{figure}
%
\tikzstyle{mybox} = [draw=black, fill=blue!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=black, text=white]
%
\begin{tikzpicture}
\node [mybox] (box){%
\begin{minipage}{0.5\textwidth}
    Hier werden die chemisch-physikalischen Eigenschaften gelistet sein.
    \end{minipage}
    };
\node[fancytitle, right=10pt] at (box.north west) {Physikalisch-chemische Eigenschaften};
\end{tikzpicture}
%
\tikzstyle{mybox} = [draw=blue, fill=green!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=blue, text=white, ellipse]
%
\begin{tikzpicture}
\node [mybox] (box) {%
\begin{minipage}{0.5\textwidth}
    Hier sollen die pharmakodynamischen Parameter stehen!
\end{minipage}
};
\node[fancytitle] at (box.north) {Pharmakodynamik};
\end{tikzpicture}
%
\end{document}
2

Something like this?

enter image description here

\documentclass[12pt]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{tikz}
\usetikzlibrary{shapes,decorations}
\usepackage{float}
\usepackage{chemfig}
\setdoublesep{0.357 em}
\setchemrel{0pt}{1.785 em}{2.785 em}
\setatomsep{1.785 em}
\setbondoffset{0.18265 em}
\setbondstyle{line width=0.0642}



\begin{document}


\tikzstyle{mybox} = [draw=black, fill=blue!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=black, text=white]
%
\begin{tikzpicture}[remember picture,overlay]
\node [mybox,anchor=north west] (box) at ([shift={(1cm,-1cm)}]current page.north west){%
\begin{minipage}{0.5\textwidth}
    Hier werden die chemisch-physikalischen Eigenschaften gelistet sein.
    \end{minipage}
    };
\node[fancytitle, right=10pt] at (box.north west) {Physikalisch-chemische Eigenschaften};
\end{tikzpicture}
%
\tikzstyle{mybox} = [draw=blue, fill=green!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=blue, text=white, ellipse]
%
\begin{tikzpicture}[remember picture,overlay]
\node [mybox,anchor=north east] (box) at ([shift={(-1cm,-1cm)}]current page.north east){%
\begin{minipage}{0.5\textwidth}
    Hier sollen die pharmakodynamischen Parameter stehen!
\end{minipage}
};
\node[fancytitle] at (box.north) {Pharmakodynamik};
\end{tikzpicture}\vspace{3cm}
%


\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center) {
\chemfig{*6(=(-[:-90]OH)-=-(-[:90]N(-[:150]H)-[:30](=O)-[:-30]CH_3)=-)}};
\end{tikzpicture}
%\caption{Paracetamol}
%\end{figure}\vspace{3cm}

%
\tikzstyle{mybox} = [draw=black, fill=blue!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=black, text=white]
%
\begin{tikzpicture}[remember picture,overlay]
\node [mybox,anchor=south west] (box) at ([shift={(1cm,1cm)}]current page.south west){%
\begin{minipage}{0.5\textwidth}
    Hier werden die chemisch-physikalischen Eigenschaften gelistet sein.
    \end{minipage}
    };
\node[fancytitle, right=10pt] at (box.north west) {Physikalisch-chemische Eigenschaften};
\end{tikzpicture}
%
\tikzstyle{mybox} = [draw=blue, fill=green!20, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitle} =[fill=blue, text=white, ellipse]
%
\begin{tikzpicture}[remember picture,overlay]
\node [mybox,anchor=south east] (box) at ([shift={(-1cm,1cm)}]current page.south east){%
\begin{minipage}{0.5\textwidth}
    Hier sollen die pharmakodynamischen Parameter stehen!
\end{minipage}
};
\node[fancytitle] at (box.north) {Pharmakodynamik};
\end{tikzpicture}
%
\end{document}
1

Here you can find a very simple solution.

It is possible to change the headings, width or the page size if you need a header or page numbers. In addition, you can very easily create a macro and use it over and over again. If you really want to have the fancy boxes, you can easily use them as well.

\documentclass{article}

\usepackage{chemfig}
\setdoublesep{0.357 em}
\setchemrel{0pt}{1.785 em}{2.785 em}
\setatomsep{1.785 em}
\setbondoffset{0.18265 em}
\setbondstyle{line width=0.0642}

\usepackage{blindtext}
\usepackage{geometry}

\usepackage{tikz}
\usetikzlibrary{positioning,shapes,shadows,arrows}

\tikzstyle{mybox}=[rectangle, draw=black, rounded corners=1mm,text centered, text=black,rectangle split, rectangle split parts=2]

\makeatletter
\def\parsecomma#1,#2\endparsecomma{\def\page@x{#1}\def\page@y{#2}}
\tikzdeclarecoordinatesystem{page}{
    \parsecomma#1\endparsecomma
    \pgfpointanchor{current page}{north east}
    % Save the upper right corner
    \pgf@xc=\pgf@x%
    \pgf@yc=\pgf@y%
    % save the lower left corner
    \pgfpointanchor{current page}{south west}
    \pgf@xb=\pgf@x%
    \pgf@yb=\pgf@y%
    % Transform to the correct placement
    \pgfmathparse{(\pgf@xc-\pgf@xb)/2.*\page@x+(\pgf@xc+\pgf@xb)/2.}
    \expandafter\pgf@x\expandafter=\pgfmathresult pt
    \pgfmathparse{(\pgf@yc-\pgf@yb)/2.*\page@y+(\pgf@yc+\pgf@yb)/2.}
    \expandafter\pgf@y\expandafter=\pgfmathresult pt
}
\makeatother

\def\ltboxname{Physikalisch-chemische Eigenschaften}
\def\rtboxname{Pharmakodynamik}
\def\cboxname{Strukturformel}
\def\lbboxname{Pharmakodynamik}
\def\rbboxname{Physikalisch-chemische Eigenschaften}

\begin{document}


\newgeometry{inner=1cm,outer=1cm,top=2cm,bottom=2cm}
\begin{tikzpicture}[remember picture]
        \node at (page cs:0.85,0.85) [mybox,anchor=north east] {
            \textbf{\rtboxname}
            \nodepart{second}
            \begin{minipage}{0.42\textwidth}
            \blindtext
            \end{minipage}
        };
        \node at (page cs:-0.85,0.85) [mybox,anchor=north west] {
            \textbf{\ltboxname}
            \nodepart{second}
            \begin{minipage}{0.42\textwidth}
            \blindtext
            \end{minipage}
        };
        \node at (page cs:-0.85,-0.85) [mybox,anchor=south west] {
            \textbf{\lbboxname}
            \nodepart{second}
            \begin{minipage}{0.42\textwidth}
            \blindtext
            \end{minipage}
        };
        \node at (page cs:0.85,-0.85) [mybox,anchor=south east] {
            \textbf{\rbboxname}
            \nodepart{second}
            \begin{minipage}{0.42\textwidth}
            \blindtext
            \end{minipage}
        };                        
        \node at (page cs:0,0) [anchor=center] {
            \begin{minipage}{0.8\textwidth}
             \centering
              \chemname{\chemfig{*6((-OH)-=-(-\chemabove{N}{H}-[:-30](=[:-90]O)-[:30]CH_3)=-=)}}{Paracetamol}
            \end{minipage}
        };
\end{tikzpicture}    
\restoregeometry

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.