考虑以下乳胶文件:
\documentclass[11pt]{report}
\usepackage[english,frenchb]{babel}
\usepackage[framemethod=TikZ]{mdframed}
\mdfdefinestyle{defstyle}{%
linecolor=red,linewidth=2pt,%
frametitlerule=true,%
frametitlebackgroundcolor=gray!20,
innertopmargin=\topskip,
}
\mdtheorem[style=defstyle]{definition}{Definition}
\begin{document}
\begin{definition}
An infinite set $A$ is countable if there exists a bijection $f$ from the
natural numbers into $A$.
\end{definition}
\end{document}
因为有这么一行字:
\usepackage[english,frenchb]{babel}
段落有默认缩进(我想保留)。但是此缩进还会将 \mdtheorem 命令创建的 mdframed 框的标题移到右侧。有没有办法保留段落的正默认缩进,但使 mdframed 的框标题保持正常对齐?
答案1
像这样?
\documentclass[11pt]{report}
\usepackage[english,french]{babel}
\usepackage[framemethod=TikZ]{mdframed}
\mdfdefinestyle{defstyle}{%
linecolor=red, linewidth=2pt,%
frametitlerule=true,%
frametitlebackgroundcolor=gray!20,
innertopmargin=\topskip,
frametitlealignment =\raggedright\noindent
}
\mdtheorem[style=defstyle]{definition}{Definition}
\begin{document}
\begin{definition}
An infinite set $A$ is countable if there exists a bijection $f$ from the
natural numbers into $A$.
\end{definition}
\end{document}