# mdtheorem is only framing the bottom-half of my text

I'm using the mdtheorem environment and for some reason the boxes seem to not print out correctly when I compile and open my pdf file. Everything compiles fine, but I get that my theorem is only framed on the bottom-right, and the top-left part of the frame is missing.

I just use a command like, say,

\begin{algo} \label{alg:ew} \textbf{Calcul }
\end{algo}


any ideas?

Ok, well, this is an example of code :

\documentclass[12pt]{article}

%\pagestyle{empty}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed}
\usepackage{multirow}
\usepackage{graphicx}

\usepackage[french]{babel}
%\usepackage[autolanguage]{numprint}

\newmdtheoremenv{alg}{Algorithme}

\begin{document}

\begin{alg}  \ \ \textbf{Graphiques de $P(X=x)$ et $P(X\leq x)$ }
\end{alg}

\end{document}


Which is just the basic use of it here. I was able to make the whole box appear now, but only when I was zoomed in so close on the thing I couldn't see anything else.

Is there a way to make the frame thicker, so maybe that would help the frame to post properly even when not so zoomed in?

-
Please add a minimal working example illustrating the problem; we cannot guess how you are defining your environment! –  Gonzalo Medina Jun 7 '12 at 3:06
–  Peter Grill Jun 7 '12 at 3:17
Sometimes it depends on the zooming or something like this of your pdf viewer. –  Marco Daniel Jun 7 '12 at 14:41
You can say \newmdtheoremenv[linewidth=1pt]{alg}{Algorithme}, but the result won't be nice. In general, the thicker the line, the more funerary the result. –  egreg Jun 8 '12 at 18:20
Your example looks correct in SumatraPDF and PDF-Xchange viewer. Viewer from Texworks doesn't show left border and adobe reader doesn't show top border. –  Ignasi Jun 8 '12 at 18:42

## 1 Answer

Since it appears that frame was not beign displayed due to the thickness of the frame line, you can adjust the line width with \newmdtheoremenv[linewidth=<size>]{alg}{Algorithme}

Here is the result with [linewidth=2.0pt]:

Of course you can also include other options as well. So [linewidth=2.0pt,linecolor=red] yields:

## Code:

\documentclass[12pt]{article}

%\pagestyle{empty}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{mdframed}
\usepackage{multirow}
\usepackage{graphicx}

\usepackage[french]{babel}
%\usepackage[autolanguage]{numprint}

\newmdtheoremenv[linewidth=2.0pt]{alg}{Algorithme}

\begin{document}
\begin{alg}  \ \ \textbf{Graphiques de $P(X=x)$ et $P(X\leq x)$ }
\end{alg}
\end{document}

-