Git Product home page Git Product logo

jsk-latex-docker's Introduction

jsk-latex-docker

Dockerを使ってJSKのlatexテンプレートを使った文章をコンパイルできます。latexを直接インストールしなくてもコンパイルできるようになります。(ci-thesisでのみ確認)

also includes latexdiff to make submitting revisions easier!

ローカルPC上での使い方

docker run ...時にDockerhubからプルしてくれるので、このレポジトリをcloneする必要はないです

cd /path/to/your-thesis
# on Linux
docker run --rm -it -v $(pwd):/workdir yasu31/jsk-latex-docker
# on Windows
docker run --rm -it -v ${pwd}:/workdir yasu31/jsk-latex-docker

デフォルトではmakeを実行しますが、コマンドの最後にmake cleanpdfcrop hogehoge.pdf(PDFの余白をクロップしてくれる)とかを追加すればそっちが実行されます。もっと凝ったコマンドを送りたければコマンドの最後に/bin/bash -c "cd robomech; ls -l"とすればbashコマンドが送れます。

GitLab CI上での使い方

以下の内容でレポジトリのrootに.gitlab-ci.ymlというファイルを作成します。CIが通ったら、"Download artifacts"で、コンパイルされた結果のPDFをダウンロードすることができます。

image: yasu31/jsk-latex-docker
compile-latex:
  script:
    - make
  artifacts:
    paths:  
      - main.pdf

GitHub Actions上での使い方

GitHubにpushされるたびにGitHub Actions上でコンパイルされ、出力されたPDFをダウンロードすることができます。GitHub Actionsの無料枠には制限があるので注意。無料枠は毎月3000分ですが、自分の場合ci-thesisだと全体の処理に2分程度かかりました。

レポジトリのrootに.github/workflows/compile_pdf.ymlというファイルを作成し、以下をコピペしてpushすれば動いてくれるはずです

on: [push]

jobs:
  compile-pdf:
    runs-on: ubuntu-latest
    container:
      image: yasu31/jsk-latex-docker
    steps:
    - name: Set up Git repository
      uses: actions/checkout@v1
    - name: Compile LaTeX document
      run: make
    - name: Upload PDF to workflow tab
      uses: actions/upload-artifact@v2
      with:
        name: PDF
        path: main.pdf

jsk-latex-docker's People

Contributors

yasu31 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.