1

I use Tikz to draw a image, but the image is little big and too right in the page, i want the image move to left in the page, how to do it? I tried to smallize the font size, but this does not make it move to left

2
  • You can use \begin{tikzpicture}[scale=<amount>]. <amount> is a number like 0.8. Or you can use \resizebox{\textwidth}{!}{your tikzpicture}
    – user11232
    Aug 22, 2014 at 4:28
  • Also add \noindent before the tikzpicture environment. Aug 22, 2014 at 5:06

1 Answer 1

1

Short sum up of this solution. It gives you the possibility to handle your tikzpicture like an image in a figure-environment. This way you can set the width of your tikzpicture to <factor>\textwidth.

This way you don't need to overlap your graphic over the text's width.

\documentclass[11pt]{article}

\usepackage{blindtext}
\usepackage{filecontents}
\usepackage{tikz}
\usepackage{tikzscale}

\begin{document}
\blindtext

\begin{filecontents}{image.tikz}
 \begin{tikzpicture}
  \draw (0,0) rectangle (15,5) node [midway] {Slightly too big rectangle};;
 \end{tikzpicture}
\end{filecontents}

\begin{figure}[ht!]
 \centering
 \includegraphics[width=\textwidth]{image.tikz}
 \caption{tikz in figure}
\end{figure}
\end{document}

Rendered image

1
  • You could also use a \savebox. Aug 22, 2014 at 14:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .