Convert Latex document to PDF using Docker and Jenkins

Convert Latex document to PDF using TexLive Docker image and Jenkins pipeline.

Mujahid Khaleel
Jun 22, 2021

Convert Latex document to PDF using TexLive Docker image and Jenkins pipeline.

pipeline {
    agent any

    stages {
        stage('TexLive') {
            agent {
              docker {
                image 'texlive/texlive'
                reuseNode true
              }
            }

            steps {
                writeFile encoding: 'utf-8', file: 'example.tex', text: '''\\documentclass{article}
\\begin{document}
  Hello World!
\\end{document}'''
                sh 'pdflatex example'
            }
        }
    }
}

See also

In this page

Tags

BooksTechnology