![PDF-Seitengröße mit „Standalone“ + „Tikz“](https://rvso.com/image/420057/PDF-Seitengr%C3%B6%C3%9Fe%20mit%20%E2%80%9EStandalone%E2%80%9C%20%2B%20%E2%80%9ETikz%E2%80%9C.png)
Ich habe eine einfache Visitenkarte in Standardgröße erstellt. Wenn ich das PDF jedoch öffne, ist es 1,5 mm größer (Höhe und Breite). Ich habe versucht, geometry
die Einstellungen zu ändern, aber ohne Erfolg.
\documentclass[tikz]{standalone}
%\usepackage[margin=0pt,paperwidth=80mm,paperheight=50mm,pass,noheadfoot]{geometry}
\usepackage{tikzpagenodes}
\usetikzlibrary{arrows.meta,shapes.geometric,shadows,shadings}
\usepackage{xcolor-material}
\usepackage{graphicx}
\usepackage{fontspec}
\setmainfont{Alegreya}
\tikzstyle{linha} = [line width=7pt,MaterialGrey300]
\tikzstyle{linhafina} = [line width=3pt,MaterialGrey300]
\tikzstyle{bola} = [inner sep=0pt,minimum size=0pt]
% yes, I know \tikzstyle is oudated, it's just easier to type.
\colorlet{cinza}{MaterialGrey300}
\pagestyle{empty}
\begin{document}
\begin{tikzpicture}
[every node/.append style={text=MaterialGrey800,
% font=\Huge
},
\node[opacity=.6,overlay,inner sep=0pt] (figura)
%at (current page.center)
{\includegraphics[width=8cm,height=5cm]{example-image-a}};
\draw[line width=4pt,MaterialRed900%,fill=MaterialGrey300
%rounded corners=12pt
] (figura.south west) rectangle (figura.north east);
\node[yshift=1.5cm] (texto) at (figura.center)
{\itshape \LARGE John Doe};
\node[below= 3pt of texto,overlay] (prof) {\scshape \large o\,r\,i\,o\,n};
\node[xshift=6pt,yshift=6pt,
align=left,anchor=south west,fill=white,opacity=.5,
text opacity=1,
rectangle,draw,rounded corners=2pt] (address) at (figura.south west) {\small Contact:\\e-mail: --- \\ website};
\end{tikzpicture}
\end{document}
Es ist alles gut, aber wenn ich das PDF im Acrobat Reader öffne, ist die Größe etwas größer (1,5 mm):
Antwort1
Zunächst, wie haben Sie diese Datei kompiliert? Sie enthält wesentliche Fehler. Sie haben vergessen, die Umgebungsfront zu schließen [
. tikzpicture
Und Sie haben nicht angegeben, wo dieser Knoten \node[opacity=.6,overlay,inner sep=0pt] (figura)
sein soll? Sie haben nicht angegeben, dass Sie verwenden Laulatex
!! Die endgültige Ausgabegröße ist 29.8 mm * 19.8 mm
oder 1.17*0.78 in
.