Is there latex/pdflatex build support in Pipelines feature?

I want to integrate a continuous building tool for .tex files in my bitbucket repository. Is there a way I can run 'pdflatex' with pipelines?

3 answers

Hi @Tharindu Rusira,

There are three ways you can do this. The first is to use a docker image published already as the image you use to build the pipeline. e.g.

image: sharelatex/sharelatex
    - step:
        - latex <fileName>

There is a list of possibilities at and . From here you will need to run the latex commands in the script. The second way is to build your own latex image, push it to a private repository or dockerhub and then pull it just as you would for a public image in the previous method. The final way is to install latex as part of the build. e.g.

    - step:
		- apt-get install texlive-full --assume-yes
        - latex <fileName>

However this will take a long time to complete and you'll have to run it every time. It is important to point out that we don't have support for artifacts yet so your pdf will be inaccessible after the pipeline has finished running.




In case someone is interested, I made a simple pipeline file which can build latex document easily. The build is triggered manually (replace 'custom' by 'default' to change that), and handle complex document with bibliography as well as simple one. If a package is missing, the simplest solution is to put it in your repo.

The main file should be named "Main.tex".

It should be noted that the artifacts are lost as mentioned by @ Thomas Bradshaw. However, you could upload it to a third-party storage service (such as an SFTP server).

image: fermiumlabs/latex-docker:latest

  custom: # Manually only
      - step:
            - pdflatex Main.tex && bibtex Main && pdflatex Main.tex && pdflatex Main.tex
      - step:
            - pdflatex Main.tex


I've created a docker image (latex4bitbucket) with which you can easily compile latex, as well as automate the copy of the generated files to a Google Drive folder.

Description with example pipeline configuration is available here.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

716 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot