tex-region-header

tex-region-header is a compiled Lisp function in `tex-mode.el'.

(tex-region-header FILE &optional BEG)

If there is a TeX header in the current buffer, write it to FILE.
Return point at the end of the region so written, or zero. If
the optional buffer position BEG is specified, then the region
written out starts at BEG, if this lies before the start of the header.

If the first line matches `tex-first-line-header-regexp', it is
also written out. The variables `tex-start-of-header' and
`tex-end-of-header' are used to locate the header. Note that the
start of the header is required to be within the first 100 lines.