-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation errors when using \includeonly #10
Comments
Hi! The code compiles without errors for me. Maybe you have some leftovers from old versions of the package in the aux file. Do you still get an error after cleaning up all auxiliary files? |
Just tried it : cleaned up the aux files, compiled it one time without the includeonly and compiled it another time with it. I still get the error. |
Hmm, I see. So the reproduce the error, one first needs to compile without the includeonly, and then (without cleaning the aux files) add the includeonly and compile again. I can try to look into it, but an easy fix is to clean up again before compiling... |
Seems a good fix for now, I tested several situations where I thought the lack of auxiliairy files would raise an issue, but it doesn't in my project. Should I close the issue or leave it for now ? |
If you are happy, feel free to close it. I played a bit around and don't see an easy fix for this. The error is caused by trying to access a reference defined in mwe1.tex, which then does not exist. There may be some ways to work around this, but I have no experience with \includeonly and this particular order of compilations seems to start the execution in an incosistent state... |
Thanks for your work ! |
Hi @chrmatt, sorry for digging out this issue. I am having the same problem, although deleting I looked around, and it does not seem that this issue is that common, although using Anyway, I really like this package, but it currently becomes really frustrating! I hope we can find a solution. Thanks again! |
Hi @phdcybersec! I'm glad you like the package and I'm sorry for your frustration. I'll try to take a look soon, but I can't promise a quick fix. If anybody has an idea how to fix this, please let me know and I'll try to make it work. |
If this might help, I've encountered the exact same error message ( |
I don't know how but it seems that my MWE compiles now. If no one opposes, I can close this issue. |
I still get the error following the instructions discussed before:
|
Sorry, I forgot I changed the system-wide algpseudocodex.sty file. Problem's still there. |
Yeah, this is still true today, and like discussed, recompiling the whole document is not always feasible. Please keep the issue open in case someone with more time and/or knowledge comes across it! |
I'm not familiar with package development, but I believe that the error is caused by This line. My MWE goes here:
\documentclass{article}
\usepackage{algpseudocodex}
% \includeonly{plaintext.tex}
\begin{document}
\include{algorithms.tex}
\include{plaintext.tex} % without algorithmic
\end{document}
% error with includeonly
\begin{algorithmic}[1]
\Require{$x$}
\If{$x \geq 0$}
\State \Return $x$
\Else
\State \Return $-x$
\EndIf
\end{algorithmic}
% ok with includeonly
\begin{algorithmic}[1]
\Require{$x$}
\State \Return $|x|$
\end{algorithmic} According to the documentation of the package Without % main.aux
\relax
\@input{algorithms.aux}
% ...
\@input{plaintext.aux}
\expandafter\ifx\csname c@algpx@indentEndPage-0@totc\endcsname\relax\newcounter{algpx@indentEndPage-0@totc}\fi\setcounter{algpx@indentEndPage-0@totc}{0}
\expandafter\ifx\csname c@algpx@indentEndPage-1@totc\endcsname\relax\newcounter{algpx@indentEndPage-1@totc}\fi\setcounter{algpx@indentEndPage-1@totc}{0}
\gdef \@abspage@last{2} With % main.aux
\relax
\@input{algorithms.aux}
\@input{plaintext.aux}
\gdef \@abspage@last{1} Maybe we could use |
Hi !
I have a compilation error when using algorithmic environment when using \includeonly{...} to compile my chapters separately. I'm using an up-to-date texlive install with algpseudocodex v1.1.0.
Here is a MWE showing the issue :
And
mwe1/2.tex
contain :The first error is :
Deleting the .aux files removes the error. According to some colleagues, there was no error in the previous version of algpseudocodex.
The text was updated successfully, but these errors were encountered: