見出しには設定しないで\parskipを設定する

見出しには設定しないで\parskipを設定する

コードに空行がある場合にテキスト段落の間に挿入される垂直スペースを定義したい。

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

または

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

すると、見出しと他の項目間の垂直方向のスペースにも影響します。

\mypar のようなものを使わなくてもよい簡単な解決策はありますか\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}

見出しとテキスト段落間の垂直スペースを設定する

答え1

手動で設定しないでください\parskip。KOMAスクリプトクラスのデフォルトの方法は、 、 などの値を持つ オプションを使用することです。詳細parskipについてはドキュメントを参照してください。また、halffullfull-エグレ下に。

見出しレベルの前または後にスキップを設定するには、

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

しかし、見出しの後の垂直方向のスペースは、\parskip最小の正の値を使用した場合でも少なくとも均等になりますafterskip=1sp。水平方向のスキップに負の値がある場合は、afterskip代わりに垂直方向のスキップが使用されます。https://tex.stackexchange.com/a/292202/43317

\parskip見出しの最後に挿入されたスペースを本当に削除したい場合は、ハックがあります

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

ここに画像の説明を入力してください

コード:

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

答え2

\parskipグループ内で変更するだけで、そのグループ内での効果を制限できます。

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

答え3

簡単な修正方法として、次の方法が使えます:

\usepackage[parfill]{parskip}

関連情報