Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like programmatically to insert/write an expression at the current insertion point, but matching the current format, such as font size and style, so that it looks like the user typed it. Default use of NotebookWrite[], NotebookApply[] and Paste[] doesn't do this.

For instance if you change the colour in a text cell and press the paste button -> it will paste text in black colour, unlike typing that text yourself. How to avoid this?

Off course, one could set any specific style when using Paste[Style[exp, Red]], but it is unknown here- it is the style at insertion. And the same for Font.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.