0

I'm trying to use the hidealllines key for mdframed, but it's not working, either as a local argument or in an \mdfsetup. It works when I set all the topline=false, etc., but not when I just use hidealllines—and, furthermore, hidealllines seems to undo the hiding if each line is explicityly hidden!

MWE

\documentclass{article}

\usepackage[tikz]{mdframed}

\begin{document}

\mdfsetup{backgroundcolor=blue!10}

% all lines, as expected
\begin{mdframed}
  Text.
\end{mdframed}

% all lines (huh?)
\begin{mdframed}[hidealllines]
  Text.
\end{mdframed}

% no lines, as expected
\begin{mdframed}[topline=false,rightline=false,bottomline=false,leftline=false]
  Text.
\end{mdframed}

% all lines (huh??!)
\begin{mdframed}[topline=false,rightline=false,bottomline=false,leftline=false,hidealllines]
  Text.
\end{mdframed}

\end{document}
2

Although this isn't stated in the documentation, you have to explicitly set hidealllines=true, not simply hidealllines. (The documentation examples do use this, but the key description just says that "you can use the short form hidealllines.")

A corrected MWE:

\documentclass{article}

\usepackage{xcolor}
\usepackage{mdframed} % works with tikz/pstricks as well

\begin{document}

\mdfsetup{backgroundcolor=blue!10}

\begin{mdframed}[hidealllines]
  Lines are not hidden.
\end{mdframed}

\begin{mdframed}[hidealllines=true]
  Lines are hidden.
\end{mdframed}

\end{document}

Output from the above MWE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.