auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Failed to skip from chapter tex file to master pdf file.


From: Tassilo Horn
Subject: Re: Failed to skip from chapter tex file to master pdf file.
Date: Sun, 11 Jul 2021 21:05:06 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

>> > ```
>> > epdfinfo: Error opening
>> > /home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/content/conclusion.pdf:No
>> > such file or directory
>>
>> What would be the right filename?  The project looks like thesis.tex is
>> the master file so I'd assume the pdf would be thesis.pdf and not
>> conclusion.pdf which is just some included chapter in content/.
>
> Yes. "thesis.tex" is the master file, and "thesis.pdf" is the
> generated pdf file name.

So this would be the right filename, I guess.

/home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/content/thesis.pdf

>> What are your TeX-master values?  It should be t in thesis.tex and
>> "../thesis" in the sub-files in content/.  From the error above, I'd
>> guess you've told AUCTeX that conclusion.tex was the master file and
>> pdf-tools uses the value of TeX-master and thus assumes
>> conclusion.pdf was the generated pdf.
>
> See below:
>
> $ tail -5 ./thesis.tex
>
> %%% TeX-master: t
>
> $ tail -5 content/publications.tex
>
> %%% TeX-master: ../thesis
>
> But still meet the error:
>
> ```
> epdfinfo: Error opening
> /home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/content/publications.pdf:No
> such file or directory

Phew, this time it is publications.pdf, last time it was conclusion.pdf.
Have you also looked at the actual variable values using `C-h v
TeX-master'?

If the TeX-master values look right, I guess you will need to edebug the
pdf-tools functions `pdf-sync-forward-search' and
`pdf-sync-forward-correlate'.  Especially, the latter calls the AUCTeX
function (TeX-master-file "pdf") to determine the name of the pdf.

Or as a first step, you could also find the master file and all chapter
files and eval the following in *stratch* and post the output:

(delq nil (mapcar (lambda (buf)
                    (with-current-buffer buf
                      (when (eq major-mode 'latex-mode)
                        (cons (buffer-file-name buf)
                              (TeX-master-file "pdf")))))
                  (buffer-list)))

Bye,
Tassilo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]