Author: Jan Sauermann
Piecewise execution of do-files in Stata
Do-files in Stata easily get a bit lengthy. Of course, you can try to shorten do-files and distribute code onto several do-files and have one master file that runs all of the respective sub-do-files (which are included by do dosubfile1.do
). Alternatively, you can leave the do-file longish but write your code such that you only run parts of the code at once:
Numbering in LaTeX documents
Manuscripts typically contain many different types of numbering: page numbering, sections, subsections, figures, tables etc.
Continue reading “Numbering in LaTeX documents”#LaTeXtip: to reset page numbers write \setcounter{page}{0}, to increment by 2 pages write \addtocounter{page}{2}, and to change styles write \renewcommand{\thepage}{\roman{page}} and use either roman (I, II etc), alph (a, b etc), Alph (A, B etc) or arabic (1, 2 etc)
#LaTeXTip: To insert an empty space with the same size as a word (say “hi”), write “\phantom{hi}” – might be useful for small quizzes or tests
Multiple lines commands in Stata
Many Stata commands get easily quite long. Take, for example, a command to generate a figure – possibly the layout definitions are quite lengthy and difficult to read. Stretching commands over several lines makes it much easier to write and read, and less prone to errors.
Continue reading “Multiple lines commands in Stata”