Graphics, Figures & Tables ⇒ Auto-sizing pages or graphics
Auto-sizing pages or graphics
I'm tikzing my figures for my purposes. My current workflow is to tikz a figure in a separate file and include it into my document via '\input{<..>}'. I wish to tikz the figures and compile them into PDF. Afterwards, I want to use the '\includegraphics{<..>}' command on the PDF file.
Problem is that my tikzpicture have different sizes. Is there any fancy package I can use to automatically increase the size of the figure to the page size or a package that automatically adjusts the page size to that of my figure? I'd prefer the latter.
Thanks,
Stephan.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Auto-sizing pages or graphics
Code: Select all
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{automata,positioning,shapes.geometric}
\begin{document}
\begin{tikzpicture}[%
->,
shorten >=2pt,
>=stealth,
auto,
node distance=1cm,
noname/.style={%
ellipse,
minimum width=5em,
minimum height=3em,
draw
}
]
\node[noname] (1) {1};
\node[noname] (2) [below=of 1] {2};
\node[noname] (4) [node distance=1cm and 3mm,below left=of 2] {4};
\node[noname] (3) [left=of 4] {3};
\node[noname] (5) [below=of 4] {5};
\node[noname] (6) [node distance=2cm,right=of 5] {6};
\path (1) edge node {a} (2)
(2) edge node[swap] {b} (3)
(2) edge node {c} (4)
(2) edge node {d} (6)
(3) edge node {e} (5)
(4) edge node {f} (5)
(5) edge [bend right=20pt] node[swap] {g} (2);
\end{tikzpicture}
\end{document}
Code: Select all
\begin{tikzpicture}[scale=2]
% picture content
\end{tikzpicture}
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Auto-sizing pages or graphics
