3

I am playing around with some LaTeX's DocStrip package.

(For those interested: it is a LaTeX package, to create documented code, in order to write e.g. a style file and incorporate the documentation in one file. DocStrip will Strip the Documentation and generate a clean and fast loadable Stylefile but is also able, to create an exhaustive documentation on that style file.)

To use DocStrip you usually have two kind of files: the .dtx containing both documentation and the code and a second file, which is similar to a Makefile. Usually it has the file extension .ins to be not mixed up with normal LaTeX files.

If you want to extract the style file (or any other package), you have to run LaTeX on your "Makefile", that is

 latex sample.ins

I want to be able, to use the normal C-c C-c key, to start this compilation. But AUCTeX is adding the extra file extension .tex, so that the real call is

 pdflatex -file-line-error  --synctex=1 -interaction=nonstopmode "\input" sample.ins.tex''

Ho do I configure Emacs/AUCTeX to run

 pdflatex -file-line-error  --synctex=1 -interaction=nonstopmode "\input" sample.ins''

instead?

I already tried to define the master file to be "sample.ins", but even than .tex is added.

  • Customize TeX-file-extensions and add "ins" to it, that should do the trick. – Arash Esbati Feb 5 '17 at 14:22
  • Thank you @ArashEsbati That worked. Would you turn your comment into an answer, I would happily accept! – Jan Feb 5 '17 at 15:25
5

Known extensions to AUCTeX are controlled by the variable TeX-file-extensions:

TeX-file-extensions is a variable defined in ‘tex.el’.
Its value is ("tex" "sty" "cls" "ltx" "texi" "txi" "texinfo" "dtx")

Documentation:
*File extensions used by manually generated TeX files.

You can use the customize interface to add "ins" to this list or with something like this in your init file:

(with-eval-after-load "tex"
  (add-to-list 'TeX-file-extensions "ins" t))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.