CopyToClipboard
CopyToClipboard[expr]
replaces the contents of the clipboard with expr.
Details
- The expression expr is evaluated and typeset before being copied to the clipboard. To copy a textual form, specify a string or InputForm[expr].
- CopyToClipboard[Defer[expr]] copies the unevaluated form of expr.
- CopyToClipboard["string"] copies the contents of "string" as plain text.
- The expression expr can be any expression, including those that represent notebooks or cells.
- CopyToClipboard supports typeset expressions, such as StandardForm and TraditionalForm.
- When pasted in between cells, the results of CopyToClipboard will be at the highest fidelity. Style or formatting information may be lost when pasting into an existing cell or when pasting into an application other than the Wolfram System.
Examples
open allclose allBasic Examples (4)
Copy a simple expression to the clipboard:
Use Defer to copy an unevaluated form of the expression:
Copy the StandardForm representation of an expression:
Copy the InputForm representation of an expression:
Generalizations & Extensions (2)
A series of discrete cells can be copied by using DocumentNotebook:
onetwoApplications (2)
Properties & Relations (1)
Possible Issues (2)
Evaluation of expressions can have unexpected effects such as reordering the copied result:
All such effects can be prevented using Defer:
When CopyToClipboard receives a string with embedded typesetting, it is copied using linear form:
Text
Wolfram Research (2010), CopyToClipboard, Wolfram Language function, https://reference.wolfram.com/language/ref/CopyToClipboard.html.
CMS
Wolfram Language. 2010. "CopyToClipboard." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CopyToClipboard.html.
APA
Wolfram Language. (2010). CopyToClipboard. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CopyToClipboard.html