Lucian Marin

Introducing Amatl

In today’s world, where millions of documents are electronic, we need a format that is easily recognized by most of the devices and operating systems we use: Mac OS X, Windows, Linux, laptops, desktops, iPhone, eReaders, and so on.

From the start, I want to say that the idea, concept, examples and eventually writing the specification, are all mine. So, go ahead, read the lines below and blame me for things that aren’t the way they should be.

The name Amatl comes from a form of paper manufactured in pre-Columbian Mesoamerica. There are more details about it on Wikipedia, of course. My Amatl is based on HTML5 and CSS (2.1 now, 3.0 in the future) — two standards that raised the bar for what we can do in terms of layout, font embedding, typography, grids, and the positioning of images and blocks. Basically, Amatl is a file format that wants to display paper documents inside browsers without any additional tools or software. The format isn’t intended to replace Adobe’s PDF or Microsoft’s XPS; it should be used as a complementary format, open and supported by the entire industry. The closest resemblance is the EPUB format, but the two are completely different concepts.

Compatibility

The good part about this format is that it can be recognized by old browsers too — Firefox 2 and IE7, to name two. It’s just HTML after all, right?

Differences

There will be no differences when it comes to HTML5 syntax — maintaining the current specification is very important. Still, I recommend not using meta attributes, because they will be present in a CSS metadata header.

The most important differences from CSS are the introduction of a DPI value and a CSS metadata header. The DPI value will be used to write documents at a higher DPI than 96, which is the standard for all web pages on the Internet today.

Structure

Amatl document files should be packed in a ZIP container with an .am extension (like Document1.am) for offline usage — and not only for that. Browser support will be needed for reading the HTML files packed inside the ZIP. The format can also be served directly from a server, with the following structure:

index.html
page-2.html
page-3.html
|-- styles
   |-- screen.css
   |-- print.css
|-- fonts         /* embeddable fonts should be placed here */
|-- languages     /* support for multi languages documents */
   |-- index-en-us.html
   |-- index-en-gb.html
   |-- index-ro-ro.html
|-- images
|-- videos
|-- audios

Writing, printing and scaling the documents

It should be very easy to write an Amatl document — like writing a blog post with basic HTML tags: p, a, strong, and so on — because the HTML5 structure of the format is very simple. You can view the source of this example: Document 1. Printing can use a print.css file, or the browser can interpret the screen.css (dropping the styles for the body and article tags) and print the pages exactly as they are displayed on the screen.

As I said before, Amatl will support writing HTML5 with custom DPI through CSS. You can see how this works by viewing the Warp example in Firefox (or any other browser that supports zooming) at minimum zoom. If browsers adopt this format, you will be able to view higher-quality web documents right in your browser — including higher-DPI images and graphics — and print them right away without needing any other software.

Amatl can also use a single HTML file that embeds CSS, fonts and images, and separates pages accordingly. You can see this in the Document 2 example. This could be dropped from the specification, since I prefer a more standard structure for the format.

License

The format should — and will — be open, since it is based on open technologies, but it will require a commercial license for software products or web applications that write, manage or print the documents. More about this in the future. And don’t forget: there is an Amatl page dedicated to this very project.