用空行分隔某些段落,而其他段落则不用空行分隔?

用空行分隔某些段落,而其他段落则不用空行分隔?

我希望能够写出像这样表达相同想法的段落。

__1. 这是关于某事的句子。我继续写另一句话。用这句话我总结出一个想法,需要写一个新段落。

__2. 我在这里开始另一个短段落,但我没有在两个段落之间留空行,因为它们讨论的是同一个总体思想。我用这句话结束了那个总体思想和我的段落。

__3. 现在我正在谈论一些与之前的想法无关但不需要新章节的其他内容。我希望在两个段落之间留出一行空白。

__ 是缩进,段落已编号。目前我得到的是这里显示的内容;所有段落之间都有一个空行,但我不希望第 1 段和第 2 段之间有空行。

现在我正在使用 \setlength{\parskip}{\baselineskip} 在段落之间添加新行,但我似乎找不到在某些段落之间不留空行的方法。

有没有什么简单的方法可以实现这一点?

答案1

添加\medskip(或\bigskip),就这样。

This a a sentence about something. I continue with another sentence. With
this sentence I conclude an idea, and a new paragraph is needed.

I start another short paragraph here, but I did not leave a blank line
between both paragraphs, because they talk about the same general idea. With
this sentence I end that general idea and my paragraph.

\medskip

Now I am talking about some other stuff that is not related to the previous
idea, but does not need a new section. I want to have a blank line between 
both paragraphs.

\parskip为此设置。

答案2

也许下面的内容可能会有所帮助:

在此处输入图片描述

\documentclass{article}
\newcommand{\specialparshook}{}% Hook for start of environment
\newcommand{\specialparsitemhook}{}% Hook for start of item inside environment
\newenvironment{specialpars}
  {\setcounter{enumi}{0}% Restart counter
   \specialparshook% Environment hook
   \renewcommand{\item}{%
     \specialparsitemhook% Item hook
     \leavevmode% Start new paragraph
     \refstepcounter{enumi}% Increment counter
     \theenumi.~% Print numbering
   }}{}

\setlength{\parskip}{\baselineskip}
\newcommand{\connectpars}{\vspace{-\parskip}}

\begin{document}
I want to be able to write blocks of paragraphs that share the same idea like this.

\begin{specialpars}
  \item\label{par1}
  This a a sentence about something. I continue with another sentence. With this sentence I conclude an idea, 
  and a new paragraph is needed.

  \connectpars

  \item\label{par2}
  I start another short paragraph here, but I did not leave a blank line between both paragraphs, 
  because they talk about the same general idea. With this sentence I end that general idea and my paragraph.

  \item
  Now I am talking about some other stuff that is not related to the previous idea, but does not need a new 
  section. I want to have a blank line between both paragraphs.
\end{specialpars}

The \rule{1em}{.4pt} is an indentation, and the paragraphs are numbered. Right now I have what is shown here; 
there is a blank line between all paragraphs, but I do not want that blank line between paragraph~\ref{par1} 
and~\ref{par2}.

Right now I am using \verb|\setlength{\parskip}{\baselineskip}| to get a new line between paragraphs, but I 
can't seem to find a way to not have that blank line between certain paragraphs.

Is there some easy way to achieve this?
\end{document}

这个想法是创建一个类似列表的环境。每个想法都用 来设置\item。段落(或\items)与 相连\connectpars,通过 垂直跳转\parskip

如果需要,还会提供其他钩子,尽管本例中未使用它们。请注意,由于它使用- 的第一级计数器,因此无法enumerate在此列表中包含。当然,这可以更改。enumienumerate

相关内容