How to past the text without formatting loss in MathType editor - mathml

I would like to convert the 'text to MathType' in word document.
For example I have already keyed the text "A2 + B2 = C2", instead of keyed in MathType editor. So I have tried to copy and paste that text into MathType editor, while doing so the superscript's style is lose in that content, i.e. it past like A2 + B2 = C2.
Is there is any option to convert the text into MathType without formatting lose? Or paste the text into MathType Editor Window without formatting lose?

It's important to know 1) how did you "key the text..." (i.e., in Word's equation editor, or just using styled text in Word), and 2) are you using Windows or Mac?

I have finally got the answer from Design Science, it is bug in older version5.2 MathType editor. However they said it has been fixed in new version MathType editor, but I have to test it!

Related

markdown insert tabulator (R)

Is there a way to insert tabulators in R markdown code?
I just want to show sth. like
attendees: 33
sick leave: 1
presenters: 5
Text is Markdown text, numbers are inline R code. Simply putting spaces does not work, since there is a variably spaced font.
Ideally working for both HTML and PDF output. (I work on Win-10 in RStudio)
All my searches ended up in (a) creating markdown tables (too big), or (b) how to create tabs for tabbed browsing, much more complicated. I tried \t and \t, does not work.
I use either the RStudio add-in BeautifyR which has a nice Beautify Table. Got the top banner under Tools there is the Add-ins button load BeautifyR.
Then there is also using Kable. Look for the R packages and install: knitr::kable and kableExtra.

Right to left languages in R and ggplot

I am trying to get Arabic text to display correctly in R on a Mac. Currently when i produce plots in Arabic, i have to switch to Windows. Windows correctly displays Arabic in R. However in Mac, I can't get Arabic to display right to left.
I have tried using various Unicode escape characters to no avail. My understanding was that these characters are supposed to force a reading from right to left.
example1 <- data.frame(item = "مرحبا")
example1$item <- paste("\u202B", example1$item)
ggplot(example1, aes(item)) +
geom_bar() +
theme(axis.text.x = element_text(size = 25))
The title should like thusly: مرحبا.
I know that others have been able to fix this problem by using plotly package, which will correctly display Arabic text. But if the Arabic text is longer than one line, plotly won't display it properly wrapped over two lines. So I am looking for a solution that involves fixing the encoding.

Copy text from RStudio console as "plain text"

Is there a simple way to copy the selected output in RStudio's console as plain text?
For example, I have this output:
And then when I select it and copy it to another application (e.g. MS Word or WPS Office) I always get this ugly format with it:
I know I can "Keep text only" in MS Word (e.g. pressing Ctrl-T right after pasting) and similar options in other applications, but I wish there were a single hotkey, or if I could just convert all output in RStudio console to plain text by default (because I have no use for its formatting anyway).
IN Addins menu, there is an option to copy value/output to clipboard.
Please see clipr
Or you can capture console output and write output to clipboard.
to_clip_board <- function(x){
message(paste(
as.character(substitute(x)), "written to clipboard."
))
write.table(
paste0(capture.output(x),collapse = "\n"),
"clipboard",
col.names = FALSE,
row.names = FALSE
)
}
> to_clip_board(iris)
> to_clip_board(data.frame)
I just found a solution that works at least on my present OS, Linux Mint (19.3): Just select text and click with middle mouse button to the place (e.g. in WPS Office or LibreOffice) where you want to copy-paste the selected text. It will instantly copy and paste the text without formatting. (If you want to copy first, click with middle mouse button on the selected text, and then click again with middle mouse button to the place where you want it pasted.)
Others have said that the Ctrl + Shift + V should paste without formatting too, but that didn't work for me. This combination is supposed to also work on Windows in many applications. Otherwise for Windows you can download PureText that makes copy-paste without formatting super easy.
(In retrospect I realize this is not necessarily an R or RStudio question, but rather a more general OS clipboard issue. Nonetheless I needed it for R only, so I'll leave the question unchanged: there might be better and more general R-specific solutions in the future, such as making all console output plain text.)

R' Built in Editor - How to keep destination formatting font when copy and pasting from a different source?

In R's built in editor, when I copy and paste text from another source, the font size, type, etc usually changes. This doesn't happen in RStudio, which retains the destination formatting. Hence, I usually have to copy and paste text first into a text document, then into R's built in editor. I was wondering if there was a way by default to have R convert whatever text I paste in as the default text format? Thanks.

How to write text in jupyter / ipython notebook?

Here is an example of IPython notebook in which besides the input and output cells we have a plain text. How can I do the same in my IPython notebook? At the moment I have inly In and Out cells.
Change the cell type to Markdown in the menu bar, from Code to Markdown. Currently in Notebook 4.x, the keyboard shortcut for such an action is: Esc (for command mode), then m (for markdown).
As it is written in the documentation you have to change the cell type to a markdown.
Step 1: Click on the '+' to create a new cell, type some text in, and select 'Markdown' in the dropdown
Step 2: It should now look like this:
Step 3: Click anywhere in the cell and click on 'Run'. Now it looks how you expect it to.
Simply Enter Esc and type m it will convert to text cell.
Adding to Matt's answer above (as I don't have comment privileges yet), one mouse-free workflow would be:
Esc then m then Enter so that you gain focus again and can start typing.
Without the last Enter you would still be in Escape mode and would otherwise have to use your mouse to activate text input in the cell.
Another way would be to add a new cell, type out your markdown in "Code" mode and then change to markdown once you're done typing everything you need, thus obviating the need to refocus.
You can then move on to your next cells. :)

Resources