Responding here to @mwra although I also responded on the new thread – bookdown has been replaced by quarto manuscripts, which is the new way to do this and more. I also make extensive use of a workflow like @dominiquerenauld’s for all my scientific manuscripts and it’s what I teach to students in my undergrad and grad courses. Once you get over the learning curve, it’s phenomenal for technical documents. Here’s an example of the qmd file (quarto markdown) document for a manuscript of ours that is currently in review:
which renders to
Note the inclusion of markdown prose, pandoc citations, TeX for equations, dynamic figure/table numbering, html, and live R code. And it’s all plain text. For the journal we just submit the TeX file, which is generated when rendering via pandoc to pdf, but it can also render to Word docx without much extra hassle.