I am preparing questionnaire template in LaTeX.
I have the following code (simplified):
\documentclass{article}
\begin{document}
\framebox{\parbox{4cm}{
\textbf{3. How often do you have a headache?}\\
\textit{(Choose one option)}\begin{flushright}
never 0
seldom 1
often 2
\end{flushright}
}}
\end{document}
Output looks like this:
My questions are:
- Why I get the blank lines(marked by red color on picture for convenience) before and after the flushright environment ?
- How to remove them?
Best Answer
\flushright
and\flushleft
are defined using\trivlist
:and this adds some additional vertical space. If you don't want this additional space. you could use the
\raggedleft
,\raggedright
commands instead of the\flushright
,\flushleft
environments. Another option would be to set\topset
(and\parskip
, and\partopset
, if necessary) to0pt
: