Skip to content

Commit

Permalink
Added backref example and table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Wookai committed Sep 10, 2015
1 parent 7c86e8f commit 29605f5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
.*.swp
.DS_Store
*.bbl
*.bib
*.blg
*.brf
*.aux
*.log
*.out
*.pdf
*.synctex.gz
40 changes: 30 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
# 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)
* [Capitalization](#capitalization)
* [Tables](#tables)
* [Number formatting](#number-formatting)
* [Bibliography](#bibliography)
* [Back references](#back-references)
* [Creating figures](#creating-figures)
* [One script per data\-driven figure](#one-script-per-data-driven-figure)
* [Useful resources](#useful-resources)

## What is this?

This repository contains a list of tool, 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 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 your paper

.
We list below some typesetting tips and tools to help you produce quality texts.
Some tips are specific to LaTeX, but others apply regardless of what you are using.

### Capitalization
## 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

### Tables
Use title format for all section, subsection, etc. titles.

## Tables

Use [booktabs](https://www.ctan.org/pkg/booktabs) to typeset your tables.

Expand Down Expand Up @@ -55,7 +72,7 @@ Here is a nice GIF that illustrates some of these rules:

![Better table formatting](http://darkhorseanalytics.com/blog/wp-content/uploads/2014/03/ClearOffTheTableMd.gif)

### Number formatting
## Number formatting

Use the [siunitx](https://ctan.org/pkg/siunitx) package to format all numbers, currencies, units, etc:
```
Expand Down Expand Up @@ -101,9 +118,10 @@ Finally, it can help you better align numbers in a table:
```
![Siunitx formatting](https://github.com/Wookai/paper-tips-and-tricks/raw/master/examples/siunitx/siunitx-table.png)

## Bibliography

### Back references
# Bibliography

## Back references

For longer documents, such as a master or PhD thesis, it could be useful to have back references in the bibliography, to show where a reference was cited.
To do so, simply add the option `backref=page` to the `hyperref` package:
Expand All @@ -124,13 +142,15 @@ You can customize the way the back references appear with the following commands
]}}
```

## Creating figures
![Backref custom appearance](https://github.com/Wookai/paper-tips-and-tricks/raw/master/examples/backref/backref.png)

# Creating figures

Figures are a very important part of a majority of papers: they are your way of communicating your results.
You should always think about what you are trying to say with each figure, and make sure that there is just enough information to support your message, not more.
For example, if you want to show patterns in 2d points (there are two clusters well separated), maybe it is not necessary to put ticks and values on the axes (the scale does not really matter)?

### One script per data-driven figure
## One script per data-driven figure

Some figures are hand-made, to explain a system or give a global picture.
Others are data-drive, i.e., visualize some data.
Expand All @@ -139,7 +159,7 @@ Similarly, if the data required to generate a figure takes more than seconds to
This way, you will save a lot of time when working on the plot: you won't have to wait after each small change to the figure to see its effect.


## Useful resources
# Useful resources

* Automatically capitalize your title: http://titlecapitalization.com
* Chicago Manual of Style: http://www.chicagomanualofstyle.org
Expand Down
Binary file added examples/backref/backref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions examples/backref/backref.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
\documentclass{article}

\usepackage{filecontents}
\usepackage[backref=page]{hyperref}

\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{{\footnotesize [%
\ifcase #1 Not cited.%
\or Cited on page~#2%
\else Cited on pages #2%
\fi%
]}}

% inline bibliography content
\begin{filecontents}{\jobname.bib}
@misc{doe2006test,
author = "Doe, John",
title = "Test Article",
year = "2006"
}
\end{filecontents}

\begin{document}

This work~\cite{doe2006test} is great.

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

0 comments on commit 29605f5

Please sign in to comment.