Menu

#1201 import subimport reverses parameters in paths for file tree

None
duplicate
nobody
1
2015-03-08
2015-01-15
Anonymous
No

\subimport{Section/Prototypes}{Hardware}

results in a red line in the file tree because it will use the path "Hardware/Section/Prototypes.tex" while it should be "Section/Prototypes/Hardware.tex"

The same error occures with \import{<folder>}{<file>}

Docs for reference: http://tug.ctan.org/macros/latex/contrib/import/import.pdf

Discussion

  • Tim Hoffmann

    Tim Hoffmann - 2015-01-18

    duplicate

    The current cwl format and parser in TXS do not support this type of path specifications.

    See also Feature Request #642 Improved cwl format and latex parser

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-01-18
    • status: open --> duplicate
    • Group: -->
     
  • Kirill Müller

    Kirill Müller - 2015-03-07

    It's strange that support for import and subimport is advertised in the change log for 2.7.0 but this bug report is marked as a dupe of a feature that apparently seems to be implemented (but possibly incorrectly).

    I have created a minimal example that shows the behavior as attached in the screenshot. If I change the semantics of \subimport with a \let + \def hack, the file is recognized in the structure, but I still can't ctrl-click the file in the code.

    It would be just wonderful if TeXstudio did the right thing on its own, but for now I'm fine with my hack (which needs to be repeated as necessary for the other ...import... commands):

    \let\oldsubimport\subimport
    \def\subimport#1#2{\oldsubimport{#2}{#1}}
    
     
  • Kirill Müller

    Kirill Müller - 2015-03-07

    The hack was missing a trailing slash, fixed.

     

    Last edit: Kirill Müller 2015-03-08
  • Tim Hoffmann

    Tim Hoffmann - 2015-03-08

    incorrect order fixed by hg 4970 (d970647fca7c)

     
  • Kirill Müller

    Kirill Müller - 2015-03-08

    Thanks. I guess it's going to be the version after 2.9.0 where this fix will appear first?

     
  • Tim Hoffmann

    Tim Hoffmann - 2015-03-08

    Right.

     

Log in to post a comment.