#### Making a list with dates for labels, automatically skipping days

##### Replies

User

( 4 months ago )

I'm making my first syllabus in LaTeX and would like to know if there is a LaTeX-y way to generate the course schedule. Something like:

7/8 Monday: Blah

7/10 Wednesday: Blah

7/12 Friday: Blah

The course is Monday-Wednesday-Friday, so I'm looking for a way to generate a list that will skip Tuesday, Thursday, Saturday and Sunday.

I realize that simply manually editing the labels to reflect the dates would be easy enough, there are only 40 or so class meetings, but is there a way (package or native commands I'm unfamiliar with) to do this in a more automated way? Especially because it would make using this syllabus as a template for future syllabi much easier.

User

( 4 months ago )

Here is a starting point:

\documentclass{article}
\newenvironment{schedule}
{\par\longdate\renewcommand{\item}{\par%
\stepcounter{mycntr}\ifnum\value{mycntr}>3\relax%
\else
}{\par}
\newcounter{mycntr}
\begin{document}
\begin{schedule}
\item Something
\item Something else
\item Relax
\item Go to the sea
\item Something
\item Something else
\item Relax
\item Go to the sea
\end{schedule}
\end{document}

It would be possible to adjust the alignment as well as a starting date via an optional argument (say).

Ra
04-Sep-2019

2 Replies

Ra
05-Sep-2019

2 Replies

11-Sep-2019

0 Replies

12-Sep-2019

0 Replies

Lu
10-Jul-2019