Code Monkey home page Code Monkey logo

latex-ci's Introduction

latex-ci

LaTeXで書かれた論文をPDFにコンパイルしてReleaseするCI環境

Features

  • 学内用と学会用など複数バージョンを1つのリポジトリで管理することができます
  • 1つのリリースで論文と論文要旨など複数の文書をコンパイルできます
  • TexLive2020を使っているので,標準で原ノ味フォントが利用できます
  • textlintによってトンマナの校正ができます
  • huskyによってpre-commitをhookしてtextlintを走らせることができます

設定

  • Circle CIとリポジトリを連携する
  • Circle CIの環境変数GITHUB_TOKENにGithubのPersonal Access Token(repoのフルアクセス)を設定する

使い方

textlintを有効にする

$ npm install

huskyによってpre-commit時にtextlintが走るようになります

PDF化したいコミットにタグを付ける

$ git tag -a thesis-v1.0.0 -m'thesis-v1.0.0'

タグは'〈ターゲット名〉-vX.X.X'というフォーマット

タグをpushする

$ git push --tags

仕組み

  • tex -> pdf はlatexmkを使ってます
  • latexmkをMakefileで実行しています
  • タグの〈ターゲット名〉がMakefileのターゲット名になります
    • thesis-v1.0.0というタグをつけた場合,make thesisが実行されます
    • 概要と論文など2つのtexファイルを1つのコマンドでコンパイルすることができます

その他

  • textlintはpre-commitで実行される前提なので,ciサーバ上では実行されません
  • 付属の.latexmkrcはplatex仕様になっています.uplatexを利用する場合は差し替えてください

References

License

MIT

latex-ci's People

Contributors

nacl30d avatar

Stargazers

 avatar

Watchers

 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.