auctex-devel
[Top][All Lists]

Re: [AUCTeX-devel] TeX-command-buffer: generate buffer-file-name.dvi/pdf

 From: David Kastrup Subject: Re: [AUCTeX-devel] TeX-command-buffer: generate buffer-file-name.dvi/pdf Date: Mon, 09 Mar 2015 15:19:31 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Uwe Brauer <address@hidden> writes:

>    > Uwe Brauer <address@hidden> writes:
>
>    > What is the problem you are trying to solve here in the first place?
>
> This is what I wrote yesterday:
>
> My problem concerns
>
> Tex master and the include command.
>
> I have for example a master file
> main.tex which looks like (leaving all the usepackages out)
> \documentclass[12pt]{article}
> \begin{document}
>
> \include{hoja1}
> \include{hoja2}
> \end{document}
>
>
>
> In the two slave files I have set the master to main.tex.
>
> In these slave files I can run TeX-command-buffer and only this
> file/buffer is compiled. However the resulting pdf/dvi is called
> _region_.pdf and this is a big restriction:
>
>     -  when I visit some time later the directory I have now idea
>        to which file _region_.pdf corresponds.
>
>     -  when I want to send such pdf I have to rename it which is also
>        cumbersome.

You shouldn't be sending such a file anyway since its labels and page
numbers will not correspond in any meaningful manner to that of the main
document.  TeX-command-buffer is not supposed to produce a useful
document but something that is useful for working on a larger document
while not taking as long to produce.

There may be some LaTeX packages intended to do a more thorough job,
producing an actually valid approximation of a file extract.

> That is why I came up with using the latex style: subfiles, the
> corresponding files look
>
>
> \documentclass[12pt]{article}
> \usepackage{subfiles}
> \begin{document}
>
> \subfile{hoja1.tex}
> \subfile{hoja2.tex}
>
> \end{document}
>
> and the slave files for example
>
> \documentclass[main]{subfiles}
> \begin{document}
>
> text
>
> \end{document}
> %%% Local Variables:
> %%% mode: latex
> %%% TeX-master: t
> %%% End:
>
>
> Then I can run latex via TeX-command-master on the slave, the resulting
> pdf is called hoja1.pdf (I have a common header file), *but* auctex does
> not scan the headers of the master file and then I can not use parts of
> auctex functionality.

It might make sense adding better-working support for the subfiles
package.  It's conceivable to let this reroute TeX-command-buffer etc as
the user interface, but I don't think that the code is reasonably
prepared to do this.

--
David Kastrup



reply via email to