Tag Info

Hot answers tagged

65

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 ...


18

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] ...


18

\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} ...


18

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 ...


17

\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 ...


16

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 ...


14

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}} ...


13

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


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

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 ...


11

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 ...


11

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> ...


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

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}% ...


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

\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 ...


9

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

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 ...


9

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 ...


8

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}{% ...


8

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.


8

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 ...


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


7

Well.... If you don't do \hrule \@height\z@ \@width\hsize\relax Then you don't get the parskip at the top. Then in your end code, if the width of the box is not what you expect (because no paragraph material has been added) do \vbox{ hrule \@height\z@ \@width\hsize\relax \unvbox the box you had } \documentclass[parskip=half]{scrreprt} ...


7

You shouldn't be setting \parskip to a rigid value, to begin with and probably using the parskip package is better. Just enclose the lists in a group where you set the parskip to zero. \documentclass[12pt,a4paper,twoside,openright]{report} \usepackage[english]{babel} \usepackage{float} \newfloat{algo}{tbp}{loa}[chapter] \usepackage{parskip} \frenchspacing ...


7

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} ...


7

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} ...


7

As mentioned in comments I think that usually in such circumstances the unindented paragraphs are logically section breaks with anonymous untitled sections. So like a titled section they suppress following indentation. Spacing and font choice could be better and with acknowledgement to Douglas Adams, the except shown in the amazon fragment is I think ...


7

Use \usepackage{parskip}. This package also removes the indentation at the beginning of paragraphs, which usually is desired when you're adding space between the paragraphs. If I recall correctly, this package is superior to tampering with \parskip because it leaves footnote spacing unaltered, but don't pin me down on this one. The package setspace, which ...


7

you can use \addvspace\bigskipamount (or with braces around \bigskipamount if this is just a single token; it doesn't make any difference). it's always prudent to insert \par. the reason there is no vertical space -- or even a line break -- if you don't include \par is that the \vspace doesn't take effect until there is actually a transition to vertical ...



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