jrjohansson / version_information

IPython magic command for showing version information for dependency modules in a notebook.
54 stars 17 forks source link

Export to PDF fails for modules with underscore (like version_information itself) #13

Open etabeta78 opened 5 years ago

etabeta78 commented 5 years ago

If you add a cell to a Jupyter notebook calling

%load_ext version_information
%version_information version_information

then export to PDF fails due to the unescaped underscore in the module name, when the table is built.

I think a fix could be to add at line 163 of version_information.py

_name = self._latex_escape(name)

like you do for _version and update the later construction of the TeX output, but I'd leave to you the judgement about its correctness