Helper for Images, Removing Formatting, Cloze and Microsoft Word [AutoHotkey, Windows]
Source:
A continuation from http://sourceforge.net/forum/message.php?msg_id=4956853
If you haven't changed the Word keyboard shortcuts from Ctrl-F9 for New Field and F9 for Update Field, you can use the compiled EXE version if you like and don't want to install AutoHotkey(more info). Otherwise, please feel free to edit the script to your purposes.
Description:
Download includes both the compiled EXE and the original AutoHotkey script so you may tailor it to your needs.
How to use:
- Insert Image: press Ctrl-Shift-I to bring up a Select Image dialog. A Mnemosyne-friendly image tag will be inserted and in Word, the image will be inserted as well.
- Cloze: Select text and press RightCtrl-/ (the ? key) and the text will be replaced with ??? and pasted in the next field
- Paste plain text: press RightCtrl-V [Fixed June 2, 2008]
- Copy to Notepad and Save as UTF-8 (experimental): Press Ctrl-Shift-C
New features June 2, 2008[Download Below]:
- Pasting plain text with RightCtrl-V now preserves unicode characters!
- In Word templates, row numbers are formatted as hidden text. To import into Mnemosyne, simply select the table and press Ctrl-Shift-C (if you're using the helper script) or copy and paste into Notepad manually. The hidden row numbers won't copy, which I find desirable. Copying a table right into Notepad gives you each column separated by a Tab and each row on a separate line. (NB: No paragraph marks in Word tables!)
- New Simple Q&A Table Templates for Word 97-2003 & 2007
- Pretty Purple Template is now for Word 2007 only, because the alternating rows don't translate to previous versions of Word well.
New features May 25, 2008 [Download Below]:
- Ctrl-Shift-I now copies the image to a folder in your .mnemosyne folder corresponding to your current collection and produces relative img tags to that copy... much better portability!
- Other little tweaks
New features May 20, 2008:
- Adding an image in Microsoft Word with Ctrl-Shift-I now also includes manual line breaks that are hidden, so copying text (convert from table first, if appropriate!) into Notepad will skip these hidden line breaks so easier importing of a tab-delimited txt file into Mnemosyne
- New command: Ctrl-Shift-C copies text and opens a new Notepad document, pastes the text, and prompts you to save it in UTF-8 encoding
- Paste plain text: Right Ctrl-V pastes clipboard content without white space or line breaks (sadly, not Unicode-aware)
- Right Ctrl-/ for tables: Cuts the selected text, replaces it with "???", tabs to the next field, and pastes
Special Notes:
- Please turn off smart quotes AutoFormat as you type in Word; it screws with the img tags for Mnemosyne.
- You might have to display Hidden Text in Word for the manual line breaks to work
- Saving to a plain text file within Word itself sadly converts the hidden line breaks into real line breaks, which can screw up the file for importing into Mnemosyne
|
Getting Images
I've tried some different screen capture utilities, and I like MWSnap, fwiw.
Tip for Word
Saving to a plain text file within Microsoft Word will convert "hidden" text to normal text in the new .txt document (see note #3 above). However, copying from Word and then pasting into Notepad ignores hidden text. You can format as hidden line breaks and numbering that you don't want in your .txt file to be imported into Mnemosyne. You can thus copy into a new Notepad document and save that as a way to remove unwanted text. I noticed that tab characters inserted after automatic numbering do get pasted into Notepad even if they are formatted in Word as hidden (clearly, a Word bug); this does not happen if you format the automatic numbering using spaces. I've uploaded above a template for making Q&A Tables (2 files in archive: .dot for Microsoft Word 97-2003 and .dotx for Microsoft Word 2007), where the rows are numbered but copying and pasting the whole table into Notepad desirably ignores the hidden numbering and its spacing.