Visualizzazione post con etichetta ConTeXt. Mostra tutti i post
Visualizzazione post con etichetta ConTeXt. Mostra tutti i post

domenica 22 gennaio 2012

ConTeXt and Fonts, Part 1

In my opinion, font handling has been -- and still is -- one of the trickiest part of my TeX experience. With font handling I don't mean using the fonts provided by a particular TeX installation; on the contrary, I mean installing and using new typefaces into TeX -- and ConTeXt. Nowadays things are way easier: both XeTeX and LuaTeX provide simple font interfacing and intuitive OTF feature leveraging. ConTeXth can use these engines too, with LuaTeX becoming the default engine for ConTeXt.

So why stick with pdfTeX? The main reason is that changing typeset engine leads to slightly different outputs in most cases, and plain wrong output in some cases. The most blatant gotcha is, in my humble opinion, when we typeset a document in two columns and want to lay out a float spreading the whole page width. If we use pdfTeX or XeTeX as typesetting engines we can use \startcolumns..\stopcolumns and place a floating object on the top of a page; if we use LuaTeX, we must use columnsets or we just can't do it. Moreover, while XeTeX is far easier to use (I used it to typeset some long documents) allows for inferior typographic control. This leaves me with only one choice: ConTeXt + pdfTeX, with its complex font handling mechanism.

About Itemized Lists

Before tackling the subject of fonts (which will require more than one post, I think), let's talk about itemized lists.

From time to time, the need for an itemized lists (or a hierarchical list) will arise: for instance, when describing some subprocedure during character creation, or explaining the combat sequence, or if you want to remark some important points in your book.

When this time comes, you will need a way to format informations like this:

  1. First info
  2. Sec ond info
  3. Third info

or this way:

  • First info
  • Second info
  • Third info

martedì 20 dicembre 2011

The Shunned House -- Titles and subtitles, step 3

This post is going to be a little out of context, since it's about structuring your book. Problem is, these subdivisions are going to be somewhat artificial, since "The Shunned House" is a story whose structure is only one level deep. So, I'm going to insert some artificial subdivisions in it.

Like LaTeX, and HTML, context comes with some handy commands for structuring the text. These commands produce titles in a hierarchical way, the same way h1..h4 commands do in HTML. These commands can produce numbered or unnumbered title; since we are designing an RPG, and we want to avoid an overly technical feel, I think that only level-1 titles (chapters) must be numbered, while lower-level heads should not bear numbering. Your mileage may vary, however, and you might not agree with me. That's fine -- I'm no designer, and I've laid out some publicily available games only for fun.


mercoledì 7 dicembre 2011

Specimen Sheet Generator

When I started dabbling with DTP, one of the big issue I always had there have always been few programs capable to print decent specimen sheets. While there's little about roleplaying in this post, I think that serious indie game designers could really benefit from a proper specimen sheet.
So, in all of its glory, here's the ConTeXt source to create specimen sheets out of Serif, Sans and Mono fonts. As it is, this code works with ConTeXt/pdfTex, using its default fonts.
However, if you properly setup typescripts -- a subject of a next post, rest assured -- you can generate a handy pdf of 21 specimens of your favorite font set.
It's public domain and it's yours to enjoy!

lunedì 5 dicembre 2011

On choosing your weapons

Maybe you already know that ConTeXt is a set of macro that sits upon TeX and eases document authoring. It's like LaTeX, slightly different and less known. What perhaps you don't know is that w32tex comes with no less than THREE flavors of TeX:

  • pdfTex, the old stalwart
  • XeTeX, ported directly from OSX, where fonts "just work".
  • LuaTeX, a TeX engine that uses Lua as an internal programming language.

Each of these engines has its merits and its flaws, when it comes to ConTeXt usage.

  • XeTeX is, by far, the easiest to use when it comes to using fonts other than those provided with the standard TeX distro. It comes from OSX-land, and there, it leverages AAT font handling capabilities. It's been ported on linux and win32, where uses Freetype as font handler. However, when it comes to TYPEsetting, it falls -- at least under Win32 and Linux -- behind LuaTex and pdfTex. It lacks nifty microtypographic features found in the other two engines -- and if you typeset books with narrow columns, this can lead to a lot of unwanted aesthetical oddities.
  • LuaTex is the future. It's quite easy to use OTF fonts, it's got micrographic features, it can leverage advanced OTF capabilities and, if you know the language, you can program new tricks in Lua. Its drawbacks are that it's still under development -- though quite solid and stable -- and, from an indie rpg author's perspective, suffers from some serious problem when it has to lay out figures and floating boxes that spread over more than one column -- More about this in a next post.
  • pdfTex will be my weapon of choice. Sturdy, well-tested, full of features, handles full page width floats, OTF fonts and microtypography equally well. It's just more complicated to set up if you want to use other fonts than Computer Modern. However, once understood, font mechanism is not overly complicated and quite solid to boot

To recap, every code snipped I'll post will refer to the ConText/pdfTeX flavor, unless otherwise stated. I will, however, keep an eye to LuaTeX, since its potential is really enormous.