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.

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?

share|improve this question
3  
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
    
Welcome to TeX.SE. –  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
1  
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
1  
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
add comment

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]:

enter image description here

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

enter image description here

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}
share|improve this answer
add comment

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.