ROCKTAKEY / lsp-latex

Emacs lsp-mode client for LaTeX, on texlab.
GNU General Public License v3.0
66 stars 4 forks source link

Build is not working #23

Closed swarnendubiswas closed 3 years ago

swarnendubiswas commented 3 years ago

I can no longer build the output with lsp-latex-build. I have a latexmkrc file in the project and I can build from the CLI with latexmk. However, lsp-latex-build shows Build was succeeded. and nothing more.

My latexmkrc

$pdflatex = 'pdflatex -synctex=1 -interaction=nonstopmode -file-line-error %O %S';

# Define all output directories, all build files will now be placed in this directory
$aux_dir = ".";
$tmpdir  = ".";
$out_dir = ".";

$view = "pdf";

$go_mode = 1; # -g option

# Main file
@default_files = ("paper.tex");

# Run bibtex to regenerate .bbl file
$bibtex_use = 2;

# Generate tex->pdf using pdflatex (-pdf option)
$pdf_mode = 1;

# Specify which file extensions should be cleaned
$clean_ext = "aux out lot log lof toc bbl blg fls fdb_latexmk";

# Delete temporary files with -c, delete .pdf/.ps/.dvi files with -C
$cleanup_mode = 2;

$pdf_previewer = 'start evince-synctex %S "emacs -g %f:%l"';

# If nonzero, continue processing past minor latex errors including unrecognized cross references
$force_mode = 1;

My .dir-locals.el

(
 (nil . (
         (counsel-find-file-ignore-regexp . "\\(?:\\`[#.]\\)\\|\\(?:\\`.+?[#~]\\'\\)\\|.aux$\\|.bbl$\\|.blg$\\|.dvi$\\|.elc$\\|.fdb_latexmk$\\|.fls$\\|.lof$\\|.log$\\|.lot$\\|.out$\\|.rel$\\|.rip$\\|.synctex$\\|.synctex.gz$\\|.toc$")
         (projectile-enable-caching . t)
         (counsel-projectile-default-file . "paper.tex")
      ))
 (latex-mode . (
                ;; (flycheck-checker . tex-chktex)
                (TeX-master . "paper.tex")
                (reftex-default-bibliography . "path-to-bib")
                (company-bibtex-bibliography . "path-to-bib")
                (bibtex-completion-bibliography . "path-to-bib")
                (lsp-latex-root-directory . "path-to-project-root")
                ))
 )

The build with lsp-latex-build used to work a few months back, and I am not sure what might have changed since. My Emacs version is 27.1, my texlab version is 2.2.2.

ROCKTAKEY commented 3 years ago

Thanks for your report. Could you get the log with building and post it here? We probably should make issue on texlab, because Displaying "Build was succeeded" means that texlab executable returned successful signal.

You can get log if you eval:

(setq lsp-latex-texlab-executable-argument-list
      '("-vvvv" "--log-file" "texlab.log"))

and run the command lsp-restart-workspace.

Note that "texlab.log" is made on directory including current file, and you cannot use abbreviation "\~" like "\~/texlab.log" as the argument.

swarnendubiswas commented 3 years ago

texlab.log

LSP :: Connected to [texlab2:1648878/starting].
LSP :: texlab2:1648878 initialized successfully
Build was succeeded.

latexmk from CLI works.

ROCKTAKEY commented 3 years ago

Thanks. Log also said same thing. It indicates successful signal.

texlab should run the command:

latexmk -pvc -c -pdf -interaction=nonstopmode -synctex=1 filename.tex

In order to ensure it works, could you run this fom CLI? (filename.tex should be replaced with the name of your tex file.)

Then, I will make issue on texlab. Can I attach your log?

swarnendubiswas commented 3 years ago
$ latexmk -pvc -c -pdf -interaction=nonstopmode -synctex=1 main.tex
Latexmk: This is Latexmk, John Collins, 26 Dec. 2019, version: 4.67.

This is what I get, latexmk finishes or terminates with no other logs.

ROCKTAKEY commented 3 years ago

Latexmk compiled your tex file?

swarnendubiswas commented 3 years ago

Yes.

lsp-latex$ latexmk
Latexmk: This is Latexmk, John Collins, 26 Dec. 2019, version: 4.67.
Latexmk: applying rule 'pdflatex'...
Rule 'pdflatex': The following rules & subrules became out-of-date:
      'pdflatex'
------------
Run number 1 of rule 'pdflatex'
------------
------------
Running 'pdflatex -interaction=nonstopmode -synctex=1  -recorder -output-directory="."  "main.tex"'
------------
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./main.tex
LaTeX2e <2020-02-02> patch level 2
L3 programming layer <2020-02-14>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo))
(/usr/share/texlive/texmf-dist/tex/latex/lipsum/lipsum.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3.sty
(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-pdfmode.def))
(/usr/share/texlive/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)
(/usr/share/texlive/texmf-dist/tex/latex/lipsum/lipsum.ltd.tex)) (./main.aux)
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] (./main.aux) )</
usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb></usr/sh
are/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/tex
live/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb>
Output written on ./main.pdf (3 pages, 43468 bytes).
SyncTeX written on ./main.synctex.gz.
Transcript written on ./main.log.
=== TeX engine is 'pdfTeX'
Latexmk: Log file says output to 'main.pdf'
Latexmk: All targets () are up-to-date
ROCKTAKEY commented 3 years ago

Thanks. It seems to be bug of texlab executable. I will make issue.