Giter VIP home page Giter VIP logo

latexpkges's People

Contributors

bazzilic avatar michaelmhoffman avatar soraxas avatar taraskuzyo 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

Watchers

 avatar  avatar  avatar

latexpkges's Issues

Precreated .exe

By any chance, could you provide a prepackaged Windows executable for easy download?
Would make this tool way more accessible while also saving users the need to install Python2.

PyPI package

Thanks for taking over this package! Would you consider submitting this to PyPI so it is easier to install?

Output could be more readable

I suggest to remove the wordy output and use something like this:

[package] : used (build fails)
[package] : not used
[package] : used (checksum mismatch: [hash])

Detection error

I am experiencing some weird behavior please consider the files below:

test.tex:

\documentclass{book}

\usepackage{lipsum}% useless package here
\usepackage{amsmath} % needed

\input{/tmp/input.tex}

\begin{document}
	\begin{align}
		a = b + c
		\label{eq}
	\end{align}
	\cref{eq}
	\eqref{eq}
\end{document}

input.tex

 % BLA BLA BLA
\usepackage{tikz} % should be useless here as well
 \usepackage{cleveref}% needed

When running LaTeXpkges.py --latex lualatex /tmp/test.tex --input /tmp/input.tex it says:

Building the project.. Done!
Calculating the original checksum for test.pdf...
MD5 for the original output file is e774282e0696e6775781967f764a5aff
4 were found.
Testing if lipsum can be removed... Yep.
Testing if amsmath can be removed... Nope. Build fails.
Testing if tikz can be removed... Nope. Build fails.
Testing if cleveref can be removed... Nope. Build fails.

It looks like it's safe to remove these packages:
lipsum

To me that's weird because manually removing tikz does not result in an build error.

Edit:
Unforunately, that seems to be related to my changes. If I have all the stuff in one document, like

\documentclass{book}

\usepackage{lipsum}% useless package here
\usepackage{amsmath} % needed

 % BLA BLA BLA
\usepackage{tikz} % should be useless here as well
\usepackage{cleveref}% needed


\begin{document}
	\begin{align}
		a = b + c
		\label{eq}
	\end{align}
	\cref{eq}
	\eqref{eq}
\end{document}

it says for LaTeXpkges.py --latex lualatex /tmp/test.tex

Building the project.. Done!
Calculating the original checksum for test.pdf...
MD5 for the original output file is e774282e0696e6775781967f764a5aff
4 were found.
Testing if lipsum can be removed... Yep.
Testing if amsmath can be removed... Nope. Build fails.
Testing if tikz can be removed... Nope. Checksum mismatch: b6a4bf87ca6cbb42bc7a89dddb71bfdc
Testing if cleveref can be removed... Nope. Build fails.

It looks like it's safe to remove these packages:
lipsum

Which is still weird, but at least it doesn't report a crash.

Propose

Hello, I am considering to modify the script to do the same thing with macros (delete from the file macros that have not been used). I believe the same approach should work, as long as you change the regular expression to identify macros instead of packages and then you should always end up in the "Build failed" case. Do you know if there is already something like that available around?

`setup.py` depends on `py2exe`

If installing on Unix, there is no need for py2exe so this shouldn't be a hard requirement.

$ pip install git+https://github.com/TarasKuzyo/LaTeXpkges.git
Collecting git+https://github.com/TarasKuzyo/LaTeXpkges.git
  Cloning https://github.com/TarasKuzyo/LaTeXpkges.git to /tmp/pip-req-build-4ekiv_l3
  Running command git clone -q https://github.com/TarasKuzyo/LaTeXpkges.git /tmp/pip-req-build-4ekiv_l3
    ERROR: Command errored out with exit status 1:
     command: /home/mhoffman/venv/python3/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-4ekiv_l3/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-4ekiv_l3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-req-build-4ekiv_l3/pip-egg-info
         cwd: /tmp/pip-req-build-4ekiv_l3/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-4ekiv_l3/setup.py", line 2, in <module>
        import py2exe
    ImportError: No module named 'py2exe'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Parallelization

Would it be possible to have an option to run multiple tests in parallel?

Troubles when packages included in files loaded via \input{}

I have the problem that the package detects (and thus only evaluates) packages that have been included in the main document. But I have a couple of packages I load in a separate file to keep the main document cleaner. They seem to be disregarded.

Edit: Maybe an easier workaround is to let the user specify the additional files that should be parsed for \usepackage commands?

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.