Text FormattingBoxed or shaded Theorem

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
tshah
Posts: 2
Joined: Sat Jul 09, 2011 9:41 pm

Boxed or shaded Theorem

Post by tshah »

Hello all,

I've been trying to make shaded theorems in my latex book. It is using the amsbook class. I've copied a bunch of examples from online and they work when I try them as an article class, but when I move them into an amsbook file then the shading becomes black and I can't see anything. For example, this works on its own, but if I move it into an amsbook file then the shading turns black. Any help would be appreciated.

Code: Select all

\documentclass{article}
\usepackage{xcolor}
\usepackage{amsthm}
\usepackage{framed}
\colorlet{shadecolor}{gray!50}
\newtheorem{theorem}{Theorem}
\newenvironment{theo}
  {\begin{shaded}\begin{theorem}}
  {\end{theorem}\end{shaded}}
\begin{document}
\begin{theo}
Some important theorem.
\end{theo}
\end{document}
Last edited by Stefan Kottwitz on Sat Jul 09, 2011 11:21 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

tshah
Posts: 2
Joined: Sat Jul 09, 2011 9:41 pm

Boxed or shaded Theorem

Post by tshah »

Nevermind. I figured it out. I had this:

Code: Select all

\documentclass[12pt, oneside,dvipdf]{amsbook}
when I took out the dvipdf the shading worked and it wasn't all black.
Last edited by Stefan Kottwitz on Sat Jul 09, 2011 11:21 pm, edited 1 time in total.
Post Reply