# Tips and Tricks for Writing Scientific Papers
## Table of contents
* [Tips and Tricks for Writing Scientific Papers](#tips-and-tricks-for-writing-scientific-papers)
* [Table of contents](#table-of-contents)
* [What is this?](#what-is-this)
* [Typesetting your paper](#typesetting-your-paper)
* [One sentence per line](#one-sentence-per-line)
* [Capitalization](#capitalization)
* [Keep references whole](#keep-references-whole)
* [Tables](#tables)
* [Number formatting](#number-formatting)
* [Mathematical notation](#mathematical-notation)
* [Notation](#notation)
* [Define custom commands](#define-custom-commands)
* [Use the correct notation for columns et elements](#use-the-correct-notation-for-columns-et-elements)
* [Environments](#environments)
* [Bibliography](#bibliography)
* [Back references](#back-references)
* [Creating figures](#creating-figures)
* [One script per data\-driven figure](#one-script-per-data-driven-figure)
* [Python helper script](#python-helper-script)
* [Figures format](#figures-format)
* [Rasterize parts of the figure](#rasterize-parts-of-the-figure)
* [Useful resources](#useful-resources)
## What is this?
This repository contains a list of tools, best practices, tips and other guidelines we found useful/important when writing scientific papers.
Some are a matter of style (we tend to follow the guidelines of the Chicago Manual of Style), and we are well aware that other people prefer to do things differently, but we list them anyway to have a consistent guide.
Feel free to adapt, change, ignore, or even challenge everything we write!
# Typesetting your paper
Typesetting is the composition of text by means of arranging the types, i.e., letters and symbols.
It is mostly a question of a aesthetics, but beautiful typography makes documents easier and more pleasant to read, helping the reader to get to the message.
We list below some typesetting tips and tools to help you when composing your documents.
Some tips are specific to LaTeX, but others apply regardless of what you are using.
## One sentence per line
When writing LaTeX documents, put one sentence per line in your source file.
Write:
```
This is my first sentence.
This is the second one.
```
and not:
```
This is my first sentence. This is the second one.
```
The main reason for this is source control and collaboration: when looking at the changes of a commit, it is much easier to identify what sentence was changed if they are each on their separate line.
Your coworkers will thus be able to see the changes more easily.
Another benefit is that you will be able to better identify errors when only given a line number by our LaTeX compiler.
## Capitalization
We will refer below to two types of capitalization:
* sentence format : The title of the nice book
* title format: The Title of the Nice Book
Use title format for all section, subsection, etc. titles. In order to help you capitalize the right words, there's a handy website: [capitalizemytitle.com](https://capitalizemytitle.com).
## Keep references whole
Sometimes, the name of an object (such as Figure, Table, Graph, or Algorithm) and its reference number are split into two lines.
For instance, the name of the object may be on one line, while the reference number appears on the next line.
To ensure that LaTeX keeps both the name of the object and its reference on the same line, you can use the character `~` between the object and the reference.
By using the tilde character `~` in this way, you can avoid awkward line breaks and maintain a consistent formatting for your object names and reference numbers in LaTeX documents.
```latex
Figure~\ref{fig:example} displays that the project ...
```
To ensure that you don't forget to use the tilde character, you can simplify the process by creating custom commands for automation. Here's an example:
```latex
\newcommand{\refalg}[1]{Algorithm~\ref{#1}}
\newcommand{\refapp}[1]{Appendix~\ref{#1}}
\newcommand{\refchap}[1]{Chapter~\ref{#1}}
\newcommand{\refeq}[1]{Equation~\ref{#1}}
\newcommand{\reffig}[1]{Figure~\ref{#1}}
\newcommand{\refsec}[1]{Section~\ref{#1}}
\newcommand{\reftab}[1]{Table~\ref{#1}}
```
Once these commands are defined, instead of writing:
```latex
Figure~\ref{fig:example}
```
simply type:
```latex
\reffig{fig:example}
```
## Tables
[(complete example)](https://github.com/Wookai/paper-tips-and-tricks/tree/master/examples/booktabs)
[booktabs](https://www.ctan.org/pkg/booktabs) can help you produce clean and nice-looking tables.
```latex
\usepackage{booktabs}
% --
\begin{table}
\centering
\begin{tabular}{lcc}
\toprule
& \multicolumn{2}{c}{Data} \\ \cmidrule(lr){2-3}
Name & Column 1 & Another column \\
\midrule
Some data & 10 & 95 \\
Other data & 30 & 49 \\
\addlinespace
Different stuff & 99 & 12 \\
\bottomrule
\end{tabular}
\caption{My caption.}
\label{tab-label}
\end{table}
```

In general, avoid using vertical lines in your tables.
Instead, if you want to group columns, do it in the headers using `\cmidrule`.
You can also replace horizontal lines with spacing, using `\addlinespace`.
Column heads should use sentence-format capitalization (see http://www.chicagomanualofstyle.org/15/ch13/ch13_sec019.html).
You can find more advice on table formatting here: http://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf.
Here is a nice GIF that illustrates some of these rules:

## Number formatting
[(complete example)](https://github.com/Wookai/paper-tips-and-tricks/tree/master/examples/siunitx)
Use the [siunitx](https://ctan.org/pkg/siunitx) package to format all numbers, currencies, units, etc:
```latex
\usepackage{siunitx}
% ---
This thing costs \SI{123456}{\$}.
There are \num{987654} people in this room, \SI{38}{\percent} of which are male.
```

You can also use it to round numbers:
```latex
\usepackage{siunitx}
% ---
\sisetup{
round-mode = places,
round-precision = 3
}%
You can also round numbers, for example \num{1.23456}.
```

Finally, it can help you better align numbers in a table:
```latex
\usepackage{booktabs}
\usepackage{siunitx}
%---
\begin{table}
\centering
\begin{tabular}{lS}
\toprule
Name & {Value} \\ % headers of S columns have to be in {}
\midrule
Test & 2.3456 \\
Blah & 34.2345 \\
Foo & -6.7835 \\
Bar & 5642.5 \\
\bottomrule
\end{tabular}
\caption{Numbers alignment with \texttt{siunitx}.}
\end{table}
```

# Mathematical notation
[(complete example)](https://github.com/Wookai/paper-tips-and-tricks/tree/master/examples/notation)
When writing equations, it is helpful to have a coherent and consistent way of writing variables, vectors, matrices, etc.
It helps the reader identifying what you are talking about and remembering the semantics of each symbol.
## Notation
We propose the following rules for writing math:
* lowercase italic for variables: *x* (`$x$`)
* lowercase italic bold for vectors: **_x_** (`$\mathbold{x}$`)
* uppercase italic bold for matrices: **_X_** (`$\mathbold{X}$`)
* uppercase italic for random variables: *X* (`$X$`)
The `\mathbold` command comes from the [`fixmath`](https://www.ctan.org/pkg/fixmath) package and is similar to `\boldmath` or `\bm`, except that all symbols are in italics, even greek letters (other packages do not italicize greek letters).
When adding indices or exponents to vari

AbelZ_01
- 粉丝: 1046
- 资源: 5445
最新资源
- 基于氩气、空气、氧气填充床的DBD介质阻挡放电仿真研究-Comsol等离子体模块应用与沿面放电特性分析,氩气、空气与氧气填充床DBD介质阻挡放电的Comsol等离子体模块仿真研究:沿面放电特性分析
- 三相短路计算与潮流分析:基于MATLAB的程序实现,三相短路计算与潮流分析:基于MATLAB的程序设计与实现,三相短路计算,潮流计算,MATLAB程序 ,三相短路计算; 潮流计算; MATLAB程序
- 双向Buck-Boost变换器与DC-DC变换器的电压外环电流内环控制及其三种工作模式解析:恒功率、恒电流与稳压模式应用,双向Buck-Boost变换器与DC-DC变换器的电压外环电流内环控制模式及其
- DSP28335驱动下的三相逆变器电路设计与高效代码实现,DSP28335驱动的三相逆变器电路设计与优化代码实践,dsp28335三相逆变器电路加代码 ,dsp28335; 三相逆变器电路; 代码,D
- 各省市区明清进士人数数据
- 基于Maxwell软件的450W功率、内置式永磁同步电机技术参数详解:12槽10极切向设计,定子直径40mm,额定电流与转速详述,CAD绘制转子设计文件 ,基于Maxwell软件的12槽10极切向内置
- office 2016 自定义安装的工具
- 利用激光雷达观测验证ERA5、NORA3和NEWA的大风廓线-Tall wind speed profiles with Doppler wind lidars
- Delphi 12.3控件之TMS FlexCel Studio for VCL 3.21.exe
- Delphi 7 创建Access 数据库源代码
- 蚁群算法融合动态窗口法的路径规划算法研究:多动态障碍物的应用与挑战,蚁群算法结合动态窗口路径规划,多动态障碍环境下策略优化,蚁群算法融合动态窗口法路径规划算法 多动态障碍物 ,蚁群算法;动态窗口法;路
- 《95015网络安全应急响应分析报告(2024)》
- 基于STM32单片机的多级PWM调速直流电机控制系统设计:集成L298N驱动器、霍尔测速模块、液晶显示及多模式控制功能,基于L298N驱动与霍尔测速的STM32单片机直流电机PWM调速控制系统设计:按
- 基于Comsol的精确人体皮肤温度场计算模型:揭示正常代谢下皮肤温度分布规律,基于Comsol的人体皮肤温度场计算模型:探究正常代谢下皮肤温度分布,comsol 人体皮肤温度场计算模型,可以得到人体皮
- 2024人才薪资报告行业报告2024人才薪资报告
- 直流微电网多储能单元均衡控制策略:改进下垂控制实现不同容量蓄电池协调,快速均衡SOC并维持母线电压稳定,直流微电网多储能单元均衡控制策略:改进下垂控制实现不同蓄电池协调与SOC均衡,增加母线电压补偿环
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈


