i'm using tikz to draw a diagram. But i meet the problem: latex place the tikzpicture with a distant to left edge of paper and its too large that goes over right edge. Like the picture below shows, theres still plenty of space at left corner, and right part of picture already gose out of page. I have done nothing than simply write:

    \begin{tikzpicture}[square/.style={regular polygon,regular polygon sides=4}]
     %draw something large here

how can i place it correctly?

the compilable code can be found here: https://pastebin.com/H2NGYtKV Or by Overleaf: https://www.overleaf.com/read/hhxjmxdkvscg enter image description here

  • You have certainly done more that this, because the code you posted does not compile.
    – AlexG
    Apr 16, 2018 at 11:46
  • well, if u insist to see the whole code, here it is: pastebin.com/H2NGYtKV
    – tyker1
    Apr 16, 2018 at 11:50
  • The tikzpicture is too large to fit within \textwidth. The white margin on the left is the usual document margin. There is no a3paper option for the article class. See the *.log file.
    – AlexG
    Apr 16, 2018 at 12:01
  • so how can i adjust it? other than use resizebox (what i currently use)
    – tyker1
    Apr 16, 2018 at 13:06
  • ok... i used geometry to adjust margin \geometry{ a3paper, left=2mm, top=20mm, } and the problem is resolved
    – tyker1
    Apr 16, 2018 at 13:19

1 Answer 1


So i have solved it myself by using geometry package and combined it with resizebox:


    \begin{tikzpicture}[square/.style={regular polygon,regular polygon sides=4}]
         %% codes gose here

As the result, it uses the full space from left edge to right edge.

The compilable Code can be find here: https://www.overleaf.com/read/hhxjmxdkvscg

enter image description here

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.