# Generate line hash scale

I want to recreate the original NASA TLX Question from here, but how do you generate the hash scale?

-

Since you categorized the question as tex-core I would refer you to the TeXbook Exercise 10.4, which demonstrates how to draw a ruler complete with ticks.

\documentclass[11pt]{article}
\begin{document}
\def\tick#1{\vrule height 0pt depth #1pt}
\def\\{\hbox to 1cm{\hfil\tick4\hfil\tick8}}
\vbox{\hrule\hbox{\tick8\\\\\\\\\\\\\\\\\\\\}}
\end{document}


Other methods is to use the LaTeX picture environment or PGF/TikZ. The latter would probably be the easiest, but comes with a learning curve. Some amazing pure TeX rulers can also be found here http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=ruler developed by Victor Eijkhout.

-
To be honest, I was not sure how to categorize this question but this is a useful answer –  Elpezmuerto Dec 13 '10 at 16:08

Using TikZ

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{plotmarks}
\begin{document}
\begin{tikzpicture}[y=.2cm, x=0.05* \textwidth,font=\sffamily]
%axis
\draw (0,0) -- coordinate (x axis mid) (20,0);

%ticks
\foreach \x in {0}
\draw (\x,0pt) -- (\x,15pt)
node[anchor=south] {};

\foreach \x in {1,...,9}
\draw (\x,0pt) -- (\x,5pt)
node[anchor=south] {};

\foreach \x in {10}
\draw (\x,0pt) -- (\x,15pt)
node[anchor=south] {};

\foreach \x in {11,...,19}
\draw (\x,0pt) -- (\x,5pt)
node[anchor=south] {};

\foreach \x in {20}
\draw (\x,0pt) -- (\x,15pt)
node[anchor=south] {};
\end{tikzpicture}
\end{document}

-