Latex PDF building?

Has anyone had success with generating Latex files via pdflatex or xelatex?


1 Like

Nope. The latex distribution is too old. For instance, the package nag is missing completely. Now, I’m trying TravisCI based on

I gave up after I had following circle.yml file

    # update and show only important apt output
    # `-o=Dpkg::Use-Pty=0` hint by
    - sudo apt-get -qq -o=Dpkg::Use-Pty=0 update
    # remove all texlive related stuff to avoid problems
    #   hint:
    - sudo apt-get purge -qq texlive* tex-common*
    # do not install documentation as this causes troubles during installation
    #   build error:
    #   hint:
    # installed pacakges:
    #   * latexmk for building
    #   * texlive-lang-german for dehyph-exptl - see
    - sudo apt-get -qq -o=Dpkg::Use-Pty=0 --no-install-recommends install latexmk texlive-lang-german

    - latexmk document
    - mkdir build
    - mv document.pdf $CIRCLE_ARTIFACTS
1 Like

This afternoon, I managed to get my Ruby gem Verku to work, which converts Markdown to PDF via LaTeX. This is in Circle 2.0

        - sudo apt-get install texlive-xetex
      - checkout
      - run:
          name: Install Georgia
          command: 'echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections; sudo apt update && sudo apt -y install ttf-mscorefonts-installer'
      - run:
          name: Install Texlive
          command: 'sudo apt update && sudo apt install texlive texlive-xetex texlive-fonts-extra texlive-latex-extra texlive-plain-extra'
      - run:
          name: Install Verku
          command: 'gem install verku'
      - run:
          name: Create pdf.
          command: |
            verku pdf;
            mkdir /tmp/artifacts;
            cp -R builds/* /tmp/artifacts/.

      - store_artifacts:
          path: /tmp/artifacts
1 Like

Yes, it is very easy using CircleCI 2.0 and docker images. See

version: 2
       - image: koppor/texlive
       - checkout
       - run: latexmk document.tex

By using that approach, I also generate PDFs and publish it into gh-pages. Example: is generated using



Sorry to bump this thread, I’ve just used the textlive image and it worked great!
My question is: how can I install some prerequisites (I have custom fonts I need to install before building)? I tried using

    - wget

But that didn’t seem to work when using the texlive docker image (I didn’t see any output from those commands, and my build failed for not finding the fonts). I ended up calling each command from

Is there a better way? Am I holding this wrong? (sorry, very new to CircleCI and/or docker)

Hey @hmemcpy

I’m not familiar with the dependencies key. Are you using Docker 2.0? If so, just put your install command in a run section, as per the entries in Merovex’s post.

Note that fetching the fonts will not install them on its own - you’d need to put them in the right location. It’d be something like:

cd /path/to/fonts/dir && wget && gunzip InconsolataLGC-1.3.0.tar.xz && tar -xf InconsolataLGC-1.3.0.tar

I’m assuming the .xz is a gzipped file - if not, adjust the gunzip to something more suitable. And of course you’ll need to adjust the fonts dir.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.