sisl / tufte_algorithms_book

A template for textbooks in the same style as Algorithms for Optimization
350 stars 66 forks source link

upgrade to pythontex v0.17 #20

Closed johnnychen94 closed 4 years ago

johnnychen94 commented 4 years ago

Closes #19

This is copied from https://github.com/gpoore/pythontex/blob/master/pythontex/pythontex.sty while keeping the custom pigments for Julia not changed

mykelk commented 4 years ago

This looks good! It does the trick. I'm thinking that it is probably more elegant to modify juliaplots.sty so that it takes as input a package option that sets the julia lexer to julia1 or something like that. That way we don't have to include a modified pythontex.sty in this repo. The issue is that juliaplots.sty currently uses the package options to pythontex to set the julia lexer to just julia (rather than julia1, which we want for the book). We want something like this:

\RequirePackage{pythontex}
\makepythontexfamily[pyglexer=julia1]{julia}
\makepythontexfamily[pyglexer=julia1]{jl}
\makepythontexfamily@con[jlcon]{julia}

But have julia1 be a package option to juliaplots.

Feel free to file PRs here and at juliaplots.sty. If you want, I can merge what you have right now. Just let me know.

johnnychen94 commented 4 years ago

Yes, I was considering the possibility as well, but then I realized that my familiarity with latex doesn't support me to do this. Then I decide to fix the broken pipeline first and leave this enhancement to other contributors.

If you want, I can merge what you have right now. Just let me know.

Since this PR fixes the issue, I'm not considering making any more changes recently. (I really want but due to my lack of time and ability...) So let's just merge this PR, open an issue for removing pythontex.sty, and then rebuild the pipeline in the gitlab repository.

@mykelk @tawheeler If you want, I could give you the privilege to that as well, or transfer the ownership. Thank you for making this template public again!

johnnychen94 commented 4 years ago

Thanks for the quick response, the pipeline passes now.