See pandoc: https://pandoc.org/
And a variety of intermediate or input text formats, where you can pick your preferred poison whether for book publishing, research papers, math papers, technical documentation, slides, etc.
Including the author's own djot: https://github.com/jgm/djot
EDIT:
Sibling reply suggests latex. OK, but then you're also learning latex.
See pandoc: https://pandoc.org/
And a variety of intermediate or input text formats, where you can pick your preferred poison whether for book publishing, research papers, math papers, technical documentation, slides, etc.
Including the author's own djot: https://github.com/jgm/djot
EDIT:
Sibling reply suggests latex. OK, but then you're also learning latex.