You can make the face used for math and the so-called sedate face used for macro names inherit from fixed-pitch, and activate variable-pitch-mode in the LaTeX mode hook:
(set-face-attribute 'font-latex-sedate-face nil :inherit 'fixed-pitch)
(set-face-attribute 'font-latex-math-face nil :inherit 'fixed-pitch)
(add-hook 'LaTeX-mode-hook #'variable-pitch-mode)
I had a similar problem with AUCTeX and fic-mode. It's caused by the style-hooks executed by AUCTeX after loading the file. You can enable your minor mode in the TeX-update-style-hook, see. this TeX stackexchange question.
The question is: do you want hl-todo-mode to be turned on for every mode that is allowed by hl-todo-include-mode (by default that is prog-mode and text-mode) except for the excluded modes in hl-todo-exclude-mode (by default, org-mode)? OR you just want it turned on for LaTeX-mode?
If the former, then add
in your init file (.emacs or ....
Add the following line to the list of local variables of the source file:
%%% TeX-command-extra-options: "-shell-escape"
Then you need to do M-x revert-buffer to make it applied.
AUCTeX 12.2: 4.1.3 Options for TeX Processors
How to pass flags to the LaTeX compiler with AUCTeX? - Emacs Stack Exchange
emacs - Adding an option to the PDFLaTeX call from ...