Compiling the paper

Compiling the paper

How I used LateX and Docker to compile the paper

This is the repository for the paper on the Social Network Graph and Echo Chambers on the Colab.re App. This is my final project for the Masters Degree in Software Engineering for Cesar School. This post is mostly for the benefit of future me so I’d have a clue on what I was doing when I was working on this. You can use for yourself as a template, but don’t trust my code.

Motivation

Everyone recomended I use Overleaf, but since this is my first LaTeX adventure, I feel like I want to learn how this stuff works from the ground up. Also, I`m comfortable writing in the tools I already know like VSCode and IntelliJ. Futhermore, I don’t want to vendor-lock-in my paper with a cloud provider when I can just as easily setup cloud storage with github. Anyway, maybe I’ll get stuck and move back to Overleaf, maybe I’ll learn cool stuff about LaTeX…

Templating

For templating I started with this IEEE LaTex Template. But it was an english/german package threw me off hard when I couldn’t make it work in pt-br.

So I got this SBC Template. It worked first time, so I’m sticking with it for now.

I’m versioning these templates for achival purposes. Maybe by the time I revisit these links, they`re gonzo…

Installing

You need to have a TeX compiler installed. For Windows, I used MiKTeX. People recommended LiveTeX, however the package is over 4gb which mostly due to coming bundled with source code, perl and docs. To me is an overkill, I like that MiKTeX comes with a package manager and install stuff as needed. Currently with all the packages I need for the paper, the MiKTeX folder is less than 1gb in comparison.

choco install miktex

For main editing, I started with TeXMaker:

choco install texmaker

Then I quickly discovered the LaTeXWorkshop for VSCode. For me it’s much better, but it requires Perl. So let’s install StrawberryPerl for Windows:

choco install strawberryperl

For managing the references, I use JabRef. The main ref file is ./paper/colab-echo-chambers.bib. Install JabRef with:

choco install jabref

Compiling

From the ./paper directory, run:

pdflatex -halt-on-error -output-directory ../out main.tex

The file will be saved in the ./out directory.

Docker

Alternatively if you don’t want to install any of the above dependencies, you can use Docker. Build the image with: docker build -t guinetik/ltx .

Then run the container pointing to the main.tex file:

docker run --rm -it -v $(pwd):/sources guinetik/ltx pdflatex -halt-on-error -output-directory out main.tex

Demo

Docker Demo