Skip to content

7Rocky/latex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create documents using LaTeX and Docker

This image is built to generate a Docker container with the full texlive distribution installed in order to generate PDF files using LaTeX.

Moreover, Pygments and GhostScript are also available on the built image in case they are needed.

The main advantage of using this Docker image is that the installation of packages for using LaTeX is not required.

The image will work using a certain project structure. There is a template posted on https://github.com/7Rocky/plantilla-informe-LaTeX. Although it is in Spanish, it is easy to follow. Basically, the project structure is:

├── src/
│   └── ...
└── template/
    ├── _minted-main/
    │   └── ...
    ├── bibliography/
    │   └── sample.bib
    ├── images/
    │   └── ...
    ├── lexers/
    │   └── ...
    ├── main-compressed.pdf
    ├── main.aux
    ├── main.log
    ├── main.out
    ├── main.pdf
    ├── main.tex
    ├── packages/
    │   └── ...
    └── subfiles/
        ├── .../
        └── document.tex

The command to compile the project is:

docker run --rm -v ${PWD}/..:/project -it 7rocky/latex

It is important that the absolute path to the working directory (pwd) does not contain spaces.

The following command can be used to compress the PDF file and to generate bibliography (if needed):

docker run --rm -v ${PWD}/..:/project -it 7rocky/latex compress
docker run --rm -v ${PWD}/..:/project -it 7rocky/latex bib

Hope it is useful! 😄