Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
arxiv2kindle: recompiles an arxiv paper for kindle-sized screens, and sends it to your wifi-enabled kindle
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sergeyf

This comment has been minimized.

Copy link

@sergeyf sergeyf commented Jan 17, 2016

Thanks for this great example!

To make the commented out part work you need quadruple backslash:

        src[i] = re.sub(r'\\includegraphics\[width=([.\d]+)\\(line|text)width\]',
                   '\\includegraphics[width={mul}\\\\textwidth,height={mul}\\\\textheight,keepaspectratio]'.format(mul=mul),
                   line)
@bshillingford

This comment has been minimized.

Copy link
Owner Author

@bshillingford bshillingford commented Jan 20, 2016

@sergeyf Good catch, thanks!

@stared

This comment has been minimized.

Copy link

@stared stared commented May 14, 2016

Great! (Though, does not work on all papers, for understandable reasons.)
In any case, while I'm in love with Jupyter Notebook, for such tool it seems more natural to have a standalone script (pip-installable?), or something for Calibre.

@deepwilson

This comment has been minimized.

Copy link

@deepwilson deepwilson commented Sep 21, 2021

Gives me following error:
! LaTeX Error: File "eso-pic.sty\" not found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment