TColorBox 및 Tikz, 화살표가 다이어그램에 없습니다.

TColorBox 및 Tikz, 화살표가 다이어그램에 없습니다.

아래에는 mwe가 포함되어 있습니다. 보시다시피, 마지막 다이어그램에서 마지막 세 상자의 오류가 다음 페이지에 렌더링됩니다. 이 문제를 어떻게 해결할 수 있나요? 나는 이 명령을 사용하는 TexShop을 사용하여 컴파일합니다 pdftex --file-line-error --synctex=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}
\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 사진이 외부에 있었습니다. LaTeX는 두 번째 내부 컴파일 후에 인쇄되기 때문에 환경을 고려하지 않았으며 (오버레이로 실제 tikzpicture보다 하나 더 필요함)... 도움이 되었기를 바랍니다.

\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}

관련 정보