QuantEcon.cheatsheet
QuantEcon.cheatsheet copied to clipboard
Separate PDF versions for python and julia cheatsheets
We may want to have separate PDF files for python and julia cheat sheets for download.
Focusing on html for now.
We already have the pdfs from the original tex versions. Did you have in mind one created by Sphinx so we only have to edit the rsts?
Hi @vgregory757 I think we should probably embrace a full sphinx solution -- as the source is then in one place. This is a good point though -- an interim solution can use the pdf's constructed from the tex.
@vgregory757 @mmcky
Any progress here?
I tried using Sphinx to build the latex/pdf files for these and I get all sorts of latex errors from the .tex files it makes. It doesn't seem to like the matrices in particular. If I ignore the errors, the parts of the tables that didn't have errors look good in general. But I'm not sure if the errors are coming from something we did wrong in the .rsts or because Sphinx just doesn't play well with the combination of latex + tables + math.
@vgregory757 do you think you might have some time to review the generated latex file and then modify the latex code to produce the matrices etc? We could then use this template to modify the LaTeX writer in sphinx to generate what we want as a finished product.
@mmcky Sure thing, I'll see if I can get it to look nice.
Thanks @vgregory757. That would be great.
Note: The way sphinx does syntax highlighting for LaTeX isn't great using lots of \PYG{} markers etc. My advice would be to try and work around that to begin with (i.e. leave the wrapped markup) and see if the matrix infrastructure will work around that. Otherwise we could move towards using minted for syntax highlighting in the LaTeX.
@mmcky I cleaned up the generated tex version for the Julia sheet and put it in the main folder.
I wasn't having any problems with the \PYG{} markers. To get the matrices to work, I just got rid of the gather and split environments that Sphinx created around them and put them around dollar signs instead. Other major changes were using longtable instead of tabular so that the tables didn't run off the page, and getting rid of the description environments because they caused some funny looking indenting and caused some of the text to run off the page.
Does this help/look nice?
Great. Thanks @vgregory757. I can't compile the updated tex because it needs a cls file and if I run make latex then I think it will overwrite your changes etc.
Can I suggest we move the manually edited tex file into a folder julia-manual and including all the files needed to run pdflatex?
@mmcky Done. If you run make latex it'll only write to the _build folder. The new julia-manual folder includes the cls files and others you need to compile taken from the _build folder, and the tex file in this folder is the one that was modified by me. The original one created by Sphinx will show up in the _build folder.
Thanks @vgregory757. I think this looks nice. Now we will have to teach sphinx how to make that LaTeX :)