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.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI 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.
.tex
source 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 tex.stackexchange.com/q/445998/35864 – moewe Aug 14 '18 at 14:00