Track Changes in LaTeX and compare documents

One big disadvantage of writing in LaTeX compared to writing in other software, such as Word, is that its absence of track changes. Although there are ways to do track changes, such as the online tex-editor Sharelatex or the trackchanges package, I have sticked to commenting out deleted parts of the text, or by highlighting new passages in red.

I just came across this cool website on which you can compare different tex codes, e.g. before and after one of your co-authors worked on a text. On this website, you simply paste the original and the revised version, and you will receive a tex-code to generate a “track changes” document, which exactly highlights deleted and new text.

Follow this link to get compare your documents: https://3142.nl/latex-diff/

Open Stata 13 data files in Stata 12

I just ran across a very useful ado.-file called use13 which allows to open files in Stata 12 which were originally saved in Stata 13 (which often results in the error code “r(610): file not Stata format”). use13 can be installed by typing

ssc install use13
use13 filename.dta

This will then convert the Stata13 data file to use in Stata12.

Note: An alternative to use13 is to use saveold when creating the data file in Stata 13 (instead of save):

saveold filename [, saveold_options]

Use images from pdf documents in Latex

While you can simply drag & drop images in MS Word or Powerpoint, doing this in Latex requires a few more steps. An important difference is that in Latex, you first need to save the copied file as a separate image file which can then be included in the Latex code. For this purpose, we need a decent image editor. I recommend using Continue reading

Formatting Tables in Latex

There are a lot of sources giving advice on how to format your Latex tables. Adrian P. Robson (adrian.robson@nepsweb.co.uk) wrote a very good and comprehensive guide on formatting tables in Latex. Just follow the following link to download the PDF file:

LATEX Table Hints and Tips (by Adrian P. Robson, adrian.robson@nepsweb.co.uk)

 

Data storage type matters

Despite most sources tell that the storage type in stata should not matter, it is worth checking whether this is the case for your dataset. I just came across a situation where two identically constructed datasets (one stored in default type (float) and one stored in double) generated different output. Also before that i encountered a problem with person identifiers in the GSOEP if using the default data storage. If your dataset is not huge (with the GSOEP it still works quite ok) it might be worth to take the safe side and use

 set type double 

before you assemble your data set. This saves the data in the most precise way stata offers.