1

An identify brace on a graph tells the reader that the two points "identified" are topologically equivalent. That is, the correct way to understand the graph is to cut it out, roll it into a cylinder, and glue it together at the points being identified. Here's an MS Paint example:

enter image description here

How can I make a TikZ macro for such identify braces? One would typically need horizontal and vertical braces, in both "equals sign up", "equals sign down" (horizontal) or "equals sign left", "equals sign right" (vertical) flavours.

10
  • 3
    Can you atleast draw the lines for a MWE? I mean, come on. You have 6 gazillion points, you should know better
    – percusse
    Commented Feb 3, 2015 at 21:58
  • Is it a brace, like { but under the segment?
    – Sigur
    Commented Feb 3, 2015 at 21:59
  • Whats wrong with \underbrace{\rule{\width}{0pt}}? Commented Feb 3, 2015 at 22:54
  • So you want a horizontal brace, with the tip replaced by a vertical equal sign?
    – Herr K.
    Commented Feb 3, 2015 at 23:05
  • 1
    @user89 We are talking about 7 lines of stupid code for a starting MWE please let's not discuss. This is not college admission. It's just a question.
    – percusse
    Commented Feb 4, 2015 at 9:08

1 Answer 1

3

You can start with this. A command \myequivdown which draws something similar to what you want between to nodes. It's easy to replicate for equals going up, right or left. Change command name, angles and distances to your taste.

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning,calc}
\begin{document}
\newcommand{\myequivdown}[2]{
    \path (#1.south)--coordinate[midway] (aux) (#2.south);
    \draw (#1.south) to [out=-89,in=181] ([shift={(-.5mm,-3mm)}]aux)--++(-90:3mm);
    \draw (#2.south) to [out=-91,in=-1] ([shift={(.5mm,-3mm)}]aux)--++(-90:3mm);
}
\begin{tikzpicture}
    \draw (0,0)--(4,0);
    \draw (0.5,.3)--(0.5,-.3) node[below] (zero) {\strut 0};
    \draw (3.5,.3)--(3.5,-.3) node[below] (two) {\strut 2 pi};
    \myequivdown{zero}{two}
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .