auctex-devel
[Top][All Lists]
Advanced

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

Re: Parse graphicspath for searching


From: Arash Esbati
Subject: Re: Parse graphicspath for searching
Date: Thu, 19 Sep 2024 09:13:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Leo Stein <leo.stein@gmail.com> writes:

> I saw multiple style files using `TeX-auto-add-regexp', but sorry, I
> don't understand how this is related to multi-file documents.

It is related because AUCTeX applies parsed information in a multi-file
setup to all involved files.  Suppose you have something like this:

--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{graphicx}
\begin{document}

This is some text.
\begin{equation}
  \label{eq:1}
  a + b = c
\end{equation}

\include{Temp/sub-file.tex}
\end{document}

%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: t
%%% TeX-source-correlate-mode: t
%%% End:
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
This is some text in a sub-file.

%%% Local Variables:
%%% mode: LaTeX
%%% TeX-master: "../mwe.ltx"
%%% End:
--8<---------------cut here---------------end--------------->8---

in this directory layout:

--8<---------------cut here---------------start------------->8---
.
├── Temp
│   └── sub-file.tex
└── mwe.ltx
--8<---------------cut here---------------end--------------->8---

Now, when you open sub-file.tex, AUCTeX applies the parsed elements from
../mwe.ltx to sub-file.tex and loads graphicx.el there, so you can do
'C-c C-m includegraphics RET' in sub-file.tex (and sub-file.tex should
also know about "eq:1").

> If this is explained clearly somewhere in the documentation, please
> let me know, but I haven't found it yet.

I don't think this is documented in the manual in detail; it is more a
style writer thing.

Best, Arash



reply via email to

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