Below please find my final setup for writing a scientific paper/book. Although my requirements seemed to be clear&simple, it took me app. 40 hours to put everything together. And here it is: my final set-up ready :)
I want my system to support me in:
- Managing scientific sources and citations
 - Insert and enumerate simple equations
 - Export the final document to MS Word docx format, keeping all Styles (like headings).
 
- Storing all documents and drafts: Google Drive
 - Managing scientific sources: Zotero (https://www.zotero.org/)
 - Making notes and structuring content: MindManager (https://www.mindjet.com/mindmanager/)
 - Writing: Scrivener (https://www.literatureandlatte.com/scrivener/overview)
 - Exporting: Pandoc (https://pandoc.org/).
 
- Initiate the project:
- set-up a Google Drive folder and create subfolders:
- {book title}
- ... {book chapters}...
 
 - Setup
 
 - {book title}
 - set-up a Zotero folder for all needed resources {book title}
- export this folder to Setup Google Drive folder in a BibTex format using Better Bibtex plugin (how to can be found in points 1-5 here) > mylibrary.bib
 
 - in the Setup Google Drive folder store:
- a docx template for Your book (with all proper styles)
 - mylibrary.bib
 - Your preferred citation style: choose sth from https://www.zotero.org/styles, eg. https://www.zotero.org/styles/chicago-author-date-16th-edition
 
 
 - set-up a Google Drive folder and create subfolders:
 - Scientific sources
- Gather all necessary knowledge resources (books, papers, websites, reports etc.) using:
- Zotero web plugin
 - Zotero ISBN search
 - Just drag&drop files from Your folders
 
 - Organize them using TAGS
 - Make notes:
- annotate PDFs and then export notes to Zotero using ZotFile
 - integrate key notes into MindManager
 
 - Make draft structure (paragraph-detail level) in MindManager
 
 - Gather all necessary knowledge resources (books, papers, websites, reports etc.) using:
 - Writing:
- organize all the writing in Scrivener using folders
 - control targets and writing progress with meta-tags
 - compile to docx via MultiMarkdown and Pandoc (see compile presets below).
 
 
- Install Zotero (from www.zotero.org)
 - Install useful plugins:
 - Zotpick-applescript > for a possibility of calling Zotero citation during writing with a single click
- Mac-OS only: Create a dedicated app with Workflow Manager (see installation instructions https://raphaelkabo.com/blog/posts/markdown-to-word/)
 
 
I suggest to purchase it driectly from https://www.literatureandlatte.com/scrivener/overview - an AppStore version has some limitations.
For markdown to docx conversion.
- 
from terminal with
brew install pandoc - 
from this page.
 - 
Additionally, install the following pandoc extensions:
 
The only, and the most difficult to, setup you need is Scrivener.
- 
(suggested, but not required): import my Scrivener preferences and theme settings from scrivener settings github folder
 - 
Compile presets. This is the most important - magic happens here!
- 
from scrivener settings import My Markdown.scrformat.
- click File > Compile
 - drag and drop My Markdown.scrformat into the Formats panel on the right. Choose "My Formats" option
 
 - 
To see it's presets: right-click > Edit
- 
I made a lot of changes to Styles, basing mostly on Scrivomatic MarkDown exports (see: https://github.com/iandol/scrivomatic)
 - 
The most important settings are in Processing script. It took me app 30 hours to get there :). When you click Processing > Edit Script you will see sth like that:

 - 
The script itself is below (for Your Copy-Paste convenience - some fine tuning will be necessary):
fullfilename=$1 filename=$(basename "$fullfilename") fname="${filename%.*}" pandoc --filter pandoc-citeproc --filter /Applications/Anaconda/anaconda/bin/pandoc-eqnos --bibliography '/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/mylibrary.bib' --csl '/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/ee.csl' $filename -f markdown-auto_identifiers+tex_math_dollars --reference-doc '/Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/MS Word - Cambria.docx' -o $fname.docx 
 - 
 - 
IMPORTANT: update paths to Your local settings:
- /Applications/Anaconda/anaconda/bin/pandoc-eqnos <<< Your pandas-eqnos installation. Attention: I don't know why, but even if pandoc-eqnos works perfect from Your terminal, here the full path is needed...
 - /Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/mylibrary.bib - this is a path to Your Google Drive/.../setup/mylibrary.bib file.
 - /Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/ee.csl - this is a path to Your Google Drive/.../setup/{preferred style sheet} file.
 - /Users/Andy/Dysk Google/Scrivener/setup/! final setup/github/setup/MS Word - Cambria.docx - this is a path to Your Google Drive/.../setup/{preferred docx style} file.
 
That's it! It should work, although it maybe very cumbersome...
 
 - 
 
- Create a New Scrivener Project
 - Write sth
 - Compile:
- Compile for: MultiMarkdown
 - Presets: My Markdown
 
 
- Open draft project from main girhub folder
 - Compile
 - And check the output. I put my sample in the output folder.
 
- My inspirations:
 - Zotero, Markdown and Pandoc:
- All videos on Zotero, Markdown and Pandoc from Nicholas Cifuentes-Goodbody, starting from https://www.youtube.com/watch?v=Gm2MbYB3k4o&list=PLXt-tu7G1H3vlRXLmGyOzeAp7ZKDK0pty&index=1. Great!
 
 - Scrivener has their own really great tutorials here.
 
https://github.com/wodecki/writing
Happy writing :)