# How to include a long underscore before the \question command?

i am working with a simple question but i can't include underline before the \question.

## Code

documentclass{myclass}

\newcommand{\line}{\begin{tabular}{p{2cm}}
\\[-.35em]
\hline
\end{tabular}
}

\begin{questions}
\question What is the color of your shirt? \line

\end{questions}


## Output:

1. What is the color of your shirt? __

but i'm trying to make something like this by:

## Output:

__ 1.What is the color of your shirt?

How can I create this?

-
The answer probably depends greatly on what the myclass class is--in particular, on the definition of the questions environment. –  Andrew Uzzell Oct 24 '12 at 11:12
That's not a minimal working example (MWE). In addition to the unknown document class, you're missing the \begin{document} ... \end{document}. –  Andrew Stacey Oct 24 '12 at 11:22
@Kayla: Please post your TeX/LaTeX/etc. related questions here, on the main site! TeX - LaTeX Meta, however, is intended for questions about the main site, e.g. if you don't know how to accept an answer, if your reputation seems odd, or if you would like to discuss the reasons for a question being closed. –  doncherry Oct 24 '12 at 17:53

## migrated from meta.tex.stackexchange.comOct 24 '12 at 11:07

This question came from our discussion, support, and feature requests site for users of TeX, LaTeX, ConTeXt, and related typesetting systems.

Assuming the questions environment is that of the exam class: Redefine \questionlabel.

\documentclass{exam}

\renewcommand{\questionlabel}{\rule{1cm}{0.4pt}\thequestion.}

\begin{document}

\begin{questions}
\question\label{q:test} What is the color of your shirt?
\end{questions}

See question~\ref{q:test}.

\end{document}


-
redefining the command indid make it. Thank You so much! –  Kayla Oct 30 '12 at 0:00
like spaces, drawn rules (e.g. \hline) get ignored at the beginning of a line, so you need to put a "stopper" in front if you want it to be output. add \leavevmode before \hdline.