# Bug in latex copying

+ 2 like - 0 dislike
41 views

When copying something containing a formula, it sometimes happens, for example here:

http://www.physicsoverflow.org/34796/parameter-seiberg-rangle%24-discussion-variant-parameter-general?show=35049#c35049

(in the quote at the top) that the copied formula suffers from a repetition problem. I had seen the same problem on PhysicsForums, so it seems to come from a common source.

asked Jan 15, 2016 in Bug
edited Jan 15, 2016

+ 3 like - 0 dislike

The common source of this issue is MathJax and the copy system of your browser. Formulas written as MathJax tags get parsed by MathJax and then replaced by complicated mixture of HTML tags and style sheet commands (CSS). When you copy text containing such "styled" formulas, the browser copies the selected text in different formats (text, unicode text, html tags, and some more). But the clipboard sometimes does not understand this exotic mixture and constructs the best it can, which by unknown reasons sometimes doubles the content, at least in the formats that our editor understands. There is no workaround or code I can provide to prevent this behavior.

However, there are two possible ways I know to securely copy and paste formulas on PhysicsOverflow:

1. Right-click the formula, select "Show Math As" and then "TeX Commands". Select the text displayed and copy it. Then paste it into the editor and add dollar signs, as usual. I am not sure if this method works in all browsers.
2. Edit the post containing the formula using our editor, copy the MathJax tags there and paste them into the editor containing your new post. Maybe you have to open two tabs on your browser for convenience.
answered Jan 15, 2016 by (0 points)

 Please use answers only to (at least partly) answer questions. To comment, discuss, or ask for clarification, leave a comment instead. To mask links under text, please type your text, highlight it, and click the "link" button. You can then enter your link URL. Please consult the FAQ for as to how to format your post. This is the answer box; if you want to write a comment instead, please use the 'add comment' button. Live preview (may slow down editor)   Preview Your name to display (optional): Email me at this address if my answer is selected or commented on: Privacy: Your email address will only be used for sending these notifications. Anti-spam verification: If you are a human please identify the position of the character covered by the symbol $\varnothing$ in the following word:p$\hbar$ysicsOverfl$\varnothing$wThen drag the red bullet below over the corresponding character of our banner. When you drop it there, the bullet changes to green (on slow internet connections after a few seconds). To avoid this verification in future, please log in or register.