How can I quickly capture a websites MathML to use in Word? - mathjax

I create mathematics workbooks in Microsoft Word. Typing in each equation is slow but faster than LaTex. So, I often copy content from a website like LibreTexts. If I copy a section that contains equations it comes out garbled. So, I go to each equation, right click, hover over Show Math As, select MathML code, select all (Ctrl+a), copy (ctrl+c), close window (Ctrl+w), go to word (Alt-Tab), paste as plain text (Ctrl+Shift+v), go back to Chrome browser (Alt-Tab), then repeat the process.
This can be faster than typing by hand, but there has to be an easier way. There was a post similar to this one, but I don't know what extension was referred to and I don't know java.
If your solutions contains the step "learn basic Java here", that is fine. If this is the incorrect Stack Exchange, please suggest the correct one.
Thank you.

Related

2 spaces indentation in google Docs

To prepare an exam, I have to learn coding using google docs rather than using an IDE. It may seem idiot or impratical but the teacher really insists on that. It seems that is the same thing as Google interviews for example...
So far, I really got used with using two spaces indentation (I hate using tab indendation). And I want to learn how can I do that quickly in Google docs. Is there a shortcut or a "tips" (add-on?) for that?
For example, if you have an "if-condition" starting at the position number 4 and you want to move to the following line, it can be really convenient to have the cursor position at 4. Then, you'll add two spaces to start your block at position number 6. (ALL the if block will have at least position 6). But in Docs, when you move to the following line, the cursor always start at the beginning of the line except if you use the tab indentation. And it's really shitting if you want to indent your code properly...
Do you have a solution for that please ?
I was facing the same problem.
To write Python code in google docs, my solution is:
Switch off auto-capitalization, auto-correction and smart quotes. And other auto-substitutions so that you may write code without docs like formatting.
To do this: Tools> Preferences and uncheck the above items. Screen shots attached below.
Set tab to two spaces.
Right-click on ruler on top of page. Add left-tab stop, an arrow will appear, move this tab stop to 2 spaces from left of ruler. Try adding tab in the current line and if the tab size is OK, save this formatting.
To save:
Format > Paragraph Styles > Normal Text > Update 'Normal Text' to match.
Last, to add color(synatx highlight), you may use 'code blocks extension'.
Click install.
Now, write code in docs, select the code in google doc, click on:
Add-ons > Code Block. A pop up opens up.
Choose language : 'python' for me.
Choose theme: 'atom-one-dark'
click Format.
The code looks much like IDE, and writing more code is easier too.
While I understand that sometimes a point can be made by making students do things in a way that might not seem logical, this one doesn't make any sense to me.
Students don't learn anything useful by pressing space twice instead of letting an editor or IDE do it for them.
I wonder, is it because he/she wants it delivered in Google Docs or because they want you coding that way? If it's the latter, you won't have to hide your workaround.
I can only suggest using a good text editor, I always use the excellent and free Notepad++, and copy and paste it to and from Google Docs. Your instructor will never know. In fact, I'd be hunting around to see of there was a way to access your code files directly in Google Docs from Notepad++, or to auto-sync a folder with Google docs.
Notepad++ has syntax colouring - which will save your life - and can be set to indent with tabs or spaces to whatever indent width you specify. If not using an IDE, I only use Notepad++.
Your instructor sounds like some I had, people who cross a line from being quirky but with a point to make to just being a dick. There is absolutely no point in telling a student to code only in Google docs. Google docs is a great thing, I love it, but it is by no stretch of the imagination a coding tool.
(I see that this is an aged thread, but I'll respond in case someone else with a similar issue - like this year's class for that course - comes looking for an answer.)
You could try (ab)using bulleted lists:
Insert a bulleted list
Right click on the bullet, select "More bullets..."
In the "Symbol" selection list, choose "Format & whitespace" and select one of the whitespace options as bullet char
Repeat for as many levels (of bullet sub-lists) as you think you may need in your program
Fix indentation to match whatever feels best for you
Every time you need to write a nested block, you will have to press "tab" only once, then bullet list level is kept and the indentation with it. To go back to the outer block, just press shift-tab.
However, IMHO it doesn't worth the trouble. Generally, interview question solutions are not that large and hitting spacebar a couple of times is not much of an overhead.
It's somewhat cumbersome but you can set as many tab stops as you want, and docs will move nested tabs to the next tab stop as well. For example:
You can add tab stops by right clicking on that tab bar where you want the tab stop to be and clicking Add left tab stop. You'll want to have all text in the document selected if you want the tab stop to apply everywhere.

How to NOT Display the URL/Location of a Browser Bookmark

I have a javascript link (works like a plugin, but not plugin, it's just a javascipt link), the user can just drag and drop the link to it's bookmark bar.
Everything is working, but when the URL/location link is too long, it's very annoying that when the use mouses over the bookmark, it will also show the URL/Location link.
So is there a way not to display the URL/Location link when mousing over?
It would be better if we can display a customized description;
It would be better if it works for all major browsers;
It would be better if it's cross-platform;
Any reasonable suggestions or even hacks are also welcomed as long as it will improve the user experience.
Thanks.
So is there a way not to display the URL/Location link when mousing over?
Not without modifying the browser at a deep level. And if you are going to do that, you don't need to use a bookmarklet.
But you can add a comment to the code to explain it.
Example:
javascript:/*--A-very-short-description--*/document.location=...
I choose to use - instead of spaces because spaces are encoded to %20, which is much worse that - for reading.
This won't hide the code, but it does make the bookmarklet slightly more friendly.
Using this, there is a slight trick that in Firefox and maybe other browsers that sort of "hides" the code. Firefox shows only the beginning and ends of the code, not all of it. So if you code begins and ends with a comment, you can effectively hide the code.
Approximate example:
javascript:/*------------------------*/document.location=.../*------------------------*/
In Firefox this will look something like "javascript:/------------...--------------/"
You can experiment with the details to get the desired result.

MonoTouch.Dialog's OwnerDrawnElement highlight not working

I am using MonoTouch.Dialog's OwnerDrawnElement, but it doesn't seem to allow the user to 'highlight' the cell when touching the screen. I've looked at the sample, but it doesn't show the highlighting. Any suggestions?
I noticed that TweetStation doesn't seem to user OwnerDrawnElement. Should I take another approach? I need to create a custom display cell much like TweetStation.
The OwnerDrawnElement was a contribution from the community, and it is not as sophisticated as it should be. I would not depend on it for anything beyond the trivially basic.
I strongly recommend that you create your own Element, if you want to reuse some of the code for OwnerDrawElement, you could copy and paste that.

How can I insert text into another application?

To scratch a personal itch, I'm writing something like a cross between a character map and an on-screen keyboard. When the user selects a character, I'd like to insert it into another application, specifically, the application that would next receive focus if my application were closed. Is there any way to do this? Right now, I work around it by just putting the character into the clipboard and terminating, leaving the user to hit paste in the other application, but usage would be far more streamlined if I could just insert the text programmatically.
I'm doing this in GTK and expect to run it only on Linux. But cross-platform solutions are also appreciated, and if GTK can't do it but some other toolkit can, I'll gladly switch.
This sounds like you should use libwnck, which is a GTK-related library that lets you manipulate windows on the desktop. The documentation is a little sparse, but the function wnck_screen_get_previously_active_window() seems promising.
From a WnckWindow you can get an X window ID, and perhaps from there you can use the X libraries to send a paste message (or even send it a "Ctrl-V" keypress event), perhaps with XSendEvent().
Very good question, by the way. I wish I could answer it more knowledgeably.

Is there a text editor that displays a file in more than one column

I have a wide screen and I would like to see the code I edit on multiple columns, like an article in a news paper. Ideally I would want the full screen filled with the content of the file I edit.
I am not interested in displaying multiple views of the same file in multiple windows, that's a different feature.
Have a look at Follow Mode (Mentioned in this post).
Otherwise, have you considered putting your widescreen in pivot-mode? It' quite useful both for coding and web-browsing! :)

Resources