# Fancy remark environment

I have this:

\usepackage{picins}
\newcommand{\sidenote}[1]{
\begin{center}
\hpic(0.95\textwidth,0pt)[rs]{
\parbox[b]{0.9\textwidth}{\small
\bigskip{#1}\bigskip
}
}
\end{center}
}

Which generates a nice (shadowed) box with padding. The problem is that \sidenote cannot accept formatted text (i.e. paragraphs).

Is it possible to define a "FancyRemark" environment which has the same visual style but does allow for paragraphs and display style math?

-
Assuming you want an output similar to the current answer, I would use mdframed- it allows you to tweak everything very easily... –  cmhughes Jan 29 '13 at 22:33

Sorry, picins somehow does not seem to work at the moment, on this machine.

This is what I guess you wanted:

\documentclass{article}
\usepackage{tikz}
\usepackage{environ}
\NewEnviron{sidenote}{%
\begin{tikzpicture}[font=\normalsize]
\BODY
};
\end{tikzpicture}
}
\begin{document}
\begin{sidenote}
sfasdfasdfasdf
$$1+2=3$$
\end{sidenote}
\end{document}

Please give me a preview, if you want me to tweak the looks to your expectations.

-
That's great. Thank you. If I could just get a parameter for `cellpadding' within the box I can tweak the values on my end. –  vrbatim Jan 29 '13 at 22:02
I assume you mean padding as in HTML5 http://www.w3schools.com/tags/att_table_cellpadding.asp ? That would be inner sep. I inserted that with 10pt. Any TeX dimension is allowed. –  user24276 Jan 29 '13 at 22:08
Thanks again for your help. I appreciate it. –  vrbatim Jan 29 '13 at 23:03
Followup question: How can \sidenote be made to respect the current font size? (It seems to be outputting 12pt whereas the document is set to 11pt). –  vrbatim Feb 11 '13 at 18:12
It should be typeset in normalsize, but I added an option to force it, just to be sure. –  user24276 Feb 11 '13 at 19:39

Here are some options using environments defined with the help of the mdframed and tcolorbox packages; the advantage of using these packages is that the offer an easy customization mechanism and the frames allow page breaks:

\documentclass{article}
\usepackage{picins}
\usepackage[most]{tcolorbox}
\usepackage[framemethod=tikz]{mdframed}

\newmdenv[
leftmargin=10pt,
rightmargin=10pt,
innertopmargin=10pt,
innerbottommargin=10pt,
]{mdsidenote}

\newtcolorbox{tsidenote}{
breakable,
enhanced,
colback=white,
width=\dimexpr\linewidth-20pt\relax,
enlarge left by=10pt,
}

\newcommand{\sidenote}[1]{
\begin{center}
\hpic(0.95\textwidth,0pt)[rs]{
\parbox[b]{0.9\textwidth}{\small
\bigskip{#1}\bigskip
}
}
\end{center}
}

\newcommand\Text{% just to generate text for the example
Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus
tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In hac habitasse platea dictumst.}

\begin{document}

\sidenote{some text goes here}

\begin{mdsidenote}
Some text inside the environment; a displayed expression and some paragraphs:
$a + b = c + d+ e.$
\Text\par\Text
\end{mdsidenote}

\begin{tsidenote}
Some text inside the environment; a displayed expression and some paragraphs:
$a + b = c + d+ e.$
\Text\par\Text
\end{tsidenote}

\end{document}

-