My paper templates and tricks
This post keeps what I have Googled and what my friends have shared with me.
My latest paper templates are here: https://github.com/yishilin14/paper-template
Maintaining paper and its technical report (full version)
I most cases, in order to “tweak” a paper to fit within the page limit, I have to move some parts of the paper to a technical report (full version of the paper). It is hard to maintain and proof-reading two versions of the same paper in two sets of separated files.
I define some commands so that I don’t have to maintain two sets of LaTeX files. Command “\ignorespaces” prevents LaTex from inserting spaces between sentences.
1 | % Is this a technical report? |
The usage of the two defined commands (\onlypaper and \onlytech) are as follows.
1 | \onlypaper{This sentence only appears in the paper.} |
Fonts
- Change fonts for texttt
- Using “Times” could further squeeze the paper
1 | % Fonts (load times before others) |
Colors and styles of hyperlinks
- Redefine common colors such as “red” and “blue”. I don’t like the original colors.
- Redefine the style of hyperlinks (remove boxes, change colors)
1 | % Colors |
Windows Theme colors: http://www.creepyed.com/2012/11/windows-phone-8-theme-colors-hex-rgb/
Algorithms
- Change the color of comments
- Don’t print semicolons
- Define the “\algrule” (a horizontal line in pseudo-codes)
1 | \newcommand\mycommfont[1]{\textcolor{medium-blue}{#1}} |
Equations
How to rescale equations formatted using ‘align’
1 | \noindent |
Tables
Table captions
1 | % Table caption |
Resizing the width of a table
The command “\resizebox” is useful for resizing other things too.
1 | \begin{table} |
Theorems & Proofs
Package: Moveproofs
“A LaTeX package for auto-moving proofs to the appendix of a document.” https://github.com/thisisdhaas/moveproofs
1 | % Moveproofs adapted from https://github.com/thisisdhaas/moveproofs |
Packages: thmtools, thm-restate
This package is useful when I have to restate theorems in the appendix.
Documentation: http://mirror.unl.edu/ctan/macros/latex/exptl/thmtools/thmtools.pdf
The proof environment
1 | \renewcommand{\proofname}{\rm\bf{Proof:}} |
The Appendix
Displaying the appendix in the technical report only.
1 | \ifx\techreport\undefined |
Tikz
Manual: http://ftp.yzu.edu.tw/CTAN/graphics/pgf/base/doc/pgfmanual.pdf
Common line types
solid, (densely loosely) dotted, (densely loosely) dashed, (densely loosely) dashdotdotted
https://www.ubuntu-user.com/Magazine/Archive/2014/22/Creating-vector-graphics-with-LaTeX-and-TikZ/(offset)/2#article_f3)/2#article_f3))
Squeezing the paper
Squeezing the space between theorems and the main text
1 | \makeatletter |
Squeezing the space between figures and their caption
1 | \usepackage[skip=4pt,font={bf}]{caption} |
Squeezing other spacing
Put these commands after “begin document”.
1 | \ifx\techreport\undefined |
Removing the copyright box of ACM templates
1 | \ifx\techreport\undefined |
Other links about squeezing space
Squeezing Space in LaTeX: http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html#Contentsandbibliography
What commands are there for horizontal spacing?: http://tex.stackexchange.com/questions/74353/what-commands-are-there-for-horizontal-spacing
Links to common templates
I believe that conference templates are the best teachers… But I confess I’ve never studied the codes carefully…
- 2017 ACM Master Article Template https://www.acm.org/publications/proceedings-template
- IEEE Manuscript Templates for Conference Proceedings https://www.ieee.org/conferences_events/conferences/publishing/templates.html
- VLDB http://www.vldb.org/2017/formatting_guidelines.php
Demos of my template
(Using the ACM template)