scrivener to latex and to ibooks author

I’m trying to create a single scrivener project that will go to latex or to rtf:

scrivener/mmd --> Pages --> iBooks Author

with the least amount of work. The issue is of course dealing with mathematics. [Why, you might wonder, am I doing this? Well, partly to see just how creative I can be in ibooks…I’m intrigued by it as a textbook creator. But of course the requirement of an iPad makes it impossible to actually use that neat tool in a college classroom since I really cannot mandate that the class textbook requires an iPad. So I need to get the content available to those without. The pdf export in ibooks author is intentionally crippled in some ways. Really. Apple…an ibooks application for mac/pc, ala Kindle is really necessary in order to use it in classrooms. Done ranting. BTW I’m also thinking of submitting a few chapters of this to a publisher, hence the real reason for the latex output.]

My need is to be able to pass a LaTexit equation image into ibooks author, but also pass the real Latex equation instructions to Latex without the image. So what I find myself doing is:

Where after the comment % is the equation image. Latex ignores the image as behind a comment symbol and processes the equation as expected. In ibook author I have to then delete the characters around the image. If I have two of these, I need to do a carriage return because latex will comment out everything after an in-line equation.

By the way, I have to do the Pages intermediary since ibooks author will not import from rtf, only Pages an Word.

Ray

What I would try doing is using MMD’s .fodt export instead of RTF (which is really kind of simplistic and not terribly useful for much beyond proofing). Flat ODT files can only be opened in LibreOffice, or a properly patched copy of OpenOffice, but from there you can get to .docx.

Another way you could approach the equation problem is in Scrivener itself. Put the figures in their own text item in the binder, and give them a special label, like “Figure”. Then what you can do when you compile is load the Contents compile option pane, switch on Filter at the bottom, and set it to exclude all items with the “Figure” label for the LaTeX compile.

Meanwhile with the equation code itself, you could use inline annotations for these, if you aren’t using that already for actual annotations. In the compiler Footnotes/Comments pane, you can set inline annotations to use enclosing markers of your choice—which can be set to “” respectively—or—you can strip them out entirely—which is what you’d want to do for the .fodt output.

Does anyone know why the mmd to rtf thing is so limited?
Wouldn’t it be great if it understood things like “>” for indented paragraph, or even the footnote syntax.
Is this technically impossible, or is it just that the mmd people are too focussed on html to get around to it?

Declan the Curious

Technologically speaking, it’s because the tool that is making the RTF is using the HTML version and taking a “snapshot” of it, using textutil. It’s non-semantic, rudimentary, and really only good for basic conversions. That’s why footnotes die, because HTML has no such thing. For proofs its fine, and certainly the easiest “WYSIWYG” result via MMD.

I wouldn’t say that. Have you tried ODT? I feel that’s a very well done output for word processing. In the past, HTML had to be a focus because the engine itself used HTML as an internal translation engine. So the quality of the HTML had to be paramount; all other formats sprang from it. Today, MMD goes directly to ODT, LaTeX and OPML without using HTML as a middle-language.

The problem with RTF is that the designer of MMD isn’t keen on it, and I don’t blame him. It’s an archaic, pre-XML Microsoft spec with a lot of bloat in it. ODF on the other hand is an open standard with a logical internal code structure. Why not use that and let a big bulk word processor get you to RTF if you need it? That’s the idea.

Thanks. Using mmd>fodt seems to be a good idea. Nisus opens the file successfully and everything seems to be imported correctly (on a quick examination). The only thing is to change the extension to odt first.

Declan

That’s good to know that Nisus can open these as well. I’ve been using LibreOffice but that’s a bit clunky. Thanks for the tip.