Hallo, Mich würde interessieren warum ich hier bei meinem Beispiel einen weißen Rand habe. Warum kann das Latex die auszugebende Seite nicht an die Größe der TIKZ Zeichnung anpassen? (Ohne dass man den weißen Rand sieht? Open in Online-Editor
\documentclass[11pt,preview,border=3pt]{standalone} \usepackage{tikz} \usepackage[T1]{fontenc} \usepackage[scaled]{uarial} \renewcommand*\familydefault{\sfdefault} \begin{document} \newsavebox\Zeichnung \begin{lrbox}{\Zeichnung} \begin{tikzpicture} \draw[fill opacity=0.7, fill=gray,gray](-3.7,-1.06)--(3.7,-1.06)--(3.7,3.7)--(-3.7,3.7)--(-3.7,-1.06); \fill[black](-0.56,0.56)--(-0.56,1.352)--(-1.352,0.56)--(-0.56,0.56); \fill[black](0.56,0.56)--(0.56,1.352)--(1.352,0.56)--(0.56,0.56); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=1pt](0,0)--(-3.2,0); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=2pt](0,0)--(0,3.2); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=2pt](0,0)--(3.2,0); \draw[red,line width=3pt](0,-0.56)--(-3.2,-0.56); \draw[fill=red] (0,0) circle [radius=0.2cm]; \draw(0,-0.56)--(0,0.56); \draw(0,0.56)--(-3.2,0.56); \draw(-0.56,0)--(-0.56,3.2); \draw(-0.56,0)--(0.56,0); \draw(0.56,0)--(0.56,3.2); \draw(0,0.56)--(3.2,0.56); \draw(0,0.56)--(0,-0.56); \draw(0,-0.56)--(3.2,-0.56); \fill[red](-1.592,0.56)circle (0.06); \draw[red](-1.592,0.56)--(-1.592,0.96); \node[above left,rotate=0,red] at (-1.592,0.96){$0$}; \fill[red](-0.56,1.592)circle (0.06); \draw[red](-0.56,1.592)--(-0.96,1.592); \node[above left,rotate=0,red] at (-0.96,1.592){$1$}; \fill[red](0.56,1.592)circle (0.06); \draw[red](0.56,1.592)--(0.96,1.592); \node[above right,rotate=0,red] at (0.96,1.592){$2$}; \fill[red](1.592,0.56)circle (0.06); \draw[red](1.592,0.56)--(1.592,0.96); \node[above right,rotate=0,red] at (1.592,0.96){$3$}; \draw[->,blue,line width=2pt]( 0,0)--(-2.22,0)node[above]{$y$}; \draw[->,blue,line width=2pt]( 0,0)--(0,2.22)node[left]{$z$}; \end{tikzpicture} \end{lrbox} \begin{tikzpicture} [node distance=0cm] \useasboundingbox(0,0)rectangle(7.4cm,4.76cm); \begin{scope}[x=\linewidth,y=\textheight,bildeinbinden/.style={}] \node[bildeinbinden,above right,scale=1] at (0,0) {\usebox\Zeichnung}; \end{scope} \end{tikzpicture} \end{document} |
Du fügst mit Open in Online-Editor
\documentclass[11pt]{standalone} \usepackage{tikz} \usepackage[T1]{fontenc} \usepackage[scaled]{uarial} \renewcommand*\familydefault{\sfdefault} \begin{document} \newsavebox\Zeichnung \begin{lrbox}{\Zeichnung} \begin{tikzpicture} \draw[fill opacity=0.7, fill=gray,gray](-3.7,-1.06)--(3.7,-1.06)--(3.7,3.7)--(-3.7,3.7)--(-3.7,-1.06); \fill[black](-0.56,0.56)--(-0.56,1.352)--(-1.352,0.56)--(-0.56,0.56); \fill[black](0.56,0.56)--(0.56,1.352)--(1.352,0.56)--(0.56,0.56); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=1pt](0,0)--(-3.2,0); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=2pt](0,0)--(0,3.2); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=2pt](0,0)--(3.2,0); \draw[red,line width=3pt](0,-0.56)--(-3.2,-0.56); \draw[fill=red] (0,0) circle [radius=0.2cm]; \draw(0,-0.56)--(0,0.56); \draw(0,0.56)--(-3.2,0.56); \draw(-0.56,0)--(-0.56,3.2); \draw(-0.56,0)--(0.56,0); \draw(0.56,0)--(0.56,3.2); \draw(0,0.56)--(3.2,0.56); \draw(0,0.56)--(0,-0.56); \draw(0,-0.56)--(3.2,-0.56); \fill[red](-1.592,0.56)circle (0.06); \draw[red](-1.592,0.56)--(-1.592,0.96); \node[above left,rotate=0,red] at (-1.592,0.96){$0$}; \fill[red](-0.56,1.592)circle (0.06); \draw[red](-0.56,1.592)--(-0.96,1.592); \node[above left,rotate=0,red] at (-0.96,1.592){$1$}; \fill[red](0.56,1.592)circle (0.06); \draw[red](0.56,1.592)--(0.96,1.592); \node[above right,rotate=0,red] at (0.96,1.592){$2$}; \fill[red](1.592,0.56)circle (0.06); \draw[red](1.592,0.56)--(1.592,0.96); \node[above right,rotate=0,red] at (1.592,0.96){$3$}; \draw[->,blue,line width=2pt]( 0,0)--(-2.22,0)node[above]{$y$}; \draw[->,blue,line width=2pt]( 0,0)--(0,2.22)node[left]{$z$}; \end{tikzpicture} \end{lrbox}% \begin{tikzpicture} [node distance=0cm] \useasboundingbox(0,0)rectangle(7.4cm,4.76cm); \begin{scope}[x=\linewidth,y=\textheight,bildeinbinden/.style={}] \node[bildeinbinden,above right,scale=1,inner sep=0pt] at (0,0) {\usebox\Zeichnung}; \end{scope} \end{tikzpicture} \end{document} Wenn Du die Zeichnung aber sowieso nur für sich haben möchtest, dann kannst Du Dir die Open in Online-Editor
\documentclass[11pt,tikz]{standalone} \usepackage[T1]{fontenc} \usepackage[scaled]{uarial} \renewcommand*\familydefault{\sfdefault} \begin{document} \begin{tikzpicture} \draw[fill opacity=0.7, fill=gray,gray](-3.7,-1.06)--(3.7,-1.06)--(3.7,3.7)--(-3.7,3.7)--(-3.7,-1.06); \fill[black](-0.56,0.56)--(-0.56,1.352)--(-1.352,0.56)--(-0.56,0.56); \fill[black](0.56,0.56)--(0.56,1.352)--(1.352,0.56)--(0.56,0.56); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=1pt](0,0)--(-3.2,0); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=2pt](0,0)--(0,3.2); \draw[dash pattern=on 5.5mm off 2mm on .5mm off 2mm, -,line width=2pt](0,0)--(3.2,0); \draw[red,line width=3pt](0,-0.56)--(-3.2,-0.56); \draw[fill=red] (0,0) circle [radius=0.2cm]; \draw(0,-0.56)--(0,0.56); \draw(0,0.56)--(-3.2,0.56); \draw(-0.56,0)--(-0.56,3.2); \draw(-0.56,0)--(0.56,0); \draw(0.56,0)--(0.56,3.2); \draw(0,0.56)--(3.2,0.56); \draw(0,0.56)--(0,-0.56); \draw(0,-0.56)--(3.2,-0.56); \fill[red](-1.592,0.56)circle (0.06); \draw[red](-1.592,0.56)--(-1.592,0.96); \node[above left,rotate=0,red] at (-1.592,0.96){$0$}; \fill[red](-0.56,1.592)circle (0.06); \draw[red](-0.56,1.592)--(-0.96,1.592); \node[above left,rotate=0,red] at (-0.96,1.592){$1$}; \fill[red](0.56,1.592)circle (0.06); \draw[red](0.56,1.592)--(0.96,1.592); \node[above right,rotate=0,red] at (0.96,1.592){$2$}; \fill[red](1.592,0.56)circle (0.06); \draw[red](1.592,0.56)--(1.592,0.96); \node[above right,rotate=0,red] at (1.592,0.96){$3$}; \draw[->,blue,line width=2pt]( 0,0)--(-2.22,0)node[above]{$y$}; \draw[->,blue,line width=2pt]( 0,0)--(0,2.22)node[left]{$z$}; \end{tikzpicture} \end{document} Hinweis: Ich habe den Inhalt der Zeichnung jetzt einfach übernommen. Aber, wie ich Dir schon wiederholt gesagt und gezeigt habe, würde ich die Zeichnung selbst ohne das wiederholte Eintippen der konkreten Koordinatenwerte erstellen. Wenn Du einen Punkt in Deiner Zeichnung nur etwas verschieben möchtest, musst Du jede Zeile einzeln kontrollieren und ändern, was aufwändig und fehleranfällig ist. beantwortet 24 Sep '15, 10:41 esdd |