/images/jl11_lots.jpg

John Lees' blog

Pathogens, informatics and modelling at EMBL-EBI

A new direction for leesjohn

Since October 2013 I have stopped using Fedora, and instead use machines running Ubuntu 12.04/13.10, Windows 8 and OS X 10.8.5. As these OSs have a larger user base than Fedora, many of the issues I encounter are well documented and easy to fix (i.e. there is a stackexchange post as one of the top three google results), hence there haven’t been many things for me to post under the original remit of this blog.

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.