Thursday, 12 February 2015

Scrivener + Mendeley + LaTeX and references

There is a comment under my PhD Tools blog post asking about the workflow and using a reference manager with Scrivener. As I said in the comments, as far as I’m aware there isn’t a good and easy solution to that, although some workarounds have been suggested (I’ll try to find them and post links).

First, if you don’t know how LaTeX deals with references, it’s fairy simple. I store my references in Mendeley, assigning a unique cite-key to each paper. The library can be exported as .bib file, which will be automatically updated every time you add a new reference in Mendeley (it’s a one time setup, which is great). Imagine you have a paper written by Smith et al. in 2005. My cite-key for that reference would be Smith_etal2005. I tell LaTeX where it can find the .bib file (I give it the path to that file), so that it can access all the data.

When I write in LaTeX and want to cite this particular paper I use the cite-key Smith_etal2005 and a bit of code that tells LaTeX that this is a reference - it would look like \citep{Smith_etal2005}. LaTeX then goes to the .bib library, pulls out the full reference and sticks it in the “References” section at the end of the document. In the body of the text itself the reference is output as it should be i.e. "some text about the thing (Smith et al., 2005)”.

The beauty of this is that if I were to remove the reference from the body of the text LaTeX will automatically remove it from the reference list at the end. It saves me worrying about having references in text, but not in the reference list and vice versa. I really like it and plan on keeping using LaTeX and Mendeley combo to format and output my documents, likely including the thesis.

Now I am adding Scrivener to the mix. Scrivener will be used mainly for note-taking, early drafts, re-drafting, reverse outlining etc. Anything that doesn’t need to be formatted and look pretty will be done in Scrivener, saving me dealing with the majority of LaTeX syntax in everyday life and formatting once the text is ready to be seen by the outside world. Having said that I don’t want to wait with inputting all reference till the last minute, it’s just so much more efficient to deal with them as you go!

There are two options here.

(1) I can input references in the-LaTeX-way, as I go, just like I would have done if I were writing in LaTeX itself (i.e. use the \citep{Smith_etal2005} in Scrivener). Then, I can simply export (or even copy-and-paste) that document from Scrivener to LaTeX for outputting, compile it and voila! references are sorted.

(2) Alternatively, I could set up Scrivener with Multimarkdown (which is a syntax that allows you to write in plain text and then convert to a more complex format e.g. HTML), write using MMD to keep it simple and avoid having to put LaTeX-like bits of code in (the \citep{} in this case). It is then possible to export from Scrivener to LaTeX through MMD; all MMD specific syntax will be changed to LaTeX specific syntax.

I feel like after the initial set up the second option i.e. using MMD would be cleaner. But then again, I don’t really have issues with using LaTeX-style citation syntax, so that’s what I have stuck with for now, as I only needed to write fairly short pieces of text. For anything of a length greater than 5000-6000 words it might well be worth spending a couple of hours sorting MMD out and getting used to it*.


If you are interested in learning more about any of the above, check out the links below. If that’s not enough - google! There seems to be dozens of tutorials on those things out there already, hence my post is rather simple, no need to re-invent the wheel. 

BibDesk, Multimarkdow, Scrivener (those are way more detailed than this blog post too):
http://timbrandes.com/blog/2012/02/28/howto-write-your-thesis-in-latex-using-scrivener-2-multimarkdown-3-and-bibdesk/
http://timbrandes.com/blog/2014/04/08/optimize-bibdesk-multimarkdown-and-scrivener-for-a-nice-scientific-bibliography-and-citation-workflow/

More here: http://harrisonsweeney.com/posts/scrivener-multimarkdown-and-latex.html

Some good posts on having words too: https://onhavingwords.wordpress.com/2013/03/19/scrivener-multimarkdown-latex/
Using LaTeX code in Scrivener: https://onhavingwords.wordpress.com/2013/07/27/any-latex-scrivener/
Also replacements, if you are really into it all now! https://onhavingwords.wordpress.com/2013/10/06/replacements-latex-scrivener/

On Multimarkdown, from its creator: http://fletcher.github.io/peg-multimarkdown/mmd-manual.pdf




*but it’s not just because of the references, it’s because of the heading, subheading and other bits and pieces. 

Saturday, 7 February 2015

Fieldwork. Of sorts

I have just spent two full weeks in Australia. Yes, it’s not much, considering how long it takes to get there from the UK. 

The trip was an odd one. The length was dictated by several factors - I wanted to get out and meet my Australian supervisor, as well as see the set up and my study system, in order to get a better idea of what I’m dealing with and discuss my PhD project in a bit more detail. On the other hand though it’s quite late in the year and the breeding season is pretty much over by now, hence there wasn’t much point in staying down under for a prolonged period of time.

I think that the trip was a successful one. The people are great there and the supervisor was happy to share his insights about all kinds of things. It was helpful to see the birds I’m working on and get a look at the field site. I hope it will aid me in fleshing out my ideas for next season’s fieldwork (behavioural observations, yay!), so that I’ll be off to a good start when I come back in September. Additionally, I feel like I managed to do some networking and for the first time it came easy to me - maybe it’s just the atmosphere there in general, but everyone was so chatty, nice and helpful that having a conversation was a pleasure.

If anybody I have met over there ever reads this I’d like to say thank you for all your hospitality. I really appreciate it and I hope our paths cross in the future and maybe one day I can return the favour.




On top of a successful PhD trip I also managed to spent some time bird watching, chasing the wild parrots (I’m a bit of a parrot geek). Some of the photos of Oz wildlife below if you fancy seeing them.


Crimson rosella
Superb fairy-wren chick
Wallaby
Sulphur crested cockatoos on a bird feeder





Sunday, 11 January 2015

Course: Quantifying the environment

The full title of the course was "Core and advanced environmental statistics training: Quantifying the environment – Part II" at the University of Glasgow. As a NERC funded student I could attend the course for free - thank you NERC!

It was a week long course, it was rather intense and it covered three areas: flexible regression methods, spatio-temporal modelling and functional data analysis (FDA). I was particularly interested in the spatial modelling as I might do a chapter on it for my PhD.

The course was very much aimed at statisticians and quite a bit of previous knowledge was assumed. For instance, on one of the days we had a set of lectures which were a condensed version of a 20 h long course for people doing Masters in statistics. As I have no real background in stats I found a lot of it rather hard. Keep in mind that I haven't attended Part I, maybe things would have been easier if I did.

What I found a bit suprising is that a lot of things we were doing were "at the edge of statistical knowledge and research". For some reason I have expected the field of statistics to be more advanced. This might sound silly, I guess, but I just never thought deeper about where our statistical knowledge is at. Now I know! It seems that some things I was planning to do might be harder than I thought, yet the majority of them should be doable, which is great. There were a couple of things that are not-so-doable yet, mainly due to lack of packages available - the knowledge is there, but there is no easy way to utilise it by an average non-statistician.

Yet despite the fact that the stats were hard, I found the course really informative. I think this was due to a clever delivery strategy. The lectures were clear and accompanies by practical sessions. All the R scripts for the practicals were provided. This way I could work through the material and focus on trying to understand it, instead of fighting with R. I think if I had to come up with R scripts by myself I would have been completely lost. Additionally, I have all the scripts for future reference and I can be sure that the code is decent and without errors.

All in all I'd recommend the course, but be prepared for a long week and quite a bit of work!

Saturday, 10 January 2015

Resolutions, reminders, goals

It's the beginning of a new year, which means blogs and websites are flooded with new years resolutions. I don't really believe in new years resolutions and most of the ones that I came across were pretty silly (e.g. jumping off of the highest diving board at a swimming pool). If there is one list that everyone should read it's this one: Resolutions for a (Mentally) Healthier New Year.

I have a list. Not a list of resolutions, but a list of reminders.

I try to reassess my life on a fairly regular basis, a few times a year. Splitting it up means I can keep an eye on whether I'm doing OK and making progress. If something is not working I can start over and try another way of achieving the same result. It also helps me to keep the balance when my circumstances change - for instance, everything has been turned on its head when I started the PhD. I moved, I got even busier than before and I am already experiencing the infamous two body problem. But I can still look at my list and remind myself what I want my life to be like.

Anyhow, in the spirit of the new year I am going to post some of the things I have on the list.


Climb regularly. I need to fix my climbing schedule. I used to climb 2-3 times a week, but since the move in September I have been struggling to establish a proper climbing routine, so this needs correcting. I would like to climb at least once per week. Part of the problem is how far the wall is from my house/work.

Exercise regularly. This normally gets covered by climbing. Since distance is making it harder to climb I'm thinking of including some other activity - fitness classes, maybe pilates? I made plans to try a weekly "Body Balance" class with a friend.

Draw. When I was young I used to draw and paint quite a bit. I was never amazing at it, but it's one of those activities that can take your mind off of everything else. A while back I bought a graphics tablet and tried drawing/painting digitally (emulating natural media) in an attempt to get back into it but without the need to buy and store supplies (and without the mess too!). I need to work it into my schedule again.

Read (for pleasure). I used to read all the time. All the time. Not so much recently, at least not things unrelated to my work - I need to fix that! I love fiction and it would be a good break from biology-related reading. I am hugely impressed by what Eva achieved in 2014. She read over 90 books last year!

Socialise. I'm not naturally the most social person, I am perfectly happy by myself drawing, reading or going for a walk. Seeing that I have moved and know hardly anyone over here I am trying to make an effort and make some friends.

Meal plan. I used to do some meal planning with my partner and it worked really well, making shopping and cooking a lot easier and helping to reduce waste. Since I moved and started commuting regularly to see my partner my cooking has been rather ad hoc, as I don't spend all nights at my flat.

Culture. I want to take advantage of where I live - I'll make a list of things that need to be done in the city and start ticking them off.

Meditation. Try it. People seem to keep talking about it. Who knows, maybe I'll like it.

Cooking & Baking. Schedule time for some culinary fun. Maybe even sign up for a course to learn something new? Baking was my go-to de-stresser during undergrad exams. I always joked that opening a bakery was my Plan B. I want to get back into it; cookies and breads, here I come.

Blogging. I have been failing miserably at regular blogging and Twitter. I want to get back to it. I probably have to schedule it in or it won't happen.


I think it's pretty obvious that the main challenge since I started my PhD is time; some things don't happen as easily and naturally as they used to. I will have to actually schedule "me time" and relaxing activities in order to make sure that I keep at them instead of getting sucked into the vortex of pointless procrastination and hermit life. I will come up with strategies and actionable ways of achieving all of the above and staying on track. I will set little goals and review them regularly - weekly and monthly.



Work related plans?

Shut up & Write sessions! There are none in my department as far as I can tell, so I want to set up some. Hopefully I can find some folk who will be interested :] I also want to play some more with different types of working schedules.

Monday, 5 January 2015

Busy year ahead!

I'm looking forward to this year, but it looks like it will be a fairly busy one. I'm away for at least a week every month till foreseeable future! Courses, demonstrating, conferences, workshops, fieldwork - you name it, I'm doing it.

I'm excited, but also a bit apprehensive, as I've been struggling with my schedule a bit so far and this is likely to upset things. Hopefully I can figure out a way to deal with it.

Tuesday, 30 September 2014

Evernote: Tags

I wasn't convinced by tags at the beginning, but using a notebook-only approach wouldn't work due to Evernote's rather simple nesting capabilities (notebooks can only go one level deep). I actually see some advantages of tags now too - for example I can have a bunch of notes on a program (e.g. Evernote!) in lots of different notebooks (Blogs, PhD Advice, Programming). I can easily have a look at them all (across notebooks) using the tag, but I can also look at those notes linked to programming (both Evernote and non-Evernote related) by just checking the relevant notebook.

Organisation

I organised my tags by using parent-tags (normal tags can be nested within other tags by simply dragging and dropping). I don't actually use those parent tags for tagging notes, they are just there to help me group other tags, so that I can find them easily. When on a computer I often tag notes by dragging them onto the tags, so being able to locate each tag quickly helps.

For example, I have a parent-tag "Activities" within which I have (not surprisingly) all my activities, such as writing, climbing or programming.


The only exception to the rule is my "tools" tag - it's nested within a parent tag and there are tags nested within it, but I do use it to tag notes that talk about a whole bunch of programs I might want to check out (but don't want to have a tag for each of them). 

You can see that each of my parent-tags has ... in front of it. This is so that I know which tags are the parent-tags and don't tag any notes with them when tagging by starting to type the tag name (which I do when I'm away from my computer, tagging on a mobile devices).

Robustness

I decided to create a whole bunch of tags at the beginning and then try and stick to them, i.e. avoid creating new tags on a whim, so that I don't end up with each tag only being used once (which would render tags useless).

I also keep my naming consistent. Anything that is an activity, that can be written with an ing ending gets written like that, i.e. travelling instead of travel, meal planning instead of meal plan. Similarly, I keep the names in plural, for example definitions, books, conferences. Those rules arbitrary, but easy to remember, and they help to ensure that I don't accidentally create multiple tags for the same thing (i.e. so I don't have "book" and "books", which again, would make searching via tags less useful).

Sometimes I wonder how necessary the tags actually are - the search function in Evernote is excellent and most of my notes can be probably found relatively easily without tags. For instance, most of my Scrivener notes have the word Scrivener in them, so using the tag "Scrivener" doesn't really add much. However, there are also instances where tags add some extra information, for example if the note is based on something I found on Twitter it gets tagged with "Twitter" (and it happens automatically when done through IFTTT). The note doesn't actually have anything to do with the Twitter as a platform, so won't have the word "Twitter" in it and couldn't be found this way - but thanks to the tag I only need to remember that this thing I'm trying to find was initially spotted on Twitter. So I will use tags for now, even if only to figure out in what scenarios they are actually helpful!



Side Note: I do wish there was a way to automatically tag notes with a parent tag, e.g. if I tag something with "Twitter" it should also get tagged with "tools" automatically. As far as I know there is no way to achieve that easily though.

Monday, 15 September 2014

Evernote: update on the way I'm using it

I am taking some taught courses and have decided to create a separate notebook called Courses. I initially put notes on the courses in the Meetings notebook, but for some reason it didn't sit well with me, it felt like those notes didn't belong in Meetings.


I might also get rid off PhD Concepts & Definitions, Ideas & Notes notebook - I have created a document in Scrivener that keeps the definitions important for my PhD, so most of the basic things went there. This notebooks currently contains notes about my ideas linked to organisation of certain project, but I wonder whether those couldn't live in another notebook (e.g. PhD Advice & Resources or Lab Journal). I will see what happens, if it doesn't get much use it will need to go.