There can be more than Notion and Miro. AFFiNE(pronounced [Ιβfain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
Allow methods that use the string builder to return an output to pass in their own implementation of an 'Outputter' class, and implement a LaTeX and/or HTML 'Outputter' class.
This allows consumers to extend the API to output karatsubas algorithm in any format they want.
Outputter class should at minimum support a preamble method (to set up before the output), and postamble (close tags used in preamble), as well as generic lineoutput. Look into supporting multiple line types.