Re: AUCTeX to compile each \include file to a separate file

2022-11-23 Thread kaykal


On 23 Nov 2022, at 3:03, Colin Baxter wrote:

>> Arash Esbati  writes:
>
> >> Is there anyway to generate different PDF files for each included
> >> file in master file with AUCTeX.
> >>
> >> More specifically, I have one master file called “master”, in
> >> which, I have included two chapters: “chapter01” and “chapter02”.
> >> I want AUCTeX (after appropriate number of runs) to generate one
> >> PDF for the master file, one PDF for chapter01, one PDF for
> >> chapter02 and (the bonus) one PDF for bibliography.
>
> > I'm not sure how you plan to do that, but one solution comes to my
> > mind is using \includeonly in the preamble and control the output
> > with it.
>
> > See here for details:
>
> >   http://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html
>
> > Best, Arash

Thank you Arash.  Ideally, I am looking for a way to generate individual pdf 
files (4 in the example above) with one command with AUCTeX.

> \includeonly and use refsection to make bibliographies per chapter. See
> this stackexchange question:
>
> https://tex.stackexchange.com/questions/87414/per-chapter-bibliographies-in-biblatex.
>
> If individual chapter biographies are not necessary then why not use
> something like PDFtk to split the master pdf into chapter pdfs?

That is what I am doing right now, but I wanted to automate it.

Kourosh




Re: AUCTeX to compile each \include file to a separate file

2022-11-23 Thread kaykal


On 22 Nov 2022, at 12:34, Thibaut Verron wrote:

> Le mar. 22 nov. 2022 à 19:07, kaykal  a écrit :
>
>> Is there anyway to generate different PDF files for each included file in 
>> master file with AUCTeX.
>
>> More specifically, I have one master file called “master”, in which, I have 
>> included two chapters: “chapter01” and “chapter02”.  I want AUCTeX (after 
>> appropriate number of runs) to generate one PDF for the master file, one PDF 
>> for chapter01, one PDF for chapter02 and (the bonus) one PDF for 
>> bibliography.
>
>  You can have the pdf for the different chapters by using the selective 
> compilation functions: open the file chapter01, and execute 
> TeX-command-buffer (C-c C-b) should compile the appropriate chapter.
>
>  The bibliography is more tricky, I don't know if there is a solution.
>
>  Also, numbers and references will be local to the chapter: you will get 
> files which are suitable for a quick preview, but concatenating them will not 
> be as good as compiling the whole document together.

Thank you Thibaut.  TeX-command-buffer is a very neat solution for when I am 
working on these documents individually and want a quick preview.  Thanks for 
pointing that out.  But if possible, I am looking to automatically generate 
different PDF files (4 in the above example) with one command.

The particular case that I need this is for NIH grant proposals, where they 
need individual documents and one big reference file containing all the 
references throughout out the proposal.

Kourosh




Re: AUCTeX to compile each \include file to a separate file

2022-11-23 Thread Colin Baxter
> Arash Esbati  writes:

> Hi Kourosh, kaykal  writes:

>> Is there anyway to generate different PDF files for each included
>> file in master file with AUCTeX.
>> 
>> More specifically, I have one master file called “master”, in
>> which, I have included two chapters: “chapter01” and “chapter02”.
>> I want AUCTeX (after appropriate number of runs) to generate one
>> PDF for the master file, one PDF for chapter01, one PDF for
>> chapter02 and (the bonus) one PDF for bibliography.

> I'm not sure how you plan to do that, but one solution comes to my
> mind is using \includeonly in the preamble and control the output
> with it.

> See here for details:

>   http://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html

> Best, Arash

\includeonly and use refsection to make bibliographies per chapter. See
this stackexchange question:

https://tex.stackexchange.com/questions/87414/per-chapter-bibliographies-in-biblatex.

If individual chapter biographies are not necessary then why not use
something like PDFtk to split the master pdf into chapter pdfs?


Good luck.



Re: AUCTeX to compile each \include file to a separate file

2022-11-22 Thread Thibaut Verron
Le mar. 22 nov. 2022 à 19:07, kaykal  a écrit :

> Hi everyone,
>
> Is there anyway to generate different PDF files for each included file in
> master file with AUCTeX.
>
> More specifically, I have one master file called “master”, in which, I
> have included two chapters: “chapter01” and “chapter02”.  I want AUCTeX
> (after appropriate number of runs) to generate one PDF for the master file,
> one PDF for chapter01, one PDF for chapter02 and (the bonus) one PDF for
> bibliography.
>

Hi,

You can have the pdf for the different chapters by using the selective
compilation functions: open the file chapter01, and execute
TeX-command-buffer (C-c C-b) should compile the appropriate chapter.

The bibliography is more tricky, I don't know if there is a solution.

Also, numbers and references will be local to the chapter: you will get
files which are suitable for a quick preview, but concatenating them will
not be as good as compiling the whole document together.

Best wishes,
Thibaut


Re: AUCTeX to compile each \include file to a separate file

2022-11-22 Thread Arash Esbati
Hi Kourosh,

kaykal  writes:

> Is there anyway to generate different PDF files for each included file
> in master file with AUCTeX.
>
> More specifically, I have one master file called “master”, in which, I
> have included two chapters: “chapter01” and “chapter02”.  I want
> AUCTeX (after appropriate number of runs) to generate one PDF for the
> master file, one PDF for chapter01, one PDF for chapter02 and (the
> bonus) one PDF for bibliography.

I'm not sure how you plan to do that, but one solution comes to my mind
is using \includeonly in the preamble and control the output with it.

See here for details:

  http://latexref.xyz/_005cinclude-_0026-_005cincludeonly.html

Best, Arash