Menu

#1204 add open file to context menu for \subfile{file}

None
closed
nobody
1
2017-01-25
2017-01-18
Oleg
No

I would like to be able to open the file specified by \subfile{file}, akin to \include{file} behaviour.

Related

Bugs: #2041

Discussion

  • Oleg

    Oleg - 2017-01-18

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-01-19

    This should work since 2.10.0. Please update.

     
  • Tim Hoffmann

    Tim Hoffmann - 2017-01-19
    • status: open --> closed
    • Group: -->
     
  • Oleg

    Oleg - 2017-01-19

    It does not, I am on:

    TeXstudio 2.11.2 (hg 6192:72f68414a729)
    Using Qt Version 5.6.1, compiled with Qt 5.6.1 R

    Win 7 64b

     
  • Oleg

    Oleg - 2017-01-25

    @Tim: thanks for getting back and sorry for the lack of information in the original post.

    I found the problem, and it might not be specific to Win7 64bit. I have all my packages loaded in a .sty file that I include into my main document. To reproduce the issue:

    1) Create main document.tex

        \documentclass{article}
        \usepackage{mystyle}
        \begin{document}
            \subfile{mychapter}
        \end{document}
    

    2) Create mychapter.tex in the same folder:

        \documentclass[document.tex]{subfiles}
        \begin{document}
            Something.
        \end{document}
    

    3) Create mystyle.sty in the same folder:

    `\usepackage{subfiles}`
    

    The document.tex compiles correctly, but the right-click context menu does not recognize that the subfiles package is loaded, and hence does not offer the "Open file " option. Substituting \usepackage{subfiles} in place of the \usepackage{mystyle} in document.tex then produces the expected behaviour (although I need to re-open the document for the ide to reparse it and allow the context menu open choice).

     

    Last edit: Oleg 2017-01-25
  • Jan  Sundermeyer

    Jan Sundermeyer - 2017-01-25

    txs scans usepackage to know what packages are used and activates the correspondings cwls accordigly.
    You should either make a mystyle.tex and use input (mind you, it needs to be in the current work area), or generate a mystyle.cwl (see txs wiki/manual)

     

    Last edit: Jan Sundermeyer 2017-01-25
  • Oleg

    Oleg - 2017-01-25

    Or have the \usepackage{subfiles} directly in the main document.

    Thanks for the feedback.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB