Giter Site home page Giter Site logo

tsgfan07 / latex-proj-tool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from comaniac/latex-proj-tool

0.0 0.0 0.0 46 KB

A toolset to traverse and manipulate a Latex project with multiple .tex files.

License: Apache License 2.0

Shell 0.75% Python 94.36% Makefile 4.89%

latex-proj-tool's Introduction

Latex Project Managment Tool

Build

A toolset to traverse and manipulate a Latex project with multiple .tex files. Here are the currently supported functionalities. You are welcome to contribute more features :)

Project flatten

Flatten a Latex project to a single .tex file. This is useful if you want to use latexdiff or other Latex tools that require a single .tex file.

This is mainly inspired by this post: http://dropbearcode.blogspot.com/2011/09/multiple-file-latex-diff.html

Usage with latexdiff

  1. Make sure you have Perl 5.8+ in your environment.
  2. Download latexdiff from https://www.ctan.org/tex-archive/support/latexdiff
  3. unzip latexdiff
  4. python3 -m latex_proj_tool flat old_project/main.tex --output old.tex
  5. python3 -m latex_proj_tool flat new_project/main.tex --output new.tex
  6. latexdiff old.tex new.tex > tmp.tex
  7. sed 's/^M//' tmp.tex > diff.tex
  8. Compile diff.tex to get the PDF.

List Unused Files

List all unused files to help you clean the project.

Usage

List all unused files in this project:

python3 -m latex_proj_tool find_unused my_project/main.tex

List all unused files in this project, excluding some files:

python3 -m latex_proj_tool find_unused my_project/main.tex --exclude-extensions cls,sty,bst

List all unused files in this project, excluding some directories:

python3 -m latex_proj_tool find_unused my_project/main.tex --exclude-dirs backup

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.