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 load the mdframed package from a class of my own with the line

\RequirePackage[framemethod=pstricks]{mdframed}

When using the XeLaTeX engine I get a strange behavior from the mdframed environment defined as

\newmdenv[%
   skipabove=\baselineskip, 
   skipbelow=\baselineskip,
   leftmargin=0pt,
   rightmargin=0pt,
   linecolor=black,
   shadow=false,
   backgroundcolor=white,
   pstrickssetting={shadow=true,blur=true,
   shadowsize=2pt,shadowcolor=darkgray}
]{remarksbox}

The strange behavior appears when the frame is split across two pages, in which case I get a solid shadow as opposed to the blurred form I am defining for the environment. When there is no frame splitting, it works just right and I get a fading shadow.

The following lines can be considered as providing an MWE:

\documentclass{memoir}

\usepackage{xcolor,pstricks,pst-blur,lipsum}
\usepackage[framemethod=pstricks]{mdframed}

\newmdenv[skipabove=\baselineskip,
skipbelow=\baselineskip,
leftmargin=0pt,
rightmargin=0pt,
linecolor=black,
shadow=false,
outerlinewidth=0pt,%0.4pt,
frametitle=Remarks,
frametitlefont=\normalfont\normalsize,
frametitlerule=false,
backgroundcolor=white,
pstrickssetting={shadow=true,blur=true,
shadowsize=3pt,shadowcolor=gray}]{remarksbox}

\begin{document}
\lipsum[1-2]
\begin{remarksbox}
\lipsum[3-4]
\end{remarksbox}
\lipsum[5-10]
\begin{remarksbox}
\lipsum[11-15]
\end{remarksbox}
\end{document}

Can anybody replicate this behavior with the environment I've just defined? Besides, the shadow under the environment's title looks awful. How can it be suppressed?

share|improve this question
2  
Could you turn your snippet into a complete MWE that exhibits the behaviour? :) –  cmhughes Jan 9 '13 at 17:04
3  
As @cmhughes mentioned without a complete MWE we can't help you. To provided example text you can use packages like kantlipsum, lipsum blindtext. –  Marco Daniel Jan 12 '13 at 11:00
    
I have appended an MWE. Sorry about the delay and thanks for your assistance. –  Marcos Jan 13 '13 at 10:12

1 Answer 1

up vote 4 down vote accepted

that looks like an internal bug in the parameter setting. However, do not define shadow inside the PSTricks setting then it will work:

\documentclass{memoir}

\usepackage{pstricks,pst-blur,lipsum}
\usepackage[framemethod=pstricks]{mdframed}

\newmdenv[skipabove=\baselineskip,
skipbelow=\baselineskip,
leftmargin=0pt,
rightmargin=0pt,
shadow=true,%%  this is ok!
outerlinewidth=0pt,%0.4pt,
frametitle=Remarks,
frametitlefont=\normalfont\normalsize,
frametitlerule=false,
backgroundcolor=white,
pstrickssetting={blur,shadowsize=3pt,shadowcolor=gray% no shadow=true!
}]{remarksbox}

\begin{document}
\lipsum[1-2]
\begin{remarksbox}
\lipsum[3-4]
\end{remarksbox}
\lipsum[5-10]
\begin{remarksbox}
\lipsum[11-15]
\end{remarksbox}
\end{document}

enter image description here

[...]

enter image description here

share|improve this answer

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.