Giter VIP home page Giter VIP logo

pydflatex's Introduction

pydflatex: a simple LaTeX wrapper

pydflatex is a wrapper around pdflatex which produces a short, readable, coloured output. Specifically, pydflatex

  • runs pdflatex/xelatex blazingly fast using the -batchmode option
  • prints out a coloured, short summary of the warnings and errors
  • hides the temporary files in various ways
  • opens the pdf file if needed

Screenshot

Usage

pydflatex file.tex

Some useful options:

  • -x: run xelatex instead of pdflatex
  • -k: keep compiling on error
  • -o: open the pdf in a pdf viewer
  • -l: only parse existing log

A full list of options is available by running pydflatex --help.

Install

You can install pydflatex by running

pip install -e "git+https://github.com/olivierverdier/pydflatex#egg=pydflatex"
pip install blessings

Using as a Library

pydflatex is a collection of several independent modules to typeset the file, analyze its log, hiding the auxilliary files, etc. It is easy to write a simple python script that calls either one of those modules and does exactly what you want in your project.

For instance, to run a given file with xelatex you can call:

from pydflatex import Typesetter
t = Typesetter(options={'xetex'=True})
t.typeset(path_to_file)

In order to just print the summary of the log:

from pydflatex import LogProcessor
l = LogProcessor()
l.process_log(path_to_log_file)

Feel free to check out the other modules inside the pydflatex folder.

Requirements

  • blessings (optional but strongly advised): to display results in colour

pydflatex's People

Contributors

olivierverdier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pydflatex's Issues

RE: Install Instructions

Hi, Nice project you got going on ;)

I second a previously closed Issue about the lack of install instructions.

You can indeed use pip, but you need to provide the git repo as such (took me some googling to find some, might be worth saving other people's time):

pip install https://github.com/olivierverdier/pydflatex/zipball/master

And while you are there, why not add:

pip install blessings

Alternatively, why not submit your package to PyPI ?

Cheers, Bertrand

Installation instructions?

It would be nice if the readme contained instructions on how to obtain pydflatex. Are we supposed to use pip or something? I'm not to python-savvy.

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.