Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying LaTex for the very first time. I love the system, but have run into a problem (please pardon any newbie mistakes):

\emph{Modus ponens}: The form of this argument is:

\hsp if $p$, then $q$.    

\hsp $p$   

\hsp therefore, $q$.

Here, \hsp is a custom command that adds some horizontal space (\newcommand{\hsp}{\hspace{2ex}}). I would like to reduce the line spacing for the last three lines. I have tried \singlespacing etc. from the \setspace package, but it doesn't seem to work.

Can someone please help me out?

share|improve this question
1  
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  barbara beeton Jul 5 '13 at 17:49
    
\vskip -3pt, \vspace{-3pt} or something similar would help? –  karlkoeller Jul 5 '13 at 17:50
    
\hspace{...} is ignored at the beginning of a line. if you want to make sure it's not ignored, use the starred form: \hspace*{...}. regarding the vertical spacing, you might just end all the lines but the last with \` and remove the blank lines. that will treat this as a unit, a single paragraph with explicit line breaks. alternatively, since it seems like there might be more of these, it's possible a package might exist to format them suitably, or an environment could be defined for the purpose. –  barbara beeton Jul 5 '13 at 17:53
add comment

2 Answers

up vote 4 down vote accepted

One possible solution is to place the argument form inside of a spacing environment. This allows you to manipulate the spacing independently of the spacing of the document itself using the setpsace package. Another benefit of doing this is that you no longer need to define the \hsp command because the quote environment indents the text inside of it automatically. Here is an MWE of such a solution:

\documentclass{article}

\usepackage{setspace}
\doublespacing

\begin{document}

blah blah blah blah

\emph{Modus ponens}: The form of this argument is:

\begin{quote}
\singlespacing

if $p$, then $q$.    

$p$   

therefore, $q$.
\end{quote}

\end{document}

enter image description here

Update: As @karlkoeller points out, single spacing might not be enough. If single spacing is not enough, you can also place things inside of a spacing environment (which is made available by the setspace package), instead of a quote environment. Then, you can make the spacing even less than single line spacing like so:

\begin{spacing}{0.8} % or some smaller number if you would like
if $p$, then $q$.    

$p$   

therefore, $q$.
\end{spacing}

This solution will require you to either embed the spacing environment inside of a quote environment or to reintroduce your \hsp command in order to have the form of the argument indented.

share|improve this answer
1  
I don't think your answer solves the problem of vertical spacing. The OP said that \singlespacing was not enough. –  karlkoeller Jul 5 '13 at 18:53
    
Thanks for pointing that out @karlkoeller. I've updated my answer. –  Adam Liter Jul 5 '13 at 21:47
    
Thank you very much! It turns out that quote would do nicely for now. I'll save the other recipe for future! :) –  dotslash Jul 6 '13 at 1:05
add comment

You can also try this:

\renewcommand{\baselinestretch}{1} %More or less. As you wish.

Cheers!

share|improve this answer
1  
Maybe \linespread{1}? –  egreg Jul 5 '13 at 19:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.