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 have a simple picture - three vectors, originating from the (0, 0) point.

\documentclass[a4paper,12pt,oneside,titlepage,makeidx]{article}

\usepackage[pdftex]{graphicx}
\usepackage{tikz}
\usetikzlibrary{positioning, decorations.pathreplacing, calc, matrix, shapes, arrows, decorations, decorations.text, fit}

\newcommand{\dimlabel}
    {%
        \begin{tikzpicture}%
            \draw[-latex', line width = 1pt] (0, 0) -- (0, 1);%
            \draw[-latex', line width = 1pt] (0, 0) -- (1, 0);%
            \draw[-latex', line width = 1pt] (0, 0) -- (1, 1);%
        \end{tikzpicture}%
    }%

\begin{document}

    \begin{tikzpicture}
        \node (S){\dimlabel};
    \end{tikzpicture}

\end{document}

I use MikTeX 2.9 under Windows with pdfLaTeX. The problem is that, if you run this simple example, and then open file in, say, Adobe Reader, and zoom the page really close, like 1200%, you will see that vectors, which form right angle have small gap in the point of origin. The picture explains my point better. How can I avoid this effect? Tikz problem

share|improve this question
3  
You can add line cap=rect to the orthogonal paths. –  Jake Mar 22 '13 at 15:49
    
cool! it works, thank you! –  Oleksandr Mar 22 '13 at 15:53
    
@Jake perhaps you should turn your comment into an answer? –  Gonzalo Medina Mar 22 '13 at 22:47
add comment

1 Answer

PSTricks can also be used to explain your problem. You need to change the linecap (PSTricks' term) or line cap (TikZ's term) from 0 (default) to 1.

enter image description here

\documentclass[border=3pt]{standalone}
\usepackage{pstricks,multido}
\psset{linewidth=2pt,arrows=->}
\begin{document}
\multido{\i=0+1}{3}{%
\begin{pspicture}(1,1.5)
    \psset{linecap=\i}
    \psline(0,1)
    \psline(1,1)
    \psline(1,0)
    \rput(0.5,1.25){\tiny linecap=\i}
\end{pspicture}\quad}
\end{document}
share|improve this answer
add comment

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.