Git Product home page Git Product logo

Comments (15)

JelteF avatar JelteF commented on August 16, 2024

I haven't run into an issue with this yet, but I see what you mean. If you write a patch, please use the Options and Argument classes to do so. https://github.com/JelteF/PyLaTeX/blob/master/pylatex/parameters.py

I am planning on refactoring a lot of the codebase this summer anyway, so this would probably have come up. But I always appreciate patches.

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

I will. I somehow introduced them with my last request.

Getting testall.sh to run is quite a pain right now. Already took me >1h. Would you be interested in a vagrant configuration? I'm halfway there, so I guess I could provide the Vagrantfile once I'm finished.

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

Is it really that hard? I'm currently working on the documentation, so could you let me know what troubles you ran into?

Have you tried pip install -e .[all]? That should install all python requirements, the only thing that is then needed is a recent version of LaTeX. Is that the issue?

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

I did, but matlabplotlib is not building without the freetype and libpng devel package on ubuntu. It's not that hard, it just takes time figuring everything out correctly.
I suppose for the test script to work properly one has to install pylatex using pip install -e . too?
On Jun 23, 2015 9:25 AM, Jelte Fennema [email protected] wrote:Is it really that hard? I'm currently working on the documentation, so could you let me know what troubles you ran into?

Have you tried pip install -e .[all]? That should install all python requirements, the only thing that is then needed is a recent version of LaTeX. Is that the issue?

β€”Reply to this email directly or view it on GitHub.

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

Ah, ok. That is what I always dislike about Ubuntu/Debian, that you always need all those devel packages.

And yeah, you should install it with pip install -e . or you can just use python setup.py which does the same without a lot of the dependency calculation pip does.

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

I have just started refactoring (I needed a bit of a break from the documentation writing). The base_classes file has been split up into two different files and the BaseLaTeXNamedContainer has been renamed to Environment. I'm not sure how good git handles this if you made changes in the base_classes file before this change, so it might be easier to just copy and paste your changes if you already have some.

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

Well actually the BaseLaTexNamedContainer is pretty buggy anyway. It only supports a single string as parameter for both arguments and options although the docs explicitly allow either string, list or the respective class instance.

I'll just copy it over anyways. I also did an example on how to use PyLaTeX for custom commands and environments.

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

So maybe a unit test would be appropriate too, making sure the parameters work as specified, which is not the case at the moment.

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

I think I remember that I wanted to rewrite BaseLaTexNamedContainer when the Command class was created, which seemed like a good plan. But I think I ran into issues with circular imports because Command used the BaseLaTeXClass class which was in the same file. At that point I think I gave up, because I didn't feel like refactoring back then.

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

I think the new docs will really help finding issues like this btw, since they are more in the open now, instead of only in the code.

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

Yes, that is apparently an issue. Arguments and Options both rely on BaseLatexClass which is in the same module as BaseLaTexNamedContainer. I currently solved it by doing the import inside BaseLaTexNamedContainer. Not super elegant but the only way without splitting base_classes.

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

Take a look if you want
sebastianhaas@2c7c285

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

I wrote down some comments after a quick look. Great that you made an example for extending PyLaTeX btw.

from pylatex.

sebastianhaas avatar sebastianhaas commented on August 16, 2024

I will try to meet your recommendations asap. Please just drop me a line on your decision regarding splitting the typo fix and the arguments pluralization in two separate commits. I can clearly see your point there, but of course it implies resetting the commit so if you don't care too much ;)

from pylatex.

JelteF avatar JelteF commented on August 16, 2024

Closing this because it is fixed

from pylatex.

Related Issues (20)

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.