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

  • 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 '14 at 4:28
  • Also add \noindent before the tikzpicture environment. – Peter Grill Aug 22 '14 at 5:06
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

| improve this answer | |
  • You could also use a \savebox. – John Kormylo Aug 22 '14 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.