我想在 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}