
我正在嘗試一些功能tcolorbox
包,我在選項方面遇到了一些問題$tikznode$
。這是我的程式碼:
\documentclass{article}
\usepackage{tcolorbox}
\listfiles
\begin{document}
\tcbset{colframe=blue!50!black, colback=white, fonttitle=\bfseries, center title}
\begin{tcolorbox}
Hello\newline word
\end{tcolorbox}
\tcbox{Hello\newline word}
\tcbox[tikznode]{Hello\newline word}
\end{document}
前兩個框沒有問題,但最後一個框會導致錯誤:
包
pgfkeys
錯誤:我不知道密鑰“/tcb/tikznode”,我將忽略它。也許你拼錯了。
答案1
您需要添加\usepackage{tikz}
序言。
\documentclass{article}
\usepackage{tikz}
\usepackage{tcolorbox}
\listfiles
\begin{document}
\tcbset{colframe=blue!50!black, colback=white, fonttitle=\bfseries, center title}
\begin{tcolorbox}
Hello\newline word
\end{tcolorbox}
\tcbox{Hello\newline word}
\tcbox[tikznode]{Hello\\ word}
\end{document}
另一方面,您可以加載tcolorbox
加載.skins
tikz
\documentclass{article}
%\usepackage{tikz}
\usepackage[skins]{tcolorbox}
本質是tikznode
需求tikzpicture
,並將內容放在tikz
節點中。