0

I'm working on some function which should help the user when working with (la)tex documents. In order to provide some additional information to the user I need to get a list of all (la)tex files that belong to the document (read: compiled document) the user is currently working on. AUCTeX/RefTeX has already the facilities in place to define a master file on which all children files depend and from the looks of it there seems to be some internal list of files that belong to the current document.

However I don't find the appropriate piece of code or function to access this list... I don't even find the list, to be honest. Maybe someone can point me in the right direction.

elemakil
  • 3,681
  • 28
  • 53
  • Sorry, what do you exacltly mean with "files that belong to the document (read: compiled document) the user is currently working on"? – giordano Jun 18 '13 at 18:21
  • Usually one uses several different input `.tex` files in order to compile one single document (e.g. pdf file). I want to obtain a list of all the documents that are used to create the final document. – elemakil Jun 18 '13 at 19:04
  • So do you mean files included with `\input` or `\include`? In that case AUCTeX can't help you, it mixes classes, packages and included *TeX files. What you can do is a regexp search for `\input` and `\include` starting from master file (remember that `\input` can be nested). You can only exploit AUCTeX functions `TeX-in-comment` and `TeX-verbatim-p` to check whether point is in a comment or in verbatim construct. – giordano Jun 18 '13 at 19:17
  • Yes, that's what I meant. Do you happen to know whether there's some approach using `reftex`? – elemakil Jun 18 '13 at 20:04

1 Answers1

1

You probably want to use (reftex-all-document-files). I can't remember the details of how to use it, but in tex-mode.el I ended up checking (and (fboundp 'reftex-scanning-info-available-p) (reftex-scanning-info-available-p)) before calling that function.

Stefan
  • 27,908
  • 4
  • 53
  • 82