我应该如何手动换行?

我应该如何手动换行?

我如何手动断线?

我使用的方法:

\linebreak
\\
\n

推荐哪一个?

例子:

如果我把这个放到我的tex文件中,

This is for people who love VIM and for people who hate VIM.

Some of you may be wondering what VIM is...

Here you go...

输出是

This is for people who love VIM and for people who hate VIM.
Some of you may be wondering what VIM is...
Here you go...

但我希望它能展现

This is for people who love VIM and for people who hate VIM.

Some of you may be wondering what VIM is...

Here you go...

更新 2

我可以将其用于\\[2cm]垂直间距吗?

答案1

如果你想对整个文档进行此操作,那么该parskip软件包可能是最佳选择。正如 Joseph Wright 所说,问题有没有一种简单的方法可以让我整个文档的段落之间有空格而不是缩进?处理得很好。

如果您只是希望在某些单独的行中添加额外的空格,那么还有其他选择。您可以使用\smallskip\medskip\bigskip或它们的换行符\smallbreak等。或者您可以加载setspace提供双倍空格环境的包。

示例输出

\documentclass{article}

\usepackage{setspace}

\begin{document}
\paragraph*{Normal}

This is for people who love VIM and for people who hate VIM.  

Some of you may be wondering what VIM is\dots  

Here you go\dots  

\paragraph*{medskips}

This is for people who love VIM and for people who hate VIM.  

\medskip
Some of you may be wondering what VIM is\dots  

\medskip
Here you go\dots

\begin{doublespace}
\paragraph*{Double space}

This is for people who love VIM and for people who hate VIM.  

Some of you may be wondering what VIM is\dots  

Here you go\dots  
\end{doublespace}

\end{document}

如果您希望删除段落开头的缩进,那么您可以\noindent在每次发出时、或者\setlength{\parindent}{0pt}全局发出或者例如在doublespace环境内发出。

如果希望指定除跳过命令提供的尺寸以外的其他尺寸的垂直间隙,则 latex 会\vspace使用以下命令\vspace{2cm}

以下是对这两点的说明:

示例输出

\documentclass{article}

\usepackage{setspace}

\begin{document}

\noindent
This is for people who love VIM and for people who hate VIM.  

\medskip\noindent
Some of you may be wondering what VIM is\dots  

\vspace{2cm}\noindent
Here you go\dots

\vspace{2cm}

\begin{doublespace}
\setlength{\parindent}{0pt}

This is for people who love VIM and for people who hate VIM.  

Some of you may be wondering what VIM is\dots  

Here you go\dots  
\end{doublespace}

\end{document}

如果您正在使用其中一个 koma 类或回忆录,那么它们会包含针对此类情况的其他命令。

相关内容