Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More

Making a list with dates for labels, automatically skipping days

Course Queries Syllabus Queries

Max. 2000 characters
Replies

usr_profile.png

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/5 Friday: Read blah

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.

usr_profile.png

User

( 4 months ago )

Here is a starting point:

enter image description here

\documentclass{article}
\usepackage{advdate,datetime}% http://ctan.org/pkg/{advdate,datetime}
\newenvironment{schedule}
  {\par\longdate\renewcommand{\item}{\par%
    \stepcounter{mycntr}\ifnum\value{mycntr}>3\relax%
      \setcounter{mycntr}{0}\AdvanceDate[3]%
    \else
      \AdvanceDate[2]%
    \fi\today\quad}
  }{\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).

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif