Tag Info

87

Adding \usepackage{parskip} to the preamble of your document (the part between \documentclass{...} and \begin{document} will set the paragraphs to have no indentation and a bit of space between them. Note that this isn't a complete solution, because there may be elements in your document that you don't want this format to apply to (footnotes, for ...

26

\parskip is the name of the length parameter that contains the current value of the parskip; so \let\currentparskip=\parskip and \setlength{\parskip}{\currentparskip} is equivalent to \setlength{\parskip}{\parskip} and inside a minipage does nothing, as the value of \parskip is already zero. \newlength{\currentparskip} \newenvironment{minipageparskip} ...

22

Enclose the section in question within a group. \documentclass{article} \usepackage{ngerman, blindtext} \begin{document} \begingroup \section{Section with different settings} \setlength{\parindent}{0cm}\setlength{\parskip}{4ex plus 0.3ex minus 0.1ex} \blindtext\par\blindtext \endgroup %Here I would want to undo the setlength command from above and go ...

21

Some classes support switching to vertical space between paragraphs instead of indent paragraphs. For example all KOMA-Script classes support option parskip with several values: \documentclass[parskip=false]{scrartcl} \usepackage{lipsum} \begin{document} \tableofcontents \section{parskip=false} \lipsum[1-2] ...

21

Just load the parskip package and don't change the \parskip and \parindent lengths manually. In the document body, don't use \parskip but a blank line to separate paragraphs. BTW, there's normally no need to add manual line breaks (\\) in the text. \documentclass{article} \usepackage{parskip} \begin{document} We explain in this section how to obtain ...

20

\p@ is a LaTeX2e kernel dimension, equal to 1 pt. It is used as this saves some tokens in the kernel, and also makes it possible to write thinks like 0\pt, which TeX interprets as 0 times 1 pt. So written out 'long hand' the definition is '1pt'. (That token-saving was really important when LaTeX2e was written: \p@ is one token, 1pt is three. Today, it is ...

17

Before setting \parindent to zero, we can store its value in another length variable and redefine the \indent command to use this other length variable instead of \parindent (which has been set to zero). \documentclass[12pt]{article} \newlength\tindent \setlength{\tindent}{\parindent} \setlength{\parindent}{0pt} \renewcommand{\indent}{\hspace*{\tindent}} ...

17

For even lazier people. ;) You can use the parskip package, just add \usepackage{parskip} to your preamble. From the documentation: Package to be used with any document class at any size. It produces the following Paragraph Layout: Zero Parindent and non-zero Parskip. The stretchable glue in \parskip helps LATEX in ﬁnding the best place for page ...

15

Use the \showthe Tex primative to show the value + rubber if you are unsure what all the tokens mean \documentclass{memoir} \begin{document} \showthe\parskip \end{document} and the output in the log file > 0.0pt plus 1.0pt. l.3 \showthe\parskip You can use these values to set a length

14

Memoir explicitly warns against this: (p. 47) If you like the idea of eliminating paragraph indentation and using extra inter- paragraph space to indicate where paragraphs start and end, consider how confused your reader will be if the last paragraph on the page ends with a full line; how will the reader know that a new paragraph starts ...

13

A different way than using groups can come handy in certain situations: \newcommand{\keepvalues}{% \edef\restorevalues{% \parindent=\the\parindent \parskip=\the\parskip }% } Then you can say \keepvalues \section{Section with different settings} \setlength{\parindent}{0cm} \setlength{\parskip}{4ex plus 0.3ex minus 0.1ex} <text> ...

12

You'll want to redefine a couple Tufte-LaTeX commands. The current paragraph indentation and skips are set as follows: \makeatletter % Paragraph indentation and separation for normal text \renewcommand{\@tufte@reset@par}{% \setlength{\RaggedRightParindent}{1.0pc}% \setlength{\JustifyingParindent}{1.0pc}% \setlength{\parindent}{1pc}% ...

12

You should probably use the parskip package rather than changing those values yourself. As for the spacing, you can use \titlespacing from the titlesec package to change the spacing. For example \titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{-6pt plus 2pt minus 2pt} seems more or less reasonable for the spacing around the \section. Something similar ...

12

To change the amount of space between paragraphs, you want to change \parskip \setlength{\parskip}{\baselineskip} Will add an extra line between paragraphs. \setlength{\parindent}{0pt} will remove the indent at the start of paragraphs.

12

The main reason why "playing with \parskip is a bad idea" is that this length also affects list environments. Quoting from Mittelbach (1989), With LateX into the Nineties, section 3.1 "Implementation desasters": The generic list environment is one of the central modules of the LaTeX implementation. It is used internally by most standard ...

12

This is actually a "conceptual bug" in LaTeX: \parskip is added before and after lists, even when they don't start/end a paragraph. See this answer for details. Solution: Don't change the \parskip length, but load the parskip package or use one of the KOMA-script classes or memoir.

11

\parskip is a TeX primitive which gets set to various values in LaTeX constructs, so setting it directly at the start of the document has a defined effect but possibly not as expected. In particular LaTeX lists manipulate \parskip to control the spacing before the list and between items, in particular before a list it is reset to values depending on ...

10

With biblatex, the hanging indentation of bibliographies is controlled by the \bibhang length which is initialized to the value of \parindent at the time biblatex is loaded. As a matter of principle, the class option parskip=half sets \parindent to 0pt, so \bibhang becomes 0pt, too. The remedy is either (as pointed out by Kurt) to set the parskip=half ...

10

Since you don't set the innertopmargin, you have the default value, that the manual specifies as .4\baselineskip. A workaround is \newmdtheoremenv[ innerlinewidth=0pt,middlelinewidth=0pt, outerlinecolor=shadecolor,outerlinewidth=3pt, skipabove=\topskip,skipbelow=\topskip, %%% kill the initial \parskip ...

10

Basically I would claim what you see is a) a bug in listings and be deficiency in "here" floats in LaTex2e and probably a bug in the implementation of equation environment when it comes to the fleqn option. The parskip package is actually not doing much here and for testing I would just comment it out and use \setlength\parskip{33pt} instead. If you do ...

10

This might be a problem with the page breaking. Do you have some big unbreakable block (e.g. a multi-line equation) at (or near) the top of the following page)? If so, you could try to allow pagebreaks in that equation, convert the unbreakable block to a float, or maybe use \raggedbottom (which tells LaTeX not to ensure that every page has the same height). ...

9

I found a copy of the relevant class file here; assuming that this is the same as the one that you are using, the culprit is the following comment: \parskip 0pt % Extra vertical space between paragraphs. % Set to 0pt outside sections, to keep section heads % uniformly spaced. The value of parskip is set ...

9

Don't change the \parskip length, but use the class option parskip=full. (This will, among other things, remove the now redundant indention of paragraphs.) If you don't want the "additional" parskip immediately after a chapter heading, change the \chapterheadendvskip macro. \documentclass[parskip=full]{scrreprt} \renewcommand*{\chapterheadendvskip}{% ...

9

The titlesec package provides \titlespacing{<command>}{<left>}{<before-sep>}{<after-sep>}[<right>] that allows for the spacing around any sectional <command> (like \part, \chapter, \section, etc.). The former two sectional commands require the additional \titleformat to be used (see the package documentation). ...

9

Both \parbox and \begin{minipage} temporarily reset \parindent=0pt and \parskip=0pt (and a few other parameters), which can be a nuisance. Fortunately, \begin{minipage} also executes the \@minipagerestore macro after this, which is a hook to allow a LaTeX style to override these defaults. (See the ltboxes section in "texdoc source2e".) So just try ...

9

This is fairly standard multicols behaviour when the text in the first column is short: \documentclass{article} \usepackage{multicol} \begin{document} \begin{multicols}{2} \subsubsection{title} Broken text that spreads over two lines to demonstrate behaviour. \columnbreak \subsubsection{title} foo \end{multicols} \begin{multicols}{2} ...

8

The lenght of indention of a paragraph is saved in the register \parindent. The extra skip between paragraphs is saved in the register \parskip. So to setup your document against all recommended typographic rules you can set inside your preamble: \parindent=0pt \parskip=0pt

8

You can get such settings very easily using (la)texdef. (TeXLive doens't install the latexdef symlink at the moment, so you have to use texdef -t latex instead) $texdef -t latex -c memoir -v parskip \the\parskip: 0.0pt plus 1.0pt$ texdef -t latex p@ @plus \p@: \dimen11 \the\p@: 1.0pt \@plus: macro:->plus The \p@ is a dimension with 1pt and ...

8

Yes, there is a native tcolorbox solution. The content of a tcolorbox is processed with the typical settings of parbox and minipage. You can switch this kind processing by setting parbox=false to do a mimicry of 'normal' processing. You find this in the tcolorbox documentation as 3.15 Text Characteristics on page 67. \documentclass{article} ...

8

parskip=half set a non-zero \parfillskip. You could use parskip=half- instead. Or set \parfillskip to 0pt before every tcolorbox: \documentclass[parskip=half]{scrartcl} \usepackage{tcolorbox} \tcbuselibrary{hooks} \begin{document} \tcbset{before app=\parfillskip0pt} \begin{tcolorbox}[] foo \end{tcolorbox} \end{document}

Only top voted, non community-wiki answers of a minimum length are eligible