惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
Vercel News
Vercel News
博客园 - 叶小钗
大猫的无限游戏
大猫的无限游戏
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
量子位
Engineering at Meta
Engineering at Meta
B
Blog RSS Feed
博客园 - 【当耐特】
Recent Announcements
Recent Announcements
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
IT之家
IT之家
T
The Blog of Author Tim Ferriss
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
博客园 - 三生石上(FineUI控件)

jdhao's digital space

Conversion between base64 and OpenCV or PIL Image 腾讯云对象存储博客图床开启 CDN 加速(不需要购买额外域名) Search and Replace in Multiple Files in Vim/Neovim Change Table Column Width in LaTeX Image or Table Side by Side in LaTeX LaTeX 并排显示图像或表格 Firenvim: Neovim inside Your Browser Content inside HTML tags missing in Latest Hugo? Creating Markdown Front Matter with Ultisnips Labelme JSON 标注格式转 voc XML 格式 Nifty Nvim Techniques That Make My Life Easier -- Series 6 macOS 下如何为视频制作字幕 Running Command Asynchronously inside Neovim Resolving Merge Conflict after Git Stash Pop Pylint: command not found? A Hands-on Experience with Neovim's Built-in LSP Support How to Convert PDF to Images with Imagemagick 互联网上常用缩略语集锦 File Backup in Neovim Converting PDF Pages to Images with Poppler Nifty Nvim Techniques That Make My Life Easier -- Series 5 Neovim Configuration for System-wide Use How to sort a list of tuple or list in Python -- lambda or itemgetter? Building A Vim Statusline from Scratch 人类第一颗原子弹爆炸始末 Distributed Training in PyTorch with Horovod Learning Expect Programming Essential Knowledge about SSH Nifty LaTeX Techniques -- Series 1 更改 Adsense 邮寄地址,重新寄送 PIN
Tips on Writing Papers in LaTeX
2019-08-28 · via jdhao's digital space

In this post, I want to share some tips on writing papers using $\LaTeX$.

Use non-breaking space before references#

In certain cases, two piece of texts must be close to each other and not appear in different lines, e.g., when you refer to an image or a table. This is when non-breakable space comes to help. In LaTeX, you can insert a non-breakable space with ~. For example, to refer to some figure you have defined, you can use the following:

The figure~\ref{fig:some_fig} shows an interesting result.

This will make sure that figure will always be followed by the index number in the same line.

Period (or dot) and sentence spacing#

LaTeX use different width of space between words in a sentence and between two sentences. Typically, a lower case letter followed by a dot ends a sentence. An upper case letter followed by a dot is some kind of an acronym and is not considered end of sentence. When these rules are broken, you need to tell LaTeX whether there is an inter-word space or a inter-sentence space.

If a dot follows a lower case letter and it is not the end of a sentence, you should follow the dot with an inter-word space (\ ):

The book is first published in the Combin.\ Journal.

For phrases such as Prof. Adam, a non-breakable space is more appropriate:

If a dot follows an upper case letter and it is indeed the end of a sentence, you should precede the dot with \@:

WHO is a world orgnization, just like WTO\@.

Do not use \textit for emphasizing text#

Some people like to use \textit for emphasizing text. Although this works most of the time, it is not encouraged. For example, what if you want to emphasize text inside \textit command? To emphasize text, you should use \emph{} which is dedicated to do this job and does it well.

Terminate command with curly braces#

If you use chktex, you may see warnings like the following:

command terminated with space

That is because if a command does not terminate with a space, the space after it may be ignored by LaTeX.

Good: \LaTeX{} is great.
Bad: \LaTeX is great.

Space and parentheses#

In short, spaces before the opening parentheses is necessary. If you do not need comma or dot, space after closing parentheses is also necessary. In the enclosed text, there is no need to add spaces in the two ends.

national basketball association (NBA): ✔️
national basketball association(NBA): ❌
national basketball association ( NBA ): ❌

Quotation marks#

If you use two " for double quotation and two ' for single quotation, you will find the opening quotation is apparently wrong. The correct way to represent double quotation is ``some text''. The correct way to use single quotation is `some text'.

References#