Consider a simple environment in the documentclass as
\newenvironment{abstract}{
\node (tbl) {
};
}
The content of
\begin{abstract}
Content
\end{abstract}
will goes after the node. How to put the content inside the node? The node has been used by tikzpicture to draw picture backgrounds.
This can also apply to Section: how we can put the section header and text inside a node? a simple section header is as
\newcommand\section{\@startsection {section}{1}{\z@}%
{-3.5ex \@plus -1ex \@minus -.2ex}%
{2.3ex \@plus.2ex}%
{\normalfont\Large\bfseries}}
This only defines the section header text. How we can play with the section header and text within node?
UPDATE: an example in reference to discussion with @MartinScharrer
\newenvironment{abstract}{
\begin{center}
\begin{tikzpicture}
\node (x) {
This is inside node
};
\begin{pgfonlayer}{background}
\draw[rounded corners, top color=red, bottom color=black, draw=white]
($(x.north west)+(0.14,0)$) rectangle ($(x.north east)-(0.13,0.9)$);
\end{pgfonlayer}
\end{tikzpicture}
\end{center}
}


abstractcontains a paragraph break, but the normalnodedoesn't allow paragraphs. Either place the content in aminipageor\parboxmanually or use a TikZ option which does this. I thinktext widthor somealignoption does that. – Martin Scharrer♦ Apr 17 '12 at 13:16abstractenvironment used inside a manualtikzpictureor should create one by itself. Do you want to do this in order to add decorations or to reference to the node later? – Martin Scharrer♦ Apr 17 '12 at 13:20This is inside node. – All Apr 17 '12 at 13:28