[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: |
Mon, 12 Jul 2021 08:00:24 +0200 |
User-agent: |
mu4e 1.5.13; emacs 28.0.50 |
Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> Sorry for my misunderstanding. Really, it can pinpoint the problem:
>
> (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)))
> (("/home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/content/josephson.tex"
> . "josephson.pdf")
> ("/home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/content/appendix.tex"
> . "../thesis.pdf")
> ("/home/werner/Public/hpc/tools/thesis/gitlab.kwant-project.org/jbweston/thesis.git/thesis.tex"
> . "thesis.pdf"))
>
> As you can see, only the chapter/master files which have been set the
> correct TeX-master variable will report the correct master PDF file.
So the issue is solved, right?
>> > Why can't `(La)TeX-mode' return the correct result:
>> >
>> > (delq nil (mapcar (lambda (buf)
>> > (with-current-buffer buf
>> > (when (eq major-mode 'TeX-mode)
>> > (cons (buffer-file-name buf)
>> > (TeX-master-file "pdf")))))
>> > (buffer-list)))
>>
>> Because the symbols latex-mode and LaTeX-mode or TeX-mode are not `eq'
>> (identical). `major-mode' is just a symbol, and in an AUCTeX LaTeX
>> buffer it'll be set to `latex-mode'.
>
> But see the following statement on
> <https://www.gnu.org/software/emacs/manual/html_node/reftex/Installation.html>:
>
> ```
> 1.1.3 Entering RefTeX Mode
>
> To turn RefTeX Mode on and off in a particular buffer, use M-x
> reftex-mode RET. To turn on RefTeX Mode for all LaTeX files, add the
> following lines to your .emacs file:
>
> (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode
> (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode
> ```
>
> It says that the AUCTeX LaTeX mode should be called `LaTeX-mode',
> while the Emacs latex mode is called `latex-mode'
>
> Any hints on this description?
Yes, the AUCTeX variant of latex-mode shows up as LaTeX in the mode-line
(that's its name), and its hook is `LaTeX-mode-hook'. But still it sets
`latex-mode' as the symbol. The reason is that AUCTeX replaces the
stock tex-mode and latex-mode that comes with emacs rather than defining
new, alternative modes next to the standard ones.
Bye,
Tassilo
- Re: Failed to skip from chapter tex file to master pdf file., (continued)
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/11
- Re: Failed to skip from chapter tex file to master pdf file., Ikumi Keita, 2021/07/11
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/11
- Re: Failed to skip from chapter tex file to master pdf file., Tassilo Horn, 2021/07/11
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/11
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/11
- Re: Failed to skip from chapter tex file to master pdf file., Tassilo Horn, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file.,
Tassilo Horn <=
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Tassilo Horn, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Tassilo Horn, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., David Kastrup, 2021/07/12
- Re: Failed to skip from chapter tex file to master pdf file., Hongyi Zhao, 2021/07/12
- Mutability (was: Failed to skip from chapter tex file to master pdf file.), Basil L. Contovounesios, 2021/07/13