← Previous → Next Contents
Modes and formats
FAQ

Appendix C — Making calendars fit onto a single page

Get rid of unwanted information

Regardless of which format you are using, having extra stuff in the calendar that you don't want isn't going to help.  If you are using a web page somewhere, look for options that allow you to suppress sun and moon events or control the formatting of timestamps.  If you are using XTide directly, you do this using various settings.  The following examples assume command line usage, but you can change settings in several other ways.  See settings for details.

To get rid of unwanted columns for sun and moon events, use the -em command line switch to set an event mask.  E.g, to suppress all sun and moon events, set the event mask to the value pSsMm.  p = phase of moon, S = sunrise, s = sunset, M = moonrise, m = moonset.

To get rid of unwanted verbosity in timestamps (AM/PM and/or time zone), use the -tf command line switch to set the time format string.  E.g., to reduce it to four digits of 24-hour notation, set the time format string to %H%M.  To keep AM/PM but lose the time zone, set the time format string to %l:%M %p.

Other settings added in XTide 2.14 can be used to condense or tweak calendar text:

Scale down HTML

If the calendar that you want to print is on a web page or otherwise in HTML format, the next step is to set up your print scaling to make it fit on the page without a lot of ugly text wrapping.  The process for doing this is slightly different depending on your browser and tends to change along with browser versions, so overly specific instructions would be futile.  Just try different scaling, fit, portrait, and landscape options in print preview until the calendar fits nicely on a page.

Get serious—use LaTeX

The problem with printing calendars from HTML is that HTML was designed for viewing on a monitor.  Whether the result ends up on one page or three when you print it was never supposed to be a concern.  The concept of pagination eventually appeared in style options, but it was never a priority.

The right language to use in this case is LaTeX.  Like HTML, LaTeX is a markup language, but it is designed for typesetting printed documents.

XTide can generate calendars in LaTeX format.  These can be converted to PDFs using pdflatex, and those PDFs can then be printed on any size paper using Adobe Reader.

If you are using XTide through a web page, you just have to hunt for an option to generate a PDF and hope that there is one.

The process to generate and view a PDF from the command line is as follows:

bash-3.00$ tide -l"Location Name" -mc -fl -b"Start Time" -e"End Time" > cal.tex
bash-3.00$ pdflatex cal.tex
bash-3.00$ acroread cal.pdf

The default page geometry in LaTeX mode is probably not optimal for making your calendar look nice.  Experiment with different values for pageheight (-ph 420) and pagewidth (-pw 297) until the calendar looks nice in PDF.  Do not worry that the shape of the pages in the PDF is not what you have in your printer.

Example of nicely formatted calendar

When you are happy with the look of the PDF, do the following to print it.

Adobe Reader

Different versions of Adobe Reader present the same options in different ways.  On the File → Print menu, do whichever applies:

  1. Under Size Options, check Fit, and check Auto portrait/landscape.
  2. Change Page Scaling to Fit to Printable Area, and check Auto-Rotate and Center.


← Previous → Next Contents
Modes and formats
FAQ