You could pick an ecosystem with more power to control the finer details if and when that's needed. Typst is a LaTeX replacement with a syntax sort of in the markdown family of syntaxes (https://typst.app/docs/tutorial/writing-in-typst/), but fully programmable and with nice visualization options.