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.

How to draw something like this?

enter image description here

share|improve this question
5  
Welcome to TeX.SX. Please show us, what you have tried so far. This is just a "Do-it-for-me" question. Have you read tex.stackexchange.com/q/82255 and tex.stackexchange.com/q/61237 and tex.stackexchange.com/q/161257 and so many others on this side? –  LaRiFaRi Apr 15 at 15:54
    
Perhaps the package timeline will help –  Christian Hupfer Apr 15 at 15:54

1 Answer 1

up vote 8 down vote accepted

One option using TikZ:

\documentclass{article} 
\usepackage{tikz}
\usepackage{amsmath}

\definecolor{mygreen}{RGB}{117,167,117}
\definecolor{myred}{RGB}{255,1,1}

\newcommand\myent[3]{%
\footnotesize%
$\begin{array}{@{}r@{}} 
#1 \\ #2 \\#3
\end{array}$%
}

\begin{document}

\begin{tikzpicture}[x=1.5cm]
\draw[mygreen,->,thick,>=latex]
  (0,0) -- (5,0) node[below right] {$\scriptstyle t$};
\foreach \Xc in {0,...,4}
{
  \draw[mygreen,thick] 
    (\Xc,0) -- ++(0,5pt) node[above] {$\scriptstyle \Xc$};
}
\foreach \Xc/\Texto in {1/Load,2/Escape,3/Shoot}
{
  \fill[myred] 
    ([xshift=5pt]\Xc,0.25)  
      rectangle node[above] {\strut\small\Texto} 
    ([xshift=-5pt]\Xc+1,0.35);  
}
\node[below,align=left,anchor=north,inner xsep=0pt,color=myred] 
  at (0,0) 
  {\myent{a}{\neg l}{\neg h}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (1,0) 
  {\myent{a?}{l?}{h?}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (2,0) 
  {\myent{a?}{\color{myred}l\ast}{h?}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (3,0) 
  {\myent{a?}{l?}{\color{myred}h\ast}};  
\node[below,align=left,anchor=north,inner xsep=0pt] 
  at (4,0) 
  {\myent{a?}{\color{myred}\neg l\ast}{h?}};  
\end{tikzpicture}

\end{document}

The result:

enter image description here

share|improve this answer

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.