#247 add support for any file extension


As already meantioned for dtx files, it is a general problem to develop latex packages with texstudio. Many file extensions are commenly used, such as dtx, ins, cfg and others. However for these files the syntax hl is not switched on and all tex related key bindings (such as comment/uncomment) do not work.
Further compilation fails because .tex is appended by default.

The compilation issue can be solved by changing "pdflatex %.tex" to "pdflatex %.?e"

I request that the default compilation command is changed and any file can be treated as a latex file.


  • Tim Hoffmann

    Tim Hoffmann - 2011-11-26
    1. Treating more file extensions as latex is not a big deal. Do you have a definite list of the extensions? Then I can add them.

    2. However, if the syntax is different (like for dtx files), we need new syntax highlight files. If you want to help here, you can take /tunk/utilities/qxs/tex.qnfa as a starting point. The file format is described in http://qcodeedit.edyuk.org/docs/qce_examples.html

  • Matthias Pospiech

    I can work on the syntax highlighting files, however I expect to have time only after the next two weeks. File extensions that come to my mind are .tex, .ins, .dtx, .cfg. If you want to support lualatex and context in the next release it will definitely be more extensions, but I have no knowledge about these.

  • FlipR

    FlipR - 2011-12-17

    Please also add .rnw/.Rnw (Sweave) to the list of file extensions for latex highlighting if possible.

    Maybe it might be easier to provide a tab in the settings dialog to set the preferred file extensions individually? By providing a list of the default ones, useres would have more freedom to use texstudio with whatever unusual file extensions... This might be done similar to the "commands" settings dialog.

  • Benito van der Zander

    Could you add support for .rnw and .snw files for syntax hilighting
    and structure view for the .rnw and the .snw files as well. As I sad
    Those files

  • Matthias Pospiech

    @benibela: I assume that your last comment is not complete...

  • Benito van der Zander

    No, it is complete.

    But it is just an excerpt of a mail I received that I don't want to forget

  • Tim Hoffmann

    Tim Hoffmann - 2012-05-08

    n.b. dtx support added in rev. 2783

  • Tim Hoffmann

    Tim Hoffmann - 2016-03-22

    if there's still something specific missing, please open a separate request.

  • Tim Hoffmann

    Tim Hoffmann - 2016-03-22
    • status: open --> closed
    • Group: -->
    • Priority: 5 --> 1

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks