set \parskip mas não para títulos

set \parskip mas não para títulos

Quero definir o espaço vertical que é inserido entre os parágrafos do texto quando há uma linha vazia no código. Se eu usar

\setparsizes{0pt}{1.0\baselineskip}{0pt plus 1fil}

ou

\setlength{\parskip}{\bigskipamount} 
\setlength{\parindent}{0pt}

então afeta também o espaço vertical entre os títulos e outros.

Existe uma solução fácil onde eu não preciso usar algo como \mypar with \newcommand{\mypar}{\par\bigskip}.

\documentclass{scrreprt}

%% Method by KOMA-Script
%\setparsizes{0pt}{1.0\baselineskip}{0pt plus 1fil}

%% Other Method
\setlength{\parskip}{\bigskipamount}
\setlength{\parindent}{0pt}

\begin{document}
    \chapter{}
==========================================
    \section{TestSection Large Space}
    \subsection{TestSubsection Large Space}
    \subsubsection{TestSubSubsection Large Space}
Here we have big vertical space between headings because parskip

is inserted. I just want a parskip between text paragraphs.

==========================================

\newcommand{\mypar}{\par\bigskip}
\setlength{\parskip}{0pt}
    \section{TestSection space I want}
    \subsection{TestSubSection space I want}
    \subsubsection{TestSubSubsection space I want}
Here I have the space between the headings that I want. And the space between text-paragraphs that I want. 
\mypar
I wonder if there is an easy way to achieve this. 
I would like to keep using an empty line as par bigskip instead newcommand a new command to achieve that. 
\end{document}

definir espaço vertical entre títulos e parágrafos de texto

Responder1

Não configure \parskipmanualmente. A forma padrão para classes KOMA-Script é usar a parskipopção com um valor como half, full, full-etc. Consulte a documentação para mais detalhes - e veja o comentário deegrégiaabaixo.

Para definir o salto antes ou depois de um nível de título, use

\RedeclareSectionCommand[
  beforeskip=<length or glue>,
  afterskip=<length or glue>
]{<heading level name>}

Mas o espaço vertical após um título é pelo menos \parskipuniforme se você usar o menor valor positivo afterskip=1sp. Se houver um valor negativo para afterskipum salto horizontal, um salto vertical será usado. Veja tambémhttps://tex.stackexchange.com/a/292202/43317.

Se você realmente deseja remover o espaço inserido \parskipno final do título, existe um hack

\usepackage{xpatch}
\xapptocmd{\sectionlinesformat}{\vspace*{-\parskip}}{}{}

insira a descrição da imagem aqui

Código:

\documentclass[parskip=full-]{scrreprt}
\RedeclareSectionCommand[
  beforeskip=3.3\baselineskip,
  afterskip=.725\baselineskip plus .115\baselineskip minus .192\baselineskip
]{chapter}

\RedeclareSectionCommand[
  beforeskip=-2ex plus -1ex minus -.2ex
]{section}

\RedeclareSectionCommands[
  beforeskip=-1.75ex plus -1ex minus -.2ex
]{subsection,subsubsection}

\usepackage{xpatch}
\xapptocmd{\sectionlinesformat}{\vspace*{-\parskip}}{}{}

\usepackage{blindtext}% dummy text
\begin{document}

\chapter{Chapter}
\section{TestSection Large Space}
\subsection{TestSubsection Large Space}
\subsubsection{TestSubSubsection Large Space}
\Blindtext[2]
\Blinddocument
\end{document}

Responder2

Você pode simplesmente modificar \parskipdentro de um grupo para restringir seu efeito dentro deste grupo

\documentclass{scrreprt}

%% Method by KOMA-Script
%\setparsizes{0pt}{1.0\baselineskip}{0pt plus 1fil}

%% Other Method
\setlength{\parskip}{\bigskipamount}
\setlength{\parindent}{0pt}

\begin{document}

{\parskip=0pt 
    \chapter{}
==========================================
    \section{TestSection Large Space}
    \subsection{TestSubsection Large Space}
    \subsubsection{TestSubSubsection Large Space}
}

Here we have big vertical space between headings because parskip

is inserted. I just want a parskip between text paragraphs.

==========================================

{\parskip=0pt
    \section{TestSection space I want}
    \subsection{TestSubSection space I want}
    \subsubsection{TestSubSubsection space I want}
}    
Here I have the space between the headings that I want. And the space between text-paragraphs that I want. 

I wonder if there is an easy way to achieve this. 
I would like to keep using an empty line as par bigskip instead newcommand a new command to achieve that. 
\end{document}

Responder3

O seguinte funciona como uma solução rápida:

\usepackage[parfill]{parskip}

informação relacionada