
코드에 빈 줄이 있을 때 텍스트 단락 사이에 삽입되는 세로 공간을 정의하고 싶습니다. 내가 사용한다면
\setparsizes{0pt}{1.0\baselineskip}{0pt plus 1fil}
또는
\setlength{\parskip}{\bigskipamount}
\setlength{\parindent}{0pt}
그러면 제목과 다른 제목 사이의 수직 공간에도 영향을 줍니다.
\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}
답변1
수동으로 설정하지 마십시오 \parskip
. KOMA-Script 클래스의 기본 방법은 , 등과 같은 값이 있는 옵션을 사용하는 것입니다 . parskip
자세한 half
내용 은 설명서를 참조하고 주석을 참조하세요.full
full-
egreg아래에.
제목 수준 전후에 건너뛰기를 설정하려면 다음을 사용하세요.
\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}