After some trial and error, I found the answer.
If we are in a LaTeX only buffer this is true: (and (equal (symbol-name major-mode) "latex-mode") (not ess-noweb-mode)))
.
If we are outside chunks of an ESS buffer this is true: ess-noweb-mode
.
You may be interested to the following convenience functions.
;Check ESS related modes
(defun is-pure-latex ()
"The buffer is in LaTeX mode, but not in ESS mode."
(and (equal (symbol-name major-mode) "latex-mode") (not ess-noweb-mode)))
(defun is-ess ()
"The buffer is in ESS mode."
ess-noweb-mode)
(defun is-ess-doc ()
"The buffer is in ESS mode and insertion point is outside a chunk."
(and ess-noweb-mode (equal (symbol-name major-mode) "latex-mode")))
(defun is-ess-chunk ()
"The buffer is in ESS mode an insertion point is inside a chunk."
(equal (symbol-name major-mode) "ess-mode"))
(defun is-ess-inf ()
"The buffer is in inferior ESS mode"
(equal (symbol-name major-mode) "inferior-ess-mode"))