Skip to main content

You need tikzscaletikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

deleted 34 characters in body
Source Link
user11232
user11232

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

added 1006 characters in body
Source Link
user11232
user11232

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately.

You need tikzscale package. Save the contents

\begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} 

as myfig.tikz (say) and use \includegraphics

Code:

\documentclass{article} \usepackage{tikz} \usepackage{tikzscale} \usepackage{filecontents} %% only for this demo \begin{filecontents*}{myfig.tikz} \begin{tikzpicture} \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} \end{filecontents*} \begin{document} \begin{figure}[htb] \centering \includegraphics[width=0.5\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \includegraphics[width=0.2\textwidth]{myfig.tikz} \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

Unlike \resizebox, the fonts are not scaled in-appropriately. If you want to scale fonts too, use \begin{tikzpicture}[transform shape] instead of \begin{tikzpicture}.

With \resizebox from graphicx:

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htb] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \begin{figure}[htb] \centering \resizebox{0.2\textwidth}{!}{% \begin{tikzpicture}[transform shape] \draw (0,0) circle (2cm); \node at (0,0) {Me}; \end{tikzpicture} }% \caption{This figure has a width which is a factor of text width} \end{figure} \end{document} 

enter image description here

added 151 characters in body
Source Link
user11232
user11232
Loading
Source Link
user11232
user11232
Loading