latex - 在 LaTeX 中添加新行和新段落的最佳方法是什么?

标签 latex

我目前正在写一份报告,其中我写了这样的新段落:

I like sharks, sharks are cool.

Also bears are really cool.

其中基本上有一个完全空的线。为了创建一个新段落,我使用“\”代码:
I like sharks, sharks are cool. \\
Also bears are really cool.

然而,这会产生“Underfull\hbox (badness 10000)”错误。开始新段落的正确方法是什么?

最佳答案

在您希望有一个新段落的代码行之后使用\par

I like sharks, sharks are cool. \par
Also bears are really cool.

https://www.sharelatex.com/learn/Paragraphs_and_new_lines

如果您正在寻找换行符,请到这里
https://www.sharelatex.com/learn/Line_breaks_and_blank_spaces

你有几个选择
\\ (two backslashes)
\newline
\hfill \break
\vspace{5mm}
Inserts a vertical spaces whose length is 5mm. Other LATEX units can be used with this command.
\vfill
Inserts a blank space that will stretch accordingly to fill the vertical space available. That's why the line "Text at the bottom of the page." is moved to the bottom, and the rest of the space is filled in.    
\smallskip
Adds a 3pt space plus or minus 1pt depending on other factors (document type, available space, etc)
\medskip
Adds a 6pt space plus or minus 2pt depending on other factors (document type, available space, etc)
\bigskip
Adds a 12pt space plus or minus 4pt depending on other factors (document type, available space, etc)

关于latex - 在 LaTeX 中添加新行和新段落的最佳方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50012397/

相关文章:

latex - 在 bookdown PDF 中更改*第 X 章*名称

r - 使用 PDF 输出更改 R markdown 中标题的字体类型和大小

php - 使用 PHP 将 LaTeX 公式插入 MySQL 时会自动删除反斜杠

syntax - 如何在 Latex 伪代码中放置圆括号

python - 使用对数轴刻度时 Matplotlib Latex 错误,版本相关

LaTeX for Chemistry 在我的网站上

math - 用于数学的轻量级标记语言

latex - Autoconf/Automake 条件和 dist 规则

latex - 如何使纸张尺寸适合LaTeX中的内容

bash - sed 将 tex 速记 $$ 替换为 latex 速记\(\)