I have the following code:
\section{Questions}
\freequestion What is the largest (LOC) class in the project? \par
\makebox[\textwidth]{%
\begin{tabularx}{\textwidth}{|X|S|S|S|S|S|X|}
\hline
& $--$ & $-$ & $-/+$ & $+$ & $++$ &\\
\hline
The necessary information was easy to find & $\square$ & $\square$ & $\square$ & $\square$ & $\square$ & The necessary information was hard to find\\
\hline
Information retrieval requires redundant user input & $\square$ & $\square$ & $\square$ & $\square$ & $\square$ & Information retrieval does not require redundant user input\\
\\\hline
\end{tabularx}%
}
\freequestion Please share any other remarks or ideas for improving the
workshop or this survey: \par
And here the macro:
\def\freequestion#1\par{#1\par\nobreak
\begingroup\nobreak
\advance\leftskip by 2pc
\hrule width 0pt height 1.7\baselineskip\hrulefill
\hrule width 0pt height 1.7\baselineskip\hrulefill
\par
\medskip
\endgroup
}
Now I wanted to add a linebreak or two before and after the table in the middle, but I already tried \\
, \newline
or \par
and \parskip
but nothing worked. why?
Best Answer
You can't have line-breaks between paragraphs, especially not two (because there are no lines to break there). Don't change
\parskip
by yourself as long you know exactly what to your are doing. Two\par
s after each other act like one. Note that the empty line before\freequestion
already creates an implicit\par.
If you want to change the spacing between the table and the surrounding paragraphs use
\bigskip
(also\medskip
and\smallskip
) in combination with\par
.