4

I'm using XeLaTeX, and I need to have paragraphs that are only separated by vertical space, and with no indentation. However, no matter what I try, I always get indented paragraphs. This is my complete preamble (after it comes \begin{document} and normal text):

\documentclass[a4paper,10pt]{article}
\usepackage{listings}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{polyglossia}
\usepackage[pdfusetitle,bookmarks=true,
  bookmarksnumbered=true,bookmarksopen=false,
  breaklinks=false,pdfborder={0 0 0},backref=false,
  colorlinks=false]{hyperref}
\usepackage{fontspec}
\usepackage{fancyvrb}
\usepackage{marginnote}
\usepackage[outer=4cm, heightrounded, marginparwidth=3cm,
  marginparsep=0.5cm]{geometry}
\usepackage[parfill]{parskip}

% Bug in TexLive 2010
\DeclareUTFcharacter[\UTFencname]{x00A0}{\nobreakspace}

\setmainfont[Mapping=tex-text,Scale=MatchLowercase,Ligatures=Common]{Garamond Premier Pro}
\setsansfont[Mapping=tex-text,Scale=MatchLowercase,Ligatures=Common]{Myriad Pro}
\setmonofont[Scale=MatchLowercase,BoldFont={PragmataPro Bold},ItalicFont={PragmataPro Italic},BoldItalicFont={PragmataPro Bold Italic}]{PragmataPro}

I have also tried:

% Paragraphs
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\setlength{\intextsep}{0pt}

Neither of these methods work. What am I doing wrong?


I am using:

XeTeX 3.1415926-2.4-0.9998 (TeX Live 2012/Arch Linux)
kpathsea version 6.1.0
Copyright 2012 SIL International and Jonathan Kew.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 49.1 [with modifications for XeTeX]
Compiled with zlib version 1.2.7; using 1.2.7
Compiled with FreeType2 version 2.4.11; using 2.4.11
Compiled with fontconfig version 2.10.92; using 2.10.92
Compiled with libpng version 1.5.15; using 1.5.15
Compiled with poppler version 0.22.3

Test document demonstrating the issue:

\documentclass[a4paper,10pt]{article}
\usepackage[pdfusetitle,bookmarks=true,
 bookmarksnumbered=true,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},backref=false,
 colorlinks=false]{hyperref}
\usepackage[parfill]{parskip}

\title{Test}
\author{Me \and You}
\date{\today}

\begin{document}

\maketitle

\abstract{
  Something something

  Something something
}

\pagebreak

\tableofcontents

\pagebreak

\section{Introduction}

I don't want to change the prelude in case I mess something up. I
don't want to change the prelude in case I mess something up. I don't
want to change the prelude in case I mess something up. I don't want
to change the prelude in case I mess something up. I don't want to
change the prelude in case I mess something up.

So here is just normal text instead of lipsum. So here is just normal
text instead of lipsum. So here is just normal text instead of
lipsum. So here is just normal text instead of lipsum. So here is just
normal text instead of lipsum. So here is just normal text instead of
lipsum.

\end{document}
doncherry
  • 54,637
dflemstr
  • 143
  • 3
    If you have \setlength{\parindent}{0pt} you will get no indentation (or more exactly the indentation will be zero) Please post a document that shows the problem, ie has a paragraph with indentation. – David Carlisle Apr 29 '13 at 16:11
  • But I want the indentation to be zero, so why wouldn't I use that option? – dflemstr Apr 29 '13 at 16:17
  • With the preamble you show I get vertically spaced paragraphs and no indentation. – egreg Apr 29 '13 at 16:19
  • You misunderstood my comment. \setlength{\parindent}{0pt} or equivalently \usepackage[parfill]{parskip} set parindent to 0. No other part of the code you posted is relevant, but you say that in the part of the document that you have not shown that you get indentation. So we can not help as whatever the problem is it isn't in the code shown. Please edit the question removing font and other packages but adding some text to show the problem. If you show us some indented text we can say what is causing the space. – David Carlisle Apr 29 '13 at 16:21
  • 2
    abstract is an environment, not a command with an argument. \begin{abstract}Text\end{abstract} is the correct way of doing. And this is the cause for your troubles. – egreg Apr 29 '13 at 16:46
  • Really, and here I've been using it like a command since forever. I think I learned this behavior from LyX, which generates a command from a WYSIWYM document IIRC. Anyways, if you add your comment as an answer, I will mark it as a solution. – dflemstr Apr 29 '13 at 16:49
  • I would suggest you to switch to scartcl and to use one of the built-in parskip options: for example, \documentclass[a4paper,10pt,parskip=half]{scrartcl} (see the scrguien document for a list of the available options). – Gonzalo Medina Apr 29 '13 at 16:51

1 Answers1

7

The abstract should go as an environment:

\begin{abstract}
Something something

Something something
\end{abstract}

not as a command with argument.

This is a general advice for the article, report and KoMa-script classes. Specialized classes might require the abstract as the argument of a command (check their documentation).


In the article class, the definition of \abstract (which is executed as part of \begin{abstract} is

  \if@twocolumn
    \section*{\abstractname}
  \else
    \small
    \begin{center}
    {\bfseries\abstractname\vspace{-.5em}\vspace{\z@}}
    \end {center}
    \quotation
   \fi

so you basically got a quotation environment lasting forever.

egreg
  • 1,121,712