Category: LaTeX

  • Subfigures in LaTeX

    To combine multiple figures in one figure environment in LaTeX, e.g. to show scatter plots for different groups, the usepackage subfig is there to help. It allows to create several subfigures while also adjusting the subtitles of each of the subfigures. Simple call the package in the preamble by adding

  • Avoiding widows and orphans in LaTeX documents

    To avoid paragraphs ending with a single line on the following page often looks a bit ugly. Especially when they are then followed by figures or tables. Single lines of a page-overlapping paragraph are called “widows” and “orphans”. How can we tell TeX to avoid those? With the following code, you tell TeX that it […]

  • Beamertex 16:9 aspect ratio

    With an increasing number of beamers supporting 16:9 aspect ratio of your presentation slides, it is fairly easy to implement this in beamertex. Simply add “aspectratio=169” to the options in document class command in the first line of your latex file:

  • Include entire PDF files in your LaTeX document

    I described already earlier how to use images in pdf format in your LaTeX document, e.g. if you want to include a screenshot of a Table of a paper in pdf format in your slides (which results in much better quality than using jpg or similar formats). But what if you want to include complete […]

  • Routine to export tables from Stata to LaTeX

    When it comes to exporting regression tables from Stata to LaTeX, there are several packages that can be used. For a long time, I used outreg2, but now improved my code for the the estout package by Ben Jann. The remainder of this post describes the routine that works best for, you might want to […]

  • Simple formatting of table and figure captions

    There is a fairly simple way to make adjustments to table and figure captions, e.g. to make the “Figure” bold or change the separator between “Figure X” and the actual caption: 

  • Colored cells in LaTeX Tables with overlay

    If you like to highlight single cells in LaTeX tables in the overlay mode, there is a very simple way to do so:

  • 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 […]

  • 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 […]

  • DOI to BibTex Converter

    I just came across a very simple way to retrieve the full BibTex-Code from DOI. Just copy the DOI of a paper you want to cite and paste it into the search field of this website: http://www.doi2bib.org/