tcolorbox はなぜこのような奇妙なページ区切りを挿入するのでしょうか?

tcolorbox はなぜこのような奇妙なページ区切りを挿入するのでしょうか?

下の MWE に、例のフォーマットされたセクションを作成したいと思います。ただし、tcolorbox パッケージは奇妙な改ページを挿入します。改ページをいくつか挿入したいのですが、すべてが連続するように設定されない理由がわかりません。誰か助けてくれませんか?

私とは違って、もっと詳しい知識をお持ちの方がいらっしゃれば、矢印の実現やターゲット位置の並置を改善するための提案にも興味があります。

\documentclass{article}

\usepackage{graphicx, color, colortbl}
\usepackage{xltabular}
\usepackage{scrextend}
\usepackage[breakable, most]{tcolorbox}
\usepackage{lipsum}

\newtcolorbox{exampleFieldFrame}[1]{
    breakable,
    enhanced,
    boxrule=.25pt,
    colframe=blue,
    colback=white,
    attach boxed title to top left,
    boxed title style={
        colback=blue,
        arc=0pt,
        top=3pt,
        bottom=3pt,
    },
    outer arc = 8mm, 
    arc = 8mm, 
    sharp corners = northwest, 
    sharp corners = southeast, 
    title={#1},
}

\newenvironment{exampleField}[2][false]{
    \vspace{2\baselineskip}
    \bgroup\setlength{\parindent}{0cm}
    \begin{exampleFieldFrame}{Beispiel xxx:}
}{
    \end{exampleFieldFrame}
    \vspace{\baselineskip}
    \egroup
}

\newenvironment{exampleBody}[1][Aufgabenstellung]{
    \xltabular{\textwidth}{@{}l p{3cm} X@{}}
    \hspace{5pt}\begin{tikzpicture}
        \fill[fill=blue] (0, 2pt) node[anchor=south]{}
        -- (0, 10pt) node[anchor=north]{}
        -- (20pt,6pt) node[anchor=south]{}
        -- cycle;
    \end{tikzpicture} & \textit{#1:} & }{
    \endxltabular
    \vspace{-15pt}
}

\newenvironment{exampleBody*}[1][Lösung]{
    \begin{xltabular}{\textwidth}{@{}l p{\dimexpr\textwidth-3cm} X@{}}
        \hspace{5pt}\begin{tikzpicture}         
            \fill[fill=blue] (0,2pt) node[anchor=south]{}
            -- (0, 10pt) node[anchor=north]{}
            -- (20pt,6pt) node[anchor=south]{}
            -- cycle;
        \end{tikzpicture} & \textit{#1:} & 
    \end{xltabular}
    \vspace{\baselineskip}
    \begin{addmargin}[44pt]{0pt}
    }{
    \end{addmargin}
}

\begin{document}

\begin{exampleField}{\textwidth}
    \begin{exampleBody}[Zielstellung]
        Es soll der Ersatzwiderstand (= Eingangswiderstand) des toten Netzwerkes aus Abbildung bezüglich der herausgeführten Klemmen berechnet werden.
    \end{exampleBody}
    \begin{exampleBody}[Zielstellung]
        Es soll der Ersatzwiderstand (= Eingangswiderstand) des toten Netzwerkes aus Abbildung bezüglich der herausgeführten Klemmen berechnet werden.
    \end{exampleBody}
    \begin{exampleBody*}
        \lipsum[1-5]
    \end{exampleBody*}
    \begin{exampleBody}[Zielstellung]
        Es soll der Ersatzwiderstand (= Eingangswiderstand) des toten Netzwerkes aus Abbildung bezüglich der herausgeführten Klemmen berechnet werden.
    \end{exampleBody}
\end{exampleField}

\end{document}

答え1

xltabularbreakable 内では動作しないと思いますtcolorbox。env を定義する理由がわかりませんexampleField。引数が 2 つありますが、定義では使用していません。私見ですが、目標を達成する必要はありませんxltabular。このフォーマットは、一部の人が環境で簡単に設定でき\leftskip\leftskip最初の行の を削除してから、実際のコンテンツの前にマーカーと見出しを配置できます。

\documentclass{article}
\usepackage[breakable, most]{tcolorbox}
\usepackage{lipsum}

\newtcolorbox{exampleFieldFrame}[1]{
    breakable,
    enhanced,
    boxrule=.25pt,
    colframe=blue,
    colback=white,
    attach boxed title to top left,
    boxed title style={
        colback=blue,
        arc=0pt,
        top=3pt,
        bottom=3pt,
    },
    outer arc = 8mm, 
    arc = 8mm, 
    sharp corners = northwest, 
    sharp corners = southeast, 
    title={#1},
}

\newenvironment{exampleBody}[1][Aufgabenstellung]{%
\par\bgroup\leftskip4cm\hskip-\leftskip\hbox to 4cm{\begin{tikzpicture}         
\fill[fill=blue] (0,2pt) -- (0, 10pt) -- (20pt,6pt) -- cycle;
\end{tikzpicture}\quad\textit{#1:}\hss}\ignorespaces}{%
\par\egroup%
}

\begin{document}
\begin{exampleFieldFrame}{Beispiel xxx:}
\begin{exampleBody}[Zielstellung]
    \lipsum[2]
\end{exampleBody}
\begin{exampleBody}[Zielstellung]
    \lipsum[2]
\end{exampleBody}
\begin{exampleBody}[Lösung]
    \lipsum[1-5]
\end{exampleBody}
\begin{exampleBody}
    \lipsum[2]
\end{exampleBody}
\end{exampleFieldFrame}
\end{document}

ここに画像の説明を入力してください

関連情報