Text Formatting ⇒ Format for indented questions/answers
Format for indented questions/answers
What is the first answer? Here it is.
What is the next answer? This.
What is the third? Right here.
Thus far I've been simply using a \quote environment, but putting \newline after all but the final line. This works fine, except when there is a page break in the middle of the question. Then what happens is that an excessively large space is inserted after the whole series. This is horrible, as the ensuing text is really the continuation of the preceding paragraph.
So: I'm seeking either an alternative way to format the Q/A's or a way to fix my current strategy so that I avoid the extra spacing.
I've been trying to produce a minimal working example of the excess spacing, but have not been successful so far: the issue seems to disappear when I cut out everything but the immediate paragraph and push it down to a pagebreak. However, I have yet to discern what else might be relevant.
Any thoughts are welcome.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Format for indented questions/answers
Code: Select all
\documentclass{article}
\usepackage{lipsum}% for autogenerating filler text
\newenvironment{qaquote}{\begin{quotation}\hspace*{-1\parindent}\setlength{\parindent}{0em}\relax}{\end{quotation}}
\begin{document}
\lipsum[1]
\begin{quote}
\lipsum[3]
\end{quote}
\lipsum[2]
\begin{qaquote}%
What is your name? Arthur of Camelot.
What is your quest? I seek the holy grail.
What is the air speed of velocity of an unladen swallow? What do you mean, an African or European swallow?
\end{qaquote}
\lipsum[6-7]
\end{document}
Re: Format for indented questions/answers
Format for indented questions/answers
If it doesn't work for you, then there must be some important difference about your document which you have neglected to mention. Please post a minimal working example showing the problem.
It might be enough to add \setlength{\parskip}{0pt} right before where I have \setlength{\parindent}{0em}, but it's impossible to know without knowing more about your document. See the Post on Avoidable Mistakes.
Re: Format for indented questions/answers
The problem with posting a minimal working example is that I cannot find one. Or rather, the minimal working example (for me) is a 25 page paper. When I delete seemingly irrelevant text, the problem disappears, and attempts to create the problem from scratch by adding text don't work. I think latex is inserting blank lines based on the overall distribution of text, but I don't know what algorithm it uses so I can't recreate the problematic situation.
-
johnjamessmith0
- Posts: 37
- Joined: Sun Mar 29, 2009 1:41 am
Re: Format for indented questions/answers
Re: Format for indented questions/answers
-
coachbennett1981
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm