“Microsoft has a new version out, Windows XP, which according to everybody is the ‘most reliable Windows ever.‘ To me, this is like saying that asparagus is ‘the most articulate vegetable ever.‘ “ (Dave Barry)


Mendelay & Jabref & TeXworks

May 24th, 2012

Another blog about academic workflow I’m afraid – not that I’ve blogged on this before but I’ve finally nailed down my preferred “pipeline” for producing papers, reports and what-have-you and felt I’d share mine.

Mendelay has it’s flaws, but  it’s my preferred citation/pdf manager.  It automatically parses an internal database of my citations and references into a bibtex file that I can then use when writing.  Simple.  But there are some irritations and complications with this approach when you try to use the bibtex file for a proper paper, report or thesis such as the meta-info extraction returning poorly formatted conference and Journal titles.

Standardised Journal/Conference names

Mendelay has had this on it’s “todo” list for a long time now.  Jabref amongst others, allow you to define abbreviated journal names for it to scan for and replace with the full title you specify.  Perfect for ensuring your references are in order.  But since Mendelay regenerates my master bib file on the fly whenever a change is made (or I delete it), I wrote a small batch file for Windows that concatenates my abbreviations list with the bibtex file, into a newly useable version.

Abbreviations in Jabref work by first defining the abbreviation in the bibtex file, then referencing the abbreviation by placing #ABBR# in the relevant field when editting an entry.  The #’s are rather important it appears, and you can use this method presumably in different field types, not just “booktitle” or “journal”.

For example, here’s an example entry of an abbreviation in a bibtex file, particularly note the curly braces:

@STRING{ACCV = {Asian Conference on Computer Vision}}

The problem is this stuff has to be IN the bibtex, and Mendelay regenerates that file every time it updates it, removing your additions.

In my workflow, I ignore Mendelay’s (often spurious) meta-data extraction for the Journal or conference proceedings field and enter #ACCV# directly in the using Mendelay.  This ensures that the abbreviation is propagated to the mid-level bibtex file (you must tell Mendelay not to escape LaTeX chars otherwise you’ll end up with more slashes than necessary).  I get around having to manually insert all my abbreviations by keeping an abbreviation text file next to the bibfile and using this code to join them and generate a new file I work from.

more abbrevs_v2.txt > temp.txt
type temp.txt library.bib > new_library.bib
del temp.txt

So now I’m left with this, much nicer method of writing:

Edit stuff in Mendelay, read, review, add citations etc; >> Run batch file to generate abbreviation friendly file >> use new file in TeXworks.

 

 

 

 

Some old videos

November 30th, 2011


AI & Cognitive Science Conference Proceedings

November 15th, 2011

A brief list of conference proceedings as electronic publications –  mostly for my own reference and interest:

Very helpful link here for those interested in the latest dates all in one place.
Resources requiring a membership I don’t have:

LaTeX cheat sheet

October 24th, 2011

I don’t mind admitting that I don’t have any formal academic qualifications in maths, barring A-Level.  And let’s face it back then I was more interested in girls than differential equations so I didn’t do brilliantly.

However, lately I find myself needing a lot of linear algebra and playing with matrices – so.  Time to make things easy for myself and make a cheat-sheet of all the stuff I’ll need.

Maybe it’ll be of some small use to someone else, but usual disclaimers as to accuracy apply.  Up to a few weeks ago the math notation used in most text books was all Greek to me (oho!), so forgive me if this is elementary.

A great resource for this stuff is here, and another good one is here.  There’s a very good cookbook whose format I should probably emulate here.  Also, when you’re trying to find out the \LaTeX command for a particular symbol, try detexify - you can draw what you want and it’ll present you with a list of trained examples!  Very nice, comes in iPad flavour too.  I’ve tried out a few of the examples on this page, as an exercise.

I’m using quick LaTeX which is by far the best plugin I’ve tried. Thoroughly recommended.

My favourite \LaTeX symbol is \Im. Good to know.

Symbols

\alpha, \Alpha, \beta, \Beta, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \Phi means:

alpha, Alpha, beta, Beta, gamma, Gamma, pi, Pi, phi, varphi, Phi. (Missing characters mean just use normal uppercase roman characters, like A

Lambda (\lambda)-ish calc notation

\forall x \in X,\quad \exists y \leq \epsilon means:

For all x in X, exists Y less than equal to epsilon

A \subset B and A \subseteq B denote  A is a subset of B.  However, \subset is more properly used to denote a proper subset. (Set Theory)

Geometry

Thus, something like \{x_i\}_{i=1}^{m} \subseteq \mathds{R} should refer to a vector of values for x indexed at 1 and of m length, that is a subset of real numbers.  However, \mathds{R}^n would refer instead to the Cartesian product of n copies of R, i.e. essentially an n-length cartesian coordinate describing a point in n-dimensional space.  That is to say, when used in the context of the above example, we are now looking at a vector of coordinates in n-dimensional space, where i is a number between 1 and m, and x_i is a cartesian coordinate describing a point in space.

Math

\sum_{i=1}^{10} t_i means:

The sum of all values for t where the value of i is between 1 and 10.

\prod_{i=1}^{n} t_i means:

The same except the range of values is the variable n and you multiply each value instead of summing it.

\sqrt{ \dfrac{\sum_{i=1}^{j}(n_i)\vspace{20pt}}{\vspace{20pt}\prod_{i=1}^{j}( n_i)}} means:

The root of n divided by the product of all values of n.

x \equiv y means:

The equivalent of

E(...) refers to:

Expected values of whatever

\|x\| means:

The magnitude/length of x, or more correctly its norm (length seems more meaningful, but who am I to argue?)

\mid x\mid means:

Can mean the same as the above! Or an absolute value of a scalar; or the determinant of a matrix.

\|x_i-y_i\| means:

The distance between x and y (or the magnitude of the delta of x and y, same thing)

x \ldotp y means:

The dot product of x and y.

\bar x

Can mean the compliment of x (i.e. a subset of it); hence the symbol for mean, which refers to a subset of the total population of x?

Matrices

Capitalised characters M, I are used to denote a Matrix.  Lowercase roman letters denote variables or vectors, such as in: x, k

Generic matrix with equation numbering:

(1)    \begin{equation*} A_{m,n} = \begin{pmatrix} a_{1,1} & a_{1,2} & \cdots & a_{1,n} \\ a_{2,1} & a_{2,2} & \cdots & a_{2,n} \\ \vdots  & \vdots  & \ddots & \vdots  \\ a_{m,1} & a_{m,2} & \cdots & a_{m,n} \end{pmatrix} \end{equation*}

Variation… m, n, refer to rows, cols

(2)    \begin{equation*} B_{2,4} = \begin{bmatrix} 1, 2, 3, 4\\ 5, 6, 7, 8 \end{bmatrix} \end{equation*}

Probability

P(y=1|x;\theta) = 0.7 means the probability that y is equal to 1, given x parameterised by theta, is 0.7
x \sim \mathscr{N}(\mu,\sigma^{2}) x is distributed as N(params).
Geometry

Aymptote = curve that approaches zero distance to a line or axis as it approaches infinity.

ICS & Windows XP

October 22nd, 2011

So, I have a bit of an odd setup at home and thought this might come in handy for others as well as give me a nice reference in case I need to go through this again.

Essentially my wifi dongle packed up, and my desktop is too far from the hub to route a cable through.  What I ended up doing was repurposing an old laptop with a decent wifi card.  My desktop is connected to the laptop via a network cable, and the laptop is set to automatically boot into a suitable account, fire up the wifi and connect.

Setup: House router, other devices connected to it via wifi.  My desktop, no wifi dongle.

I tried bridging the connections which I assume to be the correct method, but it wasn’t having any despite all connections working just fine seperately (i.e. LAN and wifi/internet on the ‘router’ laptop).

What I ended up doing was enabling internet connection sharing (ICS) on the laptop’s wifi (which was configured appropriately), and the LAN connection (which auto-configures on the laptop side).

On the client desktop (Win 7), I used the following settings:

IP Address:   192.168.0.2

Subnet: 255.255.255.0

Gateway: 192.168.0.1

DNS Server: 192.168.0.1

When you use ICS, essentially all computers connected to the host (my laptop ‘router’ in this case) all connect under their own submask.  This should work fine most of the time.

Now, internet was restored and all was well. My desktop could see the router and therefore the internet, plus it had a nice fast cable link to the laptop for speedy backups on the laptops drives.

Problem though: my desktop couldn’t navigate to other shares networked directly to the actual router (i.e. not my laptop, the proper house router) using their names, i.e. DEVICE1 etc, although IP addresses are fine.

Solution to this was a little weird; See screenshot.

Under the DNS settings, and further down still even, you need to add the suffix ‘home’, where ‘home’ is whatever your main router’s DNS suffix is.  This will ensure you can find things by name on your local network whilst working through an ICS connection sharing your house or office’s main routed internet connection.  It unfortunately, doesn’t work both ways, other devices won’t be able to find your ICS client by name.

I’m no expert in this network stuff, but I’ve got as far as I need!

Twitter test…

October 8th, 2011

This stuff was less of a pain a year or so ago, I swear…

Useful Texts

October 3rd, 2011

I’ve moved this stuff to a static page, since I think I’ll be updating it frequently.

You can find the page here.

Time to get with the… well, times

October 2nd, 2011

Much as I’d love to have kept updating the old site, it was built from scratch and without even so much as a framework like CodeIgniter or Kohana, so keeping it secure was becoming a pain.  I’ll work on porting some stuff over to the new site as an ongoing hobby.