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)
推荐阅读
- python - Excel文件保持打开状态
- reactjs - Reactjs 在 Datepicker 设置选定的日期值
- javascript - 当鼠标悬停在下一个或上一个 div 上时隐藏活动 div
- python - 使用正则表达式从文本中提取未知数量的字符串
- python - 尝试使用 pyautogui.press('volumemute') 使系统静音,但它什么也没做
- python - 极小极大函数内国际象棋移动生成的转置表
- php - Laravel 在下拉菜单中预选
- azure - 限制对 Azure 存储库的访问
- java - 由于 Android Studio 中的运行时异常,Android 应用程序崩溃
- javascript - MongoDB UpdateOne 没有更新,尽管它给出了成功的消息