0

Feeding

\documentclass{article}
\usepackage{mdframed}
\begin{document}
\begin{mdframed}
Test
\end{mdframed}
\end{document}

to latex followed by dvips results in the left vertical bar (and, with different contents, sometimes the upper bar) of the frame vanishing at certain magnifications of gv: 0.1, 0.125, 0.250, and 2. Here is what we see at the double zoom:

output

To compare with other methods of generating a frame,

\documentclass{article}
\usepackage{framed,mdframed}
\begin{document}
\begin{framed}Good\end{framed}
\noindent\fbox{\parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{Good}}
\begin{mdframed}Bad\end{mdframed}
\end{document}

yields

output for comparison

in gv.

Who is the culprit: latex, mdframed, dvips or any of their combinations? Any fix, any remedies? (A suggestion to use pstricks or tikz would be only the second choice because we'd ideally like to see the lines natively in DVI, too.)

Crosspost: http://github.com/marcodaniel/mdframed/issues/42 .

EDIT: This particular view is specific to gv. As opposed to mdframed missing half the frame, we do NOT always miss a half of the frame. Other viewers (e.g., okular) have issues at other sets of magnifications.

  • In the default frame method the left and top rule are drawn before the white background is drawn and pixel rounding can make them disappear. Use the \usepackage[tikz]{mdframed} or \usepackage[pstricks]{mdframed}. Or better switch to tcolorbox which is much more powerful and actively maintained. – Ulrike Fischer May 24 '23 at 07:28
  • this is alread reported here and github – David Carlisle May 24 '23 at 07:50
  • @UlrikeFischer I know. Though I have not stated this originally, I'd prefer to have the frame visible also in the DVI output, if technically possible. Using tikz or pstricks would prevent that. –  May 24 '23 at 19:12
  • it is the same problem as in the duplicate. If you want a perfect output you need a drawing method which can draw the line after the background, and you need a format + viewer which can handle that. So either drop the dvi viewer or start to accept the restrictions that come with the format. – Ulrike Fischer May 24 '23 at 19:13
  • @UlrikeFischer I understand. My hope is that as the lines of a regular \fbox are visible in DVI, and as framed does its job for DVI in my opinion, too, we could hopefully do the same/similar for mdframed. –  May 24 '23 at 19:18
  • well in a fbox there is no white background. mdframed is not used much but you can find various similar questions about colortbl + hlines. – Ulrike Fischer May 24 '23 at 19:22

0 Answers0