Tell me more ×
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 implement some basic \overbrace and \underbrace symbols to the nodes of the vertical line in the timeline of this script. Can someone please help? Getting nowhere.

The tikzpicture is wedged into line I am typing normal LaTeX on with \put due to the whole page having an overpic.

\documentclass[11pt,a4paper]{article}

\usepackage[percent]{overpic}
\usepackage{tikz}
\usetikzlibrary{snakes}
\begin{document}
\put(12,46){\begin{tikzpicture}[snake=zigzag, line before snake = 5mm, line after snake = 5mm]
\draw (0,0) -- (10,0);
\draw[decoration] (2,0) -- (7,0);
\foreach \x in {0,1,2,3,4,5,6,7}
\draw (\x cm,3pt) -- (\x cm,-3pt);
\draw (0,0) node[below=3pt] {$ 0 $} node[above=3pt] {$  $};
\draw (1,0) node[below=3pt] {$ 1 $} node[above=3pt] {$  $};
\draw (2,0) node[below=3pt] {$ 2 $} node[above=3pt] {$  $};
\draw (3,0) node[below=3pt] {$ 5 $} node[above=3pt] {$  $};
\draw (4,0) node[below=3pt] {$ 6 $} node[above=3pt] {$  $};
\draw (5,0) node[below=5pt] {$ n $} node[above=3pt] {$  $};
\end{tikzpicture}}
\end{document}
share|improve this question
\draw [ thick, decoration={ brace, mirror, raise=0.5cm }, decorate ] (wall1.east) -- (mass) will this work in there somewhere changing wall.east and mass obviously – john Sep 4 '11 at 23:13
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, then they are marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). For inline code, you can use backticks. – Alan Munn Sep 4 '11 at 23:13
I have been looking rather stupid whenever I post my code here, I dont understand what you mean actually. Does that work in this comment section to? – john Sep 4 '11 at 23:16
you can only use backticks for code inside comments (since comments are supposed to be small.) The backtick is the '`' character. I'm not sure which other part of the comment you don't understand. If you are entering a question, you should see a bunch of little icons above the input area (including one that is '{}'). If you select your code, and click on that icon, it will automatically indent each line by 4 spaces for you. – Alan Munn Sep 4 '11 at 23:17
oh I see, but i can only do that at the beginning of my post? anyway , I replaced wall.east and mass (tex.stackexchange.com/questions/25531/adding-underbrace-in-tikz) with 02,0 and 7,0 worked a charm...how do i do overbrace though – john Sep 4 '11 at 23:21
show 7 more comments

closed as not a real question by lockstep, Paulo Cereda, egreg, Joseph Wright Dec 3 '11 at 22:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

Browse other questions tagged or ask your own question.