Using readme2tex in private repos
alshedivat opened this issue · comments
First of all, thanks for creating readme2tex -- very cool and useful idea!
I tried to use it in one of my private repos, and, unfortunately, it doesn't seem to work because rawgit doesn't allow to access files in private repos (see #92). At the same time, github doesn't allow accessing SVGs using relative paths for security reasons (see #316).
I am wondering if there is a known workaround for this issue? A straightforward one would be to enable rendering latex as PNGs (optionally) and use relative paths for them. Would it be possible to add support for this?
Hey @alshedivat,
Thanks for reporting this. I can try to see if I can do the PNG work-around you've suggested. It should be relatively straightforward to add a flag that processes svgs into pngs (say, the --relative
flag) and embed them as relative urls. Of course, we would have to add mutual exclusion rules like not being able to use a separate branch to keep track of the svgs, but it should work.
I just added this feature, which you can tick with the combination
python -m readme2tex --branch master --nocdn --pngtrick ...
In fact, the documentation for this (https://github.com/leegao/readme2tex/tree/f8615f5b1cdd0238004270fefd82a086c3ecff19#relative-paths) is itself rendered using this trick.
Note that you'll probably want to explicitly tick the --rerender
flag the first time you run pngtrick
since the caching system is still looking for svgs
.
If you get a chance to test this out, let me know who it goes :)
Sweet! Just tried it out, and it worked nicely. Thanks for adding this feature! :)
No worries, thanks for bringing it up! :)
Am I wrong, or is this feature not available yet on PyPI? My version of readme2tex is 0.0.1b2