LaTeX

3 posts

Plotting IP and MO-IP models in R

I recent released a small package gMOIP which can make 2D plots of linear and integer programming models (LP/IP). With the package you can make plots of the feasible region (or solution space) of an LP, visualize the integer points inside the region and the iso profit curve. Moreover, can also make a plot of a bi-objective criterion space and the non-dominated (Pareto) set. Figures are prepared for LaTeX and can automatically be transformed to TikZ using tikzDevice.

How to install a fully working LaTeX environment

This post is a guide on how to install the computer typesetting system LaTeX and the corresponding programs for editing and creating LaTeX documents, and converting them to Portable Document Format (pdf) on Windows. You will need to install the following software in the following order A LaTeX engine. A free engine under Windows is MikTeX (containing a lot of other useful stuff). Just install the basic installer, which will download the packages you need automatically. A LaTeX editor. I recommend the free editor TeXStudio which is very powerful. Download and install the latest version. If you want another spellchecker language (e.g. Danish), have a look at this page. Even though that TeXStudio have a built-in pdf viewer. I also suggest to install SumatraPDF. Happy typing 🙂

Highlighting R code in LaTeX using SweaveListingUtils

It is well known that you can use Sweave to integrate R code into a LaTeX document. However, how do we highlight R code in LaTeX? LaTeX got its own powerful package listings that can highlight source code from various languages. Moreover, the package SweaveListingUtils provides utilities for defining R as a listings “language”. To highlight your R code in your Sweave document you have to include the following code chunk: