如何删除换行符?

如何删除换行符?

因此我的文本如下:

输入乳胶:

texttext

ugly linebreak

输出:

texttext
  ugly linebreak

期望输出:

texttext
ugly linebreak

我该如何删除这个空格(在 ... 处)?我知道当我面对面编写我的 latex 代码时,如果不添加任何空格,这些换行符就不会发生,但我不想这样做。我尝试了 \nolinebreak 功能,但似乎不起作用。

答案1

默认布局使用缩进段落

在此处输入图片描述

\documentclass{article}

\begin{document}

texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 

ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 


\end{document}

如果您希望使用垂直空间而不是缩进来标记段落,则parskip可以使用该包。

在此处输入图片描述

\documentclass{article}
\usepackage{parskip}
\begin{document}

texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 
texttext texttext texttext texttext texttext texttext 

ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 
ugly linebreak ugly linebreak ugly linebreak ugly linebreak 


\end{document}

相关内容