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.

So I want to draw a diagram explaining names of digit places ('hundreds' 'tens' 'ones'). I want blank lines with these labels underneath. I'm thinking qtree might be an idea (4 top branches being the blank lines with 1 branch coming off each for the labels).

I am curious is anyone knows an easier way.

Thanks a lot!

share|improve this question

1 Answer 1

up vote 2 down vote accepted

One option would be to use PGF/TikZ; something along these lines:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}

\newcommand\HuTeOn{%
\begin{tikzpicture}[node distance= 0.5cm and 1cm]
  \node (h) {\rule{1.5cm}{0.4pt}};
  \node[right= of h] (t) {\rule{1.5cm}{0.4pt}};
  \node[right= of t] (o) {\rule{1.5cm}{0.4pt}};
  \node[below = of h] (nh) {hundreds};
  \node[below = of t] (nt) {tens};
  \node[below = of o] (no) {ones};
  \foreach \i in {h,t,o}
    \draw[->] (n\i) -- (\i);
\end{tikzpicture}
}

\begin{document}

\HuTeOn

\end{document}
share|improve this answer
    
Hey there. Thanks a lot Gonzalo! That is exactly what I wanted to do! I've never used the \newcommand function before so that was interesting to see. Many interesting things in there actually! Thanks again! –  Michael Mar 18 '11 at 21:04

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.