Paragraph indenting in an mdframed environment
I wasn't able to use the settings provided by mdframed
. So I just defined a new enviroment. I think for changing it in mdframed
you would need to patch package internals. Anyway this Solution has no problem with additional spaces.
\documentclass{article}
%\usepackage{lipsum}
\usepackage[framemethod=tikz,%
innerleftmargin=\parindent,%
skipabove=0.6\baselineskip,%
skipbelow=0.6\baselineskip,%
innertopmargin=0.4\baselineskip,%
innerbottommargin=0.4\baselineskip]{mdframed}
\newlength{\defparindent}
\setlength{\defparindent}{\parindent}
% The singleframed environment
\newmdenv[linewidth=0.4pt,%
linecolor=black,%
backgroundcolor=white]{singleframed}
\newenvironment*{singleframedindent}{\begin{singleframed}\setlength{\parindent}{\defparindent}\ignorespaces}{\end{singleframed}}
\begin{document}
\begin{singleframedindent}
qwerty\\
qwerty
qwerty
\end{singleframedindent}
\end{document}
Result is:
You wouldn't have any problem with the space in your example if you would do:
\begin{singleframed}
\setlength{\parindent}{\defparindent}%
qwerty
qwerty
\end{singleframed}
The new line after setlength
is the cause for the additional space. By using the comment tag you don't have any problems.
With the current version on github (upload to CTAN today) you will get the following output of your example: