[texworks] Problem of compiling several tex files in one main file
Charles Nix
cnix at bargerandnixorgans.com
Sat Nov 16 20:32:50 CET 2024
First off, I'm not a windows user, but no one else has replied, so I will offer a couple of thoughts for you to try.
1) The error is coming from your TeX engine, not TeXworks, so a general TeX mail list might get you more answers.
2) The error appears to be a problem writing an .aux file in the subdirectory with the chapter .tex files. Is writing to that directory available to your TeX engine?
3) A quick search shows several similar questions on stack exchange forums. One thing mentioned is that writing .aux files is restricted to a single directory for security reasons, unless you set a command line option.
I would try moving the main and all chapters into the same directory, adjusting your path settings to match, and see if that works.
Charles Nix
-----Original Message-----
From: qian <zhutaoqian at gmail.com>
To: texworks <texworks at tug.org>
Date: Friday, 15 November 2024 5:57 PM EST
Subject: [texworks] Problem of compiling several tex files in one main file
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/20241116/14dd5685/attachment.htm>
More information about the texworks
mailing list.