# Save the answer in TEX?

Lot of answers here are excellent but there is no way to save it in LaTeX format. Even if we can put them in favorites or print them or save as pdf .

Also on meta : Save the answer in PDF? but this discussion is about saving to pdf, the best solution utilize https://stackedit.io/ but it only provides save to markdown, html, or pdf.

• click the edit button, copy the source into a tex file, add you favorite preamble – Grigory M Jul 9 '14 at 10:53
• Have to do this for every reply – athos Jul 9 '14 at 10:57

The comment "click the edit button, copy the source into a tex file, add you favorite preamble" is a slight oversimplification. Consider bold and italic fonts, quotes and spoilers, links and images, strikethrough and colors, bulleted and numbered lists, HTML entities (accented letters, etc), underscores and ampersands in text, and the fact that MathJax tolerates some things that LaTeX will not (e.g., \begin{align} ... \end{align}).
• @user151558 The problem is that TeX processors require definitions to be in topmatter (before \begin{document}), while MathJaX (for lack of topmatter) is okay with them being in a formula within the document. I'll try to come up with a way to extract definitions and put them where they belong. For now, the fix is to copy-paste the \def manually to the beginning of file, removing the surrounding . Compiles after that. – user147263 Aug 24 '14 at 0:40