question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latex Build only works from root project file

See original GitHub issue

Hello,

I’ve switched to Vim recently and have discovered your coc extension for LaTeX. From what I’ve seen so far, it works great, thank you for your work.

I have a small gripe with it though, the latex.Build only seems to work correctly when working on the root file of a LaTeX project. I’ve setup the command using the default latexmk executable and the following configuration:

{
	"latex.build.args": [
		"--shell-escape",
		"-pdf",
		"-interaction=nonstopmode",
		"-synctex=1"
	],
	"latex.build.onSave": true
}

My project structure is composed of a root file report.tex and files for each chapters included in the main root document, the files are inside a folder, for example chapters/chap1.tex, chapters/chap2.tex.

I mainly work on those files, and when I save them or directly run the build command with :CocCommand latex.Build from these files it doesn’t build anything. When I open the root file and run the command, everything builds correctly.

Thanks in advance for your help

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
maximelovinocommented, Nov 25, 2019

Hello, thank you, yes it seems to work correctly now, activates on both tex and plaintex and can build project from both type of files

0reactions
fannheywardcommented, Nov 25, 2019

Thanks for your feedback, I’ve published 1.9.8, can you give it a test?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to compile current document instead of root in TeXstudio?
It allows you to compile both the master document and the separate input files as if they had been separate projects, with their...
Read more >
Build only works for files changed from within vscode #1535
I cleared both logs first, then opened a tex file. The last message in "Latex Workshop" log is always Root file remains unchanged....
Read more >
Set Main Document - Overleaf, Online LaTeX Editor
The main file should always be in the root directory (outside of any folders), ... See some tips on reorganising your project to...
Read more >
More Modern CMake - GitHub Pages
These usually write a build system (or IDE) file and then let that do the actually ... CMake works with more compilers, in...
Read more >
c# - File path for project files? - Stack Overflow
You can work around this with build event commands to disable the read-only attribute on those selected files in the output folder. Copy...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found