GithubHelp home page GithubHelp logo

altavir / gradle-latex Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csabasulyok/gradle-latex

0.0 1.0 0.0 137 KB

Gradle LaTeX plugin - connect & watch multiple TeX and resource files

Groovy 100.00%

gradle-latex's Introduction

Gradle LaTeX plugin

Build Status Stable version

This plugin allows automation of compiling PDFs using LaTeX and BiBTeX. It offers the following:

  • compile multiple tex and bib files with dependencies in-between them;
  • use Gradle's continuous build feature to watch for changing sources
  • watch auxiliary files (images, extra tex files, etc.)
  • use Inkscape to convert images in unsupported formats like svg or emf

Requirements

  • LaTeX compiler: pdflatex and bibtex on PATH (tested using MikTeX on Windows and TeXLive on Linux)
  • Java version 1.8+
  • Gradle 2.0+
  • if using automatic image conversion, also inkscape on PATH

Gradle usage

Check the examples for further information.

1. Including plugin

The plugin can be used by including the following in your build.gradle:

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath group: 'com.github.csabasulyok', name: 'gradle-latex', version: '1.0'
    }
}


apply plugin: 'latex'

2. Specifying inputs

Specify inputs in build.gradle:

latex {
    // doc1.tex -> doc1.pdf
    tex 'doc1.tex'
    // doc2.tex -> customDoc1.pdf
    tex tex:'doc2.tex', pdf:'customDoc1'
    // doc3.tex, refs.bib -> doc3.pdf
    tex tex:'doc3.tex', bib:'refs.bib'
    // img.svg -> img.pdf, doc4.tex -> doc4.pdf
    tex tex:'doc4.pdf', img:['img.svg']
}

3. Calling LaTeX tasks

Build all PDFs:

>gradle pdfLatex

Clean output and auxiliary files:

>gradle cleanLatex

Use continuous build (will block and watch file changes):

>gradle -t pdfLatex

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.