Tuesday 29 July 2014

Harvard-style referencing using Latex and Mendeley

I needed to use Harvard-style referencing for my thesis and ran into some trouble as I was using Mendeley to generate my bibliography. The way that worked for me in the end was to use the natbib latex package with the \bibliographystyle{agsm} command. I copied the local version to my working directory and edited the write URL function to

FUNCTION {write.url}
{
    { skip$ }
}

to get rid of the links to webpages that were appearing in my output. I had a lot of unusual (Russian) names in my references which were giving errors, so I edited the final .bbl file (not the .bib created by mendeley) manually to replace troublesome characters and errors.

Installing AIPS on Ubuntu 14.04

The instructions for installing AIPS on Ubuntu 13.04 (http://astronomicalproblems.blogspot.co.uk/2013/05/installing-aips-on-ubuntu-1304.html) work well for 14.04 too. Warning! see the full edit below.

[EDIT]

Some intel processors were giving a little trouble even when following the method linked above. The single offending file was AU7B.FOR, located in 31DEC14/AIPS/SUB (or the equivalent) and the issue was the MONTH parameter declared at the top of the file.

By deleting the MONTH declaration in the FORTAN code and the initialization of MONTH  to JAN, FEB etc. a little further down and replacing it with

character (len=3), dimension(12) :: MONTH
MONTH(1) = 'JAN'
MONTH(2) = 'FEB'
MONTH(3) = 'MAR'
MONTH(4) = 'APR'
MONTH(5) = 'MAY'
MONTH(6) = 'JUN'
MONTH(7) = 'JUL'
MONTH(8) = 'AUG'
MONTH(9) = 'SEP'
MONTH(10) = 'OCT'
MONTH(11) = 'NOV'
MONTH(12) = 'DEC'

you can get AIPS to compile with gfortan as usual. I think the problem relates to old fashioned fortran code, modern gfortran and intel processors (I don't seem to have the same trouble with AMD processors, though they are of different vintages).

The resulting aips installation does compile - but there is a serious problem with IMAGR, and likely other tasks too. The best bet is to download an older version of gfortran compatible with AIPS and use that to compile for a fully functional AIPS installation.

HTML form won't submit (Angular)

 It turns out if you mix normal HTML forms with Angular ones (i.e. using FormsModule) Angular will disable the default behaviour of forms on...