2
$\begingroup$

Some answers in physics.stackexchange seem to me so extremely brilliant! I would like to join some of the best ones in a single document by copy-paste. How can I do that, preserving the LaTeX code?

(Some of the gems happen even in very innocent questions... I don't know how many people have I already told in the last weeks, about that answer to the question "why the kinetic energy goes as $v^{2}$ " involving two pieces of clay and a thermometer...)

$\endgroup$
2
$\begingroup$

Direct copy-paste works if it's an HTML document in Word. Sometimes.

Otherwise, here's a trick: open about:blank (URL bar), type javascript:document.body.contentEditable=true in the URL bar and hit Enter. Now, copy-paste the LaTeX-formatted stuff. It ought to work. You can type and modify stuff as well. Then, save the HTML document and/or print to pdf. This userscript may help in cleaning up posts for better copy-pasting

Note that you should attribute the owner of each post (see here).


If you want un-mathified LaTeX source:

  • For individual equations: right click, show math as>TeX commands
  • For the whole post: Click "edit", copy-paste the source code to here, see the preview.
$\endgroup$
  • $\begingroup$ Does the trick work in any browser? $\endgroup$ – Qmechanic Nov 23 '12 at 1:47
  • $\begingroup$ @Qmechanic: Pretty much. Older versions of FF and IE won't support it. And FF/IE don't have a built in print-to-pdf, you have to have Acrobat installed. But for all intents and purposes, yeah, it works everywhere :) $\endgroup$ – Manishearth Nov 23 '12 at 1:48
  • 1
    $\begingroup$ That doesn't seem to work (firefox, kubuntu 10.04, java installed) $\endgroup$ – Eduardo Guerras Valera Nov 23 '12 at 13:38
  • $\begingroup$ Isn't there any way to simply make my navigator show latex commands instead of rendered formulas? I remember to have seen it somewhere... $\endgroup$ – Eduardo Guerras Valera Nov 23 '12 at 13:40
  • $\begingroup$ @Eduardo: Right click on the formula, a little menu shows up. Show math as>TeX commands. If you want to see the commands embedded in the post, copy-paste the source (you can find it via "edit"), into the meta.physics "ask question" box, and look in the preview area. That will unmathify everything. $\endgroup$ – Manishearth Nov 23 '12 at 13:47
  • $\begingroup$ @Eduardo: Hmm, yeah, it seems to depend. On Chrome it works, but some formatting is lost... $\endgroup$ – Manishearth Nov 23 '12 at 13:48
  • $\begingroup$ Oh, finding the source via "edit" is nice enough, thanks! (I was thinking I couldn't do it without much reputation). If you add that to your answer, I'll mark it as "answered". $\endgroup$ – Eduardo Guerras Valera Nov 23 '12 at 14:13
  • $\begingroup$ @Eduardo: Done :) $\endgroup$ – Manishearth Nov 23 '12 at 14:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .