Mnemosyne + LaTeX on Mac OS X?

587 views
Skip to first unread message

Notyourbroom

unread,
Sep 12, 2008, 3:07:14 PM9/12/08
to mnemosyne-proj-users
Hi there,

For one of my current university courses, I will need to memorize a
number of equations. I have never used LaTeX before, but I have heard
good things about it and would like to try using LaTeX-formatted cards
in Mnemosyne.

Without really knowing what I was doing, I installed BasicTeX from
here:

http://www.tug.org/mactex/morepackages.html

Then, I tried the sample formula given here:

http://www.mnemosyne-proj.org/help/adding-media.php

and here was my output:

"Problem with latex. Are latex and dvipng installed?"

I searched for dvipng but I did not see anything for Mac OS X.

I am an absolute beginner at this, so any help would be
appreciated :)

I saw another Mac user's experience was "Mnemosyne does use my Latex
installation, which is great":

http://www.mnemosyne-proj.org/help/compiling-mac-os-x-1.php

so I'm sure I'm just missing something basic :)

Best,
Bill

Peter Bienstman

unread,
Sep 13, 2008, 2:08:47 AM9/13/08
to mnemosyne-...@googlegroups.com
I don't have a Mac, so I can't help, I'm afraid, but perhaps one of the Mac
gurus on this list can help out.

Peter

--
------------------------------------------------
Peter Bienstman
Ghent University, Dept. of Information Technology
Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium
tel: +32 9 264 34 46, fax: +32 9 264 35 93
WWW: http://photonics.intec.UGent.be
email: Peter.B...@UGent.be
------------------------------------------------

Oisín Mac Fhearaí

unread,
Sep 13, 2008, 6:24:44 AM9/13/08
to mnemosyne-...@googlegroups.com
2008/9/12 Notyourbroom <notyou...@gmail.com>

and here was my output:

"Problem with latex. Are latex and dvipng installed?"

I searched for dvipng but I did not see anything for Mac OS X.

Hi,

What is the output of "latex -version" and "dvipng -version" in Terminal? I don't know about BasicTeX, but presumably it should provide these programs.

I got mine via either port or fink, a package management tool like apt-get for OS X. Possibly some other latex distributions include it (http://www.tug.org/mactex/ ?).

Good luck,

Oisín

Felix Engel

unread,
Sep 13, 2008, 1:18:02 PM9/13/08
to mnemosyne-...@googlegroups.com
Hi,


> 2008/9/12 Notyourbroom <notyou...@gmail.com>
> and here was my output:
>
> "Problem with latex. Are latex and dvipng installed?"
>
> I searched for dvipng but I did not see anything for Mac OS X.


this seems to be a problem with PATH settings. From what I see, these
binaries should exist somewhere in
/usr/local/texlive/2008basic/bin/i386-darwin.
So start the Terminal application and type
/usr/local/texlive/2008basic/bin/i386-darwin/dvipng
If something happens you have installed latex correctly.
Now you can type into the Terminal
export PATH=/usr/local/texlive/2007/bin/i386-darwin:$PATH
and then type
/Applications/Mnemosyne.app/Contents/MacOS/Mnemosyne
Now mnemosyne should start and you should be able to use the latex
tags as documented.

Please report back any successes or problems.

Regards,
Felix

>

Notyourbroom

unread,
Sep 13, 2008, 2:12:46 PM9/13/08
to mnemosyne-proj-users
First off: it seems to work, though there are some issues still :)

dvipng does not seem to come included with the basic installation; /
usr/local/texlive/2008basic/bin/universal-darwin directory does not
have dvipng.

So I installed the 1+ GB non-basic version, and I was able to find
dvipng here:

/usr/local/texlive/2008/bin/universal-darwin

I then ran the following:

export PATH=/usr/local/texlive/2008/bin/universal-darwin:$PATH
/Applications/Mnemosyne.app/Contents/MacOS/Mnemosyne


And I was then able to see the TeX-formatted output.

However, I then tried quitting Mnemosyne and re-launching it, and
while I could still view the equation I had rendered previously, I
would again get the "Problem with latex. Are latex and dvipng
installed?" error message if I edited the card. (In other words, new
input could not be rendered if Mnemosyne was not launched with those
terminal commands.)

I then tried copying the dvipng file to /Applications/Mnemosyne.app/
Contents/MacOS/Mnemosyne (not knowing what I was doing) but that did
not work.

Do I always need to launch Mnemosyne from the terminal using those
commands whenever I want to add a new TeX-formatted card, then?

Thank you for your assistance :)

On Sep 13, 1:18 pm, Felix Engel <Felix.En...@fcenet.de> wrote:
> Hi,
>
> > 2008/9/12 Notyourbroom <notyourbr...@gmail.com>
>  smime.p7s
> 3KViewDownload

loto

unread,
Sep 13, 2008, 11:28:07 PM9/13/08
to mnemosyne-proj-users
Hey all, I'm struggling with the exact same problem. I also am a
total beginner to latex....the thing is, there is a latex folder
containing a dvipng file within the mnemosyne directory but it
apparently can't find it....any ideas?

Felix Engel

unread,
Sep 14, 2008, 6:15:00 AM9/14/08
to mnemosyne-...@googlegroups.com
Hallo Loto,

Am 14.09.2008 um 05:28 schrieb loto:
>
> Hey all, I'm struggling with the exact same problem. I also am a
> total beginner to latex....the thing is, there is a latex folder
> containing a dvipng file within the mnemosyne directory but it
> apparently can't find it....any ideas?

The dvipng file in the mnmosyne is not the executable itself. I only
contains some information about how to call that. So you will
probably need to install a latex distribution (see the links in
notyourbroom's mails) and then you will also need to set your machine
up as described in my mail(s) to notyourbroom.

Regards,
Felix

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "mnemosyne-proj-users" group.
> To post to this group, send email to mnemosyne-proj-
> us...@googlegroups.com
> To unsubscribe from this group, send email to mnemosyne-proj-users
> +unsub...@googlegroups.com
> For more options, visit this group at http://groups.google.com/
> group/mnemosyne-proj-users?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Felix Engel

unread,
Sep 14, 2008, 9:03:58 AM9/14/08
to mnemosyne-...@googlegroups.com
Hi,

Am 13.09.2008 um 20:12 schrieb Notyourbroom:

>
> First off: it seems to work, though there are some issues still :)

Good!

>
> dvipng does not seem to come included with the basic installation; /
> usr/local/texlive/2008basic/bin/universal-darwin directory does not
> have dvipng.

That's interesting - maybe that should be noted somewhere in the
documentation?

>
> [...]


> And I was then able to see the TeX-formatted output.

Very good!


>
> However, I then tried quitting Mnemosyne and re-launching it, and
> while I could still view the equation I had rendered previously, I
> would again get the "Problem with latex. Are latex and dvipng
> installed?" error message if I edited the card. (In other words, new
> input could not be rendered if Mnemosyne was not launched with those
> terminal commands.)

I can point you to a fix for your current setup. You need to set the
variable PATH for your environment. This can be done by editing the file

$HOME/.MacOSX/environment.plist

It is an XML file that contains various environment variables. I have
added the lines
<key>PATH</key>
<string>/usr/local/texlive/2007/bin/i386-darwin/</string>

inside the section that starts with <dict> and ends with </dict>. You
will need to adapt the paths to your installation. If the directory
does note exist, you will have to create it.

I have added my file as a reference.

Regards,
Felix

environment.plist

Notyourbroom

unread,
Sep 14, 2008, 2:52:58 PM9/14/08
to mnemosyne-proj-users
Hello :)

I am afraid I am still having problems.

My $HOME directory (/Users/billprice/) did not have a .MacOSX
directory, so I created one.

I placed the file you provided into the directory and modified the
path to what is correct for my system, namely:

/usr/local/texlive/2008/bin/universal-darwin/

However, this does not appear to have changed the program's behaviour.
Novel TeX inputs are only rendered if I launch the program via the
terminal commands you provided earlier.

To recap... :)

I have the file placed here:

/Users/billprice/.MacOSX/environment.plist

and its contents are:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
&lt;key&gt;PATH&lt;/key&gt;
&lt;string&gt;/usr/local/texlive/2008/bin/universal-darwin/&lt;/
string&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Best,
Bill

Felix Engel

unread,
Sep 14, 2008, 3:05:23 PM9/14/08
to mnemosyne-...@googlegroups.com
Hi,

Am 14.09.2008 um 20:52 schrieb Notyourbroom:

> I am afraid I am still having problems.
>
> My $HOME directory (/Users/billprice/) did not have a .MacOSX
> directory, so I created one.
>
> I placed the file you provided into the directory and modified the
> path to what is correct for my system, namely:
>
> /usr/local/texlive/2008/bin/universal-darwin/
>
> However, this does not appear to have changed the program's behaviour.
> Novel TeX inputs are only rendered if I launch the program via the

Have you tried logging off and then logging in again? If I am
guessing right, then that change will only become active once you do
a fresh login.

BTW, based on this problem I have created a feature request:
https://blueprints.launchpad.net/mnemosyne-proj/+spec/latex-path-
configuration

Regards,
Felix

Peter Bienstman

unread,
Sep 14, 2008, 3:14:15 PM9/14/08
to mnemosyne-...@googlegroups.com
On Sunday 14 September 2008 21:05:23 Felix Engel wrote:

> BTW, based on this problem I have created a feature request:
> https://blueprints.launchpad.net/mnemosyne-proj/+spec/latex-path-
> configuration

Note that you can already set the full path to dvipng now, that's what you can
use the .mnemosyne/latex/dvipng file for.

Is it still needed to have a separate option for the latex path too?

Peter

Felix Engel

unread,
Sep 14, 2008, 3:20:51 PM9/14/08
to mnemosyne-...@googlegroups.com
Hello Peter,

Unfortunately when started by LaunchServices, yes. Setting the path
in the dvipng file in .mnemosyne/... always used the tex files which
were still there from my prior successful try. So I ended up with the
same equation in all cards.

Regards,
Felix
>
> Peter

Notyourbroom

unread,
Sep 14, 2008, 9:02:28 PM9/14/08
to mnemosyne-proj-users
Hi,

> Have you tried logging off and then logging in again? If I am  
> guessing right, then that change will only become active once you do  
> a fresh login.

I am sorry to report that this did not fix the problem :) but you are
right, I should have tried logging off and back on again first.

Because I know I can use those terminal commands to launch Mnemosyne
with proper LaTeX support, this is no longer a major issue for me
personally, so I thank you greatly for helping me to get this far. But
because other people might have the same problem, I am attaching some
images which directly illustrate exactly where I have placed which
files, etc.

I don't know if this could lead to the diagnosis of the issue, but I
hope it will be helpful in some way. :)

Path to the dvipng file illustrated:
http://dl.getdropbox.com/u/118928/dvipng_path.png

Path to the environment.plist file illustrated:
http://dl.getdropbox.com/u/118928/environment_path.png

Contents of environment.plist:
http://dl.getdropbox.com/u/118928/environment_contents.png

Best,
Bill

Oisín Mac Fhearaí

unread,
Sep 15, 2008, 6:46:15 AM9/15/08
to mnemosyne-...@googlegroups.com
2008/9/15 Notyourbroom <notyou...@gmail.com>


Hi,

> Have you tried logging off and then logging in again? If I am  
> guessing right, then that change will only become active once you do  
> a fresh login.

I am sorry to report that this did not fix the problem :) but you are
right, I should have tried logging off and back on again first.
Hi, when you log back on, is the tex path actually in your $PATH? It sounds like the environment.plist thing isn't working for you. I think it was intended for pre-Leopard OSes and might not work properly in all cases.
There are a couple of other ways: see http://discussions.apple.com/thread.jspa?messageID=7846944 - I use ~/.bashrc and /etc/profile (iirc), but the /etc/paths.d/* method looks kind of nice as well.
Oisín

Felix Engel

unread,
Sep 15, 2008, 7:38:11 AM9/15/08
to mnemosyne-...@googlegroups.com
Hi,

On Mon, Sep 15, 2008 at 11:46:15AM +0100, Oisín Mac Fhearaí wrote:
> 2008/9/15 Notyourbroom <notyou...@gmail.com>


> Hi, when you log back on, is the tex path actually in your $PATH? It sounds
> like the environment.plist thing isn't working for you. I think it was
> intended for pre-Leopard OSes and might not work properly in all cases.
> There are a couple of other ways: see
> http://discussions.apple.com/thread.jspa?messageID=7846944 - I use ~/.bashrc
> and /etc/profile (iirc), but the /etc/paths.d/* method looks kind of nice as

Thanks for that link - that is very helpful. Probably you are right
about the change for Leopard. I am on Tiger.

Two more notes, however. One: If you set PATH in ~/.bashrc you run the risk
of overwriting PATH variable. Two: Applications launched LaunchServices
(e.g. via the Dock, via Quicksilver or by double clicking an App Bundle) do
not start a shell and thus do not read ~/.bashrc, so that does not work
(at least not on Tiger).

Regards,
Felix

Oisín Mac Fhearaí

unread,
Sep 15, 2008, 8:06:44 AM9/15/08
to mnemosyne-...@googlegroups.com


2008/9/15 Felix Engel <Felix...@fcenet.de>


Two more notes, however. One: If you set PATH in ~/.bashrc you run the risk
of overwriting PATH variable.
Only if you do it naievely. The usual approach is to use a recursive set (i.e. set PATH=$PATH:/usr/local/tex/bin), although you can sometimes get ever-growing an path variable. In my .bashrc there's a function defined for appending or prepending to PATH, which only adds if the argument isn't already present.
Two: Applications launched LaunchServices
(e.g. via the Dock, via Quicksilver or by double clicking an App Bundle) do
not start a shell and thus do not read ~/.bashrc, so that does not work
(at least not on Tiger).
That's true - for them, the /etc/profile (or possibly ~/.profile, looking at the thread) method might be suitable.

petrs...@gmail.com

unread,
Sep 30, 2013, 5:13:22 AM9/30/13
to mnemosyne-...@googlegroups.com
Or just add the full path to the latex and dvipng commands in the file ~/Library/Mnemosyne/config.py

For me the end of the file looked like this:

# Latex command.
latex = "latex -interaction=nonstopmode"

# Latex dvipng command.
dvipng = "dvipng -D 200 -T tight tmp.dvi"


I am using latex and dvipng from Mac ports, so now these entries look like this:

# Latex command.
latex = "/opt/local/bin/latex -interaction=nonstopmode"

# Latex dvipng command.
dvipng = "/opt/local/bin/dvipng -D 200 -T tight tmp.dvi"

neilb...@gmail.com

unread,
Sep 26, 2014, 9:20:09 AM9/26/14
to mnemosyne-...@googlegroups.com, petrs...@gmail.com

I have a problem with using Latex, I get the same response as Bill. I've gone through the posts in the replies, and I have no idea what they are talking about. Any basic clues on what I should be doing?

Reply all
Reply to author
Forward
0 new messages