I have a really good book (.pdf) that i would like to take some code from there. I know that book was written with LaTeX, so my question is if there are any kind of way to take that .pdf and reconvert to .tex file?
Thanks in advance.
I have a really good book (.pdf) that i would like to take some code from there. I know that book was written with LaTeX, so my question is if there are any kind of way to take that .pdf and reconvert to .tex file?
Thanks in advance.
There is no perfect way to reverse-engineer the LaTeX source from a PDF.
However, there is some (non-free) software that will carry out OCR on a PDF file and output LaTeX for you. The one I know about (and have used, a little) is InftyReader.
InftyReader is non-free, and while (in my experience) it produces reasonable output, as with any OCR process it is far from perfect, so you would still need to undertake substantial post-processing.
Note: This is commercial software, but I have no financial or other interest in endorsing it.
.texsource code of the book from just the PDF. (Unless the author actually embedded it into the PDF, which is possible, but would be highly unusual.) See also https://tex.stackexchange.com/q/445998/35864 – moewe Aug 14 '18 at 14:00