TColorBox と Tikz、矢印が図に表示されない

TColorBox と Tikz、矢印が図に表示されない

以下に mwe を記載しました。ご覧のとおり、最後の図では、最後の 3 つのボックスのエラーが次のページにレンダリングされています。これを修正するにはどうすればよいでしょうか。このコマンドを使用する TexShop を使用してコンパイルしていますpdftex --file-line-error --synctex=1。はい、2 回以上コンパイルしました。

\documentclass[11pt, letterpaper, oneside]{memoir}

\usepackage{libertine}
\usepackage{libertinust1math}
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{enumitem, amssymb}
\usepackage{textcomp}
\usepackage[tracking = true, letterspace = 125]{microtype}
\usepackage{soul}
\usepackage{mfirstuc}
\usepackage{scalerel}
\usepackage[skins, raster]{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{decorations,decorations.markings}
\usepackage{etoolbox}
\usetikzlibrary{optics}
\usepackage{draftwatermark}
\usepackage[pass]{geometry}
\usepackage[hyphens]{url}
\usepackage{hyperxmp}
\usepackage{hyperref}
\usepackage{xfrac}
\usepackage{multicol}

\usepackage[english]{babel}
\usepackage{blindtext}

% force LaTeX to write the author, title, and copyright into the PDF
\makeatletter
  \AtEndDocument{\hyxmp@find@metadata\hyxmp@embed@packet}
\makeatother
\hypersetup{
    colorlinks=true,
    linktoc=all,
    urlcolor=blue,
    linkcolor=part,
    draft=false,
    pdfauthor={some authoer},
    pdftitle={some org},
    pdfcopyright={Copyright \copyright~2019 by author. Some rights reserved.},
    pdfpagelabels=true,
    implicit=false
}

\chapterstyle{ell}

\setlength{\emergencystretch}{6pt}
\setlrmarginsandblock{1in}{1in}{*}
\checkandfixthelayout
\linespread{1.3}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%   The Document
%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\title{A Title}
\author{An Author}
\date{}
\maketitle

\frontmatter

\blindtext

\mainmatter

\Blindtext
\tcbset{enhanced, nobeforeafter, sidebyside align=top,box align=center, width=1.6in}

\begin{center}
\begin{tcolorbox}[remember as=one]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=two]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=three]
Many more somethings happen and the world nearly dies
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=four]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=five]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=six]
a result
\end{tcolorbox}
\end{center}

\begin{tikzpicture}[overlay,remember picture,line width=0.5mm]
\draw[->] (one.east) to (two.west);
\draw[->] (three.east) to (four.west);
\draw[->] (five.east) to (six.west);
\end{tikzpicture}

\blindtext
\begin{center}
\begin{tcolorbox}[remember as=1]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=2]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=3]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=4]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=5]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=6]
a result
\end{tcolorbox}
\end{center}

\begin{tikzpicture}[overlay,remember picture,line width=0.5mm]
\draw[->] (1.east) to (2.west);
\draw[->] (3.east) to (4.west);
\draw[->] (5.east) to (6.west);
\end{tikzpicture}

\backmatter

\blindtext

\end{document}

図に矢印がない

答え1

同じページに強制的に配置するために、 tikzpicture を同じcenter環境に配置するだけです... LaTeX はカラーボックスを次のページに配置することを決定しましたが、考えを変えて、前のページで再考した後にそれを強制しました... tikz 画像は環境外にあり、2 回目の内部コンパイル後に印刷されるため、LaTeX の再考に従わなかった (オーバーレイとして実際の tikzpicture よりも 1 つ多く必要)... お役に立てば幸いです。

\documentclass[11pt, letterpaper, oneside]{memoir}

\usepackage{libertine}
\usepackage{libertinust1math}
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{enumitem, amssymb}
\usepackage{textcomp}
\usepackage[tracking = true, letterspace = 125]{microtype}
\usepackage{soul}
\usepackage{mfirstuc}
\usepackage{scalerel}
\usepackage[skins, raster]{tcolorbox}
\usepackage{tikz}
\usetikzlibrary{decorations,decorations.markings}
\usepackage{etoolbox}
\usetikzlibrary{optics}
\usepackage{draftwatermark}
\usepackage[pass]{geometry}
\usepackage[hyphens]{url}
\usepackage{hyperxmp}
\usepackage{hyperref}
\usepackage{xfrac}
\usepackage{multicol}

\usepackage[english]{babel}
\usepackage{blindtext}

% force LaTeX to write the author, title, and copyright into the PDF
\makeatletter
  \AtEndDocument{\hyxmp@find@metadata\hyxmp@embed@packet}
\makeatother
\hypersetup{
    colorlinks=true,
    linktoc=all,
    urlcolor=blue,
    linkcolor=part,
    draft=false,
    pdfauthor={some authoer},
    pdftitle={some org},
    pdfcopyright={Copyright \copyright~2019 by author. Some rights reserved.},
    pdfpagelabels=true,
    implicit=false
}

\chapterstyle{ell}

\setlength{\emergencystretch}{6pt}
\setlrmarginsandblock{1in}{1in}{*}
\checkandfixthelayout
\linespread{1.3}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%   The Document
%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\title{A Title}
\author{An Author}
\date{}
\maketitle

\frontmatter

\blindtext

\mainmatter

\Blindtext
\tcbset{enhanced, nobeforeafter, sidebyside align=top,box align=center, width=1.6in}

\begin{center}
\begin{tcolorbox}[remember as=one]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=two]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=three]
Many more somethings happen and the world nearly dies
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=four]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=five]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=six]
a result
\end{tcolorbox}

\begin{tikzpicture}[overlay,remember picture,line width=0.5mm]
\draw[->] (one.east) to (two.west);
\draw[->] (three.east) to (four.west);
\draw[->] (five.east) to (six.west);
\end{tikzpicture}
\end{center}

\blindtext
\begin{center}
\begin{tcolorbox}[remember as=1]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=2]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=3]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=4]
a result
\end{tcolorbox}
\end{center}

\begin{center}
\begin{tcolorbox}[remember as=5]
Something happens
\end{tcolorbox}
\qquad
\begin{tcolorbox}[remember as=6]
a result
\end{tcolorbox}
\begin{tikzpicture}[overlay,remember picture,line width=0.5mm]
\draw[->] (1.east) to (2.west);
\draw[->] (3.east) to (4.west);
\draw[->] (5.east) to (6.west);
\end{tikzpicture}
\end{center}
\clearpage
\backmatter

\blindtext

\end{document}

関連情報