[texhax] Drawing a Likert scale
Philip G. Ratcliffe
philipratcliffe at tiscali.it
Mon Nov 14 07:08:14 CET 2005
> I'm trying to write a set of macros to draw Likert scales, which
> look something like this:
>
> |__|__|__|__|
> | | | | |
>
> A B C D E
>
> However, I can't seem to get the alignment in the tabular
> environment to work right. I've tried (example reduced to 2 items):
>
> \begin{tabular}{cccccc}
> & \vline\rule{0cm}{0.2cm} & & & \vline\rule{0cm}{0.2cm} & \\
> \cline{2-5}
> & \vline\rule{0cm}{0.2cm} & & & \vline\rule{0cm}{0.2cm} & \\
> \multicolumn{3}{c}{A} & \multicolumn{3}{c}{B} \\
> \end{tabular}
>
> But the centerline overhangs the ends, like so:
>
> _|__|_
> | |
>
> A B
>
> Changing the first line to "\begin{tabular}{cc@{}ccc@{}c}" results in:
>
> _|__|
> | |
> A B
>
> Which is also just not right.
>
> Can anyone help?
Try this
\begin{tabular}{|p{2em}|p{2em}|l}
& & \\
\cline{1-2}
& & \\
\multicolumn{1}{l}{\llap{A\,}} &
\multicolumn{1}{l}{\llap{B\,}} &
\multicolumn{1}{l}{\llap{C\,}} \\
\end{tabular}
Cheers, Phil Ratcliffe
More information about the texhax
mailing list