GithubHelp home page GithubHelp logo

flatex's Introduction

flatex.py

This "flattens" a LaTeX document by replacing all \input{X} lines w/ the text actually contained in X. I recently re-factored it to use the click module to create a command line interface.

Copyright, 2015, John J. Horton ([email protected]) Distributed under the terms of the GNU General Public License See http://www.gnu.org/licenses/gpl.txt for details.

It was inspired by: http://tex.stackexchange.com/questions/21838/replace-inputfilex-by-the-content-of-filex-automatically/21840#21840

There are C and perl versions of this, but I wanted a pure python version to fit in w/ my existing paper-creating toolchain.

To install

git clone [email protected]:johnjosephhorton/flatex.git
cd flatex
pip install --editable . 

To use as a stand-alone script

flatex inputfile.tex outputfile.tex

If you want to include the bbl file as well

flatex --include_bbl inputfile.tex outputfile.tex

Limitations:

  1. It doesn't do \includes - just inputs.

  2. I haven't tested it for nested inputs (thought it's designed to work on files like).

  3. I haven't tested it for more complicated file arrangements e.g., realtive reference inputs that are more complex that just a file living in the same directory.

  4. The test case writes to the /tmp folder - so the test probably wouldn't work on Windows(?).

flatex's People

Contributors

airwoodix avatar ati-ozgur avatar dvbrydon avatar johnjosephhorton avatar jorgsk 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  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

flatex's Issues

Usage with subfile package

It would be awesome if this script worked with the subfile package. I might submit a PR if I have the time!

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.