Tag Archives: bash

Convert LaTeX to any output format easily

I use LaTeX to take notes, record TODO lists, the shopping and everything in between.

Oftentimes, I’ll need to copy my notes to somewhere: a wiki, this blog, or to put in an email. It’s at this point I need to quickly convert to my target format.

So, to satisfy the above, I wrote a wrapper script that takes a file name and corresponding target format for output (according to Pandoc):

if [ $# -lt 2 ]; then
echo "Please provide a filename and output format compatible with pandoc"
exit 1
pandoc -f latex -t $2 $1

Very simple. Like I said, take a file name and the pandoc output format and then pass it all to pandoc to convert the LaTeX original to a format of my choosing. Very handy!

SheevaPlug and Locales

So, I got an awesome SheevaPlug from NewIT; it’s a Linux plug computer the size of a laptop adapter that uses around 5W of power. It’s perfect for an always-on home server.

After getting it installed and setup at home, I had the following locale-related issues when running apt-get and so-on;

locale: Cannot set LC_CTYPE to default locale: No such file or directory

which was spamming my shell far too often.

The simple fix was to apt-get install locales and then run dpkg-reconfigure locales and install those that are relevant to your system; as I’m in the UK and the only user I just installed en_GB.UTF-8.

Now I’ve got no more spam!