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.

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

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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
add comment
up vote 1 down vote accepted

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}
share|improve this answer
add comment

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.