Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have this:

\usepackage{picins}
\shadowthickness{2pt}
\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?

share|improve this question
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 at 22:33

1 Answer

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}
\usetikzlibrary{shadows}
\usepackage{environ}
\NewEnviron{sidenote}{%
  \begin{tikzpicture}[font=\normalsize]
      \node [text width=0.9\linewidth,draw,drop shadow,fill=white,inner sep=10pt]{%
           \BODY
        };
   \end{tikzpicture}
}
\begin{document}
\begin{sidenote}
  sfasdfasdfasdf
\begin{equation}
1+2=3
\end{equation}
\end{sidenote}
\end{document}

Example figure

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

share|improve this answer
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 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 at 22:08
Thanks again for your help. I appreciate it. – vrbatim Jan 29 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 at 18:12
It should be typeset in normalsize, but I added an option to force it, just to be sure. – user24276 Feb 11 at 19:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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