how to save the files that i am including in a latex compilation?

12 views
Skip to first unread message

christian_yale

unread,
Aug 13, 2008, 3:55:41 AM8/13/08
to LaTeX Users Group
hello there,

i do have a 'master' .tex file, within it, i am calling several
other .tex files (they are sections, and also some are tables), using
\include, as well as figures as pdf or jpg.

i compile it as pdflatex without any problem.

I was wondering if it is possible to save in some way all the external
files that i am using in order to compile the master document??,

thanks in advance
c

evan

unread,
Aug 16, 2008, 9:42:26 PM8/16/08
to LaTeX Users Group
Emacs with Auctex can do that.

Christian Salas

unread,
Aug 17, 2008, 8:28:46 PM8/17/08
to latexus...@googlegroups.com
how? Please explain further

I do use emacs + auctex (under Linux)

jrothim

unread,
Aug 18, 2008, 10:29:49 AM8/18/08
to LaTeX Users Group
You should use the command
\input{filename.tex}
to read in external files with your Latex content. I think it is
different from the \include command.

In the subsidiary files, you will also need to define the variable
"tex-master" to "/home/user/master.tex".
Defining it in the footer sometimes works:

%%% Local Variables:
%%% TeX-master: "../master.tex"
%%% End:

Though if not just do it explicity (M-x set-variable).



On Aug 17, 8:28 pm, "Christian Salas" <cselja...@gmail.com> wrote:
> how? Please explain further
>
> I do use emacs + auctex (under Linux)
>

Christian Salas

unread,
Aug 18, 2008, 10:37:17 AM8/18/08
to latexus...@googlegroups.com
Hi jrothim

i actually use \input, not include (my mistake).

now in the subsidiary files, how i define the variable 'tex-master'???, do i have to put those 3 lines with %%% at the end of each file??, and then after compiling, where is going to appear the list of files that i have included in the final compiled document?

sorry for the questions, maybe silly, but i want to understand this

evan

unread,
Aug 19, 2008, 9:12:21 AM8/19/08
to LaTeX Users Group
You need to change your start-up .emacs file.
I haven't done this myself but I find this website quite explanatory
http://www.gnu.org/software/auctex/manual/auctex/Multifile.html

On Aug 17, 8:28 pm, "Christian Salas" <cselja...@gmail.com> wrote:
> how? Please explain further
>
> I do use emacs + auctex (under Linux)
>

Christian Salas

unread,
Aug 19, 2008, 4:58:30 PM8/19/08
to latexus...@googlegroups.com
i tried this, but i cannot make it to work!!!, uffff, any further help would be great!!

i did the following

in my .emacs file
- i add
(setq-default TeX-master t) ; Query for master file.

and i did also create a folder called "auto" in the directory where i am working,
i tried also putting
%%% Local Variables:
%%% TeX-master: "master"
%%% End:
at the end of the 'master' tex file and/or at the end of each of the other tex files that are going go be loaded with \input

but still nothing happened!!

can you give me more help, please?

evan

unread,
Aug 20, 2008, 10:00:20 AM8/20/08
to LaTeX Users Group
About the variable tex-master:
If this variable is nil, AUCTeX will query you for the master file
when you open any tex file.
If the variable is t, then AUCTeX will assume the file that you just
opened is a master file itself.
If the variable is shared, then AUCTeX will query for the name of the
master file, but will not change the file.

Try setting tex-master to nil instead of t. Also remove the
%%% Local Variables:
%%% TeX-master: "master"
%%% End:
from your files. Emacs will include them automatically.

Note the command
(C-c C-d) Save all buffers known to belong to the current document.

Christian Salas

unread,
Aug 20, 2008, 3:44:23 PM8/20/08
to latexus...@googlegroups.com
done, but still no success

i did as you suggested, run pdflatex in my master file, which is not called master.tex, then emacs say error, then i press "ctrl+c ` ", and i see the output message error, which is here (between ****)

**********************
Running `LaTeX' on `master' with ``pdflatex  -interaction=nonstopmode "\input" master.tex''
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, loaded.
! I can't find file `master.tex'.
<*> \input master.tex
                    
Please type another input file name
! Emergency stop.
<*> \input master.tex
**********************

but at the same time, emacs asked me (in the final space within the emacs windows) with blue letters
****
Master file (default this file): ~/dissertation/prospectus/
****

then i wrote the name of the file following /prospectus/prospectus01.tex, and i click enter, and put me in a buffer called "Web2C 7.5.6" with nothing on it, and appear a message (in the error buffer or emacs output buffer) as follows

***********************
ERROR: I can't find file `master.tex'.

--- TeX said ---
<*> \input master.tex
--- HELP ---
TeX can't find a file that it needs. If the name of the missing file
has the extension tex, then it is looking for an input file that you
specified---either your main file or another file inserted with an
\input or \include command. If the missing file has the extension sty
, then you have specified a nonexistent document style or style
option.
***********************

and a new file was created called "texput.log", which contains the following text

*******
This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=pdflatex 2008.5.7)  20 AUG 2008 15:36
entering extended mode
 %&-line parsing enabled.
**\input master.tex

! Emergency stop.
<*> \input master.tex
                    
*** (job aborted, file error in nonstop mode)

 
Here is how much of TeX's memory you used:
 3 strings out of 95086
 113 string characters out of 1183199
 45034 words of memory out of 1500000
 3277 multiletter control sequences out of 10000+50000
 3640 words of font info for 14 fonts, out of 1200000 for 2000
 28 hyphenation exceptions out of 8191
 4i,0n,3p,1b,8s stack positions out of 5000i,500n,6000p,200000b,5000s
!  ==> Fatal error occurred, no output PDF file produced!
*******



any new suggestions????, thanks for helping me

c

evan

unread,
Aug 21, 2008, 9:42:49 AM8/21/08
to LaTeX Users Group
In addition put

% Local variables:
% mode: tex-pdf
% TeX-master: "mymaster.tex"
% End:

at the end of each file, where "mymaster.tex" is the name of your
master file.
I am not sure if mode should be "tex-pdf" of "latex" but you can try
both.
Reply all
Reply to author
Forward
0 new messages