如何在 schemata 中插入 itemize/enumerate 块?

如何在 schemata 中插入 itemize/enumerate 块?

如何在 schemaata 中插入 itemize/enumerate 块?

\documentclass[10pt,a4paper]{article}
\usepackage{schemata}
\newcommand\AB[2]{\schema{\schemabox{#1}}{\schemabox{#2}}}

\begin{document}

\AB{text here}
{
\AB{Some text 1}
{

%%%%%%%%%%%%%%%%%%%% With this lines instead of itemize block, all runs fine
%$\bullet$ text 1.1 \\
%$\bullet$ text 1.2 \\
%$\bullet$ text 1.3 \\
%$\bullet$ text 1.4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{itemize}
  \item text 1.1\\
  \item text 1.2\\
  \item text 1.3\\
  \item text 1.4\\
\end{itemize}
}\\
Some text 2 \\
Some text 3 \\
\AB{Some text 4}
{
text 1.1 \\
text 1.2 \\
text 1.3 \\
text 1.4
}\\

}

\end{document}

答案1

其中一种方法是使用 minipage 环境:

\documentclass[10pt,a4paper]{article}
\usepackage{schemata}
\newcommand\AB[2]{\schema{\schemabox{#1}}{\schemabox{#2}}}

\usepackage{enumitem}
\newlength{\mywidth}
\setlength{\mywidth}{\textwidth}
\addtolength{\mywidth}{-\parindent}

\newenvironment{myitemize}
   {\begin{minipage}{\mywidth}\begin{itemize}[leftmargin=1em,itemsep=-0.5em]}
   {\end{itemize}\end{minipage}}

\begin{document}

\AB{text here}
{
\AB{Some text 1}
{

\begin{myitemize}
  \item text 1.1
  \item text 1.2
  \item text 1.3
  \item text 1.4
\end{myitemize}

}\\
Some text 2 \\
Some text 3 \\
\AB{Some text 4}
{
text 1.1 \\
text 1.2 \\
text 1.3 \\
text 1.4
}\\

}

\end{document}

相关内容