John Lees' blog

Pathogens, informatics and modelling at EMBL-EBI

A latex bibliography style I like (Nature style in biblatex)

This isn’t really a specific question, but I needed to make a bibliography in latex with the following requirements: The citations take up as little space as possible, so should probably be superscript The citations should be correctly grouped (i.e. 1-3, 6 not 6, 2, 3, 1) The bibliography can take up any amount of space The citations should be linked to their bibliography entry (i.e. hyperref compatible) bib entries contain unicode characters I want the entries to look like the Elsevier standard, though Nature is also fine I want DOIs, properly displayed and hyperlinked, not monospaced The style=nature option supplied to biblatex in the preamble (see http://ctan.

DPPC (Dipalmitoylphosphatidylcholine) DSPC and DMPC in Latex

Using chemfig I was able to represent DPPC (Dipalmitoylphosphatidylcholine) and other lipids in Latex by using the following code \newcommand\setpolymerdelim\[2\]{\def\delimleft{#1}\def\delimright{#2}} \def\makebraces\[#1,#2\]#3#4#5{% \edef\delimhalfdim{\the\dimexpr(#1+#2)/2}% \edef\delimvshift{\the\dimexpr(#1-#2)/2}% \chemmove{% \node\[at=(#4),yshift=(\delimvshift)\] {$\left\delimleft\vrule height\delimhalfdim depth\delimhalfdim width0pt\right.$};% \node\[at=(#5),yshift=(\delimvshift)\] {$\left.\vrule height\delimhalfdim depth\delimhalfdim width0pt\right\delimright_{\rlap{$\scriptstyle#3$}}$};}} _\setpolymerdelim\[\]_ \begin{figure} \small \setatomsep{1.5em} \chemfig{N^+(-\[:180,1.1\]H_3C)(-\[:90,1.3\]CH_3)(-\[:270,1.3\]CH_3)(-\[:-30\]-\[:30\]-\[:-30\]O-\[:30,1.3\]P^+(<\[:50,1.5\]O\rlap{${}^-$})(<:\[:130,1.5\]O\rlap{${}^-$})(-#(1pt,)\[:330,1.3\]O-\[:30\]-\[:-30\](-\[:270\]O-\[:-30\](=\[:270\]O)(-\[@{downleft,0.8}:30\]CH_2-#(1pt,1pt)\[@{downright,0.3}:-30,1.2\]CH_3))(-\[:30\]-\[:-30\]O-\[:30\](=\[:90\]O)(-\[@{upleft,0.8}:-30\]CH_2-#(1pt,1pt)\[@{upright,0.3}:30,1.2\]CH_3))))} \makebraces\[10pt,13pt\]{n}{downleft}{downright} \makebraces\[6pt,15pt\]{n}{upleft}{upright} \label{fig:lipids} \end{figure} The crucial line is: \chemfig{N^+(-\[:180,1.1\]H_3C)(-\[:90,1.3\]CH_3)(-\[:270,1.3\]CH_3)(-\[:-30\]-\[:30\]-\[:-30\]O-\[:30,1.3\]P^+(<\[:50,1.5\]O\rlap{${}^-$})(<:\[:130,1.5\]O\rlap{${}^-$})(-#(1pt,)\[:330,1.3\]O-\[:30\]-\[:-30\](-\[:270\]O-\[:-30\](=\[:270\]O)(-\[@{downleft,0.8}:30\]CH_2-#(1pt,1pt)\[@{downright,0.3}:-30,1.2\]CH_3))(-\[:30\]-\[:-30\]O-\[:30\](=\[:90\]O)(-\[@{upleft,0.8}:-30\]CH_2-#(1pt,1pt)\[@{upright,0.3}:30,1.2\]CH_3))))} You’ll also need to include the following in the preamble \usepackage{chemfig} Which produces something that looks like this:

Samsung Galaxy S3 with Fedora

The new Android phones no longer work as USB mass storage devices, and instead use MTP. Not that I really know what this is, or its advantages over the previous system. Fortunately a very helpful blog post at http://tacticalvim.wordpress.com/2012/12/08/mounting-nexus-4-via-mtp-in-fedora-17/ guided me most of the way (the nexus 4 and galaxy S3 are very similar) I had to make a couple of changes as the device ids were different, but it’s essentially the same instructions so have a look there first

Installing Times New Roman in fedora

I imported a pdf into inkscape I made in gnuplot which used Times New Roman as a font, however Times wasn’t installed so it substituted the font for sans. I have a pretty shaky knowledge of how fonts work, and why it was that it worked in gnuplot but Times isn’t available from other programs, but my solution was as follows: Follow the instructions to use the script to install all msttcorefonts at: http://blog.

Using custom text when using ref in latex

I couldn’t find how to do this easily, but perhaps this is because I used rubbish search terms. I eventually found my answer on http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing (which ended up telling me lots of useful things about the hyperref package I didn’t know) First source the hyperref package in the preamble \usepackage{hyperref} You’ll probably want to provide some options to make it look nicer. See the manual linked from the ctan page: http://www.

Converting .ndv files into .csv (for the UV/Vis nanodrop spectrometers)

Thermo Scientific NanoDrop range of UV/Vis spectrophotometers (http://www.nanodrop.com/Absorbance.aspx) seem to be pretty good to me – apart from their terrible software. I used the NanoDrop 1000 Spectrophotometer, and found the software to be so unintuitive that I had to read the entirety of the manual for the sections I used (which can be found at http://goo.gl/smXCT). The two main points I would note are: The data can be exported from the report - select ‘Show report’->‘Save report’->‘Full report’ which will save a .