Sorry for a newbie question. I’ve had a license for Scrivener for a long time (since version 2 actually) and finally I decided to put it to good use.
I come from Jupyter notebooks and there it is extremely easy to write Latex AND preview it right away.
But I’m totally baffled how I should write Latex equations in Scrivener especially since there is no live preview for it (I’m actually trying to set up Marked 2 for that)
Should i use this format?
I see you are using a Mac, which likely means you are using the MacTeX distribution, which means you probably have LaTeXiT installed, which means if you paste in the above into Scrivener, select it and right-click on it, in the Services menu you should see some functions for typesetting the equation to an image. If not, here is where you can grab a copy of LaTeXiT, and here is a very recent discussion on tips for using it.
As far as general previewing goes, there isn’t anything built in with Scrivener, but it’s not too difficult to set up a workflow with the compile settings to do so:
For pure LaTeX writing, first check out the LaTeX project template in the Non-Fiction section. If you open Compile in that and double-click on the compile format it uses to edit it, the Processing pane has a basic automation script that is disabled by default that will, when enabled, cause the project to compile directly to PDF.
When using Markdown as a “front end”, you should see a Compile for option to compile directly to PDF which works well for simple setups where you don’t need additional scripts to run. If you do, then that is what the Processing pane is for, available to “MultiMarkdown” as a file type.
Either way, you can drop the compiled PDF into your Project Bookmarks list and thus easily load that into one of the split editors for proofing. What I do is compile a quick PDF, refresh the view, and continue proofing. As I say it’s not quite as seamless as something that has a built-in workflow, but it’s honestly not a lot of overhead compared to even dedicated tools like TeXShop. Since each Format can have its own processing workflow set up you can even switch targets on the fly, like having a proofing design that highlights hyperlinks, has margin notes and so on, vs a production output.
Marked 2 does not display this as equation, but maybe I should tweek it too?
Yeah, that would be a matter of consulting its documentation. I’m not sure if it supports live rendering of LaTeX equation syntax.
I remembered something: there is a Markdown text editor that makes editing the contents of a folder really easy, called Typora, which also has the ability to render LaTeX equation syntax live. Unlike Marked, it won’t open a .scriv folder in any kind of useful manner, but that’s often not a limitation with the external folder sync feature. Some even use that as their primary mode of editing, and leave Scrivener for the organisational side of things.
When I used Scrivener as my rich text LaTeX editor, I would take a quick snapshot of the equation from whatever equation editor I was using (e.g. MathType) and then I’d paste it into the Scrivener document and then make it an “annotation” that got stripped out upon compile. It worked well enough for me (indeed I still use this even though now I use Scrivener to write in Markdown), but obviously it doesn’t give you a live preview.