termcal: 위 첨자 st, nd, th

termcal: 위 첨자 st, nd, th

날짜의 st, nd 및 th를 다음과 같이 위 첨자로 표시하고 싶습니다.

22

어떻게 해야 하나요?

MWE

\documentclass{article}
\usepackage{termcal}

\newcommand{\WFClass}{%
\skipday % Monday (no class)
\skipday % Tuesday (no class)
\calday[Wednesday]{\classday} % Wednesday
\skipday % Thursday (no class)
\calday[Friday]{\classday} % Friday 
\skipday\skipday % weekend (no class)
}

\newcommand{\Holiday}[2]{%
\options{#1}{\noclassday}
\caltext{#1}{#2}
}


\begin{document}
\begin{center}
\begin{calendar}{1/20/2020}{16} % Date Classes Begin & Length in Weeks
\setlength{\calboxdepth}{.3in}
\WFClass
% schedule
%\caltexton{1}{1.1, 1.2 Review}
\caltextnext{1.3, 1.4 Review}
\caltextnext{2.1, 2.2 Linear Equations}
% ... and so on

% Holidays
\Holiday{1/20/2020}{Martin Luther King Day}
\Holiday{3/8/2020}{Spring Break}
% ... and so on

\options{4/26/2020}{\noclassday} % finals week
\options{4/27/2020}{\noclassday} % finals week
\options{4/28/2020}{\noclassday} % finals week
\options{4/29/2020}{\noclassday} % finals week
\options{4/30/2020}{\noclassday} % finals week
\caltext{4/27/2020}{\textbf{Final Exam}}
\end{calendar}
\end{center}
\end{document}

답변1

사용할 수 있습니다 \textsuperscript(그러나 사용해서는 안 됩니다. 위 첨자는 잘 알려진 워드 프로세서가 모든 사용자에게 임의로 적용한 빅토리아 시대의 유물입니다).

\documentclass{article}
\usepackage{termcal}

\makeatletter
\renewcommand\@rdend[1]{\textsuperscript{\ifcase#1 th\or st\or nd\or rd\else th\fi}}
\makeatother


\newcommand{\WFClass}{%
\skipday % Monday (no class)
\skipday % Tuesday (no class)
\calday[Wednesday]{\classday} % Wednesday
\skipday % Thursday (no class)
\calday[Friday]{\classday} % Friday 
\skipday\skipday % weekend (no class)
}

\newcommand{\Holiday}[2]{%
\options{#1}{\noclassday}
\caltext{#1}{#2}
}


\begin{document}
\begin{center}
\begin{calendar}{1/20/2020}{16} % Date Classes Begin & Length in Weeks
\setlength{\calboxdepth}{.3in}
\WFClass
% schedule
%\caltexton{1}{1.1, 1.2 Review}
\caltextnext{1.3, 1.4 Review}
\caltextnext{2.1, 2.2 Linear Equations}
% ... and so on

% Holidays
\Holiday{1/20/2020}{Martin Luther King Day}
\Holiday{3/8/2020}{Spring Break}
% ... and so on

\options{4/26/2020}{\noclassday} % finals week
\options{4/27/2020}{\noclassday} % finals week
\options{4/28/2020}{\noclassday} % finals week
\options{4/29/2020}{\noclassday} % finals week
\options{4/30/2020}{\noclassday} % finals week
\caltext{4/27/2020}{\textbf{Final Exam}}
\end{calendar}
\end{center}
\end{document}

여기에 이미지 설명을 입력하세요

왼쪽 열이 왜 가득 찬 상자를 생성하는지 잘 모르겠습니다.

관련 정보