CommentLuv Enabled

Typesetting in HTML, Opera FTW?

Skip to content

Typesetting in HTML, Opera FTW?

After thinking on it for a while, I decided that HTML would be the best format to typeset my RPG in. It gives me the level of control I want and I can print to PDF to make an actual ‘book.’ I can also, of course, use the HTML itself as a webpage.

I’ve been having a lot of fun today playing with everything. I’m using JavaScript heavily so that my HTML pages are really more like lightly-formatted data files, and it’s quick and easy to add content to them.

I’ve come up with an unusual problem, though. Both Chrome and Firefox, my browsers of choice, have problems with the actual printing.

In Chrome, there’s no way to print background colors. This is bad, because the background colors are important for keeping my tables legible.

In FireFox, for some odd reason, embedded fonts which work perfectly on the screen do not work in print mode.

Additionally, I found that sometimes a block of text I didn’t want split up would get strung across a page break. There’s actually a CSS property to fix that: “page-break-inside: avoid”.

As it turns out, only Opera supports this CSS rule. Weird. (Even weirder: the corresponding JavaScript property, pageBreakInside is supported by one other browser– Internet Explorer!)

To top it all off, Opera has a shortcut for previewing in print mode, which is a godsend when you’re trying to optimize CSS for printing as well. Ctrl-shift-p.

So Opera doesn’t suffer the font problem, allows printing background colors, has this unique and highly useful CSS rule, and makes print previewing easy. So… I guess Opera is the browser of choice for typesetting in HTML.

Who knew?

Posted in Creations Tagged with ,,,,,,,,

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.