May 20

Vote for the Korvoros Cover

Here they are! The two covers I made for Korvoros. I created four concepts for The Lastchild before I settled on one, but this time, I think I’ll put it to a vote. As a scientist in my day job, it might be an interesting experiment to investigate how the public’s taste corresponds to mine.  If you have any suggestions, please leave them in the comments sections.

Please vote!

Thanks!

 

Escape from Karsh Kaila

Escape from Karsh Kaila

The Lair of Korvoros

The Lair of Korvoros

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

Vote for the Korvoros Cover
Which cover do you think is the more appealing?

Permanent link to this article: http://www.duanevore.com/vote-for-the-korvoros-cover/

May 11

HTML and CSS for E-book Self-Publishers, Part 3: CSS

This is it, the one I was worried about writing: style sheets.  As a reminder, the XHTML we talked about in Part 2 describes the structure and content of your material and CSS describes how it is presented. I was worried for a couple of reasons, and as I got into writing this installment, I found my fears justified.

First off, let me explain that I am using the term CSS rather loosely.  In fact, the style sheets used in EPUB documents are compatible with CSS, use the same syntax, and many of the same features.  I learned CSS through web development, and when I first experimented with formatting e-books, I ran into some issues.  For example, when I tried to use what is called the first-word pseudo-element, it just plain didn’t work.  EPUB style sheets support a subset of “real” CSS, and it is not always clear what that subset is.  The problem is exacerbated by the fact that e-reader designers are given some leeway in how to implement the standards.  If you want to zero in on the details, the description of style sheets for EPUB 2.0 is given here. Note that  I may still say CSS, though somewhat inaccurately.  Please bear with me.

The second issue is that even though we are talking about a subset, there are still dozens of properties, dozens meaning well over 100.  Just a few of them:

text-variant
margin-right
color
border-bottom
cue-after

The good news is that you can defeat most formatting challenges with relatively few of them.  The bad news is that it takes a while to learn how they all fit together.  You might in your mind know want you something to look like, and pull out half of your hair trying to get CSS to adhere to your vision.   Oh, the properties do what they’re supposed to; it’s putting them together in the right combinations that takes some figuring out.  Unless you are a divine being you will get frustrated.  This is why you still might want to hire a professional for fancy stuff, but bear in mind that professionals get frustrated, too.

So, with these two apocalyptic details under consideration, I decided to shift the focus of this installment away from comprehensively explaining style sheets, because I can’t do it in one post.  Maybe 20.  Instead, I decided to simply explain enough that you can understand what you are seeing and how it all works, and to be able to interpret the examples when I get to them.  If you want to develop your e-book formatting skills, you’ll just have to bit the bullet and get yourself a book on it.

What “Cascading” Means

You should know this.  There are four sources that a browser or e-reader can get style information, and they are prioritized so that higher priority sources override lower priority sources.  The four are:

  1. Browser or e-reader internal styles.  They all have these, or they wouldn’t be able to display simple pages that don’t include any explicit style information.
  2. Styles contained in external style sheets.  Anything here overrides the default styles.  Note that you can have more than one style sheet.
  3. Styles defined in the head section of your page. Yes, there is a <style> element that I didn’t mention in the last installment.  I left it out for 3 reasons: (1) We hadn’t even gotten to styles yet, (2) they apply only to that page and writers usually want the same style across the entire book; and (3) there was no sense in explaining something you would probably never use.
  4. Styles declared in the style attribute in a start tag.

Now, when I said that higher-priority definitions override lower-priority ones, it is important to understand that the override applies to specific properties (like font-weight: bold;) and not to the entire class.  I demonstrated this in Part 2 with my uglylred class example.  The attribute style=”color: blue;” overrode only the color, not the entire definition.

CSS Structure

As I said last time, CSS groups properties into classes.  A typical class might look like this:

p { 
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    color: black;
    padding: 8pt 2pt 0 2pt;
    text-indent: 2.2em;
}

What we have here is some kind of identifying selector, followed by a pair of curly braces that wrap a list of properties and their values.  The properties are separated by semicolons.  You don’t technically need a semicolon on the last one, but always put one there anyway or you will end up adding another property to the end, forget the semicolon, and then be frustrated when things don’t work anymore.  The format of this declaration doesn’t matter, but if you want to save yourself headaches, you’ll write it as I did above, or something similar.  It’ll work fine like this:

p{font-family:Arial,Helvetica,sans-serif;font-size:10pt;color:black;padding:8pt 2pt 0 2pt;
    text-indent:2.2em;}

But you’ll hate yourself later when you have to go back and figure out what’s wrong.

About selectors

In the example above, the p at the front is the selector.  In the real world, selectors can take three forms:

  • HTML Tag
    When the selector is just a letter or sequence of letters, it represents an HTML tag, and is to be applied to all elements of that type.  In this example, the class is applied to all paragraphs.
  • Class name
    When the selector is written in the form “*.name” or just “.name”, then any element with its class attribute set to that name (i.e. class=”name”) will have that style applied to it.
  • Identifier
    When the selector is written in the form “#name”, then it is applied only to the single element that has that identifier, such as id=”name”.

That is the basics of selectors, but there are a couple of other facts that you might find useful:

  • You can get more specific.  The selector p.indent, will apply that class only to paragraphs with the attribute class=”indent”.
  • You might be able to save space by writing multiple selectors on the same line, separated by commas.  For example, h1, .h1, #h1 will apply that style to all h1 headers, all elements with class=”h1″, and the element with the id h1.

Now I need to tell you once again that I am just scratching the surface of selector syntax.

About properties, In general

As you can see above, properties take the general form:

property-name: property-value;

However, there are some subtleties in the property value syntax.  You may have multiple values separated by spaces as in:

padding: 8pt 2pt 0 2pt;

Here, all the values apply, and it is usually important what order they come in.  In this example, the four values represent the top, right, bottom, and left.  You just have to learn these, but there is another way to do it so that you don’t, and I’ll show you about that later.

Or, you may see values separated by commas:

font-family: "Gill Sans", Arial, Helvetica, sans-serif;

In this case, the values are interpreted one at a time, and the first one the browser understands is the one it uses.  If it can’t find “Gill Sans”, it will look for Arial, and if it can’t find that, Helvetica, and so on.  sans-serif is one of several typefaces always defined.  I always put one of those at the end, but if it can’t find any of them, it will use the default.

About properties, more specifically

There are often multiple ways to define values, giving you a choice.  I’ll point out three of them here.

  • Sizes
    If you look at my paragraph example way at the top, you’ll see that I defined padding and text-size in points, and the indent in ems.  You may also use px for pixels or cm for centimeters, but I’ve never used centimeters.  In the case of fonts, you can also specify size in terms as a percentage of the size used by the parent element (75%, for example), or with vague terms such as small, xx-large, and larger.  I avoid those.
  • Colors
    Here is where my British friends will have to take one for the team and spell it color.  I suppose the properties were defined in America.  As with size, color can be specified several ways.  Note that although you can specify all of these colors, e-readers are not required to reproduce them.

    • There are 147 pre-defined color names, which are what most people probably use most commonly (entirely speculative).  Rather than try to list them here is a link.
    • If you are a graphic artist, you can specify them with a hexadecimal RGB value such as #228AFF, where the first two digits are red, the second two are green, and the third are blue.  I use this method fairly often.  If you are not a graphics artist and don’t know what I’m talking about, just skip it and use the pre-defined names.
    • If you are even more of a graphic artist, you can specify colors as RGB, RGBA, HSI or HSIA.  I’ll not explain these as to not overload, but details are here.
  • Position
    Often, it is necessary to specify where within a page, or more generally, within any parent element, where an element should be positioned.  As with size, you can specify position in points, ems, pixels, etc., but there are also special keywords like top, right, and center.

Display element sizing

Everything you see on a page occupies a rectangle.  This is true even if the content isn’t rectangular.  Understanding how this works is crucial to any kind of formatting.  In a nutshell, your content is surrounded by padding, which is surrounded by a border, which is surrounded by a margin.  Think of it as a set of boxes within boxes.

I was all set to pull out CorelDraw and make an elegant diagram to demonstrate, but realized that such diagrams were already scattered about the Internet, and many of them with more detailed descriptions than I would put here.  One that looked suitable is:

http://coding.smashingmagazine.com/2009/10/05/mastering-css-coding-getting-started/

The part about sizing is followed by floats, which I don’t intend to get into, and then some other stuff.  You’re free to read all that if you want, but it’s optional.

However, there are some important points that web page mentions, but not so prominently, and they are such that if you don’t get them right it may drive you to the madhouse.  I’ll try to make sure both points are clear:

  1. In an Inigo Montoya moment, the properties padding and margin might not mean what you think they mean.  Padding is the space inside the bounding container, and margin the space outside.  I’ve been doing this for more than 10 years, and it still seems like they are backwards.
  2. The width property is the width of the content, not the container.  This seems rather like measuring a sheet of paper by the size taken up by the paragraphs on it.

Together, these two curiosities conspire to make life difficult.  Suppose you create a box of a certain width and put some text in it:

p1You decide the text is too close to the border and want it to look like this:

p2Your first thought might be to increase the margins as you would in a word processor.  You’d be wrong.  That would give you something totally different.  What you need to do is increase the padding, and then, since that would make the whole box wider, decrease the width of the text by a corresponding amount.

I know.  It’s crazy, and sometimes leads to a lot of extra work.  This is precisely what leads me to speculate that the specification was developed under the influence of mental deficiency, malicious intent, alcohol, or some combination of those three.

Different ways to say the same thing

Of course there has to be a complication like this, but this one turns out to be mighty useful.

You can write:

p {
    padding-top: 0.8em;
    padding-right: 0.3em;
    padding-bottom: 0;
    paddling-left: 1.2em;
}

Or, you can write it more compactly as:

p {
    padding: 0.8em 0.3em 0 1.2em;
}

Likewise, you could write:

p {
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
}

Or:

p {
    font: bold 12px Arial, sans-serif;
}

Notice that in the second example, I changed the order of the properties.  This is because when you write them the long way, the order doesn’t matter, but in the compact form, it does.  If the parser finds something out of order it will just stop there, and make you wonder why some of the properties work and some don’t.  You may also see some even shorter notation, such as

p {
    padding: 0;
}

which means that zero is applied to all four sides.  There are other shorthand notations, but again, they’re one of those things that you just have to learn by brute force if you don’t want to look them up every time.

 

So, this seems to me to be all you need to know to follow the examples that come later and to at least make some sense out of style sheets when you come upon them.  It might turn out that I am totally wrong about that, in which case I will amend this post further.  Or, it might turn out that you discover I am totally wrong, in which case please leave comments and I’ll try to answer them or amend this post.

I’ll be honest with you.  When I got into this style sheet installment, I began to think that I bit off more than I can chew.  I was tempted to forget about it and simply post an add saying that I am available for hire to do all this for you.  However, I do have faith in people’s persistence and hope that you are willing to jump in and give it a try.  I have only touched the surface of style sheets, but this should be enough to meet most basic formatting needs.

Wait for the examples in Part 5 and see how it all is put together.

Good luck!

 


Previous   1   2   3

 

Permanent link to this article: http://www.duanevore.com/html-and-css-for-e-book-self-publishers-part-3-css/

May 10

So? I Like Some “Girly” Things. Deal With It.

How to tell if a toy is for a boy or girlSomeone posted this image on Twitter, and I copied it to Facebook.  I thought it was so darned cool aside from it’s professional use of color.

I have kids, and as it turns out, the boys prefer “boy” toys and the girls prefer “girl” toys.  But they didn’t get that from me.  It’s unlikely that Tylor would ask for doll, but quite a bit more likely that Rayanna would ask for Star Wars Legos, but should either case actually transpire, I would have no problem getting them what they wanted.  Children should be allowed to develop their interests even if it challenges the authority of peer pressure.

In case you don’t know me, I’m a radical feminist, a position that developed when I was a Girl Scout leader and noticed something decidedly wrong culturally when the girls were afflicted with adolescence.  Without going into the concepts of radical feminism (I’ll leave that as a homework assignment for you to research) , there is a simple observation that shows we still live in a patriarchal society.

It is OK for a girl to be a tomboy (at least for a while) but it is not OK for a boy to be a tomgirl.  In fact, the word tomgirl is not clearly defined in the English language, and my spell-checker doesn’t like it.  Similarly, it is OK for a professional woman to go to work in a suit, but would be horrifying for a professional man to go to work in a dress.  The explanation exposes a fundamental flaw in our attitudes.  It is reasonable for a female of any age to aspire to “maleness” but quite the indicator of insanity if a male wants to degrade himself by pursuing “femaleness.”

Iggy Pop in a Dress

Iggy Pop in a Dress

In our society, maleness is still better.

I’ve believed for years that the feminist movement has failed in that it has attempted to achieve sexual equality by making women more like men.  That is an implicit recognition that the male paradigm is better.  Where did that stupid idea come from?  Women do not need to become men to achieve social equality; they are fine as they are.  It is society that needs to change, but it persists in enforcing a double standard.

Bullshit.  I won’t be a party to that.

Let it be known that there are many “male” things that I like.  These include power tools, James Bond, action movies, high-tech gadgets, pumpkin pie (science shows a connection), and so on.  But let it also be known that I reject the notion that I am restricted to liking “male” things and that I am hereby publicly and proudly announcing that there are some “girly” things that I also like, and that it is no shame on me to do so.

  1. Dolls.  Well, some dolls, like the American Heritage Dolls.  I despise Barbie and similar crap for the sexist message they broadcast.
  2. Pink.
  3. Fairies.  Tinkerbell is so cute!
  4. Unicorns.
  5. Big, fluffy hair bands.
  6. Romance novels. Some of them are really quite good.

There you have it.  I might dredge up more if I think about it longer.  If you wish to look down your nose at me, then go right ahead.  No water of my back.  If it ruffles your feathers, then good.  Grow up and learn to deal with it.

PS: I really, really don’t like heels.

Permanent link to this article: http://www.duanevore.com/so-i-like-some-girly-things-deal-with-it/

May 09

HTML and CSS for E-book Self-Publishers, Part 2: HTML, XML, and Both

Here in the second installment, as promised, we examine HTML and its relatives, the linguistic realm of content description.  This is what defines what this web page (and all others) says.  How it looks (fonts, colors, etc.) is more properly done with CSS, which we’ll discuss next time.  But for now, we are looking at the information you want to present.  In the world of e-book publishing, this will be, of course, what you have written.

The Pieces

There are three languages you need to know about in order to sound like you know what you’re talking about, but don’t worry.  They’re really all the same thing.  But it does help to be able to distinguish them, especially if you’re having a problem and need to ask about it online.

HTML

This is how it all started.  The first web pages I ever wrote were in HTML 1.0, which, hopefully, you’ll never see again.  To throw you right into the shark-infested waters, here is a sample taken from the original HTML specification from 1993:

<HTML>
  <TITLE>
    A sample HTML instance
  </TITLE>
  <H1>
    An Example of Structure
  </H1>
    Here's a typical paragraph.
  <P>
    <UL>
      <LI>
        Item one has an 
        <A NAME="anchor">
          anchor
        </A>
      <LI>
       Here's item two.
      </LI>
    </UL>
  </P>
</HTML>

I would like you to note the overall structure. It consists of a number of elements (such as HTML) delineated by a start tag (<HTML>) and a stop tag (</HTML>).  Within it is a TITLE element, a header (H1) element, and a paragraph (P) element.  The paragraph element then contains other elements.  There are some things you should observe:

  1. The start and end tags for any element are identical except that the end tag name starts with a slash, or oblique stroke.
  2. Elements can be nested.
  3. The outside element is always HTML, which is the document itself.

This early HTML let the programmer get away with a lot.  You didn’t necessarily have to use a stop tag.  For example, the end of one paragraph can be indicated by the start of a new one.  Furthermore, some elements like IMG doesn’t have much use for a stop tag because no text goes in it; everything is handled by tag attributes, which we’ll discuss in greater detail under XML.  Frankly, you can’t get away with much of that anymore and having been a software engineer for a long time, I’ll be the first to argue that it’s a good thing.  There is a bigger learning curve up front, but you end up spending less time tracking down misbehavior later on.

XML

Only three years later, someone took the general idea of HTML and generalized it to XML (Extensible Markup Language).  XML uses the same structure to define any kind of data, even binary data like images, but does so with some restrictions.  It’s not nearly as forgiving as the original HTML.  To reduce (I’d like to say ‘eliminate’ but you can never eliminate it all) programming foolishness, XML enforces additional syntax rules and provides specific document and interpretation elements.

If you were to go out and buy a book on XML, it would probably be three inches thick.  I’ve seen some of those.  But most of the XML features you would find therein like XSLT, XPATH, XQUERY, XML Schema, are those that you will probably never have to worry about in an e-book, and this is the last you will hear about them. I have used XSLT and XPATH, but that was in some complicated Web programming.  I don’t you even can use them in an e-book.

XHTML

Now we’ve reached the present, and this is where the “Both” comes in.  XHTML is HTML that is XML-compliant.  Put another way, it is an XML application where the tags are the HTML tags.  This distinction is important because 99% of the time if someone says, “HTML,” what he really means, if he knows anything at all about it, is “XHTML.”  Nobody, but nobody, writes in the original HTML anymore, and if you tried to create e-book with it, every piece of software on the way to publication will complain about it.  The EPUB editor Sigil, which we’ll talk about in Part 4, won’t let you save or view a file unless it validates correctly.

This is another point worth making about the difference.  The original HTML specification described how to represent both the content and how it was to be presented, though the options in those early years paled in comparison with today’s.  The latter was accomplished through the use of element attributes (more about those in a few paragraphs) such as cellspacing to affect the appearance of tables.  For backward compatibility, those features still exist (though are being phased out with HTML 5.0 and eventually won’t work anymore), but it is bad form to use them; it is much better to control appearance with CSS.  A simple example should explain one reason why.  Suppose you have 27,000 paragraphs in 12-point type and you decide it needs to be 11-point.  Which would you rather do: change 27,000 paragraphs of HTML or 1 line of CSS?  Your call.

Now, on to business.

What you need to know about XML

As I said above, not much.  Most of the advanced features are useless here, though at some point there will eventually be a brief mention of Document Type Declarations.  Briefly, here are the rules for XML.

1. XML documents consist of elements delineated by a start tag and a stop tag

Exactly like the HTML example above.  Here’s something you are quite likely to see:

<rainbow>(Some text goes here.)</rainbow>

The text really has nothing to do with rainbows, but does to demonstrate that in XML, you can name elements anything you want, just so long that you follow certain naming rules.  Since this series deals with e-books, you’ll be using HTML element names, so you’ll never have to make up any of your own>  So there is no point in my describing the rules.  If you’re interested in more, there will be a link at the end of this section.  Notice again that the start tag and stop tag have the same name enclosed in angle brackets, but that the stop tag name starts with a slash, just like in old HTML.  So far, so easy.

2. Elements can be nested

Like this:

<sun><rainbow>(Some text goes here.)</rainbow>More text here</sun>

Elements can be nested as deeply as you need to go, and combined arbitrarily with text.  A trivial example might be introducing one boldface in a paragraph:

<p>This is a <b>boldface</b> word.</p>

If you’re paying attention, you might have noticed that since the angle brackets identify tags, you will have a problem if there is an angle bracket in your text.  Don’t worry; this base is covered.  We’ll talk about special characters below.

3. Every element that is started must be stopped

Put another way, every start tag must have a matching stop tag, and every stop tag must have a matching start tag.  I suppose this makes sense.  However, every now and then you might run into a tag that doesn’t have anything in it.  In fact, if you hack your own e-books, you will run into them.  A common example in HTML (remember, really XHTML!) is the break element that goes to the next line:

The end of one line...<br></br>...the start of the next

This is fine, but there is a shorter way.  Use one tag, with the name, but put a slash at the end:

The end of one line...<br/>...the start of the next

When you do this, the tag is both the start and stop tag.  Yes, there is still a matching tag, but it matches itself.  Just a little quicker and easier to read.

4. Elements must be properly nested

In other words, if you start an element within an existing element, it must also end within that element.  Here is another example from HTML:

<p>The last word in this paragraph is in <i>italics</i>.</p>

That is perfectly correct.  However, the following is wrong because the nesting is improper.

<p>The last word in this paragraph is in <i>italics.</p></i>

Many early browsers were forgiving of this sort of thing, and would work anyway.  I can’t speak as to newer browsers or e-books, because I haven’t fed them bad XML, at least for a very long time.  As I mentioned above, any competent XML or e-book editor will complain about errors like these.

5. Start tags and some special tags can have attributes

For example:

<rainbow colors="7" radius="100">Eat Skittles!</rainbow>

Again, in XML the attributes can be anything you want as long as they follow naming conventions, but using the same argument as above, I won’t explain what those conventions are.  They’re defined for you in HTML, and I’ll show you what many of them are when we get to that point.

6. XML is case-sensitive

<rainbow>Text</RAINBOW>

is wrong because the tag names don’t match.  They’re different cases.  The original HTML didn’t care.  Browsers that are otherwise XHTML-compliant may not care, but I wouldn’t take the chance, and I don’t want to experiment to find out if e-book readers care, but they should.  Anyway, it is an informal convention that everything is in lower case, and that is what I will assume from now on.

7. Every document starts with an XML declaration

It’ll look something like this:

<?xml version="1.0" encoding="utf-8"?>

Note that this is a special tag, neither a start nor stop tag, and you’ll only see it here.  It is distinguished by the question marks, and just says, “This is an XML document.”

The attributes here deserve some remark: don’t worry too much about either.  Realistically, almost everything you run into will be version 1.0; there’s no need to use anything higher.  And as for encoding, I’d stick with UTF-8, which you don’t really need to put in because it is the default.  UTF-8 covers every language you need to write in except Klingon and Elfin.  (If you need to write in those, I might include a how-to) in Part 5.

8. There is special notation for special characters

For characters that have some special meaning in XML, there is still a way to put them in.  They are called “escape sequences” or, more properly, “character entity references.”  They start with an ampersand (&), end with a semicolon, and have some number of characters in between.  If you need an ampersand, it’s &amp;. Two I use frequently are the m-dash (&mdash;) and the non-break space (&nbsp;).  The angle brackets are &lt; and &gt;. There are two or three hundred of these defined for HTML, so it makes no sense to list them here when I just give you a link to the table on Wikipedia.

No, you don’t have to memorize them all.  As a matter of fact, you may never need to use most of them, because this list was compiled for browsers before UTF-8 was a player and they needed an allowance for accented characters in languages other than English that use the Roman alphabet.  Now that we have UTF-8, those characters can be coded directly, along with Cyrillic, Chinese, etc., so those special characters aren’t really so special anymore.  The ones you’ll need are the ones that have special meaning in XML.  I’ve listed three above; the other two are &quot; (“) and &apos; (‘).

9. Every XML document has an outer element that encloses everything

In other words the whole document is one big element with everything else properly stuffed inside.  This is correct:

<xml>
  Everything you ever wanted in the document
</xml>

This is wrong because there is more than one outer-level element:

<root1>
  Some of the stuff
</root1>
<root2>
  More of the stuff
</root2>

It doesn’t matter what that outer-level element is named.

 

There! You might be catching your breath by now, but don’t worry.  If you do this for a while, it’ll all fit together and it will be so natural that you’ll wonder how anyone could think it could be any other way.  I’ve only presented maybe 0.1% of all there is to know about XML (probably less), but this is 99.9% (probably 100%) of all you’ll ever need to know for e-books.  It’s just enough so that you can understand XHTML.

But I did promise a reference if you want to know more.  Here it is.

What you need to know about XHTML

Or, colloquially,  HTML. Now that the basics if XML are under your belt, we can move onto elements that actually go into a web page.  Again, I won’t be show you everything; just what you’re likely to need for an e-book.  To that end, I’m going to skip forms, buttons, iframes, embedded object, tables … the list goes on.  Actually, tables might be useful, but not for this series; I’m thinking fiction here, and they’re rarely found in fiction.

Universal attributes

Before I get into what those elements are, this is a good place to identify some attributes that apply to all of them.  There are others, but once again you won’t need to know them until you are an HTML/e-book Grand Master.  These three are common, and all three have direct application to formatting, which is the whole purpose of this series.  Unfortunately, this installment won’t give you much information about how to use them, because that comes under CSS in Part 3.

id

This attribute assigns a name that is used internally to the page or document.  There is another attribute actually called name, but that one is used externally and is one that we won’t need for e-books.  This attribute is useful because it is possible to assign styles to specific elements by id, though I almost never do it.  It seems clumsy.  If you use it, each identifier must be unique on any given page.

class

OK, folks, this is the big one.  If you only learn one of these three, this is the one you want.  I’m forced to say a little about CSS at this point so you know what I’m talking about.  CSS defines a large number of properties like color, font-size, text-align, you get the idea.  These are in turn grouped into collections called classes.  So by applying a specific CSS class to an element, you apply all of those properties in one smooth operation.  The class attribute specifies the name of that class.  Once you get all this figured out, you can cleverly apply more than one class by separating them with spaces.

style

It might that you have perfect paragraph style defined that you always want to use, but here or there you want to override one of the properties.  Let’s say you just love 42-point Comic Sans in bright red (excuse me while I gag!)  But for emphasis somewhere you want one paragraph to be blue.  You could write:

<p class="uglyred" style="color: blue;">This is a blue paragraph.</p>
HTML Sample

Everything else in uglyred will stay the same, but the color will be changed to blue for that paragraph only.  Although you can do this, and although I have, rarely, it’s still not a very good idea except in extreme cases, as it’s dragging you away from the reason for using CSS in the first place.  If you want to change blue to hot pink, you have to go through your document and find every place you did it.  More about this next time.

Essential HTML Elements

Well, now that that’s done, take break, have some tea and biscuits, and come back when you’re ready.

This will be the intermission.

Back already?  Let’s get on with it, then.  The ones you need to know:

<html>

This is simply the outer-level element that contains everything else.  Remember that a compliant XML document has one.

<head>

This element contains information that the browser or e-book reader needs to have in order to display the page correctly, or other information such as clues for search engines.  For practical e-books, there is only one sub-element that I’m sure  you’ll need, but upon writing this paragraph, I wonder if search engines go so far as to index e-books.  I’ll have to look into that.

<link>

This is the one sub-element of head that you need to know.  It specifies how to get to other resources necessary to process the page correctly, and the one resource you will need is your CSS style sheet.  The link element from my example in Part 1 looked like:

<link href="../Styles/Style0001.css" rel="stylesheet" type="text/css" />

You need all three of the attributes shown here.  rel specifies the relationship between the two documents, and type specifies what the other document is.  Practically speaking, for CSS references, they’ll always be the values shown here.  The remaining one, href, specifies where to find it.  The path in this case is one within an EPUB  file, and you’ll need to know how to figure this out.  More about that in Part 4.  You might have more than one CSS stylesheet link once you start getting fancy.

<body>

Right after <head>, you’ll find <body>.  This is where the actual displayed content resides.  Let’s take a moment at this point to review the structure so far so you can start to see the big picture.  What we have so far is:

<html>
  <head>
    <link href="someplace" rel="stylesheet" type="text/css" />
  </head>
  <body>
    ...everything you want to say...
  </body>
</html>

Now, onward…

 <p>

This may be your most frequently used element, the paragraph

<hn>

Hah!  I tricked you!  There is no <hn> element.  There are, however six elements h1 through h6, with h1 being the highest outline level and h6 the lowest.  These are header elements that are used to separate a document into sections.  For example the title “Essential HTML Elements” above is h3. My chapter titles in e-books are almost always h2.  Browsers and readers have built-in styles for them that are generally bigger, bolder, but not necessarily better than ordinary paragraph text.

There is nothing particular that you can do with these elements that you can’t do with a paragraph element, but they serve the additional purpose of defining document structure.  Editors like Sigil use them to automatically generate a table of contents, and believe me, it saves a lot of time over doing it by hand.  Use them.

 <img>

You will use the image element any time you want, well, images in your e-book.  Going back to the original version of my drop cap example, I embedded that big B with:

<img class="dropcap" src="../Images/drop-cap-b.jpg" />

The src attribute tells where to find the image, and again, that detail depends on the e-book format, in this case EPUB.

 <a>

The a stands for anchor, which is weird because neither of the two uses for it seems to be an anchor, given my understanding of the word.  Yes, I said two uses.  It does two different but related things.

This first, and much more common, is to create a clickable link.  This happens when you include the href attribute:

<a href="http://www.google.com">Google</a>

Of course, that displays the word Google, as a clickable link to Google’s web site.  Of course, in an e-book that link will point to something internal, such as the start of a chapter.

The other use is to define a place to link to within a page. That happens when you use the name attribute instead of href.  (What happens if you use both, I don’t know; I’ve never tried it.)

<a name="jumphere">Here</a>

In fact, I put such an anchor on the “Essential HTML Elements” header above, so you can go there by clicking here.  Or, if you just hover over the link your browser will probably show you where it’s headed.  In Firefox, it’s in the lower left corner.  Have a look.  The hash (#) is the important character.  Everything before that tells the browser what page to go to, and everything after that tell where within the page to go.

Now here is where I have to tell you that you might have to forget about the second use of the anchor tag.  It has been made obsolete in HTML5.  “Well,” you ask, “why did you even bring it up?”  Because I don’t know the current state of all e-readers in the world, and a lot of them won’t know about HTML5 yet.  Besides, I’m sure that they will remain backward-compatible for a long time, and that the anchor target will still work for years.

So what has HTML5 replaced it with?  Something better, actually.  Instead of having to put in an explicit anchor to jump to, you can now jump to any element by its id.  Cool, huh?

<b> and <i>

This are simply boldface and italic, used fairly often.  You’ll see some editors, if you mark text as bold, put in strong tags, and for italics, em tags.  These mean strong and emphasis but virtually every browser and e-reader render them as boldface and italic.  I rarely use them directly because they are longer to type, however, there is a good argument for using strong and em, so perhaps those editors are doing it right.  The argument is that if you want to change their meaning, as em meaning red text instead of italic text, it is easy to make that change in CSS without redefining b and i.

<br>

I mentioned this earlier.  It starts a new line.  Usually written <br/> instead of <br></br>.

<hr>

This is a horizontal rule that by default just puts a line across the page.  There are all kinds of cool formatting things you can do with it, though, once we get into CSS.  Usually written <hr/>.

<span>

I saved this one for last, frankly, because I wasn’t sure how to describe it.  Really explaining it gets into the difference between block and inline display elements, and hierarchy, and I just didn’t want to go there.  But neither did I want to leave it out, because it can be so useful.  So I decided just to explain what to do with it.

You can put a span element around anything in a web page, and by itself doesn’t do a thing to the visual presentation.  However, one use for it that makes sense in e-books is to apply a property to a whatever it encloses, like this.

<p>We need one <span style="color: blue;">blue</span> in this paragraph</p>

All span does here is apply the blue property to the word blue.  You have to be careful doing this, because if you have other elements within the span, their properties may override what you set in the span element and give you unexpected results.  Unexpected, but correct.

I also ended up using it for my drop cap:

<span class="dropcap-b">&nbsp;</span>

But exactly how that works is a topic to broach later.

 

Again, there are just short of a zillion other elements out there, some of which just don’t apply to e-books, and some of which you’ll never need unless you’re doing something exotic like embedding right-to-left Hebrew in left-to-right English.  (Hmmm.  I’m not even sure e-readers support that!)  But just in case you want to, here is where to go for the gory details.

I’ll leave you with the entire text of my example from Part 1 in case you want to ponder it for a while.  Don’t worry about the xmlns attribute; that’s something that Sigil put in automatically and has to do with namespaces.  You don’t need it.  Don’t worry about the !DOCTYPE element, either.  We’ll cover that in Part 4.

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="../Styles/Style0001.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h2><span class="chapter">Chapter Three</span><br />
The Angel Gate</h2>
<p><span class="dropcap-b">&nbsp;</span>ekka, still barefoot, slid to a stop on the chilly
flagstone just inside the open main gate. The breeze — more than a breeze, really — coerced
her hair and gown into an urgent flutter around her. She stared gaping into the courtyard.
Something had just happened, something mysterious, something dark and dangerous. As if sensing
her hesitation, one final gust extinguished both torches in the castle's entryway, blowing soot
into her eyes. The elders would have to know about this!</p>
<p>"Laurie!" she squealed, trying to rub the sting from her eyes. "Laurie! Come quick!"<br /></p>
</body>
</html>

OK.  Give yourself a few days to digest this, and I’ll follow up with Cascading Style Sheets.


Previous   1   2   3   Next

 

Permanent link to this article: http://www.duanevore.com/html-and-css-for-e-book-self-publishers-part-2-html-xml-and-both/

May 04

HTML and CSS for E-book Self-Publishers, Part 1: Introduction

CoverWhen I first discovered how e-book formats work, it came easily because I have been writing web pages since the days of Netscape Navigator 3.0, which Google and Wikipedia conspire to tell me was 1996 (I don’t see any point in mentioning how bad some of them were). It makes sense, when you think about it. Why develop a new technology for e-books when a suitable one already exists?

What I’m trying to get around to saying is that most of the more prevalent e-book formats — Mobipocket, EPUB, Amazon AZW and KF8 — are simply a collection of web pages, and your e-book reader is a specialized browser. A rather dumb browser in many ways because it can’t play Flash or run Java applets … yet. Several other formats, and I’m going to pick on Microsoft’s LIT here, are different, but still have the same underpinnings. Incidentally, I think the first thing a person should do with a LIT file is convert it to something else.

Why do you care?  I don’t know.  But I know why I care: First, knowledge of the inner workings of e-book documents can arm a self-publisher with vast power over the appearance of the final product, and, second, even though my word processor (I use Word Pro) exports to HTML, which can be directly converted into various e-book formats, a book never converts 100% correctly and I have to do some hacking to make it right.  If you don’t care about either of these, perhaps you care about something else.  If you don’t care about anything related to this post, now might be a good time to stop reading.

It is important to understand that even if an e-book format is based upon the web page paradigm, different formats support different capabilities, different tools support different functions, and different readers support different formats. For example, Mobipocket has a provision for Javascript, which allows a document to actually do something. Sigil, an EPUB editor that we’ll look at in Part 4, supports some of the features of the latest EPUB standard (version 3), but not all. However, even if a tool such as Sigil doesn’t directly support a feature, it may be possible to implement it yourself with direct editing of the e-book code, as I did in the example below. The most glaring case of omission is the sad one of the Amazon Kindles, which do not recognize EPUB, probably the most widely supported format in the world. Fortunately, the most critical features for e-book publishing are fairly common across formats and platforms.

Because EPUB is so common and widely implemented, it will be the format I use in this series of blog entries. There are enough examples on the Internet already of how to create an EPUB e-book using tools like Sigil, so I won’t do that myself. What I will do is expose some of the inner workings of the format for people who need to do a little more. The outline will be as follows:

Part 1: Introduction

What you are reading now.  There is no need to elaborate.

Part 2: HTML, XML, and Both

HTML (Hypertext Markup Language) is the basic language of web pages, and describes the content to be presented.  This part will introduce the essential tags for an e-book document and how to properly specify attributes.

Part 3: CSS

Where HTML describes the content, CSS (Cascading Style Sheets) describes the presentation. This is where I introduce the example I mentioned above:

CSS Example

First, a caveat: this is not from a real story.  I just conjured up the image and tapped out some words on the keys.  So don’t complain about my writing (it’s a first draft, after all), and don’t ask what happens.  I don’t know who Bekka and Laurie are, and I have no idea what just took place.  But that aside, you’ll probably notice chapter title formatting and the drop cap.  Neither the image for the divider in the chapter heading nor for the drop cap appears in the HTML at all; it’s described by CSS.  I’ll show you in Part 5 how I did both of these effects.

Part 4: EPUB and Sigil

Here I’ll explain the basics of the EPUB format, especially how it is organized.  Did you know that an EPUB file is just a renamed ZIP file?  The important part is what is zipped up in it.  I’ll also describe how to use Sigil to make manual changes to your document.

Part 5: Some Examples

Besides the chapter heading and drop cap shown above, I’ll try to think of some other cool effects.  Between now and then, if you have any suggestions, let me know.

It is important to understand that after this series is finished, you won’t be an expert in any of the above topics.  In fact, I wonder if it is possible to be an expert in HTML and CSS.  I’ve been doing it for almost 20 years and still pull my hair out from time to time.  If you require anything sophisticated, hire a professional, but if you’re looking for basics to enhance your e-book appearance, I hope to have you covered.


1   2   3   Next

Permanent link to this article: http://www.duanevore.com/html-and-css-for-e-book-self-publishers-part-1-introduction/

Apr 27

Of Cell Phones and Tricorders

But nothing of cabbages and kings.

Having been a certifiable geek since 1959, perhaps earlier, I was, naturally, a fan of the original Star Trek series when it debuted in 1966.  It was unavoidable.  The binding that occurred led to dreams, of course.  A great many of them involved phasers in some way or another, but in the real world, I was much more fascinated with tricorders.

This is not surprising because, you see, in the alternate reality of adolescent fantasy, I was Mr. Spock.  My best friend, Jim, was Captain Kirk (quite logical, because they have the same first names) and Mike, I believe, was Scotty.  That’s OK; I didn’t want to be the captain, anyway; I was more the science officer type.  In moments of terminal geekdom, I would walk around with my hands clasped behind my back, raising my eyebrows, and quoting, “Fascinating.”  That was an identity crisis from which I did eventually recover.

Being a hopeless Spock-like geek with knowledge of electronics, it was probably also unavoidable that I would eventually want to build a real tricorder.  I am not the only person with that fantasy (click here) but I was probably one of the very few in the late ’60s, at a time before there were LCD displays, large-scale integration, lithium-ion batteries, or even (gasp!) commercially available microprocessors.  Still, I thought I could have packed a crude UV-vis-near-IR spectrometer, RF analyzer, magnetometer, bolometer, and a few other instruments into a usable package.  I even bought some parts, but I didn’t get very far with it because, as a high-school student, I was flat broke most of the time.

But what’s all this have to do with cell phones?

Cell phone tricorder?

Cell phone tricorder?

It started with a vision.  If you are a writer, you know what I mean: that moment when some brief image pops into your head,
one that has the potential to develop into a story.  You know the kind: it grabs you and pulls your imagination along for a while just to see where it goes.  This particular vision was of a young girl on a city street, scanning around with her cell phone, and reporting back to someone, “I think I’ve found him.”   That image might become another entry here, but for now, it led me to think about the similarity between modern cell phones and tricorders.

A typical smart phone is loaded with quite an array of sensors.  Mine isn’t even particularly fancy, but it has these:

  • Two-dimensional visual imager

Non-geeks will simply call this a camera,  Nevertheless, a two-dimensional visual imager is exactly what it is.  Unfortunately, the camera won’t work as a visible-light spectrometer, but if you knew you were looking at a monochromatic laser light source, an app could exist, properly calibrated, to measure its wavelength.  Also, your camera gives your phone the ability to scan QR codes for whatever purpose floats your boat.

  • Audio sampler

Again, non-geeks would call this a microphone, and an obviously necessary sensor for a phone, or you wouldn’t be able to talk to anyone.  But it could go beyond that.  Engineer that I am (yes, I’m still a chemist, too), I knew that it would be possible to write a spectrum analyzer app, and in the process of writing this entry, I searched to see what is out there already, and indeed there are several.  Here‘s one for Android.  Curiously, an audio spectrum analyzer is one function that it never occurred to me to put into my 1969 “tricorder.”

  • GPS terminal

The GPS in your phone is actually an array of multiple high-frequency electromagnetic sensors.  After all, you need at least four satellites to know where you are.  The best I could have done with mine was to determine which way was north.  See below.

  • Magnetometer

GPS will tell you where you are, but it won’t tell which way you are facing.  Enter the magnetometer, which measures the earth’s magnetic field to determine direction.  Of course, magnetic north isn’t exactly true north, but not to worry.  Since the GPS determines location, a smart enough phone can look up the declination (difference between the two) and calculate where true north is.  I don’t know if mine’s that smart; it just needs the right app.  On the downside, my magnetometer keeps provoking “Anomalous magnetic field” messages, probably more common if you spend your time in science labs.

  • Gravimeter/accelerometer

These are pretty much the same thing.  A gravimeter is a specialized accelerometer designed to measure the acceleration of gravity.  In other words, it can tell which way is up.  Or, more specifically, down.  It can also tell when you are shaking the phone, but except for games, I’m not sure what good that information is.  This is the part that figures out how you are holding the phone so that it knows which way to display the image.

These three (GPS, magnetometer, and accelerometer) tell the phone not only where it is in three-dimensional space, but which way it is facing.  This opens up a whole category of interesting possibilities, from those rolling-ball-in-the-maze puzzles to using it as a crude level while you’re building your house.  What I like it for (being a geek, of course) is the SkEye app. Point it in any direction and it will show you what you would see in space if the earth weren’t in the way.  Not as cool as a real telescope, but a great geek toy, and a telescope can’t see through the earth.

So, it would seem that in the intervening 44 years, while I was asleep, I guess, much of my fantasy has been realized.  There are no UV-Vis-infrared spectrometers in phones yet, but how long before there are?  How soon will be we able to detect life-forms hiding behind boulders or detect phasers on overload or anomalous neutrino fluxes?  “Still science fiction,” you say?  Maybe not so much.  OK, detecting neutrino fluxes will be sci-fi for a while.

A brief escapade with Google has shown me that already you can buy an attachment that contains chemical, temperature, infrared, humidity, and proximity sensors.  Cell phone technology is being investigated to locate snipers and record environmental data.  The tricorder of my youthful Star Trek fantasies is just around the corner.

So, it appears, is Big Brother.

 

 

 

Permanent link to this article: http://www.duanevore.com/of-cell-phones-and-tricorders/

Apr 22

The Lastchild Released for Kindle

CoverThe title says it all.  See here for details.  It took quite a bit longer to prepare than I thought it would, but doesn’t everything take longer?  Next, I’ll be making some revisions to Korvoros.  No plot changes; just tightening up a few loose ends and releasing it properly with an ISBN.

Permanent link to this article: http://www.duanevore.com/the-lastchild-released-for-kindle/

Apr 12

Mundane Science Fiction … And Other BS

I imagine that many other science fiction fans welcomed the arrival of the 21st century as that harbinger of the long-awaited future’s having at last arrived.  The jubilation was, perhaps, tempered by the lack of what we have actually been able to accomplish: in 2001 there was was no giant double-ringed space station nor mission to Jupiter (or Saturn, depending on whether you are thinking of the film or the novel).  What a lot of fans are not aware of, however, is that the early 21st century saw an insidious attack upon the very foundations of science fiction itself.

It’s called mundane science fiction.

In a nutshell, it postulates that we would only write about near-future events with “known” science and no warp drive, time travel, aliens, or anything else really interesting.  There is some theory involved that writing of such matters constitutes the tarnish of an adolescent fantasy about moving away from home.  Knowing that I am unlikely to recall, for the purpose of this post, all of its malicious perfidy, I’ll just copy the points from the ever-useful Wikipedia:

  • That interstellar travel remains unlikely; that warp drives, worm holes, and other forms of faster-than-light travel are wish fulfillment fantasies rather than serious speculation about a possible future.
  • That unfounded speculation about interstellar travel can lead to an illusion of a universe abundant with worlds as hospitable to life as this Earth. This is also viewed as unlikely.
  • That this dream of abundance can encourage a wasteful attitude to the abundance that is here on Earth.
  • That there is no evidence whatsoever of intelligences elsewhere in the universe. Although absence of evidence is not necessarily evidence of absence, it is considered unlikely that alien intelligences will overcome the physical constraints on interstellar travel any better than we can.
  • That interstellar trade (and colonization, war, federations, etc.) is therefore highly unlikely.
  • That communication with alien intelligences over such vast distances will be vexed by: the enormous time lag in exchange of messages and the likelihood of enormous and probably currently unimaginable differences between us and aliens.
  • That there is no present evidence whatsoever that quantum uncertainty has any effect at the macro level and that therefore it is highly unlikely that there are whole alternative universes to be visited.
  • That therefore our most likely future is on this planet and within this solar system, and that it is highly unlikely that intelligent life survives elsewhere in this solar system. Any contact with aliens is likely to be tenuous, and unprofitable.
  • That the most likely future is one in which we only have ourselves and this planet

35-1 It is worth noting, of course, that some of these claims are spurious or outright wrong.  Sure, faster-than-light travel is unlikely … now.  Just as faster-than-sound travel was once considered impossible, as was traveling faster than 60 miles per hour.  I’m sure that crossing the ocean was once considered impossible.  You see, the people in those days, as now, had little idea what technological advances would come in the future.

And who’s to say it’s an illusion that there are other worlds hospitable to life?  Large numbers of exoplanets have already been found, and many scientists, myself included, consider it highly unlikely that there isn’t life on some of them somewhere. And the idea that there is “no present evidence whatsoever that quantum uncertainty has any effect at the macro level?” Well, it didn’t take long to nip that pernicious rumor in the bud: http://www.livescience.com/27137-uncertainty-principle-measured-macro-scale.html.

But the pure evil of mundane science fiction lies not with its shaky premises, but on its philosophical foundation.  Meditate for a moment, if you will, on the term, science fiction.  When Geoff Ryman and others started the movement in 2002, perhaps for them the operative word was science.  For most of us, I’m sure, the operative word is fiction.  For the sake of argument, I’ve taken a few definitions from the Oxford English Dictionary, which we should agree is the authoritative resource on the language.

1.1 a.1.a The action of fashioning or imitating. (Obs.)
b.1.b Arbitrary invention.
c.1.c concr. That which is fashioned or framed; a device, a fabric.
2.2 Feigning, counterfeiting; deceit, dissimulation, pretence. Obs.
3. a.3.a The action of ‘feigning’ or inventing imaginary incidents, existences, states of things, etc., whether for the purpose of deception or otherwise.
b.3.b That which, or something that, is imaginatively invented; feigned existence, event, or state of things; invention as opposed to fact.

I like the part that says, “as opposed to fact.”  The whole point of fiction is that it isn’t true.

First LensmanI’ve used a similar example to make another point in another post, but let’s go that route again.  We know we have the science and technology to put a base on the moon.  What we don’t have is the motivation and funding.  So, nowadays, the idea of a moon base isn’t fiction at all from a scientific point of view, it’s fiction from an economic and political point of view.  Since I am currently reading Oliver Twist, let’s use that as an example.  If we take the novel and relocate it from Victorian England to a moon base, it’s suddenly science fiction, right?

Wrong!

As I argued in that other post, merely putting something into a space setting doesn’t make it science fiction. The fiction really has to be about science somehow to make it science fiction.  On top of that, if the story isn’t pushing the limits of knowledge, is it science fiction at all?  According to the tenets of mundane science fiction, we should restrict our imaginations to what is known, or at least likely to follow from what is known.  If you take the fiction out of the science, how is it science fiction?  A locomotive is an interesting work of known technology, derived from known scientific research on thermodynamics, but Murder on the Orient Express is hardly science fiction.  Stories involving communications satellites and space shuttles and space stations, and x-ray telescope are hardly science fiction anymore; they are part of our present world.

The whole idea of science fiction is to go beyond what we know.

I used a bit of foreshadowing above when I wrote, “restrict our imaginations.”  You might have noticed that science fiction writers have always been free to write about near-future events using short-term extrapolations of known science and technology.  There has never been any restriction on that.  Nor has there been any restriction regarding writing about the end of the universe, intergalactic federations, and interdimensional travel.  But apparently some people think there should be, and they’ve made it into a “movement.”

Science fiction and fantasy have always been at the vanguard of imagination.  They have reached beyond current reality and posed questions that no one ever before has thought to ask.  What will the first contact with aliens be like?  Will we even be able to communicate?  How can species with totally different psychologies even find points of cooperation?  What is really inside a black hole?  What impact will teleporters have on society?  What will humans be like in a billion years?  What are the limits of biological diversity in the universe?  Can history actually be changed?  Will going faster than light really send you back in time?  Have aliens ever visited the earth before?  What impact on society would switching minds cause?

Mundane science fiction has a simple answer for all these questions: don’t ask!

Robby_and_MorpheusIt is the Newspeak of speculative fiction, striving to eliminate that speculation, to put boundaries on the imagination, to blockade creativity.  Potentially, it is the death agony of science fiction.  There has been a lot of science fiction of the mundane variety, and given the quantity of sci-fi that I’ve read, I’m sure I’ve read some of it.  But I don’t remember it.  There have been some films — Outland comes to mind — but even that was, well, rather mundane.  What I remember are the stories that stretched my imagination, that went One Step Beyond, that reached to The Outer Limits, that encroached upon The Twilight Zone.  It has never been the ordinary, the “realistic” … the mundane.  The unknown — not the known — is the very soul of science fiction.  Take it out and you have nothing.

If you want to write about the near future using known, “reasonable” science, then by all means do so.  Such is the nature of creativity.  But to make it a “movement” and try to elevate some set of stories to an imagined philosophical plateau above the others, is in itself psychological science fiction that doesn’t fit the definition of “mundane.”  It doesn’t need a “movement” any more than space opera does, so don’t make it one, and don’t suggest that’s what other people should write.

I know, I appended to the title,”… And Other BS.” but, frankly, it seems that I’ve already covered quite enough BS for one post.

 

Permanent link to this article: http://www.duanevore.com/mundane-science-fiction-and-other-bs/

Apr 07

A Tribute to Word Pro

OK.  Everyone take a seat and have someone standing by with smelling salts, because this might come as a shock, and I would hate for any readers to topple over and gash their heads on the corners of nearby tables.  Are you ready?  Here goes….

I don’t write with Microsoft Word.

Let’s pause for you to recover from the shock.  No, you heard me right: I don’t use Microsoft Word.  In fact, I despise Microsoft Word, but I do have a modicum of respect about how Microsoft has carried bugs over all the way from at least version 3 and managed to tout them as features.

First, a little history.  Not knowing any better in the late 1980s, I had Word on my laptop.  This was, of course, in the early days of Windows, so everything was a bit more crude than it is today.  Still, I was frustrated with Word because it would get a paragraph in some weird format mode and the only way to fix it was to delete it and type it in again.  I had this crazy idea that the people at Microsoft should try actually using their products.  Then came the day when I got my hands an a trial copy of Ami Pro.

A moment for some history.  the Ami word processor was originally developed by Samna, and to this day, if you look through my file archives you will still see files with the .sam extension.  Ami was the first practical word processor developed for Windows, and was a real what-you-see-is-what-you-get product.  Yes, they even beat Microsoft to the draw.  Samna was purchased by Lotus development, and turned into Ami Pro, which included some enhancements, and was what I had the demo version of.

Word Pro - still the best

Word Pro – still the best

In short, after trying it, I gave Microsoft Word perhaps as long as a day before I uninstalled it.  Ami Pro kicked its ass up one side and down the other.  It was robust, intuitive in its functionality, and a sheer pleasure to use by comparison.  Then, shortly thereafter, Lotus upgraded it again, called it Word Pro, and I was in seventh heaven.  Unlike Word, if I didn’t know how to do something, I would think, “If I had written this word processor (and I had written one by that time) how would I have implemented this?”  Nine out of ten times I would try that, and it would work.  I had a marvelous product that apparently had been developed by people who could both program and write.  I think it must have been a first for the software industry.

In the mid 2000s, when I was working on my bachelor’s degree, I made an honest attempt to use Word for lab reports, because it was what almost everyone used.  I gave up on the attempt.   It proved to be fruitless, and I went back to Word Pro.

word pro textSo just what is so great about Word Pro, you might wonder.  You mean besides being able to put tables in tables, which Word couldn’t do?  Besides being so intuitive to use?  You know those pesky dialogs in Word, where you have to drill down, down, down and click a bunch of OKs to see what a format change looks like?  Well check out the box to the left.  Pop this baby up, and whatever text you select automatically has its attributes displayed here, and anything you change here is instantly reflected in the text.  Anything you’ve changed that differs from the style settings shows up with a red dot beside it so you know.  Granted, Word is starting to work this way — after 20 years!  There are similar dialogs for page setup, image format, you name it.  Furthermore, all the dialogs for spell check, format check, find and replace, aren’t dialogs at all, but panels that dock below the toolbar so they don’t cover up what you’re trying to see.  Someone really thought this out.  The equation editor beat the socks off Word’s.  Then, there is the main reason I switched back.  I had to use a lot of tables and graphs built by other applications, and, frankly, my ten-year-old version of Word  Pro imported OLE objects from other software better than the current version of MS Word, and OLE is a Microsoft technology!

One might wonder why Word Pro didn’t take the world by storm.  Well, it should have.  But, you see, IBM bought out Lotus.  I had mixed feelings about that, largely because of what happened to OS/2.  You might have heard of it.  OS/2 was IBM’s windowed operating system that competed at the time with Microsoft Windows.  It shouldn’t have been a competition at all, because OS/2 kicked Windows’ butt as thoroughly as Word Pro kicked MS Word’s.  You could even run Windows in an OS/2 window and it worked perfectly, or rather, as well as it would work on its own.  Just try that the other way around.  Ha!  Fat chance!  Furthermore, if you wrote code that talked directly to hardware … well, you should know that’s a definite no-no for any multitasking operating system, but in the old DOS days, it was fine to do so, and sometimes necessary.  The word processor I wrote attained its speed by writing directly to video RAM. Not to worry; OS/2 intercepted direct hardware I/O and processed it accordingly.  My word processor also worked fine.  On top of that, OS/2 was compliant with the Common Object Request Broker Architecture (CORBA), which was vastly superior in multiple ways to Microsoft’s System Object Model (SOM).

So what happened?  Why do we live in a Windows world if OS/2 was so superior?  That’s a good question, and brings us back to why I had mixed feelings about IBM’s buying Lotus.  IBM had a track record of beating Microsoft on the technological front, just as Borland delighted in doing something shortly after Microsoft declared it impossible.  But as good as IBM was technologically, they were comparably bad at marketing.  No one seemed to know they had a better operating system, and few people figured out that through Lotus, they had a better word processor.  On the other hand, Microsoft was deviously (and possibly illegally) persistent and forceful at marketing, and killed all of its competitors.

As I had feared, Word Pro ended up dying, just as other superior technologies died under marketing power: Beta video cassettes instead of VHS, HD-DVD instead of Blu-Ray.

Yet the story is not over, and IBM continued to blunder.  They released a free office suite called Symphony.  Much of the code was based on the Open Office suite, which deeply baffled me.  If they wanted to release a free competitor to stick a knife under the ribs of Microsoft, they had a much better starting point: Lotus Smartsuite, which included Word Pro, and 1-2-3, which was the original Windows spreadsheet program.  They could have polished Smartsuite up a bit, released it, and kicked Microsoft’s butt once again.  But of course, they did the wrong thing, and released something that couldn’t compete.

Attention: IBM : if you ever want to release the SmartSuite code into public domain, I’d be delighted to take it over.

Hence, my tribute (or should I call it a requiem) for the best word processor ever written.  As far as I am concerned it still is.  I am forced, from time to time by circumstance, to use Microsoft Word, and it seems that they are finally, after 30 years, starting to iron some of the kinks out of it.  Microsoft has always been slow getting things right.  Over the years, they have glitzed up Word’s interface and added features, but that stupid paragraph formatting glitch that pissed me off in the beginning, was still there the last I looked.

So, I still stick with the best.  My installation CD is stored in my fire safe, and backed up in other locations.  I don’t know what I would do without it.  It is possible to convert Word Pro documents to Word format, but even so, Word seems to know that it came from something else and totally screws up the import.  It still is not very robust.  Besides, I would feel as if I were prostituting myself by switching.

So tonight, if you have any honor, go out and have a pint, toasting to a real word warrior.

Permanent link to this article: http://www.duanevore.com/a-tribute-to-word-pro/

Mar 28

In Defense of Ginevra

A great fan drawing of Ginny Weasley, by Vishelina.

A great fan drawing of Ginny Weasley, by Vishelina.

If you’re any kind of Harry Potter fan, you will know at once who Ginevra is. For the rest of you, who have perhaps seen the films but not seen the light, Ginevra would be Ginny Weasley’s real name.  I confess, I chose this particular piece of artwork to represent her because (1) I didn’t want “Ginevra”‘s identity to be immediately obvious to the uninitiated, and (2) it is absolutely, irrefutably, the coolest, most adorable fan artwork of her that I have ever seen.  Kudos to Vishelina, whoever she really is.

Why, you might ask, would she need defended?  She casts a wicked Bat-Boogey hex, was a member of Dumbledore’s Army, fought in the Department of Mysteries and the Battle of the Astronomy Tower, and kicked butt in the Second Wizarding War.  It sounds like someone might need defended from her.

Well, I’m not talking about anyone in-universe.  She’d be just as effective as Hermione at punching old Draco in the nose.  And she can’t afford to be a bad person: she has to fill the bill of Harry Potter’s girlfriend, future wife, and mother of his children.  The Boy Who Lived, the Chosen One, who ultimately defeated Lord Voldemort in battle.  She can’t be a slouch.

No, the accusations come from from out-of-universe, in other words, the real-life one we live in.  As one blogger put it, “She’s not a bad person, she’s a bad character.”  This was based on the premise of Ginny’s involvement and transformation.  She appeared in Harry Potter and the Chamber of Secrets as a victim of Tom Riddle’s diary, possessed by Lord Voldemort, and ultimately rescued by Harry.  Rather week, it seems, impressionable, vulnerable.  She sort of drops out of history for the most part other than the skirmish in the Department of Mysteries.  But then, in Harry Potter and the Half-Blood Prince, she resurfaces, as intelligent, talented, strong, and suddenly a top-notch, formidable Quidditch player.  One wonders what happened during those missing years.

Simply, she grew up.

The complaint, however, is that she grew up invisibly, that Rowling did not properly develop her character between those two volumes.  Instead, she disappeared into a cocoon as a caterpillar and mysteriously emerged as a butterfly.  There is some truth to this argument.  Rowling could have done a better job polishing her in the interim, showing her develop as a person, keeping her on the table so that we didn’t forget she existed.

But she didn’t, actually, make a mistake.

I’m a writer, so I know what it’s like to have to backtrack.  You chronicle a history of your world, and then, in a later chapter or even later volume, you realize that something back at the beginning needs to be changed.  That’s why I don’t want to put anything out until a following volume or two, at least, have solidified.  Failing that, you have to play some fancy footwork to cover up a sudden shift in the plot.   Everyone reading this blog should know that George Lucas is guilty of that.  In the original Star Wars, later to be named Episode IV, A New Hope, Obi-wan Kenobi tells a young Luke Skywalker that Darth Vader betrayed and murdered his father.  Later, in The Empire Strikes Back, Darth Vader reveals to him, “No, I am your father.”  Well, this took some of that fancy footwork to patch up, and Kenobi’s weak, “so in a manner of speaking” explanation is far from satisfying.  Awkward.

Rowling was never guilty of that.  There were never any contradictions in Ginny’s personality, in her story line, in anything.  In fact, Rowling did even foreshadow their future romance: remember Ginny’s embarrassed fascination with him at first?  We might feel a bit cheated in that we didn’t get to see her actually grow up in very much detail, and I feel that Rowling should have showed us that, but she didn’t do anything wrong.  She didn’t shift the plot and have to cover it up.  She didn’t suddenly twist Ginny’s motives.  She didn’t have her doing bizarre and inexplicable things.  She didn’t botch her role in the plot.  Ginny didn’t change in any way over the “silent years” that is not explained by simply growing up.  We just missed out on seeing it, but that does not necessarily make her a bad character.

Tolkien was frustrating about that: he’d lead up to a great battle, cut to another scene, then come back when the battle was over.  Darn!  We missed It!

Perhaps I’m defending Rowling here more than I am Ginny.  I’m not particularly a Ginny fan (except for the artwork above); I’m much more of a Hermione fan, or even more than her, Luna.  Regardless, I’m still tired of all the whining about Ginny’s being a bad character.  She is a great character, just one that wasn’t entirely documented.

 

Permanent link to this article: http://www.duanevore.com/in-defense-of-ginevra/

Older posts «