Git Product home page Git Product logo

Comments (8)

brunotvs avatar brunotvs commented on July 28, 2024

Actually, I found two behaviors that I consider undesirable:

  1. When I define a new command using import or subimport, TexLab appears to be unable to build the document tree.
\newcommand{\structure}[1]{
	\subimport{#1/}{document.tex}
}
  1. If I subimport file1.tex and, in file1.tex, I input file2.tex, TexLab does not seem to consider file2.tex as part of the same project as file1.tex.

from texlab.

brunotvs avatar brunotvs commented on July 28, 2024

Created this repo showing the errors:
https://github.com/brunotvs/texlab_issue

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@brunotvs Currently, this is to be expected because the server does not implement the same logic as the TeX engine so in this case, it does not know that \structure{foo} resolves to \subimport{foo}{document.tex}. There two ways to solve this issue:

  1. Hard-code this case similar to texlab.experimental.labelDefinitionCommands (difficult to draw the line here on what is useful enough to be hard-coded into the server)
  2. Implement a (rudimentary) macro expansion engine in the server (very hard)

from texlab.

brunotvs avatar brunotvs commented on July 28, 2024

@pfoerster Okay, but what about nested subimports?

from texlab.

brunotvs avatar brunotvs commented on July 28, 2024

@pfoerster, in addition, can the .fls file be utilized?

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@pfoerster Okay, but what about nested subimports?

If they just use the plain \subimport command, they should work.

@pfoerster, in addition, can the .fls file be utilized?

Sure, #1160 adds a the .fls as an additional source for the project detection. With this changeset, your example will work now after compiling the document once.

from texlab.

brunotvs avatar brunotvs commented on July 28, 2024

Sure, #1160 adds a the .fls as an additional source for the project detection.

Awesome, sounds great.

If they just use the plain \subimport command, they should work.

@pfoerster I found that if I add a latexmkrc file, citation and refs from nested submimports stop working as per this repo

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@pfoerster I found that if I add a latexmkrc file, citation and refs from nested submimports stop working as per this repo

Thanks for the example. With #1161, your example should work as intended.

from texlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.