我想制作一个像图像一样的矩形,在其中可以添加图像\includegraphics
。我有以下矩形代码:
\begin{tikzpicture}[overlay,remember picture]
\draw [xshift=3mm,line width=7pt,rounded corners=7pt, draw=black]
($ (current page.north west) + (15mm,-15mm) $)
rectangle
($ (current page.south east) + (-15mm,15mm) $);
\end{tikzpicture}
答案1
我不太明白这个问题
尝试这个
\documentclass[a4paper]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{fit,calc,positioning}
\begin{document}
\begin{tikzpicture}
\node[draw,,line width=5pt,rounded corners=5pt,](cadre){\includegraphics[width=10cm]{linux-penguin}};
\draw [xshift=3mm,line width=5pt,rounded corners=5pt, draw=black,fill=white]
($ (cadre.north) + (15mm,-5mm) $)
rectangle
($ (cadre.north) + (-15mm,5mm) $);
\end{tikzpicture}
\end{document}
附上您的来源和评论
\documentclass[a4paper]{article}
\usepackage{pgf,tikz}
\usetikzlibrary{fit,calc,positioning}
\begin{document}
\begin{tikzpicture}[overlay,remember picture]
\draw [xshift=3mm,line width=7pt,rounded corners=7pt, draw=black]
($ (current page.north west) + (15mm,-15mm) $)
rectangle
($ (current page.south east) + (-15mm,15mm) $);
\node at ($ (current page.north) + (0,-15mm) $) [draw,line width=5pt,rounded corners=5pt,]{\includegraphics[width=4cm]{linux-penguin}};
\end{tikzpicture}
\end{document}