Thanks Peter, dvipng from the command line yeilds the same results, so the problem is in LaTeX. Indeed, the LaTeX-community.org group agrees (link below) that dvi is not a good format for this file output, and that pdflatex is a better solution.
In fact, the command pdflatex tmp.tex produces the correct output pdf file, while latex tmp.tex, produces the goofy dvi, seen in the image in my original thread. So I have a new question: is there a workaround within the framework of Mnemosyne that can run pdflatex to produce a pdf file, and then convert the pdf file to a .png that will be immediately available, as in dvipng? I was thinking of modifying the dvipng command or the latex command in config.py to run pdflatex, then pipe the output pdf to imagemagick to convert the pdf file to png, but the details far elude my ability. Ideas? By the way, this workaround might make a useful plug-in for folks who create images using latex that aren't suited to dvipng. the referenced link: http://www.latex-community.org/forum/viewtopic.php?f=46&t=12881 Regards, -John. On Oct 5, 6:31 am, Peter Bienstman <[email protected]> wrote: > Hi John, > > I would try to debug this outside of Mnemosyne, as this really seems like a > latex issue. > > Don't use Texworks (as this is not used by Mnemosyne), but rather from the > command line, try typing the following two command in the correct directory: > > latex -interaction=nonstopmode tmp.tex > dvipng -D 200 -T tight tmp.dvi > > These are exactly the same commands that Mnemosyne uses as well. > > If these commands generate a correct png image, then it's a mnemosyne problem. > > If these commands don't work, then it's a problem with your latex/chemfig > install, and you're better off asking on their mailing list for help. > > Hope this helps, > > Peter > > On Tuesday, October 04, 2011 10:29:46 PM John Terex wrote: > > > > > > > > > > > Hello, > > I'm trying to write chemical formula using the LaTeX package chemfig. > > I have added the //usepackage{chemfig} to my config.py preamble. I > > have added the chemfig package using the MikTeX package manager. I > > have rebooted my machine. I have removed all existing .png files. > > Here's my problem. I am attempting to write a very simple chemical > > formula: H-C~N, where the ~ represents a triple bond. I write the > > following formula on the front of the card: <latex>\chemfig{H-C~N}</ > > latex>, and press the preview button. > > The resulting preview superimposes the H,C, and N all on top of one > > another, with none of the chemical bonds (see image). > > > Troubleshooting: > > > the cmd.exe releases the following error multiple times: < raw > > PostScriptdvipng warning: PostScript environment contains DVI commands > > dvipngwarning: PostScript environment contains DVI comands > > dvipngwarning: No image output from inclusion of raw PostScript > > > > the tmp.dvi file does not render the molecule correctly either. It > > also superimposes the atoms, but also includes some super-streched > > bonds going off in a diagonal. (see image) > > > the tmp.tex file outputs normally (see image): > > \documentclass[12pt]{article} > > \usepackage{chemfig} > > \pagestyle{empty} > > \begin{document} > > \chemfig{H-C~N} > > \end{document} > > > The tmp.tex file compiles and outputs the correct file in .pdf format. > > (see image) > > > image: > >https://picasaweb.google.com/lh/photo/caK51waIx0sO6jkT3ebAaw?feat=dir... > > nk > > > I am a new user to both LaTeX and Mnemosyne, and I've exhausted my > > ability to solve the problem with Google searching. Any idea why > > TeXworks will generate the correct .pdf, yet Mnemosyne does not > > generate the correct .png? > > > Thanks! > > -John. > > -- > 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: [email protected] -- You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/mnemosyne-proj-users?hl=en.
