TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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





\begin{program} ## FROM HERE

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


The example was slightly modified from the one at the bottom of link text. Here is an image of what I want to the shadowbox to look like. 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.

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

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


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