I recently bought Scrivener after getting all excited about how it facilitates the writing of long-form documents in a non-linear way. It would be absolutely perfect for me if:
there is a formula editor; and
there is output in TeX/LaTex
I see that the formula editor is being investigated – hope it can be done. The second item above is much harder to do, but if it it happens then…wow!
Did I say that a formula editor would be a really neat idea?
I personally use Scrivener as my main LaTeX editor for the same reasons as yours : the power of LaTeX with the mind-free non-linear editing of Scrivener.
Now with the new Compile tool, you can get Scrivener to output the draft’s folder hierarchy as \section, \subsection \subsubsection commands. I joined my LaTeX compile settings to this post, which does this thing.
For the equation editor, sure it is up to Keith, but I don’t know if this is completely necessary as a built-in tool in Scrivener. There is already the wonderful program LatexIt which is free and helps a lot in editing and typesetting equations. As an example, I joined a screenshot of one of my projects.
I edit my big equations in LatexIt, and then transfer the result as an image and as LaTeX code in Scrivener. It goes both ways : you can also cut-and-paste from Scrivener to LatexIt for edit, and then come back to Scrivener. LatexIt can also be called as a service : so you can type the equations directly in Scrivener, and call the “Typeset LaTeX equation” to convert it to an image. Just keep in mind that the images are removed when you compile to LaTeX code (plain text).
May I ask you: How in the world did you do that? Get LaTeX equations into a scrivener document like that! I keep reading that there is some equation capability in Scrivener now, but I don’t see it in the manual? Obviously, I’m missing something…
I’m not sure where you heard that Scrivener has (or will have) an equation editor, but I second the recommendation to use LaTeXiT. I recommend that even to people with no knowledge of LaTeX and no desire to learn it. If you are using MultiMarkdown, you might as well just paste the equation code in and wrap it in an HTML comment so MMD ignores it and passes it through to LaTeX. If you aren’t using MMD and are exporting to Word or something, then PNGs are good—and I’d save the equations that generated them in a comment attached to the image. Use linked images, so you can update them from outside of the project easily in case errors are found during proofing.
thanks. I think I understand what I was “hearing”…the right-click leads to a services menu that has a variety of LaTeX rendering/disposition choices. I didn’t know the trick of packing LaTeX commands in an html wrapper - that it would pass on to Texshop et al. in that way.
it still feels a little cludgey. Don’t know whether one could imagine writing a book with equations this way or not.
I third the motion for latexit. Using it with externally linked pictures is the best option because that is essentially how it works in M$ word with its equation editor. When it comes time to plop an equation in, word opens the editor program and ultimately pastes the editor object into the document.
I don’t think it’s anymore kludgey to paste a linked image into a Scrivener document than how equations work in the other word processing programs.
The slickest for me, was years ago… pasting live mathmatica objects into appleworks documents… those were the days! Of course, I also had to vectorize my fortran code for the CRAY and that wasn’t fun… would rather be playing strategic conquest.
But seeing live equations was fun.
Well, back to Scrivener and writing… I think you should use whatever equation creation program you are using now and follow Ioa’s advice to paste it into the Scrivener doc as an externally linked image.
None too frequently did I later notice that my stat thermo needed revised but my written explanation didn’t. Or was it vice versa? The same approach works well for diagrams, figures, and tables, which is something I do use frequently now.
Actually, there is another way I use this. I frequently need to explain form document sections to others. The explanation doesn’t change, but sometimes the exact language of the underlying form being explained does. I paste those underlying forms as linked objects. The training document is always up to date with the current forms that way. Nice. This would work the same way with your equations.
Just to answer your question “how did I do that”, I made a small recording of my workflow. It works very well for me and I do a LOT of complex equations in complex documents. I hope it works for you too.
Yes, LatexIt adds those services. You can also revert from an image to the text source, but in my case it isn’t necessary since I always keep the source below the rendered equation for the final LaTeX document.
If you want me to send you the video, I have no problem with that, apart from the fact that it’s very ugly with the big DEMO watermark…
Thanks! I’m downloading MacTex now as I don’t have LaTeX installed on this system, then I’ll install LaTeXIt. David and I have full copies of ScreenFlow so I think we’ll re-record your video for the site without the stamp. If you have any good LaTeX equation examples that we can use in the video (such as the one you use in your video), that would be great, though, seeing as my knowledge of LaTeX and the sort of equations you create is non-existent.
The best bit is that you can go back to the rendered equation later and convert it back to Latex code, edit and then re-layout.
This is great for any semi-techincal epub stuff, because the live code is always there in the text, but it burps out the formula nicely.
Also works well with tabulation - often best seen as a kind of diagram…
However I prefer results from scriveners lists, to \itemize.
Now if anyone knows why the colour in LatexIT does not work so well, when called as a service…
It also looks as if the service ought to hunt through a whole bunch of scrivenings and find all the equations and bits of latex to convert…No success here with that.
In summary, I have wasted more time than I want to re-count looking at getting high quality equations into publications. Some variant of Tex is definitely the way to go, particularly in something with the philosophy of Scrivener, where you can repurpose text, squirting it out through different publication routes.
For those that don’t want to install a service, but just need occasional equations, dumped as graphics… codecogs.com/latex/eqneditor.php
Gives an equation-editor like interface (so a deluge of drop downs, covered in math glyphs)
It’s also about the only way of getting an svg from LaTEX that I know of…tidily.
Then keep the code in the document notes (just in case you change your mind - or make a small mistake) and dump the equation (formatted), where-ever you want it.