[ Full disclosure : I was first exposed to emacs and LaTeX 31 years ago ; my professionnal life has made me endure various "word processors" and suchlike horrors for more than a quarter century . I can hardly claim unbiasedness... ]
I am often confronted to this conudrum. I find the Sage notebook extremely handy to jot down an idea, toy and experiment with it and take quick notes, but I feel more at home with LaTeX when it comes to writing down things for good.
LaTeX has been created to prepare structured documents. It supports not only hierarchical sectioning, but also cross-referencing, footnotes, tables of contents, indexing, references (most important !), und so weider ad infinitum...
SageTeX is a LaTeX package that allows to insert almost any form of Sage calls in a LaTeX document, from the simple inline insertion of a Sage expression to a full program, along with LaTeX documentation.
The development of such a document is tremendously helped by the use of emacs along with
sage_shell_mode, which allows you to run Sage in an emacs frame, allowing you to check your (typeset) results and your (2D) figures ; it even has a
notebook emulation feature that might help your transition.
The price to pay is learning these tools, of course. Emacs' learning curve is a bit
Matterhorn-like (only a bit steeper, according to some...), Latex's vastness can be compared to the
Ural, and sage is ... well... Sage (and expanding !). But these difficulties are mutually healing : emacs' infinite programmability opens the possibility of sage_shel_mode, but also of
AUCTeX and
RefTeX (which make the maintainance of a complicated document a breeze, compared to what word processors offer) and allow you not to learn 90% of LaTeX (the existing macroes will do the job for you).
However, almost all you need for that *can* be done in Markdowwn. It just happents that these tools exist in a zillion different (and mutually incompatible, of course) extensions, with no central federating program.
Furthermore, these tools are probably better adapted to the production of "dynamic" documents such as HTML pages or e-books, whereas LaTeX is strongly paper-oriented : papers, books, slides are supposed to have a *fixed* layout.
If you aim to go to the Web or e-publications (such as e-pub), you might be better off developing your document in the Notebook, exporting to pandoc or something like that, and re-exporting to HTML, e-pub or whatever (my experiences of converting a math-heavy LaTeX document to epub was not, to say the least, overwhelmingly successfull : the solution lies probably somewhere in the futire of
LaTeXML). That way, you could ask Pandoc to number your section hierarchy and insert a table of contents. I currently see no way to cross-refer your document in the notebook (but I'm certainly not an expert in Markdown), but it might be added in this post-processing stage.
So pick your poison according to your goals : if you aimt to a PDF, LaTeX is perfect, and learning to use it with the help of AUCTeX and sage_shell_mode might well worth learning emacs. If you aim to e-publication, pandoc is worth a look.
HTH,
Emmanuel Charpentier