Equations/figures list

I’m currently evaluating 30 days trials of Scrivener. So far - 15 days, I find it a great tool, which speeds up the whole process a lot. But… there are some problems (at least for me) and I’d be really glad if you could help me to solve them.

I write a lot of research papers during my PhD in machine learning and data science. As you can expect - with many equations/tables/source code examples. My Professor requires all PhD students to follow strict rules related to publications’ structure. Specifically:

  1. equations/tables/figures/source code examples need to be numbered separately with proper annotations
  2. all equations/tables/figures/source code examples need to have separate tables in the end of paper with sort of “table of contents” showing exact page number. Example:

In plain MS Word is pretty easy to achieve.

My current setup is: Scrivener + Zotero (bibliography) + MS Office for Mac and no other third party software, like MathType - at least for now, until I get 100% sure I want Scrivener :slight_smile: Papers will be compiled to MS Word format unfortunately, because two journals, that expect me to submit paper, use Word as default tool :frowning:

According to point 1 - I’ve solved it using the following markdown syntax:

According to point 2 - I have no idea how to solve this in Scrivener → Word compilation. In my recent publication (50’000 characters) I have almost 60 equations. Exporting plain text captions and then manually fixing them in MS Word is not an option - I have no time for that. I’d expect from professional writing software to have such a function. Could you please help me and give some workarounds/solutions how it can be achieved?

I’ll be very glad for help.

Best regards

Scrivener is professional writing software, but it isn’t professional document formatting software (and it clearly states this on the web page IIRC). There is no built-in mechanism to build arbitrary lists of X, this isn’t a feature that affects writing, only final formatting.

If Scrivener allowed you to cross-ref scrivener links you could then use <$p> linked to the paragraph containing the equation, but unless AmberV has a solution I missed this won’t work at the moment.

The partial solutions to this problem, depending on your technical level:

  1. Bite the bullet and do this in Word/LibreOffice. It may be possible to automate this with a macro (using some sort of text tag); but personally I find the macro languages in Word/LibreOffice horrible to use!
  2. Use markdown or other markup language in Scrivener. For LaTeX there is already a very simple workflow involving Pandoc and using pandoc-crossref or pandoc-eqnos to number your figures, equations, lists and tables. Interestingly, LaTeX doesn’t seem to auto-generate lists of equations (though there are several solutions to generate lists of equations). The plain text equation labels would be very simple to parse using a filter-script to generate a list which could be injected into any output format. The problem would be the page numbers, this is a problem that is difficult to solve in any conversion system as it is only the final format that can specify the page numbers.

So you can write in Scrivener using pandoc+pandoc-crossref, create a filter (using your preferred language) that reads the equation labels and prepends a list to the document before it was converted; this would work in DOCX/LaTeX/HTML or any other output. You should be able to cross-ref and link, but if you needed page numbers in the list this requires a more complex solution I can’t immediately think of, unless you use LaTeX as the output (perhaps good for your professor, but would need some manual work for DOCX output).

Thanks for the quick response. I think I should change my mindset when using Scrivener - this is not WYSIWYG (What You See Is What You Get) editor like Apple Pages or Ms Word but more workflow (write-flow :slight_smile: ) oriented software :slight_smile:
But still it sometimes suprises me how unintiuitive and hard to do (for now) are some things, which were trivial in Pages or Ms Word.
As a professional software developer I have to admit, that modular documents structure and split-to-parts philosophy of Scrivener gets very close to design patterns used in programming :slight_smile:

Going back to main topic - Latex used to be my primary tool, so using workaround described by you seems reasonable. Although I was hoping, that there will be easier ways, than writing scripts to hack my own text, just to produce a list of figures :slight_smile:

Anyway - thanks for help again.

Best regards

I think it is hard to have one (the flexible modularity of generating content) without somewhat sacrificing the other (deep formatting tools that depend on content). In an ideal world (and a wish for a future version), Scrivener would have a “deeper” cross-referencing ability and compile system that could handle index production from this. I think deeper cross-referencing (referencing paragraphs of content within documents) has been often wished for on this forum, and is a clear benefit to building up content in general for many use cases. The fact it can also offer useful hooks for final formatting would be an added bonus!

Given your technical background, I’m sure you’ll find a solution; don’t think of it as a hack, but an optimisation :open_mouth: 8) :smiley:

That’s because you’re tempted to think of Scrivener as a REPLACEMENT for Word (or better), which it isn’t.

Think of Scrivener as a multi-featured writing compositor, organiser and editor which has many or even most of the basic-to-medium functions of a word processor, but also allows you to do much more than any ordinary WP can - for example, moving bits of your writing around to change or suit the flow better, snapshotting versions of your writing, bringing in or linking to any type of research document, multiple types of note/comment/annotation/footnote/linking/refs etc. You CAN compile your output to a formatted document for print or pdf or epub etc, but you can also compile to Word for those “finished specialist” functions that Scrivener isn’t designed for.

If you think about the Scrivener > Pandoc-HTML > PDF route, then this:

alistapart.com/article/building … 3#section5

gives you an idea of how to set up counters to cross-ref and build tables-of-X. As I understand, LaTeX does tables of figures, but not tables of equations so you will need some customisation anyway, and HTML+CSS is more intuitive IMO than LaTeX (you of course may have lots of LaTeX experience, and YMMV)…

Thanks a lot for sending this, I’ll read it carefully. I suspect that LateX workflow will be easier for me because of my previous experience, but we’ll see.

Btw. I’ve just encountered series of blog & forum posts from L&L, that Scrivener 3 is on it’s way. Maybe I’ll wait with buying, once release date is announced (T-3 months for free upgrade :stuck_out_tongue:).

If I manage one day to find some simpler way of generating table of figures/equations I’ll update this thread so maybe other people will have a solution ready :slight_smile:

Best regards

No need to wait to buy: earlier this week Keith, the Developer, said they intend to release the Mac version 3 within 3 months so you’ll get your free upgrade-- but if there is a delay beyond 3 months, then they’ll be happy to honour it anyway.

. [url]Free Upgrade to v3.0 ? - #4 by KB]

Thanks a lot, that’s great news indeed :slight_smile:

Best regards

Scrivener 3 has a lot of very useful new features for those of us who like to use custom markup along with the unparalleled organisational writing environment that is Scrivener. You can use styles as “semantic holders” and for each style define a replacement prefix/suffix, this is contained in the compile format, so for example you could have the same text in Scrivener but compile it to completely different markup systems (asciidoc/pandoc/LaTeX). This flexible separation of content and markup style is wonderful, and I think is unparalleled in any other software. Scrivener 3’s compile will also run a post-processing workflow on the generated document automatically.