Basic OpenType support in OpenOffice.org

Yay, I completely missed that OpenOffice.org finally supports OpenType fonts… Only basic support though, all the real OpenType candy isn’t properly supported yet. It’ll probably take another ice age to pass before OpenOffice.org will properly support OpenType.

However without Sun or Oracle holding it back LibreOffice may stand a better chance of staying up to speed on current technology.

Printing & Binding

In the past I’ve dealt with the typesetting of documents and the selection of paper to be printed on. However this obviously leaves two steps: printing and binding. Here are some fast tips:

When printing an important document (like for example your thesis) always try to use a Laser printer, even if this means you would need to have it printed elsewhere. Laser printers generally have higher resolutions which make the characters/glyphs cleaner and smoother. Laser printed documents also should generally last longer in archives.

If you fail to gain access to a decent Laser printer, you can fall back to your inkjet printer. Preferably use original cartridges. The cheaper refill inks often bleed more, and quite likely may not last in archives. Most original vendor inks should easily last decades in proper archival circumstances.

In both cases you should avoid “Fast” or “Draft” printing modes, always check your printer is set to “High Quality”.

Finally when you’re done printing you should have your important document bound. The most common way to bind documents is to use a plastic coil. But don’t! Plastic coil binding looks cheap (and actually is cheap). Plastic coil binding often isn’t durable enough to stand the rigors of being intensively handled by multiple people.

The next option would be to have your document glued. This process is relatively expensive. Most schools don’t offer it, you’ll need to look for a more professional copyshop for that. Glued documents are reasonably durable and look just fantastic.

The final and most durable option would be metal coil binding. A metal coil will resist any trials you throw at it, the paper will give way first. Metal coils are cheaper than glueing, but avoids the cheap look that plastic coils induce. Most shops will have you choose between bare metal and black metal coils. You should use black metal coils to go with white paper for maximum contrast and bare metal coils with creme paper to complement its natural/elegant look.

Paper

In the past I have frequently ranted about typography, however I’ve been forgetting an essential aspect: Paper! The plain old 80gsm plain white office paper just won’t cut it. When selecting paper for official publications you should consider the following aspects:

  • Color: This is heavily dependent on your selection of fonts. Whenever you use sans-serif fonts in your publication you should stick with white paper. If you went with old style serif fonts (like Garamond, Palatino) you might want to consider using beige or creme tinted paper. Creme paper will look less harsh in artificial light without compromising legibility.
  • Weight: Never use 80gsm office paper for official publications. This will just scream “I didn’t care”. At the very least go for 90gsm. I personally prefer 100gsm.
  • Quality: Not all paper is suitable for archival purposes. Good paper complies with either ISO 9706:1994 or ANSI/NISO Z39.48-1992. Both standards dictate important aspects of paper like pH, alkaline reserve, tear resistance and resistance to oxidation. Compliant paper should easily last a hunderd years, if not more.
  • Coating: Only use glossy coated paper for brochures. Reading large texts on glossy paper is a bad idea at best.
  • Environment: Good paper should comply with environmental guidelines specified by the FSC.

Last but not least, I can highly recommend (100gsm) BioTop-3 paper. BioTop-3 is matte creme paper which complies with ISO 9706 and FSC guidelines.

LaTeX tips & tricks

During my internship I quickly got frustrated with OpenOffice.org Writer. Halfway through I switched to LaTeX and never looked back. LaTeX is far from perfect, but it’s a hell of a lot better than any random wordprocessor. There is a very good introductory text available on LaTeX, it’s called lshort. Here are some good articles on why you should use LaTeX.

During the past few month, I’ve learned quite a few LaTeX tricks, which I’ll share with you:

VarioRef

Normal references will insert a reference to a page number, even if the object being referenced is on the same page. VarioRef will change this behavior into something more intelligent. When I reference an object on the following page, VarioRef will produce something like “overleaf” instead of “on page 14”. Here is how you can use VarioRef (in Dutch):

\usepackage[english,dutch]{babel}

\usepackage[dutch]{varioref}

\label{sec:statistical}

\vref{sec:statistical}

Rotating

Every once in a while your tables get to wide to fit on a portrait A4 page. Don’t panic, the rotating package will come to the rescue. Using the sideways environment (defined by the rotating package) you can rotate an object (a table for example) 270/90 degrees. Please note that only the object is rotated. This means page headers and footers remain as they were, not disrupting the document flow.

\usepackage{rotating}

\begin{sideways}

\end{sideways}

Elegant section numbering

For my thesis I wanted the section numbering to be visible in the margins. This way the section titles would be nicely lined up with my text, producing a very elegant look. Here is how you can do it:

\usepackage{sectsty}
\makeatletter\def\@seccntformat#1{\protect\makebox[0pt][r]{\csname the#1\endcsname\hspace{12pt}}}\makeatother

Semibold instead of Bold

If you have a Semibold variant of your font available I highly recommend you abstain from using Bold. LaTeX can do this for you (automatically), the following command will replace all bold fonts with semibold ones.

\renewcommand{\bfdefault}{sb}

Lowering glyphs below their baseline

In my thesis I used old style figures. When using the paragraph symbol followed by such old style figures, the paragraph symbol looked as if it was placed to high. You can define your own custom commands, with which you can lower of raise any glyph respectively to their baseline like this:

\newcommand\Ss{\raisebox{-1.25pt}{\S}}

Phantom objects

When creating my halftitle page, I had issues lining up everything. I always had a discrepancy somewhere. The phantom command saved my day. Any phantom object will occupy exactly the same space as if it were normally there, except it won’t. A space will be filled with exactly the same dimensions as the object would normally occupy:

\phantom{Whazaaap}

Background picture

For some creative typesetting you might want to include a picture into the background of your document. Create your own JPEG at 150dpi for ebook uses and 300dpi for printing, then include it into the document like this:

\usepackage{eso-pic}
\AddToShipoutPicture{\includegraphics[width=\paperwidth,height=\paperheight]{background.jpg}}

Custom font size commands

The default LaTeX font size commands are rather limited. They do not allowed you to insert really large text. This is done for a reason, generally you wouldn’t need to. However if you feel you really need to have some larger text, you can define your own size command. The following example defines 50pt text with a 55pt line height:

\newcommand{\gargantuan}{\fontsize{50}{55}\selectfont}

Modifying enumeration styles

For example if you would want to typeset one of the Creative Commons license texts, you would need to change the second level enumeration style to alphabetical enumeration. You can do it like this:

\renewcommand{\labelenumii}{\alph{enumii}.}

Custom PDF Metadata

If your not happy with the PDF metadata generated by pdfLaTeX, you can override it like so:

\usepackage[pdftex]{graphicx,hyperref}

\pdfinfo{
/Title (LaTeX Tricks)
/Subject (LaTeX)
/Author (Pascal))
/Keywords (latex tricks)
/Creator (LaTeX 2e)
/Producer (pdfTeX for Linux)}

SmallCap Abbreviations
If you regularly need to smallcap a common abbreviation, it quickly gets rather old having to change “DEC” into “\textsc{dec}” every single time. But there is another way. Define an abbrev command, and then define a specific command for every common abbreviation:

\usepackage{textcase}

\usepackage{xspace}
\newcommand\abbrev[1]{\textsc{\lowercase{#1}}\xspace}
\newcommand\DEC{\abbrev{DEC}}

Leading / Linespread

Having a little extra space between lines makes text more legible. I generally prefer a line spread of 1.1:

\linespread{1.1}

Manual Kerning

Sometimes the kerning tables of font will not suffice. With the kern command you can move two glyph closer together, or further apart:

\kern+1pt

Changing The Margins

Generally LaTeX uses proper margins. Good documents have large margins. Anything below 3cm on A4 paper should be considered a sin. However, your margins can be a good tool to do some copyfitting. Copyfitting is the process where you make your paragraphs fit on a page, so that all the text is nicely aligned, and paragraphs are minimally spread across several pages. You can slightly change the margins of your document using the geometry package to accommodate this process. The geometry package will automatically recalculate the other margins based on the inner margin you specify:

\usepackage[inner=3.83cm]{geometry}

Ghostscript troubles

I’m the owner of the MegaFont XXL pack, and I had trouble printing the @ sign with one of the included fonts. Everything was fine onscreen (rendered by FreeType), but when I printed (rendered by Ghostscript) my work, it had the right part of the tail of the symbol missing.

The logical conclusion would be that either the printer driver (hplip) or font rasterer (Ghostscript) was the culprit. Luckily this was easy to find out. Ubuntu has two version of Ghostscript in it’s repositories namely gs-esp and gs-gpl. The ESP version lags behind in versioning but has extra patches for compatibility with CUPS, so certain printers might not work with the GPL version. However the GPL version seems to have been more actively maintained and bug free (at least to me it seems that way).

So if you have printing issues (which are not visible onscreen) you can try this:

sudo apt-get install gs-gpl

sudo update-alternatives –config gs

The latter command will prompt you to choose between gs-esp and gs-gpl, choose gs-gpl. If gs-gpl causes more problems than it solves you can use the same command to revert back to gs-esp.

This certainly fixed my problem, but your mileage may vary.

Globally Compatible Paper Size

One of the reasons I dislike country’s like the US of A is because they keep on clamping to their own medieval (and illogical) standards, for example, they haven’t accepted the metric system there yet, the Inch and Mile are still the standard measure of distance.

The same thing goes for paper standards, almost the whole world has embraced ISO 216 and standardized on A4. But not the US, no, no… They still keep on using their Letter format.

When exporting documents to PDF for distribution, this raises issues. As both formats are incompatible with each other. A4 has more height, and Letter has more width. So

when printing either of the formats to the other on paper implies the document gets scaled (best case) or the margins get cropped (worst case).

So I’m proposing a solution to this debacle which is quite simple: create your documents using the lowest common denominator of the paper metrics. This means using the width of A4 and the height of Letter: 210mm x 279mm.

Desktop Publishing Rules of Thumb

Along the years I’ve seen many reports being written in the horrid default Microsoft Word style. OpenOffice.org’s default style is just as horrid because of compatability reasons. The following are rules of thumb explaining how to properly layout a report:

Fonts
Always try to use the least number of fonts you can. For most documents this means you end up using either two or three fonts, depending whether you want to give your document (respectively) a traditional or contemporary look. For a traditional look, use a single serif font for both headers and body text. If you rather like a contemporary look, use a sans-serif font for the headers and a serif font for the body text. In both cases you might need to use a monospaced font to display screen dumps and the likes. The font size for your body text should always be either 10, 11 or 12pts.
While there there is not much fundamentally wrong with Times New Roman, Arial and Courier, they just reek of laksness, and basically say to the reading ‘I didn’t care!’.
Instead of using Times New Roman, try Palatino or a Garamond. Arial being a bad Helvetica ripoff, should be replaced even more so, for example try Frutiger, Gill Sans, Andale Sans, Univers, Akzidenz-Grotesk. And last but not least, Courier could be replaced by Prestige, Andale Mono or Vera Sans Mono.

Margins
Don’t be afraid of white space, white space is your friend. All documents should at least have margins of 2.5cm, preferably even larger, 3.0cm or 3.5cm is not too much. LaTeX even uses 4.0cm for it’s innner and outer margins, and that’s just fine.
Large margins are a good place to grip the document, making sure your fingers aren’t obscuring any text. For teachers, mentors and reviewers it’s also an ideal place to scribble notes and corrections.

Line Width
There are several available rules of thumb concerning line width, they’re all different, yet very similar. Some folks say each line should hold about 10-12 words, other say 12-14 words. Yet another crowd tells you to put the letters A-Z, a-z, 0-9 on a line as a guide. If you compare these methods (and some others) it basically boils down to the following, always keep on average between 10-15 words per line of text.
Reading lines shorter than 10 words will disturb the sentence flow too often, while lines larger than 15 words will be tiring, because of excessive eye movement.
Ofcourse you can’t configure a line width anywhere so you must experiment the font size and margins accordingly.

Line Spacing
I always prefer a proportional line spacing between 110% and 120%. Having lines stuck too close to each other, may cause the eye to unintentionally switch between lines. But having lines be too far apart will disturb the sentence flow, because the eye needs to search where the next line starts.

Dont’s

  • Do not type two spaces after a dot. This is a remnant of the typewriter era, where the double space would cue the brain a new sentence was about to start. But modern proportional fonts obsoleted this custom.
  • Do not use a non-proportional font for your body text. Non-proportional fonts are harder to read, and cause eye strain.
  • Do not mix TrueType and Type1 fonts in your document (especially when exporting to PDF). Different operating systems have different font renderers, and may render either TT or T1 fonts more crisp or blurry. Sticking with one type will keep your document looking consistent.
  • Do not use Comic Sans. Only you can prevent bunny punchings:

HSZLUUG Logo

For a while now I’ve been involved with a local LUUG in my school, which is called HSZLUUG. During the past month we had a logo design competition, and because a lack of competition I won by default.

Behold the new official HSZLUUG logo: