![在 mdframe 中逐项列出](https://linux22.com/image/385962/%E5%9C%A8%20mdframe%20%E4%B8%AD%E9%80%90%E9%A1%B9%E5%88%97%E5%87%BA.png)
我想在 mdframed 环境中放置一个对话。
\documentclass{article}
\usepackage{mdframed}
\newenvironment{dwf}
{
\begin{mdframed}[linewidth=0.5pt,
linecolor=black,
roundcorner=0pt,
frametitlerule=false,
frametitle={}
]
}
{
\end{mdframed}
}
\begin{document}
See the following dialogue.
\begin{dwf}
\begin{itemize}
\item[Teacher A:] How looks this sentence?
\item[Teacher B:] Oh. Your name is crossed by the frame line.
\item[Teacher A:] Yours Too.
\end{itemize}
\end{dwf}
\end{document}
我该怎么办?
附言:我正在使用 XeLaTeX
答案1
您可以加载该enumitem
包并使用align=left
。
\documentclass{article}
\usepackage{mdframed}
\usepackage[shortlabels]{enumitem}
\newenvironment{dwf}
{
\begin{mdframed}[linewidth=0.5pt,
linecolor=black,
roundcorner=0pt,
frametitlerule=false,
frametitle={}
]
}
{
\end{mdframed}
}
\begin{document}
See the following dialogue.
\begin{dwf}
\begin{itemize}[align=left]
\item[Teacher A:] How looks this sentence?
\item[Teacher B:] Oh. Your name is crossed by the frame line.
\item[Teacher A:] Yours Too.
\end{itemize}
\end{dwf}
\end{document}