Newer
Older
Handbook / calendar / teachingdates / templates / lab.tex.j2
  1. % Lab dates for \VAR{paper} \VAR{period} \VAR{year}.
  2. \newcount\lecnum
  3. \newcount\weeknum
  4.  
  5. \newcommand{\LabDate}[1]{%
  6. \lecnum #1\relax%
  7. \advance\lecnum by -1\relax%
  8. \ifcase\lecnum%
  9. \BLOCK{for lab, date in weeks.items()}
  10. \BLOCK{if not loop.first}\or \BLOCK{endif -}
  11. \VAR{date.day} \VAR{date.strftime("%B")}% lab \VAR{lab}
  12. \BLOCK{endfor}
  13. \else ????%
  14. \fi%
  15. }
  16.  
  17. \newcommand{\LabDateByWeek}[2]{%
  18. \weeknum #1\relax%
  19. \advance\weeknum by -1\relax%
  20. \multiply\weeknum by 2\relax%
  21. \advance\weeknum by #2\relax%
  22. \LabDate{\the\weeknum}%
  23. }
  24.