# Random Linux/Latex tricks

This is a collection of various tips and tricks I’ve found useful in my interaction with the standard geek tools I use often. They’re mainly posted here as a reference for me, so don’t blame me if you don’t find it useful… :)

### Using custom labels with the alpha BibTeX stylePosted 2017-12-08

The alpha BibTeX style produces citation labels of the form [Ken90] or [XYZ94]. While it usually does the right thing, sometimes it doesn’t get the label right (e.g. the label is too long when the authors have multiple / hyphenated last names). Here is how you can provide a custom label with the alpha style.More »

### Swapping control/caps lock, and using Apple keyboards on LinuxPosted 2017-12-07

I rarely use caps lock and often use control. Since the caps lock key is located on the home row, I find typing more efficient if I swap control and the left caps lock. I also like to swap the command and option modifiers when I use Apple keyboards, and make the funciton keys work without having to use the FN modifier. Here are instructions on each of these.More »

### Getting DOI / arXiv links with BibTeX.Posted 2017-11-14

Many bibliography databases supply a DOI (Digital Object Identifier) or arXiv eprint number with BibTeX entries. However, the standard BiBTeX style files either ignore this information or print it without hyperlinking it correctly. Here’s how you can get working clickable links to both DOI and arXiv eprints.More »

Tags: bibtex

### Static Jinja2 Site GeneratorPosted 2017-10-21

I recently rewrote my website using staticjinja, a static site generator. This is what my website looks like and here is the source code. The features / setup-instructions are described below.More »

### Using git and DropboxPosted 2016-04-06

Dropbox isn’t version control. If you use git to version control your files, and have co-authors that use Dropbox then here is a way to use the two systems together.More »

Tags: linux, git

### Using Box.com cloud storage on LinuxPosted 2015-08-07

Recently CMU announced all users will have 1TB of space of cloud storage at Box.com. This motivated me to set it up on my Linux box, and this post describes the setup instructions to mount it as a local folder and copy files back and forth. (Note, no syncing instructions are here, since I’m perfectly happy with my unison set up and haven’t tired to set it up yet.)More »

Tags: linux

### Reverse chronological sorting with BibTeXPosted 2015-03-24

How to sort references chronologically, reverse chronologically or change the references title.More »

Tags: latex

### Using UTF-8 in mrxvt, even though mrxvt doesn't support itPosted 2014-09-14

I use mrxvt (see also the SourceForge page) as my terminal emulator. Unfortunately it lacks utf8 support. (We have an experimental utf8 branch, but never managed to make it usable.) Here are a few things I’ve done that allows me to keep using mrxvt and interact correctly with UTF-8.More »

Tags: linux

### Transfering files to Android Devices in LinuxPosted 2014-08-10

Transfering files to/from a android device to a Linux box via mtp-tools, FTP over USB, or ssh.More »

Tags: linux, android

### De-Uglyfying ikiWiki and other horror stories.Posted 2014-07-20

These are old instructions on how to theme ikiWiki and might not be relelvant anymore. I no longer use ikiWiki to maintain my website. This site is generated using staticjinja and a custom build script.More »

Tags: linux, ikiwiki

### Setting up a Debian/testing chroot on stable (wheezy)Posted 2014-07-16

I run Debian/wheezy on all my computers, mainly because I can’t afford the downtime. However, once in a while, I encounter programs I need that are only in testing. For instance the new (2014-07-16) Viber linux client needs glibc-2.14 or higher, and wheezy only has 2.13. Some blog posts suggest installing libc6 from testing on your wheezy system, but I think that’s playing with fire. libc6 is crucial to many packages, and I’m not sure things will work fine if you upgrade it.

I decided to set up a Debian/testing chroot, and then install whatever I needed under it.More »

Tags: linux

### Maintaining an old texlive installation.Posted 2014-07-12

How to subbornly continue using an obsolete version of texlive well after its due date.More »

Tags: latex, linux

### Adjusting the space between references in the bibliography.Posted 2014-07-12

If you use LaTeX and want to adjust the spacing between each item in your bibliography, then here are two ways to do it.More »

Tags: latex

### Expanding aliases in zshPosted 2014-06-25

I wanted to make some of my zsh aliases behave like vim abbreviations: Namely, as soon as you press space, the alias is expanded and you see the expanded command before executing it. Since I have a large number of clunky aliases, I didn’t want all aliases to be expanded by default.

Consequently, I came up with the following (based on something I first saw here.More »

Tags: linux

### LaTeX forward/inverse searches with ZathuraPosted 2014-03-10

I use zathura to view PDF files. As of version 0.2.7 it supports full forward / inverse searches with LaTeX. Namely, you can “control click” in any place on the PDF file, and it will open the TeX source file in your editor, and move to the corresponding location. Conversely, you can configure your editor so that pressing a particular key when editing your TeX file will open the PDF file and highlight the corresponding location.More »

Tags: linux, latex

### Using bibtool to fix your BibTeX databases.Posted 2014-03-04

Downloading BibTeX citations from review sites (e.g. MathSciNet, WebOfKnowledge) doesn’t always get you consistent results. Sometimes the case is messed up, there are extra braces, etc. Or there is a note field showing the number of citations (which shows up in your final PDF output). Moreover the citation keys are often of the form MR673830, which is useless unless you’re a computer. Here’s an easy way to fix most of these problems using BibTool.More »

Tags: latex

### KVM Macvtap vs bridgingPosted 2014-03-03

Switching my KVM networking from a bridged setup bridged setup to macvtap got me a huge performance improvement. Here are instructions on how to set it up.More »

Tags: linux

### Accessing Journals via an SSH proxyPosted 2014-03-03

Most universities have IP based authentication for access to Journals and index sites (MathSciNet, Web of Knowledge, etc.) If you’re off campus, they usually provide some VPN client (e.g. Cisco) which is quite painful to work with (at least on Linux). However, if you have ssh access to a machine on campus, you can access set up a proxy and access journals very easily.More »

Tags: linux

### Using Git and latexdiffPosted 2014-03-01

If you use git to manage your LaTeX documents, then you can easily integrate latexdiff to produce a PDF of the differences. Here are setup instructions.More »

Tags: git, latex, linux

### Installing older versions of Pentadactyl in FirefoxPosted 2014-02-18

The “latest” release of Pentadactyl doesn’t always run on any modern version of Firefox. Here’s how to get and install the bleeding edge version from the source tree.More »

Tags: linux, vim

### Setting up WordPress on your own serverPosted 2014-01-29

Tips I found useful when installing WordPress on my own server.More »

Tags: linux

### LaTeX headers to maximise space.Posted 2013-09-30

A few tricks to save space when writing documents (e.g. NSF proposals) that have strict font, margin and page restrictions.More »

Tags: latex

### Setting up ikiWiki and MathJAXPosted 2013-09-30

These are old instructions on how to set up ikiWiki and MathJAX, and might not be relelvant anymore. I no longer use ikiWiki to maintain my website. This site is generated using staticjinja and a custom build script.More »

Tags: ikiwiki

### A git quickstart guide for LaTeX usersPosted 2013-09-29

Git is a source control management system that you can use to track changes in any text file. Git, however, is quite complicated and learning it can be quite time consuming. This is a quick introduction to git for someone who will primarily use git to edit LaTeX/text documents (not code) and possibly collaborate with a handful of co-authors.More »

Tags: git, latex