0

I am super new to LaTeX and only use other documents as templates or search specifially for commands.

I am creating a survey. Now I want to create a rating scale with a crossed box for the explanation of the survey. How do I insert a cross/a crossed box into a rating?

This is set in the command definitions:

%% \Qrating = Automatically create a rating scale with NUM steps, like 
%% this: 0--0--0--0--0.
\newcounter{qr} 
\newcommand{\Qrating}[1]{\QO\forloop{qr}{1}{\value{qr} < #1}{---\QO}}

Currently, I am using this rating:

\Qtab{3cm}{very \Qrating{5} not at all}}
Nelak
  • 3
  • 1

1 Answers1

0

For a one-time example, you can manually draw the scale with one of the items replaced with a crossed box or circle.

Questionnaire preamble from http://www.svenhartenstein.de/creating-questionnaires-with-latex/. (see note below)

Code:

\documentclass{article}
\usepackage{wasysym}
\usepackage{forloop}

\newcounter{qr} 
\newcommand{\QO}{$\Box$}
\newcommand{\QC}{$\ocircle$}
\newcommand{\Qrating}[1]{\QO\forloop{qr}{1}{\value{qr} < #1}{---\QO}}

\newlength{\qt}
\newcommand{\Qtab}[2]{
\setlength{\qt}{\linewidth}
\addtolength{\qt}{-#1}
\hfill\parbox[t]{\qt}{\raggedright #2}
}

\begin{document}
\Qtab{3cm}{very \Qrating{5} not at all}

\Qtab{3cm}{very \QO---\XBox---\QO---\QO---\QO\ not at all}

\Qtab{3cm}{very \QC---\QC---\QC---$\otimes$---\QC\ not at all}

\end{document}

Result:

enter image description here

Note below: The preamble is added to make this a minimal, compilable example or MWE, you only need the part after \begin{document}. If you ask a question, please make an MWE yourself.

Marijn
  • 37,699