Git Product home page Git Product logo

Comments (11)

pfoerster avatar pfoerster commented on July 28, 2024

@haoming-li-ling Have you tried setting texlab.build.pdfDirectory to the same value as the outdir passed to latexmk?

from texlab.

haoming-li-ling avatar haoming-li-ling commented on July 28, 2024

Ah, didn't see that option. However, with the following, forward search still doesn't work:

            auxDirectory = "./output",
            pdfDirectory = ".",
            build = {
              args = {
                "-lualatex",
                "-interaction=nonstopmode",
                "-synctex=1",
                "-auxdir=./output",
                "-outdir=.",
                "%f",
              },

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

Can you try adding an empty .texlabroot file to the directory containing the main TeX file? Maybe, the project detection isn't working here (see https://github.com/latex-lsp/texlab/wiki/Project-Detection)

from texlab.

haoming-li-ling avatar haoming-li-ling commented on July 28, 2024

from texlab.

joedavid0 avatar joedavid0 commented on July 28, 2024

I have the same issue. I have set auxdir to equal texlab.build.auxDirectory and the same for outdir, texlab.build.logDirectory and texlab.build.pdfDirectory, according to the wiki. Here are the relevant settings:

auxDirectory = ".aux/",
logDirectory = ".out/",
pdfDirectory = ".out/",
build = {
	args = {
		"-pdf",
		"-auxdir=./.aux",
		"-outdir=./.out",
		"-interaction=nonstopmode",
		"-synctex=1",
		"%f",
	},
},

TexlabForward just errors with Search error. When all the directories are the same, everything works as expected.

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@joedavid0
I think there is something wrong with your settings. It should be

build = {
        auxDirectory = ".aux/",
        logDirectory = ".out/",
        pdfDirectory = ".out/",
	args = {
		"-pdf",
		"-auxdir=./.aux",
		"-outdir=./.out",
		"-interaction=nonstopmode",
		"-synctex=1",
		"%f",
	},
},

Can you try again with these settings, please?

from texlab.

joedavid0 avatar joedavid0 commented on July 28, 2024

Can you try again with these settings, please?

You're right, I missed that auxDirectory was moved under build. However, the issue still persists.
Texlab seems to look for the PDF in the project root, i.e. when I manually copy the PDF to ./, Texlab opens it there.

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@joedavid0 This might be a problem with the root directory detection. Can you try adding an empty .texlabroot file to the project? Then, it should look roughly like this:

<project folder>
   - .texlabroot
   - document.tex
   - .aux
       - document.aux
   - .out
       - document.log
       - document.pdf

from texlab.

joedavid0 avatar joedavid0 commented on July 28, 2024

Still the same problem

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@joedavid0 Can you try running #988 and post the additional log statements (they start with DEBUG - [FwdSearch])? These should be helpful to find out why the server looks into the wrong directory.

from texlab.

joedavid0 avatar joedavid0 commented on July 28, 2024

Ok this is kind embarrassing, but the error was on my part. The PR didn't have the issue, so I checked when the changes to config were introduced. Then I noticed that the version of Texlab on Arch Linux is surprisingly very outdated and doesn't have the new options yet... so that was the issue.

Sorry for wasting your time

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.