establecer \parskip pero no para los encabezados

establecer \parskip pero no para los encabezados

Quiero definir el espacio vertical que se inserta entre los párrafos de texto cuando hay una línea vacía en el código. si uso

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

o

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

entonces afecta también el espacio vertical entre los títulos y otros.

¿Existe una solución fácil en la que no tenga que 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}

establecer espacio vertical entre títulos y párrafos de texto

Respuesta1

No lo configure \parskipmanualmente. La forma predeterminada para las clases de KOMA-Script es usar la parskipopción con un valor como half, fulletc. full-Consulte la documentación para obtener más detalles y consulte el comentario deegregabajo.

Para configurar el salto antes o después de un nivel de rumbo, use

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

Pero el espacio vertical después de un encabezado es al menos \parskippar si usa el valor positivo más pequeño afterskip=1sp. Si hay un valor negativo para afterskipun salto horizontal, se utiliza un salto vertical. Ver tambiénhttps://tex.stackexchange.com/a/292202/43317.

Si realmente desea eliminar el espacio insertado \parskipal final del encabezado, hay un truco.

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

ingrese la descripción de la imagen aquí

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}

Respuesta2

Puedes simplemente modificar \parskipdentro de un grupo para restringir el efecto dentro de este 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}

Respuesta3

Lo siguiente funciona como una solución rápida:

\usepackage[parfill]{parskip}

información relacionada