2

I'm using TeX Live 2014 on Windows 8.1, and I'm having some trouble setting up a visually appealing definition environment. I'm trying to use the mdframed package with tikz, and I'm using an example that is almost verbatim from the mdframed documentation. It produces ugly and incomplete lines (no matter how far I zoom in on the pdf), which is particularly unfortunate because my document is aimed to be viewed on screens. Here is some minimal working code which produces the result:

\documentclass{article}

\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[framemethod=tikz]{mdframed}
\mdfsetup{skipabove=\topskip,skipbelow=\topskip}
\newcounter{counter}

\newenvironment{definition}[1][]{
\refstepcounter{counter}
    \ifstrempty{#1}
    {\mdfsetup{
        frametitle={
        \tikz[baseline=(current bounding box.east),outer sep=0pt]
        \node[anchor=east,rectangle,fill=gray!130]
        {\strut \textcolor{white}{Definition~\thecounter}};}}
}
{\mdfsetup{
    frametitle={
        \tikz[baseline=(current bounding box.east),outer sep=0pt]
        \node[anchor=east,rectangle,fill=gray!130]
        {\strut \textcolor{white}{Definition~\thecounter:~#1}};}}
}
\mdfsetup{innertopmargin=10pt,linecolor=gray!130,
        linewidth=1pt,topline=true,
        frametitleaboveskip=\dimexpr-\ht\strutbox\relax,}
\vspace{10pt}\begin{mdframed}[]\relax
}{\end{mdframed}\vspace{10pt}}

\begin{document}

\begin{definition}
\blindtext
\end{definition}

\end{document}

And here is an image of the output it produces:

enter image description here

I'm fairly confident that this has nothing to do with my pdf viewer, as I've tried to open the file using several viewers on several computers. What can I do to make the borders a consistent, stable width?

closed as off-topic by cfr, Kurt, Werner, Jesse, user11232 Oct 18 '15 at 5:31

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I have no problem here using an updated TeXlive 2014 on Linux. – Sigur Jan 27 '15 at 17:25
  • 1
    Welcome to TeX.SE, and thanks for the MWE. Try opening it in Acrobat and look at several zoom levels if you still have the issue. It renders fine for me with TeXShop using TeXLive2014 on Mac. – Peter Grill Jan 27 '15 at 17:26
  • I suggest you to update the packages. – Sigur Jan 27 '15 at 17:27
  • Thanks for the replies. All of my packages are up to date, and I have opened the file in Acrobat at several zoom levels (I think I already said that). I've also tried viewing it in Google Drive viewer and on multiple different devices. I should probably also have mentioned that I have also tried this on MikTeX and had the same issue. – fattybake Jan 27 '15 at 17:31
  • 4
    I'm voting to close this question as off-topic because it concerns an issue which could not be reproduced. The OP is unregistered and has not been here since February so the chances of getting to the bottom of the mystery at this point seem slim, to say the least. – cfr Oct 18 '15 at 3:20