LoginSignup
0
0

More than 3 years have passed since last update.

Gitlab-CIでTex文書を自動でPDF化

Last updated at Posted at 2020-06-04

Gitlab-CIでTex文書を自動でPDF化

gitlabのアカウントを持っていることを前提で話します。

持っていない人は作ってください。↓↓↓
https://gitlab.com/

新規プロジェクト作成

01.png

プロジェクトの設定

02.png

CI/CD の設定

その1

03.png

その2

下記のもの(.gitlab-ci.yml)をコピー

.gitlab-ci.yml
# This file is a template, and might need editing before it works on your project.
# use docker image with latex preinstalled
# since there is no official latex image, use https://github.com/blang/latex-docker
# possible alternative: https://github.com/natlownes/docker-latex
image: whywaita/docker-latex-jlisting:latest

stages:
  - build

before_script:
  - pwd
  - echo "start compile"

build:
  stage: build
  script:
    - for i in `ls *.tex | sed 's/\.[^\.]*$//'`; do echo "$i.tex -> $i.pdf"; platex $i; dvipdfmx $i; done
    - echo finished
  artifacts:
    paths:
        - "*.pdf"

その3

04.png

Texファイルのアップロード方法

プロジェクトの概要に戻る

05.png

自分のファイルをアップロード

サンプルでHello.texを使います。(内容は下に載せています。)
06.png

07.png

08.png

HelloTex.tex
\documentclass{jsarticle}
\usepackage[b5j]{geometry}
\begin{document}
Hello\TeX!
\end{document}

出来上がったPDFのダウンロード

再びプロジェクトの概要に戻る
09.png
10.png

おまけ

 共同編集の方法

11.png

共同編集者を招待したらプロジェクトを共同で編集したりできます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0