Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
Standalone package creates a page with a fixed width

How do I get the class standalone crop the image just as you would preview the package? I must get over the side that is because the package tkz-euclide.

\documentclass{standalone}
\usepackage{tikz}
  \usetikzlibrary{arrows}
\usepackage{tkz-euclide}
  \usetkzobj{all}
\usepackage[pdfpagelayout=SinglePage]{hyperref}

\begin{document}

\begin{tikzpicture}
  \tkzInit
  \tkzDefPoint(0,0){A}
  \tkzDefPoint(4,0){B}
  \tkzDefTriangle[equilateral](A,B)
  \tkzGetPoint{C}
  %angulos
  \tkzMarkAngle[fill=green!50,size=5mm](B,A,C) %\apha
  \tkzMarkAngle[fill=green!50,size=5mm](A,C,B) %\beta
  \tkzMarkAngle[fill=green!50,size=5mm](C,B,A) %\gamma
  %rotulos
  \tkzLabelPoints[below](A,B)
  \tkzLabelPoints[above](C)
  \tkzLabelAngle[pos=.7](B,A,C){$\alpha$}
  \tkzLabelAngle[pos=.7](C,B,A){$\beta$}
  \tkzLabelAngle[pos=.7](A,C,B){$\gamma$}
  \tkzLabelSegment[above right](B,C){$a$}
  \tkzLabelSegment[above left](C,A){$b$}
  \tkzLabelSegment[below](A,B){$c$}
  %triangulo equilatero
  \tkzDrawPolygon(A,B,C)
  %pontos
  \tkzDrawPoints[fill=blue](A,B,C)
\end{tikzpicture}

\end{document}

enter image description here

Does not show here, but the image was not cut from the right side.

share|improve this question

marked as duplicate by Gonzalo Medina, Caramdir, Peter Grill, Martin Scharrer Nov 18 '11 at 8:03

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
The next version of standalone will avoid this problem. But it isn't actual that easy to do automatically. –  Martin Scharrer Nov 18 '11 at 8:04

1 Answer 1

up vote 2 down vote accepted

Removing the blank line at end of the file will fix the problem. You should also remove the blank line at the beginning, but that does not seem to affect the cropping.

Also see Standalone package creates a page with a fixed width as sometimes the issue is more than just a blank line.

share|improve this answer
    
Or a % on that line if you prefer to keep it for clarity. –  qubyte Nov 18 '11 at 2:59
    
Ours, because it works with % ? Thank you. –  Regis da Silva Nov 18 '11 at 3:24
    
Sorry, could you please rephrase? –  qubyte Nov 18 '11 at 4:17

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