Adding images, sounds, mathematical formulas, and three-sided cards

A Note About Vice Versa

Mnemosyne will not show the reverse card until you have learned the forward one.

Adding images

Images can be added to questions or answers.

Right-clicking or pressing CTRL+I brings up a file selection dialog that you can use to choose an image file.

This generates tags of the form <img src="mona-lisa.jpg">. (The path is relative to the location of your *.mem file, although you can use absolute paths too. For easy sharing of databases, we recommend that you put all your pictures somewhere inside the .mnemosyne directory.)

Adding sounds

Right-clicking or pressing CTRL+S brings up a file selection dialog that you can use to choose a sound file.

This generates tags of the form <sound src="a.wav">. (The path is relative to the location of your *.mem file, although you can use absolute paths too). To play the sound again, press CTRL+R in the main window.

Supported file formats are wav, ogg and mp3. On Linux, this requires properly installing pygame and its dependencies like SDL.

Relative Paths

Whether you're adding sounds or images, it's recommended that you use relative paths. To do this, you have to make sure that the path is relative to the location of your database.
Most typically, you have:

.mnemosyne (the directory/folder that stores all your files)
.mnemosyne/default.mem (your card collection)
.mnemosyne/images/a.png (the images in a directory/folder that you want to add-- storing this in your .mnemosyne directory/folder makes it much easier to back up completely!)

The relative path would then be images/a.png

Hiding the Question when the Answer is Shown

For cards with unusually large images (such as the map cards), there is a special tag to hide the question when the answer is shown:

<card style="answerbox: overlay;"/>

Adding chemical and mathematical formulas with LaTeX

LaTeX can render your formulas using tags like <$>x^2+y^2=z^2</$>.

For this, you need LaTeX and dvipng installed. Windows users can download MiKTeX to achieve the same functionality.

The error output of LaTeX gets saved to the file .mnemosyne/latex/latex_out.txt.

Achieving more control over LaTeX

The <$>...</$> tags use LaTeX's inline math environment, but there are two more tags:

  • The <$$>...</$$> tags for centered equations on a separate line (LaTeX's displaymath environment)
  • The <latex>...</latex> tags for code which is not in any environment, but just embedded between a typical latex pre- and postamble.

By the way, you can edit what goes into the pre- and postamble by delving into your .mnemosyne/latex directory and editing the aptly named preable and postamble files to your heart's content. While you're there, feel free to edit the dvipng file as well.

Note: if you have problems with latex under OSX, add a PATH node with value "$PATH:/opt/local/bin" according to the procedure described here.

Three-sided cards

Three-sided cards are useful when dealing with vocabulary in foreign scripts easier. When learning foreign words, one often needs to recall the word, the meaning, and its pronunciation-- hence, three sided cards for the three difference aspects.

To add three sided cards, right-click on the text field in Add cards. Then, choose the option to switch to 3-sided card input, which replaces the question and answer fields with three fields: written form, pronunciation, translation.

After selecting an initial grade, 2 cards will be added:
Q: written form
A: pronunciation
translation

and
Q: translation
A: written form
pronunciation

Future versions of Mnemosyne will make sure that a change you make in one pair of the set is automatically reflected in the other one.

Latex and OS X

Note: if you have problems with latex under OS X, add a PATH node with value "$PATH:/opt/local/bin" according to the procedure described here.

This is wrong and will cause things to break in OS X. Variable are not expanded in the environment.plist, so your PATH will end up set to $PATH:/opt/local/bin which is obviously not what you are looking for. So if you are going to use the described method you have to specify the full path yourself. Also if you are planning to use this method I use /etc/launchd.con instead of messing with plists. Just put setenv PATH $PATH in that file and reboot.

But I recommend instead setting your path correctly in Terminal.app and then running open -a Mnemosyne. Applications launched from Terminal will inherit the environment they were launched from.