Unleashing dynamic LaTeX: latexmk, gnuplot, R (knitr) and pgfplotstables

One of the nice things of LaTeX is that it allows you to separate the content and the formatting/layout of your documents. Need a new column layout? Just add an option in the document class. Your image needs to be wider? Change it, LaTeX adjusts its position in the document. In other words you only need to worry about what you’re doing right now and nothing more.

However, this philosophy doesn’t extend to all aspects of LaTeX. What if you’re writing a technical document and a graphic must be regenerated if the data files change? What if those data files should also be summed up in a table and some key values discussed in the document? You’d probably end up re-running your R and gnuplot scripts, and copy-pasting the results. This isn’t a bad thing if you only have to do it once or twice, but it can get annoying quickly.

The solution: again, separate content and presentation. If you have to do some calculations to get the data you need in your document, write those calculations in the document and let LaTeX (with knitr, as we’ll see later) recreate them if needed. If you have some plots generated by gnuplot or tables from some data file, again, let your document typesetting system take care of filling them.
Continue reading

A continuous compilation system for LaTeX files

A little bit of context: some of the students of the Math-CS degree in the UAM are maintaining a repository with notes of most the subjects we’re studying, written in LaTeX. We wanted to share the compiled PDF files with the other students, but there wasn’t any CI solution for LaTeX. So, I created one. Latex_cd is a Debian service that monitors a Github repository, compiles the LaTeX files and uploads the PDF results to Dropbox. Continue reading

Using hugepage-backed buffers in Linux kernel driver

I’m not more than a complete newbie in Linux kernel development, but recently I had to modify a driver so it could use big buffers backed by hugepages. Documentation on hugepages is scarce, even more when you try to mix it in kernel driver, so I decided to write about the process and document what I found so others can have a starting point. This is probably not going to be completely correct, but it’s better than nothing.

Continue reading

El artículo perfecto

Internet se está llenando cada vez más de artículos perfectos. Hay múltiples guías como esta de Buffer para escribir El Artículo Perfecto. De ahí sale toda una miríada de artículos que

  • Suelen Estar Escritos Así.
  • 3 de cada 5 son listas o tienen un número al principio.
  • El tono del escritor es o bien de vendedor de teletienda o bien de colega chistoso.

Y lo peor de todo es que un número preocupante de las veces, esos artículos están vacíos de contenido. Los lees y te quedas igual. Continue reading