Tuesday, June 23, 2015

A multilingual, customisable CD/floppy disk jewel case calendar with LaTeX

This post is also published on the Overleaf blog.

LaTeX's versatility makes it a rather handy (and free!) tool for creating various goodies, including monthly calendars. So here's my stab at creating a LaTeX class and template for creating customisable, multilingual monthly calendars, that fit in CD or 3.5" disk jewel cases. Pictures and events can be added, and you can choose any month range for your calendar — it's not necessary that they begin on January and end on December.

You can make them for personal use, gifts or memorabilia for special events e.g. anniversaries. They may also be used for publicity or merchandise if you happen to be running a club or society.

For example, you could make a calendar showcasing birds frequenting your neighbourhood for your local birdwatching club. Work-wise, you might want to make a calendar for your journal paper reading group, highlighting important dates for assignments and conference submissions in your field in the coming semester.

Getting the Templates

You can clone the git repository on Bitbucket, or download a .zip file. Alternatively, you can also open and edit a CD-sized or floppy disk-sized calendar template on Overleaf.

The Monthly Calendars

The cdcalendar class will set up the calendar size to fit in a CD jewel case, and lay them out on an A4-sized paper:

\documentclass[12pt]{cdcalendar}
\begin{document}

%% June 2015
\monthCalendar{2015}{06}
\clearpage

%% July 2015
\monthCalendar{2015}{07}
\end{document}

If you want to make a smaller calendar to fit in 3.5" floppy cases instead, pass the small option to the cdcalendar class:

\documentclass[9pt,small]{cdcalendar}

For those who are interested in the technical details: the calendar is rendered with tikz, and the 2-up or 4-up layout is done with pgfpages.

Adding Illustrations

I've defined a \illustration command for adding graphics to each page of the calendar:

\usepackage{graphicx}

%% syntax: \illustration[caption]{width}{image-file-name}
\illustration[We had fun at the birthday party!]{8.5cm}{Party.jpg}

The image will be added at the top left of the current page. The original proportion will be preserved, so you do have to choose an illustration of appropriate proportions to fit the empty space.

Adding/marking events

You can mark events on each month using the \event command:

\event{2015-10-25}{Daylight saving time ends}

The event will be listed above the monthly calendar, and the date is circled in the calendar itself. Events must be given after the relevant \monthCalendar and on the same page.

If your event spans over several days, you can give the duration (in days) as an option to \event:

\event[5]{2015-07-26}{ACL 2015, Beijing}

Alternatively, you can also give the end date as the option instead:

\event[2015-07-31]{2015-07-26}{ACL 2015, Beijing}

Both forms of the command will give the same output.

If an event spans two months, e.g. \event[9]{2015-06-27}{Summer Camp}, you'll have to issue this command in both months i.e. once for June and once for July:

\monthCalendar{2015}{06}
\event[9]{2015-06-27}{Summer Camp}
\clearpage

\monthCalendar{2015}{07}
\event[9]{2015-06-27}{Summer Camp}
\clearpage

Multilingual Calendars

The dates, month names and weekday initials can be localised to languages that are supported by the babel, translator and datetime2.

For example, to get a calendar with Spanish dates, just pass spanish as a class option:

\documentclass[12pt,spanish]{cdcalendar}

We've tested the following language options: british, spanish, french, ngerman, italian, portuges, polish, croatian, greek.

Just remember to use LuaLaTeX to compile your project if it's in french -- it doesn't work well with PDFLaTeX, and XeLaTeX doesn't work well for this template.

Customising styles

The fonts and colours of most elements can be customised at any point in the calendar; take a look at the templates to see some examples. For convenience's sake, a \makeCover command (and the necessary metadata commands) is also provided.

It's been a lot of fun creating this template, and I'm sure you'll find many more uses for this calendar. Enjoy!

Wednesday, March 4, 2015

Friday, February 27, 2015

LaTeX Class and Template for IIUM Thesis

Moaaz Elhag Ali (email address in the .cls file) has created a LaTeX thesis class and template for the International Islamic University Malaysia (IIUM), by modifying the UMalayaThesis class files. He has requested that I host the files here so that it may benefit IIUM students. iiumthesis.cls and template files can be downloaded here.

Thursday, January 29, 2015

Monday, December 29, 2014

Malaysian University Thesis Templates on Overleaf

There, I’ve gone and published my thesis document classes and templates on Overleaf (previously writeLaTeX).


At some point I’ll probably get round to uploading the university-themed beamer templates, too. :-)

(A little more information about Overleaf after the divider and disclaimer)



(Disclaimer: I provide LaTeX-related community support for Overleaf — so you probably won’t want to just take my word for the following; go try it out yourself! :-)

Overleaf provides an online collaborative environment for authoring and publishing research using LaTeX. One nice thing about Overleaf is the rich text mode — which hides most LaTeX stuff from collaborators who are not familiar with it.



Another nice thing is the commenting facility.



So if you’d like to use LaTeX to write your thesis but your supervisor balks at it, try introducing them to Overleaf’s rich text mode and commenting feature. They just might be convinced!

Wednesday, November 26, 2014

umalayathesis Updated

The umalayathesis document class (for Universiti Malaya theses) has been updated — you can now include a Malay abstract in addition to the English abstract. Download here, or get it from bitbucket.

Friday, September 26, 2014

My slides source codes for MOSC 2014 talks

I presented something on Android Kernel/ROM at the Malaysian Open Source Conference (MOSC) 2014. I did my presentation with beamer. Here are the slides and the source codes at Github





Source at github, here