2

This question already has an answer here:

I would like to automatically insert vertical space between my paragraphs. Currently I am using \medskip before all my paragraphs. Example:

% proposal.tex
% Based on http://www.latextemplates.com/template/simple-sectioned-essay
\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[brazil]{babel}

\usepackage[utf8]{inputenc}
\usepackage{mathptmx}

\usepackage{indentfirst}

\begin{document}

\section{Introdução}

    In typesetting advertisement copy, a way of justifying paragraphs has
    become popular in recent years that is somewhere between flushright
    and raggedrightdddd setting. Lines that would stretch beyond certain limits
    are set with their glue at natural width. This single paragraph is but an
    example of this procedure; the macros are given next.

    \medskip
    Second paragraph.

\end{document}

Which generates:

enter image description here

After searching I found about including the package \usepackage{parskip}. However after I do so, all my paragraphs indentations are disabled.

enter image description here

Therefore searching again I found I could use \setlength{\parindent}{30pt} to reset the paragraph indentation, however I am not sure this is a nice thing to do.

% proposal.tex
% Based on http://www.latextemplates.com/template/simple-sectioned-essay
\documentclass[12pt]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage[brazil]{babel}

\usepackage[utf8]{inputenc}
\usepackage{mathptmx}

\usepackage{indentfirst}

\usepackage{parskip}
\setlength{\parindent}{30pt}

\begin{document}

\section{Introdução}

    In typesetting advertisement copy, a way of justifying paragraphs has
    become popular in recent years that is somewhere between flushright
    and raggedrightdddd setting. Lines that would stretch beyond certain limits
    are set with their glue at natural width. This single paragraph is but an
    example of this procedure; the macros are given next.

    Second paragraph.

\end{document}

Which generates:

enter image description here

I would like to know whether there is a best way which I can include the package \usepackage{parskip} and keep the default LaTeX paragraph indentation, instead of overriding the overrode value with \setlength{\parindent}{30pt}.

marked as duplicate by Dr. Manuel Kuehner, Stefan Pinnow, Mensch, barbara beeton, Mico Apr 21 '17 at 21:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Typically you want only one of the two format options (parskip OR indention). Are you sure that you want both? If you really want it, then here's a related question: tex.stackexchange.com/questions/181451. The answer is from Heiko Oberdiek which is a very high reputation user. – Dr. Manuel Kuehner Apr 21 '17 at 20:04
  • While anyone complains about my documents, I like to use both. Though, thanks @Dr.ManuelKuehner, for now I am going to use your linked question to save the default value of it. – user Apr 21 '17 at 20:10
  • I wasn't judging -- just wanted to make sure that it's not a random wish :). – Dr. Manuel Kuehner Apr 21 '17 at 20:13
2

The parskip package contains a line \parindent=\z@ which zeroes out the \parindent. Thus, one can save the current \parindent before loading the parskip package, and then reinstate that value of \parindent.

Incidentally, overriding the \parindent with your 30pt setting is a perfectly valid form of coding, though there are some who argue from a stylistic viewpoint that at least one of \parskip and \parindent should be exactly 0pt, but you would get no argument from me.

\documentclass{article}
\usepackage{lipsum}
\edef\svtheparindent{\the\parindent}
\usepackage{parskip}
\parindent=\svtheparindent\relax
\begin{document}
\lipsum[1-6]
\end{document}

enter image description here

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