Failing to extend LaTeX with pstricks. Ideas?

25 views
Skip to first unread message

Gabriel Rodriguez

unread,
Jan 20, 2019, 8:48:29 PM1/20/19
to mnemosyne-proj-users
I have successfully added cards to Mnemosyne with LaTeX formatting for basic inline mathematical equations (using MacTeX install).

Now I would like to add some nice plots so I researched the use of the pstricks package.

Per the various docs I found, I updated the LaTeX preamble in Mnemosyne/config.py with:

\usepackage{pdftricks}
\begin{psinputs}
  \usepackage{pstricks}
  \usepackage{multido}
\end{psinputs}

I also updated the LaTeX command to include the switch for shell-execution:

latex = "/Library/TeX/texbin/latex -output-format=dvi -interaction=nonstopmode -shell-escape"

I opened some LaTeX formatted cards in Mnemosyne, and they open with no problem. To test the new package, I create a card front with:

<latex>A Grid!</latex>

and a card back with :

<latex>
  \begin{pdfpic}
    \begin{pspicture} [showgrid=true] (3,3)
      \pscircle[linecolor=blue,doubleline=true,doublecolor=red,doublesep=12pt] (1.5,1.5){1.5}
      \pscircle*[linecolor=green] (1.5,1.5){O.25}
    \end{pspicture}
  \end{pdfpic}
</latex>

The example is from LaTex Graphics Companion by Goosens et al.

When I preview the card, I don't get any errors, just a blank card back.

I considered that maybe shell-escape isn't working because it is being invoded by Mnemosyne and not by me, so at my peril I ran sudo Mnemosyne but there was no change.

Any ideas?

Also, what is the working directory used for LaTeX compilation? Perhaps there is a log file I can dissect.

Peter Bienstman

unread,
Jan 21, 2019, 12:15:45 AM1/21/19
to mnemosyne-...@googlegroups.com
Hi,

I'm on my phone right now, but the log files are in default.db_media/_latex. They will help debugging the issue.

I assume the pstricks package is installed?

Cheers,

Peter



From: Gabriel Rodriguez <gabriel....@gmail.com>
Sent: Monday, 21 January 2019 02:48
To: mnemosyne-proj-users
Subject: [mnemosyne-proj-users] Failing to extend LaTeX with pstricks. Ideas?

--
You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mnemosyne-proj-u...@googlegroups.com.
To post to this group, send email to mnemosyne-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/ea0af26f-9214-438e-9705-14ed2b4a008a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gabriel Rodriguez

unread,
Jan 21, 2019, 1:41:51 PM1/21/19
to mnemosyne-proj-users
Thank's for providing the work directory.  

It looks like it is indeed a problem on the LaTeX side.  

Paraphrasing, the error is "ps2eps command not found" which is odd because it is in /texbin which is in my path. 

I'll bang my head for awhile before asking on a LaTeX forum.
Reply all
Reply to author
Forward
0 new messages