Skip to main content

Module render_latex

Module render_latex 

Source
Expand description

LaTeX renderer.

Emits real, compilable .tex from a SurfDoc block tree. The output target is selected by the document’s render profile (Chunk 1):

  • Papers (type: paper): IEEEtran for ieee, two-column article for acm, single-column article for the generic article format.
  • Reports (type: report): article configured per style — MLA (setspace double-spacing + heading block + Works Cited), APA (title page + References), Chicago (title page + Bibliography).
  • Everything else: a plain article document.

Citations are formatted through the Chunk 4 citation engine: numbered styles (IEEE/ACM) emit \cite{…} + a thebibliography environment; author styles (MLA/APA/Chicago/article) emit the formatted in-text string inline and a hanging-indent reference list under a \section* heading.

Pure / deterministic: same input → byte-identical .tex. No new heavy deps — the .tex is built as strings.

Functions§

to_latex
Render a SurfDoc to a complete LaTeX (.tex) document string.