mdframed
虽然我按照包中显示的示例操作,但圆角在环境中不起作用mdframed
。下面是我的代码
\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[usenames]{color}
\usepackage[usenames]{xcolor}
\usepackage{mdframed}
\usepackage{lipsum}
\begin{document}
\mdfsetup{%
middlelinecolor=red,
middlelinewidth=2pt,
backgroundcolor=red!20,
roundcorner=20pt}
\begin{mdframed}
\lipsum[3]
\end{mdframed}
\end{document}
答案1
您必须通过framemethod=TikZ
(或framemethod=pstricks
如果使用xelatex/latex...
)选项来\usepackage{mdframed}
喜欢
\usepackage[framemethod=TikZ]{mdframed}
如果没有任何选项,则框架设置为,default
其中roundcorner
等于0pt
。
完整代码:
\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage[usenames]{color}
\usepackage[usenames]{xcolor}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}
\begin{document}
\mdfsetup{%
middlelinecolor=red,
middlelinewidth=2pt,
backgroundcolor=red!20,
roundcorner=20pt}
\begin{mdframed}
\lipsum[3]
\end{mdframed}
\end{document}