Install BasicTex.
Add this to your Bash or Zsh:
export PATH="/Library/TeX/texbin/:$PATH"Install missing Tex packages:
sudo tlmgr install capt-of needspace datetime fmtcount makecell eqparbox environ framed latexmk tabulary varwidth titlesecapt install texlive-xetex latexmk # only to generate PDF
pip3 install sphinxFor RTEMS docs, additionally:
sudo apt install texlive-fonts-extra
I also needed to run
but the PDF generated was still too corrupted