Handout-mode in LaTeX slides

Whether it is lecture slides or presentations, you often wants to distribute pdf-versions of your beamertex file. If you are using overlay to blockwise show text or blockwise highlighting parts of tables (see here and here for ways to color parts of tables with overlay), it makes little sense to distribute the pdf versions where one and the same slide is repeated with each overlay step. Luckily, there is a extremely simple solution

Continue reading “Handout-mode in LaTeX slides”

Supress labels in Stata figures

Supress legend elements in multiple Stata twoway figures

A great feature of Stata figures is that you can mix several plot types in one by using the twoway (...) (...) command. If you have several plots merged into one twoway graph and also want to add a legend, the legend might become a bit crowded. In the following example, legends are specified with the , legend(lab(1 "Scatter 1") lab (4 "Scatter 2")) option because I only wanted to mark the diamonds and circles in the legend:

Continue reading “Supress labels in Stata figures”

Produce multiple pdfs in LaTeX with automated cross-references

Create reference between documents (paper, letter to editor etc) with direct quotes.

For some time I looked for a way to simplify the process of linking LaTeX files of my manuscripts with the replies to editors and referees. In particular, I was looking for a way to automatically update cross-references (i.e. to put a \ref in the replies and link it to a \label in the mansuctipt – for example for a table), and also to put direct quotes of the from the main text into a report (e.g. if you want to tell the editor/referee if you have a specific sentence, paragraph or even table added to the revised manuscript).

Continue reading “Produce multiple pdfs in LaTeX with automated cross-references”

Remove blanks from string variables in Stata

Identify and remove blank space in Stata’s string variables

When dealing with string variables in Stata, blanks spaces can make it difficult to identify values. For example, if a variable contains " Arizona", a command that contains an if command such as ... if state="Arizona" won’t detect this observation.

Continue reading “Remove blanks from string variables in Stata”

Combining strings into one variable

I’m again playing around with strings in Stata and need to combine (string) variables with (string) variables as well as strings in locals with string variables. Suppose you have two string variables (strvar1 and strvar2) and want to combine them, you can simply type

Continue reading “Combining strings into one variable”