1

I'm reproducing someone else's example where an angle is created with two lines of differing thickness. My problem is smoothing out the intersection of these two lines. Here is my current outcome:

enter image description here

My desired outcome would be one where the very thick line never goes below the horizontal line.

And my current MWE:

\documentclass[tikz]{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[line cap=round, line join=bevel] % line join=round, miter also do not work
    \draw[line cap=round] (0,0) node[left] {$0$} -- (1,0) node[right] {$t$};
    \draw[very thick,->] (0,0) -- (1,1);
\end{tikzpicture}

\end{document}

I've tried the clip work around from tikz Join line segments of different thickness with miter, but I can't get this to work. I've also tried various line join options as found in How to fix TikZ corners in 3D, but again to no avail.

Is my only option an (ugly) approach with shorten < like \draw[very thick,->,shorten <=0.4] (0,0) -- (1,1);?

I will ultimately be using LuaLaTeX, if that matters.

3

\clip more or less works for me

\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\begin{document}

\begin{tikzpicture}[line cap=round, line join=bevel] % line join=round, miter also do not work
    \draw[line cap=round] (0,0) node[left] {$0$} -- (1,0) node[right] {$t$};
    \clip (-0.2,-0.2pt) rectangle (1.1,1.1);
    \draw[very thick,->] (0,0) -- (1,1);
\end{tikzpicture}

\end{document}

enter image description here

  • Apart from some confusion on my end regarding clip, I was expecting an automatic approach, but this works. I assume you chose -0.2pt as the y coordinate due to the thickness of the horizontal line? – Richard Mar 16 '17 at 3:21
  • @Richard Yes is the half of the thickness of the horizontal line. – Ignasi Mar 16 '17 at 9:37

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.