根据的文档tcolorbox
,我们可以使用blend into
该选项,但它对我来说不起作用。
错误说:
Package pgfkeys Error: I do not know the key '/tcb/blend into', to which you passed 'figures', and I am going to ignore it. Perhaps you misspelled it. \end{posterboxenv}
Not in outer par mode. \begin{figure}[H]
Undefined control sequence. \begin{figure}[H]
Missing number, treated as zero. \begin{figure}[H]
文件: https://mirrors.bfsu.edu.cn/CTAN/macros/latex/contrib/tcolorbox/tcolorbox.pdf#page=118
以下是 MWE:
\documentclass[UTF8,scheme=plain,fontset=none,10pt]{ctexart}
\usepackage[a4paper,landscape]{geometry}
\usepackage[poster]{tcolorbox}
\tcbuselibrary{listings}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{enumitem}
\usepackage{tabu}
%\usepackage{tabularray}
\usepackage{longtable}
\RequirePackage[lite]{mtpro2}
\usepackage{ulem}
\usetikzlibrary{arrows,arrows.meta,shapes}
\usepackage{graphicx}
\RequirePackage{listings}
\lstset{
numbers=none,
numberstyle=\tiny,
numbersep=5pt,
frame=single,
aboveskip=1mm,belowskip=1mm,
%xleftmargin=8pt,
language=Python,
%alsolanguage=C++,
basicstyle=\ttfamily \zihao{-6} \linespread{1.0} \selectfont,
%morecomment=[l]{#},
morekeywords={False, as, True, yield, None, assert, with, nonlocal},
morestring=[b]",
sensitive=true,
%commentstyle=\kaishu \color{gray},
%keywordstyle=\color{xsteelblue},%\bfseries,
%stringstyle=\color{xsteelblue},
showstringspaces=false,
tabsize=4,
texcl=true,
escapechar=`
}
\newtcolorbox{innerbox}[2]{
left=0mm, right=0mm, top=0mm, bottom=0mm,
grow to left by=2mm, grow to right by=2mm,
sharp corners,
breakable=true,enforce breakable,
boxrule=0mm,
colbacktitle={#1},
colback={#1!10},
fonttitle=\sffamily\bfseries\zihao{-5},
halign title=center,
title={#2}
}
\pagestyle{empty}
\begin{document}
\begin{tcbposter}[
coverage = {
spread,
},
poster = {
columns=4, rows=7,
spacing=3mm
},
boxes = {
left=2mm, right=2mm, top=2mm, bottom=2mm,
fonttitle=\sffamily\bfseries\zihao{5}, % 主标题
halign title=center,
subtitle style={
halign=center,
}
}
]
% ===================== 0. title
\begin{posterboxenv}[halign=center]{name=ptitle,below=top,span=2}
{\zihao{2} Python Cheat Sheet} \\
\leftline{demo \hfill Created By: xaero}
\end{posterboxenv}
\begin{posterboxenv}[title=Python demo, blend into=figures]{name=a1,below=ptitle}
\tikzstyle{startstop} = [rectangle,rounded corners, minimum width=1mm,minimum height=1mm,text centered, draw=none,fill=none,thin]
\tikzstyle{io} = [trapezium, trapezium left angle = 70,trapezium right angle=110,minimum width=3mm,minimum height=1mm,text centered,draw=black,fill=blue!30,thin]
\tikzstyle{process} = [rectangle,minimum width=6mm,minimum height=3mm,text centered,text width =3mm,draw=black,fill=green!20,thin]
\tikzstyle{decision} = [diamond,aspect=2,minimum width=1mm,minimum height=1mm,text centered,draw=black,fill=orange!30,thin]
\tikzstyle{arrow} = [thin,->,>=stealth,-{Stealth[length=1.2mm]}]
\begin{figure}[H]
\begin{tikzpicture}[node distance=5mm]
\node (start) [startstop] {};
\node (decision1) [decision,below of=start,yshift=-0.5mm] {$?$};
\node (process1a) [process,left of=decision1,yshift=-4mm,xshift=-2mm] {};
\node (stop) [startstop,below of=decision1,yshift=-5mm] {};
\draw [arrow] (start) -- (decision1);
\draw [arrow] (decision1) -| node[above,font=\fontsize{4}{0}\selectfont] {$T$} (process1a);
\draw [arrow] (decision1) -- node[right,font=\fontsize{4}{0}\selectfont] {$F$} (stop);
\draw [arrow] (process1a) |- (0,-1.25) -- (stop);
\begin{scope}[xshift=2cm]
\node (start) [startstop] {};
\node (decision1) [decision,below of=start,yshift=-0.5mm] {$?$};
\node (process1a) [process,left of=decision1,yshift=-4mm,xshift=-2mm] {};
\node (process1b) [process,right of =decision1,yshift=-4mm,xshift=2mm] {};
\node (stop) [startstop,below of=decision1,yshift=-5mm] {};
\draw [arrow] (start) -- (decision1);
\draw [arrow] (decision1) -| node[above,font=\fontsize{4}{0}\selectfont] {$T$} (process1a);
\draw [arrow] (decision1) -| node[above,font=\fontsize{4}{0}\selectfont] {$F$} (process1b);
\draw [arrow] (process1a) |- (0,-1.25) -- (stop);
\draw [arrow] (process1b) |- (0,-1.25) -- (stop);
\end{scope}
\end{tikzpicture}
\end{figure}
\end{posterboxenv}
\end{tcbposter}
\end{document}