![如何用北中心部分的方框装饰 tikz 矩形?](https://linux22.com/image/296637/%E5%A6%82%E4%BD%95%E7%94%A8%E5%8C%97%E4%B8%AD%E5%BF%83%E9%83%A8%E5%88%86%E7%9A%84%E6%96%B9%E6%A1%86%E8%A3%85%E9%A5%B0%20tikz%20%E7%9F%A9%E5%BD%A2%EF%BC%9F.png)
我想制作一个像图像一样的矩形,在其中可以添加图像\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}