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.

I'm trying to find a way to tame decision nodes (diamond shape) but I just can't do a thing! If I put a formula inside the diamond and if that formula is a little big the shape just grows like a square and becomes to high.

I want the decision node to look like this

http://sixsigmaspc.com/protectedimages/blockdiagram-flowchart-symbols.gif

and not like this:

enter image description here

\documentclass{article}
\usepackage{amsmath,tikz}
\usetikzlibrary{shapes.geometric}

\begin{document}
\tikzstyle{decision} = [diamond, draw, text badly centered, inner sep=3pt]

\begin{tikzpicture}
    \node [decision] {$\lVert f(\mathbf{x}^{0}) \rVert < \varepsilon_{g}$};
\end{tikzpicture}
\end{document}

I thank you all for the help you can give me. :)

share|improve this question
    
Please provide a minimal example that is compilable as provided. –  Thorsten Donig Apr 28 '11 at 16:27

2 Answers 2

There is an aspect option for the diamond shape, which sets the target ration of the height and width. By default it is one. See section 48.3 “Geometric Shapes” in the manual (v2.10).

\documentclass{article}
\usepackage{amsmath,tikz}
\usetikzlibrary{shapes.geometric}

\begin{document}
\begin{tikzpicture}
    \node [draw, diamond, aspect=2] {$\lVert f(\mathbf{x}^{0}) \rVert < \varepsilon_{g}$};
\end{tikzpicture}
\end{document}

result

share|improve this answer

See aspect ratio at page 177 of pgfmanual

share|improve this answer
    
The key is named shape aspect (or just aspect), not aspect ratio. –  Caramdir Apr 28 '11 at 16:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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