[texworks] Problem of compiling several tex files in one main file
qian zhutao
zhutaoqian at gmail.com
Fri Nov 15 21:25:21 CET 2024
Hello!
It's really a pleasure to use Texworks to write papers, useful and extremely easy to handle.
However, I've encountered a problem with several tex files in one main file. I don't quite understand the instructions in the manual. I'm writing an article with more than 10 sections, and I want to do them seperately in 10 tex files and then use \include command to add them to the main file, but it keeps sending errors.
In the main file when I compile it shows the following:
"! I can't write on file `"F:/LaTex works/test/sections/1.aux"'.
\@include ...mmediate \openout \@partaux "#1.aux"
\immediate \write \@partau...
l.49 \include{F:/LaTex works/test/sections/1.tex}
(Press Enter to retry, or Control-Z to exit; default file extension is `.tex')
Please type another output file name: "
And after I enter the output file name, like "111", it worked but created a new tex file "111.tex" sort like this
" \relax
\providecommand\hyper at newdestlabel[2]{}
\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}\protected at file@percent }
\@setckpt{F:/LaTex works/test/sections/1}{
\setcounter{page}{2}
\setcounter{equation}{0}
\setcounter{enumi}{0}
\setcounter{enumii}{0}
\setcounter{enumiii}{0}
\setcounter{enumiv}{0}
\setcounter{footnote}{0}
\setcounter{mpfootnote}{0}
\setcounter{part}{0}
\setcounter{section}{1}
\setcounter{subsection}{0}
\setcounter{subsubsection}{0}
\setcounter{paragraph}{0}
\setcounter{subparagraph}{0}
\setcounter{figure}{0}
\setcounter{table}{0}
\setcounter{parentequation}{0}
\setcounter{section at level}{1}
\setcounter{Item}{0}
\setcounter{Hfootnote}{0}
\setcounter{bookmark at seq@number}{1}
\setcounter{caption at flags}{0}
\setcounter{continuedfloat}{0}
\setcounter{KVtest}{0}
\setcounter{subfigure}{0}
\setcounter{subfigure at save}{0}
\setcounter{lofdepth}{1}
\setcounter{subtable}{0}
\setcounter{subtable at save}{0}
\setcounter{lotdepth}{1}
}"
My working location for the subfiles is
F:/LaTex works/test/sections,
So my include command is
\include{F:/LaTex works/test/sections/1.tex}
And the main file is in
F:/LaTex works/test/,
so as wrote in the manual I add this
% !TeX root = F:/LaTex works/test/main.tex
at the begining og the subdocument with no preamble or a document environment.
I would like to know whether it is a normal situation, or I've done something wrong.
If there's problem with my side, I'd like to know how to solve this problem, cause it's bit annoying to type something for everying single subfile included in the main file.
Thanks a lot and wish you a very happy weekend!
----- configuration info -----
TeXworks version : 0.6.8 ("github") [r.6b1c6ab, 2023/2/18 上午 11:42]
Install location : D:/Program Files (x86)/texlive/2023/tlpkg/texworks/texworks.exe
Library path : C:/Users/Schlichting/AppData/Roaming/TUG/TeXworks/
pdfTeX location : D:/Program Files (x86)/texlive/2023/bin/windows/pdftex.exe
Operating system : Windows 10, 64-bit
Qt version : 5.15.8 (build) / 5.15.8 (runtime)
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texworks/attachments/20241115/27112f6c/attachment.htm>
More information about the texworks
mailing list.