# Horrible time when trying to copy-paste an answer to a LaTeX document

Yes, I click on "edit" and then copy the code. But it is full of problems... All I want to do is having an answer copied to a latex document, that I can then export to .pdf, copy, keep in my personal collection of documents... Isn't there any simple thing I can add to the header of the document, something like:

\usepackage{document.from.stackexchange}

or perhaps:

so that the document compiles with all the stuff, formulas, links, etc ? This is frustrating...

• What exactly are the problems you get when copying from the "edit" page? I'm just curious. – Nathaniel Jan 24 '13 at 7:36

I personally use this userscript when I want to make a PDF. I first click the "print" button, then I print to pdf (In chrome, do Ctrl-P and the "PDF" or "print to file" option should be there)

Otherwise, you can Google "MarkDown to LaTeX converter" and use one of those.

• Thanks and +1. It is however not what I am looking for (whereas it is much better than nothing; at least I can have the answers I want copied in .pdf). I would like to be able to include the answers in a LaTeX document (so that I can modify or copy formulas from them). But, again, thanks very much for the link – Eduardo Guerras Valera Jan 23 '13 at 13:21
• @EduardoGuerrasValera: Try code.google.com/p/markdownpp or johnmacfarlane.net/pandoc – Manishearth Jan 23 '13 at 13:25
• thanks very much, I will give that stuff a try. – Eduardo Guerras Valera Jan 23 '13 at 13:39

I suspect you are using a dodgy preamble. It is very hard to know without a minimal example of the kind of tex file you tried to compile.

Why don't you try asking this on tex with an example of what you have tried?

I use ScrapBook addon to achieve these webpages. You can have (almost) exact local copy of them without the Internet.

When you need to copy of the equation, you can click the edit and copy the latex equation, provided that the questions/answers have not deleted on the server. Even they are deleted, you still have the full information for you to type the equation yourself. I guess you wont need to copy their text as your own.