GitBucket
4.21.2
Toggle navigation
Snippets
Sign in
Files
Branches
1
Releases
Issues
1
Pull requests
Labels
Priorities
Milestones
Wiki
Forks
nigel.stanger
/
Handbook
Browse code
Updated calendar LaTeX template
master
1 parent
304d05b
commit
e00d73ad0e9db4cc6b53744ebc345dfc532171d8
Nigel Stanger
authored
on 3 Feb 2021
Patch
Showing
1 changed file
calendar/teachingdates/templates/calendar.tex.j2
Ignore Space
Show notes
View
calendar/teachingdates/templates/calendar.tex.j2
% Teaching calendar for \VAR{period} \VAR{year}. \BLOCK{for week, date in weeks.items()} \BLOCK{set eow = (date + eow_offset)} \newcommand{ \BLOCK{- if date|isteaching -} \VAR{period_name}Week\VAR{week|num2words} \BLOCK{- elif date|isbreak -} \VAR{period_name}Break \BLOCK{- else -} WTF \BLOCK{- endif -} }{ \BLOCK{- if date.month == eow.month -} \VAR{date.strftime("%d")}--\VAR{eow.strftime("%d")} \\ \VAR{date.strftime("%b")} \BLOCK{- else -} \VAR{date.strftime("%d %b")} \\ --\VAR{eow.strftime("%d %b")} \BLOCK{- endif -} } \BLOCK{endfor}
% Teaching calendar for \VAR{period} \VAR{year}. \BLOCK{for week, date in data.items()} \BLOCK{set eow = date|eow(end_of_week)} \newcommand{ \BLOCK{- if date|isteaching -} \VAR{period_name}Week\VAR{week|num2words} \BLOCK{- elif date|isbreak -} \VAR{period_name}Break \BLOCK{- else -} WTF \BLOCK{- endif -} }{ \BLOCK{- if date.month == eow.month -} \VAR{date.strftime("%d")}--\VAR{eow.strftime("%d")} \\ \VAR{date.strftime("%b")} \BLOCK{- else -} \VAR{date.strftime("%d %b")} \\ --\VAR{eow.strftime("%d %b")} \BLOCK{- endif -} } \BLOCK{endfor}
Show line notes below