-
Notifications
You must be signed in to change notification settings - Fork 474
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
Adjustable problem numbers don't affect header until the second page #8
Comments
Ping! |
ocelotsloth
added a commit
to ocelotsloth/latex-homework-template
that referenced
this issue
Dec 7, 2020
This patch fixes a bug where the header's problem counter is not updated when the problem counter is overriden. fixes jdavis#8 Signed-off-by: Mark Stenglein <mark@stengle.in>
@kiarashgl can you give that a try? You just need to add the following line: \nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{} Into the %
% Homework Problem Environment
%
% This environment takes an optional argument. When given, it will adjust the
% problem counter. This is useful for when the problems given for your
% assignment aren't sequential. See the last 3 problems of this template for an
% example.
%
\newenvironment{homeworkProblem}[1][-1]{
\ifnum#1>0
\setcounter{homeworkProblemCounter}{#1}
\nobreak\extramarks{Problem \arabic{homeworkProblemCounter}}{}\nobreak{}
\fi
\section{Problem \arabic{homeworkProblemCounter}}
\setcounter{partCounter}{1}
\enterProblemHeader{homeworkProblemCounter}
}{
\exitProblemHeader{homeworkProblemCounter}
} |
@ocelotsloth That fixes the problem. Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey,
One of my professors likes to number his problems as if the homework was really one giant homework, instead of multiple weekly assignments. As in, problem 1 on homework 2 is really problem 7 for example.
I noticed that the header still says problem 1 on the first page instead of problem x, though the problem numbers are correct from the second page onwards.
It's not a biggie, but hopefully, it can be fixed soon :)
The text was updated successfully, but these errors were encountered: