-
Notifications
You must be signed in to change notification settings - Fork 3
/
time-added-dots+timeline+style+text.tex
55 lines (49 loc) · 1.63 KB
/
time-added-dots+timeline+style+text.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% https://tex.stackexchange.com/a/303028/173708
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,decorations.pathreplacing}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{center}
\makebox[\textwidth]{
\begin{tikzpicture}[
every node/.style = {align=center},
Line/.style = {-angle 90, shorten <=-2pt},
Brace/.style args = {#1}{semithick,
decorate,
decoration={brace,
#1,
raise=20pt,
pre=moveto,
pre length=2pt,
post=moveto,
post length=2pt,}},
ys/.style = {yshift=#1}
]
\linespread{0.8}
\coordinate (a) at (0,0);
\coordinate[right=30mm of a] (b);
\coordinate[right=30mm of b] (c);
\coordinate[right= 20mm of c] (d);
\coordinate[right=24mm of d] (e);
\coordinate[right= 5mm of e] (f);
\coordinate[right=22mm of f] (g);
% adding * specs to the Line \draw macros for the dot
\draw[Line,*-] (a) -- (g) node[right] {$x$};
\draw[Line, *-] (b) -- (c) ;
\draw[Line, *-] (d) -- (e) ;
\draw[Line, *-] (f) -- (g) ;
\draw[Brace=mirror] (a) -- node[below=20pt] {Compensation} (b);
\draw[Brace=mirror] (b) -- node[below=20pt] {Gift} (d);
\draw ([ys=0mm] a) node[below] {0} -- (a);
\draw ([ys=0mm] b) node[below] {$\theta s$} -- (b);
\draw[Line, shorten >=4pt] ([ys=10mm] c) node[above] {$\delta$} -- (c);
\draw[Line, shorten >=4pt] ([ys=10mm] d) node[above] {$x(\delta)$} -- (d);
\draw ([ys=0mm] d) node[below] {$\theta s + w$} -- (d);
\draw ([ys=0mm] f) node[below] {$z$} -- (f);
\end{tikzpicture}
}
\end{center}
\lipsum[2]
\end{document}