LaTeX Notes
LaTeX tips that I’ve needed at some point when writing papers and documents.
Moar Floats!
When you reach a “Too many unprocessed floats with marginpar” error due to usingn Tufte-book etc you’re going to need morefloats
🙃 Just add this package to your preamble:
\usepackage{morefloats}
\usepackage[maxfloats=25]{morefloats}
(if you want to set a float limit)
Table Cell Flush Right
Have you ever needed to flush text right in a table cell? No, well you can just
use \hfill
in case you’re ever wondering…
Natbib Citation
Sébastien Merkel has put together a great Reference sheet for natbib usage. My most commonly used commands:
\citet{jon90}
: Jones et al. (1990)\citep{jon90}
: (Jones et al., 1990)\citeauthor{jon90}
: Jones et al.
Citing Webpages
I like to use Wikipedia’s Cite This Page example:
- Use the LaTeX package
url
by placing\usepackage{url}
somewhere in the preamble (before\begin{document}
). - The template of the BibTeX entry is as follows:
@misc{ wiki:xxx,
author = "{Wikipedia contributors}",
title = "LaTeX --- {Wikipedia}{,} The Free Encyclopedia",
year = "2011",
howpublished = "\url{https://en.wikipedia.org/w/index.php?title=LaTeX&oldid=413720397}",
note = "[Online; accessed 17-October-2018]"
}
Convert PDF Images to EPS
Although it’s becoming less common some conferences/journals will require images to be submitted in an EPS format rather than PDF/PNG etc. I usually generate PDF images, hence, I’m going to quickly run through how I convert PDF to EPS.
- Install Poppler:
$ conda install poppler
- Navigate to the directory where your PDF images are saved and execute the following:
$ pdftops -eps filename.pdf
A new EPS image file should appear in the same directory with the same filename as the PDF that was used to generate it.
TODO notes
Explain:
- Separate .tex compilation. Handy for say just working on just one chapter of a thesis at a time.
Leave a Comment