컴파일 오류: (\c@days 명령이 이미 정의되어 있으며 최종{} 환경은 무시됩니다.)

컴파일 오류: (\c@days 명령이 이미 정의되어 있으며 최종{} 환경은 무시됩니다.)

나는 Calendar.sty 패키지(아래에 추가됨)를 사용하여 달력을 만들려고 합니다. 이를 위해 R에서 knitr .rnw를 사용하여 달력 매개변수가 있는 행렬을 반복하고 .tex 파일을 만들었습니다. 내 눈에는 .tex 파일이 작동해야 하지만 아래 오류와 함께 컴파일되지 않습니다. 해당 패키지에 약간의 충돌이 있다고 확신하지만 정확히 무슨 일이 일어나는지 알 수 없어서 문제를 해결할 수 없습니다.

내 오류 메시지는 다음 두 가지입니다(그러나 반복됨).

\@calendarwidth=\dimen274
\@currday=\count300
\@numdays=\count301
! LaTeX Error: Command \c@days already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                              
                                                      
l.148 \end{calendar}
                        
Your command was ignored.
Type  I <command> <return>  to replace it with another command,
or  <return>  to continue without it.

\c@days가 어떻게 작동하는지, 무엇과 충돌하는지 전혀 모르지만 어떤 이유로 환경을 종료해야 하는 \end{calendar}도 무시하므로 다음 페이지에서 새 캘린더 환경을 만들 수 있습니다.

내 .tex 파일(첫 번째 오류는 \begin{document}에서 발생하고 다른 오류는 \end{calendar}에서 발생함):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Monthly Calendar
% LaTeX Template
% Version 1.2 (February 3, 2023)
%
% This template was downloaded from:
  % http://www.LaTeXTemplates.com
%
% Original author:
  % Evan Sultanik with modifications by 
% Vel ([email protected])
%
% License:
  % CC BY-NC-SA 4.0 (https://creativecommons.org/licenses/by-nc-sa/4.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
  % PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------
  
\documentclass[10p]{article}\usepackage[]{graphicx}\usepackage[]{xcolor}
% maxwidth is the original width if it is less than linewidth
% otherwise use linewidth (to make sure the graphics do not exceed the margin)
\makeatletter
\def\maxwidth{ %
  \ifdim\Gin@nat@width>\linewidth
    \linewidth
  \else
    \Gin@nat@width
  \fi
}
\makeatother

\definecolor{fgcolor}{rgb}{0.345, 0.345, 0.345}
\newcommand{\hlnum}[1]{\textcolor[rgb]{0.686,0.059,0.569}{#1}}%
\newcommand{\hlstr}[1]{\textcolor[rgb]{0.192,0.494,0.8}{#1}}%
\newcommand{\hlcom}[1]{\textcolor[rgb]{0.678,0.584,0.686}{\textit{#1}}}%
\newcommand{\hlopt}[1]{\textcolor[rgb]{0,0,0}{#1}}%
\newcommand{\hlstd}[1]{\textcolor[rgb]{0.345,0.345,0.345}{#1}}%
\newcommand{\hlkwa}[1]{\textcolor[rgb]{0.161,0.373,0.58}{\textbf{#1}}}%
\newcommand{\hlkwb}[1]{\textcolor[rgb]{0.69,0.353,0.396}{#1}}%
\newcommand{\hlkwc}[1]{\textcolor[rgb]{0.333,0.667,0.333}{#1}}%
\newcommand{\hlkwd}[1]{\textcolor[rgb]{0.737,0.353,0.396}{\textbf{#1}}}%
\let\hlipl\hlkwb

\usepackage{framed}
\makeatletter
\newenvironment{kframe}{%
 \def\at@end@of@kframe{}%
 \ifinner\ifhmode%
  \def\at@end@of@kframe{\end{minipage}}%
  \begin{minipage}{\columnwidth}%
 \fi\fi%
 \def\FrameCommand##1{\hskip\@totalleftmargin \hskip-\fboxsep
 \colorbox{shadecolor}{##1}\hskip-\fboxsep
     % There is no \\@totalrightmargin, so:
     \hskip-\linewidth \hskip-\@totalleftmargin \hskip\columnwidth}%
 \MakeFramed {\advance\hsize-\width
   \@totalleftmargin\z@ \linewidth\hsize
   \@setminipage}}%
 {\par\unskip\endMakeFramed%
 \at@end@of@kframe}
\makeatother

\definecolor{shadecolor}{rgb}{.97, .97, .97}
\definecolor{messagecolor}{rgb}{0, 0, 0}
\definecolor{warningcolor}{rgb}{1, 0, 1}
\definecolor{errorcolor}{rgb}{1, 0, 0}
\newenvironment{knitrout}{}{} % an empty environment to be redefined in TeX

\usepackage{alltt} % Can also use 9pt or 11pt for a smaller or larger overall font size

%\usepackage{typearea} % makes switching between landscape and portrait possible
% use: 
  %\newpage
%\KOMAoptions{paper={portrait or landscape},pagesize}
%\recalctypearea
% to set up a change in rotation

\usepackage{calendar} % Use the calendar.sty style bundled with the template
\usepackage{parallel}
%\usepackage{enumitem}
\usepackage[landscape, a4paper, margin=0.5in]{geometry} % Page dimensions and margins
\usepackage{tikz}
\usepackage{pgffor} % creating forloops with foreach
\usepackage{forloop} %creating forloops with forloop
\usepackage{tabularx}
%\setlist{nosep}
%\usepackage{palatino} % Use the Palatino font

%----------------------------------------------------------------------------------------
  
%library(tikzDevice)


\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\begin{document}
tlmgr search --global --file calendar.sty
tlmgr search --global --file forloop.sty
tlmgr search --global --file palatino.sty
\pagestyle{empty}
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
January
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Level 8}{easy non-crimp boulders of new set \eventskip chinups \eventskip stretching}
\day{Level 8}{new set \dayheader{Notes:}{}}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
February
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
March
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
April
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Level 8}{easy non-crimp boulders of new set \eventskip chinups \eventskip stretching}
\day{Level 8}{new set \dayheader{Notes:}{}}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
May
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
June
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
July
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Level 8}{easy non-crimp boulders of new set \eventskip chinups \eventskip stretching}
\day{Level 8}{new set \dayheader{Notes:}{}}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
August
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
September
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Level 8}{new set \dayheader{Notes:}{}}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
October
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Level 8}{new set \dayheader{Notes:}{}}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
November
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\BlankDay
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\noindent
\StartingDayNumber=2
\begin{center}
\textsc{\LARGE{ 
December
}}\newline
\textsc{\large {2024}}
\end{center}
\begin{calendar}{\linewidth}
\BlankDay
\setcounter{calendardate}{1}
\newcounter{days}{0}
\day{Level 8}{new set \dayheader{Notes:}{}}
\day{~}{~}
\day{Hangboard}{\dayheader{Notes:}{}}
\day{Strength}{weighted Pullups \eventskip Deadlifts \eventskip Benchpulls \eventskip Flys \eventskip Muscleups}
\day{~}{\vspace{2.5cm}}
\day{Kilterboard}{Notes:}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\day{~}{\vspace{2.5cm}}
\finishCalendar
\end{calendar}
\newpage
\end{document}

달력.sty:

\NeedsTeXFormat{LaTeX2e}

\def\CalendarVersion{3.3}
\def\CalendarVersionDate{2023/02/03}

\ProvidesClass{calendar}[\CalendarVersionDate
           LaTeX2e class file `calendar' v\CalendarVersion]

\typeout{'calendar' style \CalendarVersion \CalendarVersionDate.}
\typeout{Created by Evan Sultanik}
\typeout{****** Bugs/comments/suggestions/technicalities to Evan Sultanik -- [email protected] ******}

\RequirePackage{tabularx}

\def\@CALtrue{1}
\newcount\@currentdaynum
\newcounter{calendardate}
\newcount\StartingDayNumber

\def\dayheader#1#2{
  \vspace{2pt} % Whitespace above the heading
  \begin{minipage}[t]{0.87\hsize}
    \raggedright
    \small % Small font size
    \textit{#1}
  \end{minipage}
  \begin{minipage}[t]{0.1\hsize}
    \raggedleft
    \textit{#2}
  \end{minipage}%
}
\def\activities#1{
  \parbox{\hsize}{\vspace*{5pt}\raggedright\scriptsize #1}\smallskip
}

\let\@colbreak=&

\def\printdayname#1{\hfil\textsc{#1}\hfil}

\newcommand{\dayname}[1]{
  \ifnum#1=1 Sunday\else
  \ifnum#1=2 Monday\else
  \ifnum#1=3 Tuesday\else
  \ifnum#1=4 Wednesday\else
  \ifnum#1=5 Thursday\else
  \ifnum#1=6 Friday\else
  \ifnum#1=7 Saturday\else
    \PackageError{calendar}{Unrecognized day number: #1!}
  \fi\fi\fi\fi\fi\fi\fi
}

\StartingDayNumber=1
\newenvironment{calendar}[1]{
  \newdimen\@calendarwidth
  \@calendarwidth=#1
  \begingroup
    \def\@calendarmode{\@CALtrue}
  \def\day##1##2{
  \if\@calendarmode\@CALtrue\else\PackageWarning{calendar}{The '\day' macro is expected to be used in the 'calendar' environment!}\fi
  \ifnum\@currentdaynum>7\global\@currentdaynum=1\fi
  \global\advance\@currentdaynum by 1
  \vspace{-0.5\baselineskip} % Reduce the whitespace above the first day heading
  \dayheader{##1}{\thecalendardate}\def\daysep{\vskip1pt\hrule\vskip1pt}
  \activities{##2}
  \addtocounter{calendardate}{1}
  \ifnum\@currentdaynum>7\@arraycr\hline\else&\fi
  }
\def\finishCalendar{
  \ifnum\@currentdaynum=7 \\\hline\else
  \ifnum\@currentdaynum=6 &\\\hline\else
  \ifnum\@currentdaynum=5 &&\\\hline\else
  \ifnum\@currentdaynum=4 &&&\\\hline\else
  \ifnum\@currentdaynum=3 &&&&\\\hline\else
  \ifnum\@currentdaynum=2 &&&&&\\\hline\else
  \ifnum\@currentdaynum=1 &&&&&&\\\hline
  \fi\fi\fi\fi\fi\fi\fi
}
\def\eventskip{\\\vspace{4pt}}
  \def\BlankDay{
  \if\@calendarmode\@CALtrue\else\PackageWarning{calendar}{The '\calendarday' macro is expected to be used in the 'calendar' environment!}\fi
  \ifnum\@currentdaynum>7\global\@currentdaynum=1\fi
  \global\advance\@currentdaynum by 1
  \addtocounter{calendardate}{1}
  \ifnum\@currentdaynum>7\@arraycr\hline\else&\fi
  }

    \setcounter{calendardate}{1}
    \newcount\@currday
    \@currday=\StartingDayNumber
    \newcount\@numdays
    \@numdays=7
    \let\@cbreak=&
    \tabularx{\@calendarwidth}{|X|X|X|X|X|X|X|} \hline
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 \\ \hline \hline
      \@currentdaynum=1
      \let\@firstline=\@CALtrue
}{
    \endtabularx
  \endgroup
}

\pagestyle{empty} % Disable default headers and footers

\setlength{\parindent}{0pt} % Stop paragraph indentation

답변1

당신은 여러

\newcounter{days}{0}

\newcounter인수가 하나만 있으므로 이것들은 모두 있어야합니다

\setcounter{days}{0}

그런 다음 문서 서문에 카운터(한 번만!)를 할당해야 하므로 추가하십시오.

\newcounter{days}

관련 정보