Take the 2-minute tour ×
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.

Is it possible to combine the "program" part in a shadowbox?

\documentclass{article}

\usepackage{float}

\floatstyle{ruled}
\newfloat{program}{thp}{lop}
\floatname{program}{Program}

\begin{document}

\begin{program} ## FROM HERE
  \begin{lstlinsting}[basicstyle={\footnotesize},language=Java,showstringspaces=false,tabsize=4]

class HelloWorldApp {
  public static void main(String[] args) {
    //Display the string
    System.out.println("Hello World!");
  }
}
\end{lstlisting}
  \caption{The Hello World! program in Java.}
\end{program} ## TO HERE

\end{document}

Example is slightly modified from the one at the bottom of link text. Here is an image of what I want to put in the shadowbox. The image is borrowed from the above page.

alt text

share|improve this question

migrated from stackoverflow.com Apr 4 '11 at 19:59

This question came from our site for professional and enthusiast programmers.

1  
not sure if this will work exactly how you want it, but it looks pretty close: shadethm package: ctan.org/tex-archive/macros/latex/contrib/shadethm –  Mica Jan 29 '10 at 17:14

1 Answer 1

Try one of the shadowed styles from the floatrow package. Look at table 1 of the manual to see if one of them suits you.

share|improve this answer

Your Answer

 
discard

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