I want to generate a LaTeX document from Objective-C and compile it with pdfLatex so that I have an PDF in the end.
Is there a SDK to do this, or do I need to write to file some LaTeX code from a NSString and run pdflatex with a NSTask ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Some work has been done on calling out to TeX. There’s the TeX daemon, which is part of PyTeX, and which looks like it’s doing something like what you need. I’ve seen this system working, but haven’t used it myself and I’m not sure of its current status.
If, on the other hand, you’re after doing this programmatically in order to get equation bitmaps (or something like that, which your question vaguely suggests), then you might be interested in the
dvipngordvi2bitmaplibraries, which skip postscript/PDF entirely.As a general point, when doing things like this in the past, I’ve found it useful to arrange that the LaTeX I generate is pretty high-level, and the detailed layout is deferred to a class or style that you write yourself. That means that you can tune the details of the LaTeX layout while mentally in a LaTeX mode, which ends up less confusing in the end.