termcal: 上付き文字 st、nd、th

termcal: 上付き文字 st、nd、th

日付の st、nd、th を次のように上付き文字にしたいと思います。

22

どうすればいいのですか?

ムウェ

\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}

ここに画像の説明を入力してください

左の列にオーバーフルボックスが生成される理由がわかりません。

関連情報