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 used to define a small environment with the package "mdframed". I've included the package in the following way:

\usepackage[framemethod=tikz]{mdframed}

This is how I've set up the environment:

\newenvironment{bspbox}
  [2]
  {\begin{mdframed}[linecolor=gray!25, innerleftmargin=3pt, innerrightmargin=3pt, leftmargin=5pt, rightmargin=5pt, skipabove=5pt, skipbelow=5pt, linewidth=0pt, frametitle={Title#2: #1}, frametitlefont=\normalfont\bfseries]}
  {\end{mdframed}}

It works okay, but unfortunately, there are some arbitrarily placed gaps interrupting the line / frame. They can appear in various places, but in most cases, it looks like in the following screenshot: mdframed-environment

The environment was used in my document in the following way:

\begin{bspbox}{}{}
\lipsum[1]
\end{bspbox}

To sum it all up, this is what the MWE looks like:

\documentclass[a4paper,10pt]{article}
\usepackage[dvipsnames,usenames]{xcolor} % mehr vordefinierte Farben
\usepackage[utf8]{inputenc}
\parindent0pt
\usepackage{tikz}
\usetikzlibrary{mindmap,shadows,trees,positioning,arrows,shapes}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}

\newenvironment{bspbox}
  [2]
  {\begin{mdframed}[linecolor=gray!25, innerleftmargin=3pt, innerrightmargin=3pt, leftmargin=5pt, rightmargin=5pt, skipabove=5pt, skipbelow=5pt, linewidth=0pt, frametitle={Title#2: #1}, frametitlefont=\normalfont\bfseries]}
  {\end{mdframed}}

\begin{document}

\begin{bspbox}{}{}
\lipsum[1]
\end{bspbox}

\end{document}

Where lies my fault, why are there those arbitrary gaps interrupting the line?

share|improve this question
1  
Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. –  Jubobs Jan 14 at 7:52
    
Please follow Jubobs request of providing a minimal working example (MWE). As it stands your options to mdframed contain linewidth=0pt which produces no frame at all. If I change that to 1pt then I do not see the describe behaviour in a minimal document. –  Andrew Swann Jan 14 at 8:02
1  
Might also be an idea to list which version of mdframed you are using. –  daleif Jan 14 at 8:17
    
Your MWE does not produce the posted image. See my previous comment about linewidth. As daleif says, telling us the version numbers of the packages you are using could also be helpful; you can get these by adding \listfiles to your preamble, they will be printed in the log file. –  Andrew Swann Jan 14 at 8:27
2  
As Andrew says, your MWE does not produce your image, please post exactly the code that gives the problem. And setting linewidth to something non-zero gives the expected frame. I'm using version 2013/07/01 1.9b so I;d suggest updating you LaTeX installation –  daleif Jan 14 at 9:12

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.