Reader Content SDK 1.5 Logo

About Reader Content SDK

Read these sections for more information about:

  • Introducing Reader Content SDK

  • Security

  • External Architecture

  • Litgen.dll

  • Supported platforms and languages

  • Developers knowledge prerequisites

  • Installing the SDK

  • Getting help

  • Re-distribution guidelines
  • What's next?

© 2000 Microsoft Corporation. All rights reserved. Terms of use.


Introducing Reader Content SDK

The Reader Content SDK 1.5 provides support for incorporating Litgen.dll into tools that write .lit files for the Microsoft Reader eBooks solution.

The Reader Content SDK 1.5 includes the following:

Component | Description
.lit file generator (Litgen.dll) The .lit file generator that publishing tools use to create .lit files for Microsoft Reader.

Note: Litgen.dll is a non-registered COM .dll. For details about invoking Litgen.dll, go to Non-Registered .dll Guidelines.
Supporting files (Litgen.idl, Litgen_msgcodes.h) | Files used to build Litgen.dll clients.
Reader Content SDK 1.5 documentation The C++ Developers’ Guide to integrating Litgen.dll into a tool that creates .lit files for Microsoft Reader.

The documentation set includes:

  • Developers’ Guide
  • Litgen.dll Error Messages
  • Reader Content SDK Glossary
  • Markup Guide for Microsoft Reader
Sample projects Projects you can use to check your Litgen.dll tool incorporation. These projects are all complete and correct, and build complete and correct .lit files.

The sample file set includes:

  • Goodarray content project:
    • goodarray.css
    • goodarray.htm
    • goodarray.opf
  • Sleepy Hollow content project:
    • irving_hollow.htm
    • losh.lit
    • losh.opf
    • losh090.jpg
    • losh480.jpg
  • SDKexample.lit (OEB version of tag samples. Also includes the source files.)
  • SDKexampleNOEB.lit (Non-OEB version of tag samples. Also includes the source files.)
LitConvertDemo project | A sample C++ project that shows developers how to integrate Litgen.dll into a publishing application for .lit file creation. You can use the goodarray, Sleepy Hollow, or SDKexample sample files with this project.
LitErrorDemo project | A sample C++ project that demonstrates how to handle error messages generated by Litgen.dll. You can use the goodarray sample files with this project.
Quick Reference for Reader Markup Reference for supported OEB and HTML markup. Demonstrates how to author HTML and XML source files for conversion, and what to expect when you convert the tags. Use this to determine how to mark up your content for the best possible rendition.

You can review the following files to see tag usages:

  • ReadersTODAY.lit
  • SDKexample.lit (OEB version of tag samples.)
  • SDKexampleNOEB.lit (Non-OEB version of tag samples.)


Security

.lit files created with Litgen.dll can only be read using Microsoft Reader. If you want to add copyright protection to .lit files created with Litgen.dll, this is available using the Microsoft Digital Asset Server (DAS). For more information about the Microsoft Digital Asset Server, the Microsoft Reader Web site at http://www.microsoft.com/reader/info/drm.htm.

Security Level | Definition
Sealed All .lit files created with Litgen.dll have this level of security. | Titles are encrypted to prevent tampering (this does not guarantee authenticity of the copy or its source); that is, once created, a Sealed eBook title cannot be opened, changed, and saved. A Sealed title, in and of itself, does not provide for any copy protection.
Inscribed Available via Microsoft Digital Asset Server | Titles are Sealed and can prominently display data about their acquisition on the cover page so as to enable tracking and thereby reinforce honest usage.
Owner-Exclusive Available via Microsoft Digital Asset Server | Titles are Inscribed titles that can be opened only by recipients in control of a Reader-enabled device that has been "activated" for the receipt of such titles and that has furthermore verified that the title downloaded is intended for the recipient in control of that device.

Litgen.dll offers content security a unique architecture that provides unprecedented flexibility for publishers, ISVs, and booksellers. It also gives customers eBooks that can be easily accessed on multiple reading devices using Microsoft Reader. Finally, .lit files can be further protected using Microsoft Digital Asset Server. For more information about Microsoft Reader and copyright protection, see Digital Rights Management at http://www.microsoft.com/reader/info/drm.htm.


External Architecture

This section discusses the component architecture of a generic tool that uses Litgen.dll as one of the components.

Because Litgen.dll is a component of a larger workflow, diagramming its place in the conversion tools continuum helps define its role. The following diagram shows how Litgen.dll can integrate within a fictitious tool, the Acme Conversion Tool.

External Litgen.dll Architecture diagram

Note: This diagram assumes an HTML conversion. Other source formats will require different steps.

Any error return from any method is fatal. Litgen.dll does not track error codes internally, so if a caller doesn’t notice a failure from one method, there may be no other indication that the output file is corrupt.

Note: Call ILITWriter::Fail()after any failure.

All methods are clamped to their documented return codes. These return codes are not the primary mechanism for providing information about a failure. The Litgen.dll client should implement ILITCallback and supply it to Litgen.dll (via ILITWriter::SetCallback()) to provide information about a failure. Various messages are sent through ILITCallback during content preparation. These messages supply much more detail about the problem and how to correct it.

Litgen.dll has no contact with input files, therefore source file structure is not important for successful conversion tools. Tag(…, TRUE) and EndChildren() calls must be balanced. Litgen.dll requires input that appears as if it was parsed from clean HTML files and an OEB package file. The files need not actually exist.

Although the current implementation allows you to encode almost anything as content, as long as it’s well-formed, it is considerably less space-efficient to encode custom tagsets.


About Litgen.dll

Litgen.dll is the file generator that your tools use to create .lit files for Microsoft Reader. It is the main component of the Reader Content SDK.

For More Information

For features, articles, and answers to frequently asked questions about Microsoft Reader and the breakthrough ClearType™ technology, see the Microsoft Reader Web site at http://www.microsoft.com/reader/.


Supported Platforms and Languages

  • Supported Software

  • Support Platforms

  • Supported Languages

  • Supported Mime Types


Supported Software

Litgen.dll requires Microsoft Internet Explorer 4.01, SP1 or better.

The Reader Content SDK 1.5 samples require Microsoft Internet Explorer 5.0 or better.

Note: The actual dependency is urlmon.dll and wininet.dll.


Supported Platforms

The Reader Content SDK 1.5 samples (build environment) runs on:

  • Windows © 2000 Professional

  • Windows © 2000 Server

  • Windows 98 Second Edition

The Litgen.dll (3rd party tools environment) runs on:

  • Windows 95

  • Windows NT4.0 with SP6

  • Windows 98 Gold & Windows 98 Second Edition

  • Windows © 2000 Professional

  • Windows Millennium Edition


Supported Languages

The Reader Content SDK 1.5 samples are written in Visual C++, version 6.0.


Supported Mime Types

Litgen.dll supports the following mime types:

  • text/x-oeb1-css
  • text/css
  • text/x-oeb1-document
  • text/html
  • image/jpegimage/png
  • image/gif
  • image/x-bmp, image/bmp
    Note: This image/x-bmp mime type is more correct.


Developer Knowledge Prerequisites

Developers using Litgen.dll requires:

  • An intermediate to advanced understanding of the C/C++ development environment.
    For more information, see Microsoft Visual C++ at http://msdn.microsoft.com/visualc/
  • Familiarity with Visual Studio 6.0.
    For more information, see Microsoft Visual Studio at http://msdn.microsoft.com/vstudio/"
  • Familiarity with COM concepts and tasks.
    For more information, see http://www.microsoft.com/com/tech/com.asp

  • Familiarity with Unicode.
    For more information, see:
    • http://www.unicode.org/

    • http://www.microsoft.com/globaldev/default.asp
  • Familiarity with IDL.
    For more information, see http://msdn.microsoft.com/library/psdk/rpc/ov-files_6x9h.htm

  • Familiarity with MSXML C++ interfaces.
    For more information, see:
    • http://msdn.microsoft.com/library/psdk/xmlsdk/xmld2tgz.htm
    • http://www.msdn.microsoft.com/library/default.asp?URL=/library/psdk/xmlsdk/xmls6g53.htm. Click XML Developers Guide, then click Introduction to XML.
  • Familiarity with Open eBook concepts and specifications.
    For more information, see the Open eBook Publication Structure information at http://www.openebook.com/specification.htm.


Installing the SDK

To install the SDK

  1. To install the SDK, locate ContentSDK.exe at http://msdn.microsoft.com/library/default.asp.
  2. Download ContentSDK.exe to your preferred local directory.

  3. Double-click to unzip ContentSDK.exe.
    The SDK automatically creates the appropriate directories.

.dll Registration Details

Litgen.dll is a non-registered .dll. For more information about working with non-registered .dlls, see Non-Registered .dll Guidelines.

For more information, see Welcome to the MSDN Library at http://www.msdn.microsoft.com/library/default.asp.

To install Litgen.dll

To install Litgen.dll, place Litgen.dll in the same directory as the application that uses it. This applies both for development, and for installing for the end user.


Getting Help

The Reader Content SDK 1.5 is supported by Microsoft Product Support Services. For more information about getting help with the Reader Content SDK 1.5, see the Microsoft Product Support Web site at http://support.microsoft.com/directory/default.asp.


Re-Distribution Guidelines

After you integrate Litgen.dll into your publishing application, you must follow Microsoft's re-distribution guidelines.

If you want to | Follow these instructions
Incorporate Litgen.dll into a commercially available publishing application | Obtain a commercial re-distribution license from Microsoft's Web site. For more information, see http://www.microsoft.com/reader/
Incorporate Litgen.dll into a publishing application that will be used in-house at the publishing company, and selling .lit content | Obtain a license from Microsoft's Web site. For more information, see http://www.microsoft.com/reader/

It is anticipated that the licenses will be free-of-charge. More details about these programs will be available soon from Microsoft.

Follow these guidelines when you incorporate Litgen.dll into your application:

To do this Use this
Place a button on the toolbar
  • Ebook.ico (supplied as part of the download)

  • The mouseover should say Read
Include a command in the menu
  • The command should be preceded by the ebook.ico and should say Read

  • The mouseover should say Read

When you wish to distribute your content commercially, you will need to conform with the guidelines on the Microsoft Reader Web site that will be launched when Microsoft launches the SDK.


International Support

Creation and display of US English content is fully tested on LitGen.dll, and on Microsoft Reader. Even though creation and display of international content has not been fully tested, content producers are also encouraged to create .lit files in languages other than US English.

Note: Currently Microsoft Reader does not correctly display .lit files involving Asian, and BIDI characters, however, if you use the <font> tag or the CSS “font-family” property in your content source markup to select another font that contains other glyphs, those glyphs may work.

Both LitGen.dll and Microsoft Reader are Unicode applications. This means that for creation of .lit files, text must be sent to LitGen.dll using UCS2 strings.

The initial release of Litgen.dll supports authoring in any language that can be expressed in Unicode. However the supporting engines in Reader, such as hyphenation, stemming, and dictionary engines, are planned for a future release.

For more information about supported fonts, see Font and Character Set Support.


What’s Next?

We’re planning future releases of the Reader Content SDK. Keep up-to-date with what’s new, what’s planned, and what’s changed by visiting the Reader News page on the Reader Web site at http://www.microsoft.com/reader/news/default.htm.


Reader Content SDK 1.5 Logo

Understanding eBooks

An eBook is a special computer file, which contains the text of a printed book. The file may be read on a personal computer (PC), a personal digital assistant (PDA), or an electronic device designed specifically for reading eBooks (eBook reader). eBooks have many advantages, including:

  • low cost publication
  • authors can self-publish
  • easy access - you can download them from the internet
  • they are searchable
  • they have a dictionary lookup feature
  • they can be annotated
  • the interface (the reading area) is customizable for specific needs and circumstances
  • they are compact - you can carry many books in a small package
  • they are easy to update

Part of understanding eBooks includes understanding what makes them unique.

  • How eBooks differ from paper books
  • How eBooks differ from Web content

    • © 2000 Microsoft Corporation. All rights reserved. Terms of use.


How eBooks Differ from Paper Books

Designing content for eBooks is significantly different than designing content for paper books. The major differences are:

  • Live text

  • One book, many devices

  • Smaller page size


Smaller Page Size

The most important consideration to keep in mind is that any given eBook may be viewed on pages that can be any size, from as small as 3"x4" to as large as 9"x12". Large landscape tables and folio graphics are difficult, but trade books and most nonfiction are easy to adapt to these dimensions. Think in terms of paperback layout rather than quarto layout.

Microsoft Reader was carefully designed so that minimally formatted content is highly readable in its default state. For eBooks that are relatively simple from a layout point of view, such as novels and biographies, it's best to minimize the amount of formatting applied. That being said, Microsoft Reader does support highly detailed and advanced layout options for titles that require it.


Many Devices

Just like the web, layout changes depending on where the book is read. Because a single eBook file might be displayed on any size device, any design that relies on this level of precision requires a high level of formatting effort and expertise. Even then, it is difficult for a book designer to be certain that they successfully designed their content for all possible screen configurations.

In general, it is best, wherever possible, to specify the position of elements using percentage-based measurements, so that they are most likely to appear properly positioned in any format.


Live Text

eBook content is rarely designed so that (for example) a certain image might be guaranteed to appear at a certain position on a certain page. Instead, font sizes can be changed by the user as desired, to increase readability, to create a large-print edition, or to maximize the amount of text per page. This flexibility makes for a better reading experience for the reader who buys the book, but is another challenge for the graphic designer who structures the eBook text for publication.


How eBooks Differ from Web Content

Because Reader pages are designed to look and act as much as possible like traditional printed book pages, Reader pages do not support web features that interfere with reading. This is reflected in three main elements unavailable in browsers:

  • Fixed aspect ratio

  • Page turns, rather than scrolling

  • Sophisticated typography


Fixed Aspect Ratio

Like web pages, eBook pages are designed knowing that the actual page the reader sees may be any arbitrary size. Because Microsoft Reader pages are designed to emulate printed book pages, all Microsoft Reader pages maintain a fixed aspect ratio of 3:4 (width to height). Regardless of the size of the Reader page, the aspect ratio always remains constant for optimal reading.


Page Turning, Not Scrolling

Web pages can scroll horizontally and vertically. This allows for a certain amount of graceful degradation when an image or table is too big for the size of the browser window, or when text passages extend beyond the edge of a page. But scrolling also makes reading more difficult than page-turning does.

eBook text lines always break when they reach the edge of the right page margin. And graphics that are too large to fit on the page in either dimension are shrunk to the largest possible size that can fit on the page without being truncated. In many cases, images are moved to the next page for a better fit.


Sophisticated Typography

The Reader supports the highest quality of typographic layout. Microsoft Reader's underlying font display technology offers more typographic precision than current Web layout engines. Because the Reader uses unique technology to display fonts properly, the display does not always exactly match the browser layout engines' behavior, even if the content format uses identical tags. Some especially distracting forms of markup—such as blinking elements, music, and patterned backgrounds—are disabled entirely.

If browser layout standards conflict with sound typographical or design judgment, the Reader produces high quality results, even if these results conflict with common web layout traditions. These conflicts are all described here—none of these differences are large, but together they help provide an optimal reading experience to the viewer using Microsoft Reader.


Reader Content SDK 1.5 Logo

Developers Guide

The Developers Guide is the C++ developers’ guide to integrating Litgen.dll into a publishing tool that publishers, authors, and content managers can use to create the .lit files for Microsoft Reader. It contains the tools, samples, and instructions necessary to help software developers to easily create .lit authoring tools in the Microsoft Reader format.

Read this Guide to understand more about:

  • Non-Registered .dll Guidelines

  • Understanding the Litgen.dll Interface Interactions
  • Interfaces

  • Building with the Litgen.dll Code Samples


Non-Registered .dll Guidelines

The Litgen.dll usage information is located in the descriptions in the .idl, and the overall flow is described in the interface description of ILITWriter.

Note the following exceptions:

  • Although Litgen.dll is essentially a COM server, it is not created with the usual CoCreateInstance() call or equivalent. Instead, Litgen.dll exposes a single entry point that you can use to get the ILITWriter interface pointer. This approach avoids the usual sticky shared component issues, such as installation and reference counting, versioning, and interface compatibility.

  • Use the ILITWriter interface pointer the way you would use it if it came from CoCreateInstance(). Since the library is loaded directly and the applications do not share, each application should install the .dll alongside its own executables. No registration is required.

Note: Since Litgen.dll uses COM components internally, you must call CoInitialize before ILITWriter::Create() even if you do not make any other calls to COM libraries.

In some situations, simply calling LoadLibrary("litgen.dll") would be sufficient. The extra work to construct a full path is required for more complex situations, such as when Litgen.dll is incorporated into a conventional COM inproc server. LoadLibrary() has a list of directories it searches for a named .dll. The directory from which the .exe itself is loaded is included in this list, but the directory from which some COM .dll was loaded is not. For these situations, you must tell LoadLibrary() where to look.

The component is typically installed with code like the following (error handling has been removed for brevity):

IUnknown* pUnkLitWriter = 0;
ILITWriter* pLitWriter = 0;
// we'll construct a complete pathname for litgen.dll
//into szLitgenFilename, which we declare
//large enough to hold the largest possible
//path, plus a null terminator
char szLitgenFilename[MAX_PATH+1];
HMODULE hLITGen;
typedef HRESULT (*WriterCreator)(IUnknown**);

WriterCreator CreateWriter;

// some of this can be elided for clients, but it’s
// important that controls build the complete pathname.
GetModuleFileName(hClientInstance, szLitgenFilename, MAX_PATH);
PathRemoveFileSpec(szLitgenFilename);
PathAppend(szLitgenFilename, "litgen.dll");
hLitgen = LoadLibrary(szLitgenFilename);

CreateWriter = (WriterCreator)GetProcAddress(hLitGen, "CreateWriter");
hr = CreateWriter(&pUnkLitWriter);
hr = pUnkLitWriter->QueryInterface(IID_ILITWriter, &pLitWriter);


Understanding the Litgen.dll Interface Interactions

ILITWriter is the main Litgen.dll interface. The creation of a book is driven here. The four types of content that go into a .lit (publication metadata, CSS stylesheets, text, and images) are accepted by hosts created by ILITWriter.

Note: The source files must be fully parsed before you run them through Litgen.dll. The only source files parsed by Litgen.dll are the CSS files.

There can be several dependencies between the different types of content. For example, Litgen.dll must have already received all the CSS referenced from some textual content before it can correctly process and encode that content. However, the manifest specified in the metadata can be in any order. (Note that the spine, not the manifest, determines the sequence of text content. See the OEB specification for more details.)

Therefore, Litgen.dll needs to dictate the order in which the content streams are submitted. This order may be radically different than the order in which they were presented in the metadata. After presenting the metadata, the tool must ask Litgen.dll which streams to present, one at a time. The following sequence illustrates this concept.

Note: Litgen.dll can be used in a multi-threaded environment, but multiple threads must not attempt to access Litgen.dll concurrently.

To create a book, the basic sequence of operations is:

  1. Initialize COM by calling CoInitialize() or CoInitializeEx().
  2. Load Litgen.dll and create the main interface (ILITWriter) using the CreateWriter() export.
    For more information, see CreateWriter Method.
  3. Register the object to receive message using the following step:
    • Create an instance of a class that implements ILITCallback, and passes it to SetCallback().
  4. Call Create() to start the .lit file generation.
  5. Process the metadata using the following steps:
    • Call GetPackageHost() to get an ILITParserHost.
    • Parse the publication metadata, typically the package file, into this host.
      Note: Depending on the application, this might be as simple as parsing an OEB package file (.opf). Alternately, you may need to synthesize the publication data from some other form of metadata.
    • When completed, call Finish() on the host, then release the host.
      Note: Unlike other hosts, this host does not support the ILITHost methods.
  6. Process all CSS streams using the following steps:
    • Call GetNextCSSHost() in a loop.
      Note: Each time you call this, it gives you an ILITCSSHost to receive CSS content. You can call ILITHost methods, particularly GetFilename(), to discover which CSS data to stream in.
    • Write() this stream and Finish() as described in ILITCSSHost's documentation, and release the host.
      When there is no more CSS to be handled, GetNextCSSHost() returns S_FALSE, indicating that the caller must begin processing content streams.
  7. Process all text streams using the following steps:
    • Call GetNextContentHost() in a loop.
      This method gives you an ILITParserHost (the same interface type that was used for the metadata, though the implementation is, of course, very different) to receive a single content stream.
    • Call GetFilename() to find out which stream is expected; parse that stream into the host.
      Note: Depending on the application, this may be as simple as parsing an OEB document file, or it may be a proprietary conversion.
    • When completed, call Finish() on the host, then release it.
      Note: GetNextContentHost() returns S_FALSE when there are no more text streams, indicating that the caller must begin processing image streams.
  8. Process all image streams using the following steps:
    • Call GetNextImageHost() in a loop.
      This method gives you an ILITImageHost to receive a single image stream.
    • Call GetFilename() to find out which stream is expected, Write() the data from that stream into the host, then release the host.
      GetNextImageHost() returns S_FALSE when all images are processed.
  9. Call ILITWriter::Finish() to finalize the file.

Caution: The sequence of operations is enforced; if one of these methods is called out of order, it will return E_UNEXPECTED.

If any failure is returned from any Litgen.dll method, it is the caller's responsibility to call Fail(), so that Litgen.dll can clean up its internal state and delete the incomplete file. If the tool needs to terminate production of a book, Fail() can be called at any time. After calling Fail(), the ILITWriter should be released.

Note: Litgen.dll will remain stable. You can immediately call CreateWriter() and start over, if required.


Interface Reference

Litgen.dll supports the following interfaces.

Interface | Description
ILITCallback | Outgoing interface that receives text messages during content preparation. ILITCallback is the only interface that the Litgen.dll client is expected to implement.
ILITTag | This interface accepts and gathers tag names and attributes, so as to supply an atomic tag to ILITParserHost.
ILITHost | This interface returns the manifest ID, filename, or mime type of the item being parsed. This interface is common to the following three interfaces.
ILITParserHost | This interface accepts parsed content files and metadata as a stream of Tag, Text, and EndChildren notifications.
ILITCSSHost | This interface receives cascading style sheet (CSS) data.
ILITImageHost | This interface receives raw image file data.
ILITWriter | This interface writes .lit files from source files.

Notes:

  • All text parameters sent to Litgen.dll are sent as two values: a pointer to a buffer of Unicode characters, and a count of characters to use from that buffer. This text does not need to be null-terminated. If it is terminated, do not include the terminator in the count of characters.

Return Values

Each method returns one or more of the following error codes. The descriptions are included here, and the specific values returned are included with each method.

Note: In cases where the problem isn’t obvious from the error code, a supplementary message is sent to ILITCallback.

Return code | Description
S_OK | The method succeeded.
S_FALSE | The method succeeded. All content has been written, no more hosts of this type are available, so call Finish(). For more information, see Understanding the Litgen.dll Interface Interactions.
E_INVALIDARG | The method failed due to an invalid argument. In some instances, you may receive more detail from ILITCallback::Message.
E_OUTOFMEMORY | The method failed due to memory exhaustion.
E_UNEXPECTED | The method failed because the sequence described in Understanding the Litgen.dll Interface Interactions was not followed.
CO_E_NOTINITIALIZED | The method failed because CoInitialize() or CoInitializeEx() has not been called.
E_FAIL | The method failed for some other reason; details about the failure will have been supplied through ILITCallback::Message().


CreateWriter

The CreateWriter method creates a new ILITWriter.

Syntax

HRESULT CreateWriter(
[out, retval] IUnknown** ppWriter
);

Parameters

ppWriter

Pointer to interface pointer of new writer

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

See Also

  • ILITParserHost::NewTag
  • Non-Registered .dll Guidelines


ILITCallback Interface

This interface is used to send detailed messages from Litgen.dll about events that occurred during content preparation.

This is an outgoing interface. That is, a client of Litgen.dll should define a class that implements this interface, create an instance of that class, and pass a pointer to the instance to ILITWriter::SetCallback(). Litgen.dll will call Message() on that instance at various times.

If an error occurs during any method in Litgen, ILITCallback::Message() is the primary mechanism for describing the actual problem or suggesting a solution. Warnings may be generated about constructs that are valid, but may have undesirable results. Success messages are sent when a file is successfully completed. Message() will be called before the return of the method the event occurred in (and, in case of error, that method will return one of the generic HRESULTs listed the Return Values table in Interfaces.

Each message has a code as well as accompanying text. This code can be used to discriminate among messages, selecting some to be displayed to a user and others to be suppressed. It can also be used to recognize specific errors, in order to correct them automatically. Rather than simply being numbered sequentially, the message codes also distinguish the messages by class and severity. For more information on the encoding, as well as the complete list of messages, see Error Message List.

Though the message codes allow for simple suppression of warnings, suppressing them without giving the user a choice is strongly discouraged. It's best to use a conservative approach to suppressing messages; if the volume is too high to be useful in a particular application, use a Details>>-style fold-up dialog to show the warnings on demand.

In general, Litgen.dll has no contextual information to report in a message. For example, Litgen.dll can't know the current line number in the source document, since Litgen.dll isn't parsing the document. If there is useful context (such as a line number, or a hotlink) that can guide the user to the problem in the document, the client must fetch that information from its parser and present it along with Litgen's message.

Note: Litgen.dll understands line numbers in .css files, but nowhere else.

In addition to the methods inherited from IUnknown, the ILITCallback interface exposes the following methods.

Method | Description
Message | Receives a warning, error, or informational error message.


ILITCallback::Message

The Message method receives a warning, error, or informational error message.
For a complete list of error messages, see the Error Message List.

Syntax

HRESULT Message(
[in] int iType
[in] int iMessageCode
[in] const wchar_t* pwszMessage
);

Parameters

IType

Message type indicator:

0: fatal error

1: warning

-1: informational message

iMessageCode

Message code (one of the values in litgen_msgcodes.h)

pwszMessage

Null-terminated message text

Return Values

S_OK

See Also

  • ILITCallback Interface
  • ILITWriter::SetCallback


ILITTag Interface

This is a write-only interface to a tag. Litgen.dll clients should:

  1. Ask ILITParserHost for a blank tag using the NewTag() method.

  2. Populate its name and attributes through the ILITTag interface.

  3. Give it back to ILITParserHost with Tag().

In addition to the methods inherited from IUnknown, the ILITTag interface exposes the following methods.

Method | Description
SetName | Sets the name of a new tag.
AddAttribute | Adds an attribute to a new tag.


ILITTag::SetName

The SetName method sets the name of a new tag.

Syntax

HRESULT SetName(
[in, size_is(cwchName)] const wchar_t* pwchName
[in] ULONG cwchName
);

Parameters

pwchName

Pointer to the tag name

cwchName

Count of characters at pwchName that are part of the tag name

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_FAIL

See Also

  • ILITTag Interface
  • ILITParserHost::NewTag
  • ILITParserHost::Tag


ILITTag::AddAttribute

The AddAttribute method adds an attribute to a new tag.

Syntax

HRESULT AddAttribute(
[in, size_is(cwchName)] const wchar_t* pwchName
[in] ULONG cwchName
[in, size_is(cwchValue)] const wchar_t* pwchValue
[in] ULONG cwchValue
);

Parameters

pwchName

Pointer to an attribute name

cwchName

Count of characters at pwchName that are part of the attribute name

pwchValue

Pointer to an attribute value

cwchValue

Count of characters at pwchValue that are part of the attribute value

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_FAIL

See Also

  • ILITTag Interface
  • ILITTag::SetName
  • ILITParserHost::NewTag


ILITHost Interface

This is the common interface for the three "identity" properties that describe each host. This information is taken from the manifest item entry in the metadata stream. Except for the metadata host itself (that is, the ILITParserHost returned through ILITWriter::GetPackageHost()), these methods are implemented on all hosts.

Note: The manifest ID is the reference ID in the package file (.opf). For more information about the package file, see The Package File and Cover Graphics. For a sample package file (.opf), see Sample Package File. For more information about the Open eBook specification, see http://www.openebook.com/specification.htm.

In addition to the methods inherited from IUnknown, the ILITHost interface exposes the following methods.

Method | Description
GetId | Returns the manifest ID of the item being parsed.
GetFilename | Returns the filename of the item being parsed.
GetMimeType | Returns the mime type of the item being parsed.


ILITHost::GetId

The GetId method returns the manifest ID of the item being parsed.

Syntax

HRESULT GetId(
[out, retval] BSTR* pbstrId
);

Parameters

pbstrId

Pointer to BSTR to receive the string

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

Caller must use SysFreeString().

As per COM conventions, the pbstrId should be the address of a BSTR variable containing a null pointer.

See Also

  • ILITHost Interface
  • ILITHost::GetFilename
  • ILITHost::GetMimeType


ILITHost::GetFilename

The GetFilename method returns the filename of the item being parsed.

Syntax

HRESULT GetFilename(
[out, retval] BSTR* pbstrFilename
);

Parameters

pbstrFilename

Pointer to BSTR to receive the string

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

Caller must use SysFreeString().

See Also

  • ILITHost Interface
  • ILITHost::GetId
  • ILITHost::GetMimeType


ILITHost::GetMimeType

The GetMimeType method returns the mime type of the item being parsed.

Syntax

HRESULT GetMimeType(
[out, retval] BSTR* pbstrMimeType
);

Parameters

pbstr

Pointer to BSTR to receive the string

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

Caller must use SysFreeString().

See Also

  • ILITHost Interface
  • ILITHost::GetId
  • ILITHost::GetFilename


ILITParserHost Interface

This is the host to a content parser. Both content files and metadata must be parsed by the Litgen.dll client, and fed to this interface as a stream of Tag, Text, and EndChildren notifications.

ILITParserHost and ILITTag are used together to express a stream of structured content as a nested hierarchy. That is, opening and closing tags must be correctly nested and balanced. For example, the following HTML snippet:

     <b><span class="foo">Test</span></b>

should be presented to Litgen.dll with the following calls (reference counting, interface conversions, and error checking hidden for clarity):

  pParserHost->NewTag(&pTag);
  pTag->SetName(L"b", 1);
  pParserHost->Tag(pTag, TRUE);
  pParserHost->NewTag(&pTag);
  pTag->SetName(L"span", 4);
  pTag->AddAttribute(L"class", 5, L"foo", 3);
  pParserHost->Tag(pTag, TRUE);
  pParserHost->Text(L"Test", 4);
  pParserHost->EndChildren();
  pParserHost->EndChildren();

ILITParserHost is designed to fit smoothly into a tree-walking parser. The most straightforward conversion is obviously from HTML- and XML-like formats. Note, however, that any linear content markup format can be re-expressed in this form.

In addition to the methods inherited from ILITHost, the ILITParserHost interface exposes the following methods.

Method | Description
GetId | Returns the manifest ID of the item being parsed.
GetFilename | Returns the filename of the item being parsed.
GetMimeType | Returns the mime type of the item being parsed.
NewTag | Creates a new, empty tag.
Tag | Accepts notification of a tag in the content stream.
Text | Accepts notification of text in the content stream.
EndChildren | Accepts notification of the end of a tag’s children.
ExternalStylesheet | Accepts notification of an external style sheet that is specified independently from the document structure.
Finish | Finalizes the content.


ILITParserHost::NewTag

The NewTag method creates a new, empty tag.

Syntax

HRESULT NewTag(
[out, retval] IUnknown** ppTag
);

Parameters

ppTag

Pointer to interface pointer of new tag

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_FAIL

See Also

  • ILITParserHost Interface
  • ILITParserHost::Tag
  • ILITTag::SetName


ILITParserHost::Tag

The Tag method accepts notification of a tag in the content stream.

Syntax

HRESULT Tag(
[in] IUnknown* pTag
[in] BOOL fChildren
);

Parameters

pTag

The populated tag

fChildren

This has a value of true if the tag has children (either text or nested tags within the tag)

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

If fChildren is true, a matching EndChildren() is required. If fChildren is false, EndChildren() must not be called for this tag. In case of unbalanced calls, E_UNEXPECTED is returned from Finish() or EndChildren(), as soon as the problem is detected (which is likely to be much later than the actual error).

See Also

  • ILITParserHost Interface
  • ILITParserHost::NewTag
  • ILITTag::SetName
  • ILITTag::AddAttribute


ILITParserHost::Text

The Text method accepts notification of text in the content stream.

Syntax

HRESULT Text (
[in] const wchar_t* pwchText
[in] ULONG cwchText
);

Parameters

pwchText

Pointer to the text

cwchText

Count of characters at pwchText that are part of the text. Note: Embedded NULLs are not allowed.

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

Text need not be null-terminated, or complete; a text run can be broken up into several sequential calls to Text(), if necessary.

See Also

  • ILITParserHost Interface


ILITParserHost::EndChildren

The EndChildren method accepts notification of the end of the innermost tag.

Syntax

HRESULT EndChildren(
);

Parameters

none

Return Values

S_OK

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

See Also

  • ILITParserHost Interface
  • ILITParserHost::Text
  • ILITParserHost::NewTag
  • ILITTag::SetName
  • ILITTag::AddAttribute


ILITParserHost::ExternalStylesheet

The ExternalStylesheet method accepts notification of an external stylesheet that is specified more or less independently from the document structure. For example, the <?xml-stylesheet?> processing instruction in OEB documents is an external stylesheet.

Syntax

HRESULT ExternalStylesheet(
[in] IUnknown* pTag
);

Parameters

pTag

A tag populated as if it were a <link> tag

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

Internally, such stylesheets are actually handled as <link> tags. This means that they are held until a <head> is found (or synthesized for this purpose). As a result, any warnings arising from this call may not be sent to the Callback interface immediately.

See Also

  • ILITParserHost Interface


ILITParserHost::Finish

The Finish method finalizes the content.

Syntax

HRESULT Finish(
);

Parameters

none

Return Values

S_OK

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

See Also

  • ILITParserHost Interface


ILITCSSHost Interface

This is the host for receiving CSS stylesheet data. It supports UTF8 and both forms of UTF16 (a byte order mark is required for UTF16).

In addition to the methods inherited from ILITHost, the ILITCSSHost interface exposes the following methods.

Method | Description
GetId | Returns the manifest ID of the item being parsed.
GetFilename | Returns the filename of the item being parsed.
GetMimeType | Returns the mime type of the item being parsed.
Write | Receives the stylesheet text.
Finish | Finalizes the CSS stream.
GetCurrentLine | Returns the current line of the parser, in case of a warning or error during Finish().


ILITCSSHost::Write

The Write method receives the stylesheet text.

Syntax

HRESULT Write(
[in, size_is(cb)] const BYTE* pb
[in] ULONG cb
[out] ULONG* pcbWritten
);

Parameters

pb

Pointer to the data

cb

Size of the data, in bytes

pcbWritten

Pointer to a ULONG to receive the count of bytes actually written. Since Litgen.dll is always synchronous, this value will always be the same as the value passed in for cb, unless an error is returned. Callers can pass NULL here.

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

See Also

  • ILITCSSHost Interface
  • ILITCSSHost::Finish


ILITCSSHost::Finish

The Finish method finalizes the CSS stream.

Syntax

HRESULT Finish(
);

Parameters

none

Return Values

S_OK

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

The CSS is actually parsed during Finish().

See Also

  • ILITCSSHost Interface


ILITCSSHost::GetCurrentLine

The GetCurrentLine method returns the current line of the parser, in case of a warning or error during Finish().

Syntax

HRESULT GetCurrentLine (
[out, retval] ULONG* pcLine
);

Parameters

pcLine

Pointer to ULONG to receive the line

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

Parse warnings and errors are sent during Finish(), when the client may be looking at </style>, for example. This method returns the offset in lines from the beginning of the CSS data. The line number is not always available.

See Also

  • ILITCSSHost Interface
  • ILITCSSHost::Finish


ILITImageHost Interface

This is the host for receiving raw image file data. You can copy image files verbatim into this host.

In addition to the methods inherited from ILITHost, the ILITImageHost interface exposes the following methods.

Method | Description
GetId | Returns the manifest ID of the item being parsed.
GetFilename | Returns the filename of the item being parsed.
GetMimeType | Returns the mime type of the item being parsed.
Write | Receives the raw bytes of the image file.


ILITImageHost::Write

The Write method receives the raw bytes of the image file.

Syntax

HRESULT Write (
[in, size_is(cb)] const BYTE* pb
[in] ULONG cb
[out] ULONG* pcbWritten
);

Parameters

pb

Pointer to the data

cb

Size of the data, in bytes

pcbWritten

Pointer to a ULONG to receive the count of bytes actually written. Since Litgen.dll is always synchronous, this value will always be the same as the value passed in for cb, unless an error is returned. Callers can pass NULL here.

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

See Also

  • ILITImageHost Interface


ILITWriter Interface

ILITWriter is the main Litgen.dll interface. The creation of a book is driven here. The four types of content that go into a .lit (publication metadata, CSS stylesheets, text, and images) are accepted by hosts created by ILITWriter.

For more information about the interaction of the Litgen.dll interfaces, see Understanding the Litgen.dll Interface Interactions.

In addition to the methods inherited from IUnknown, the ILITWriter interface exposes the following methods.

Method | Description
SetCallback | Receives a pointer to a client-implemented callback interface.
Create | Creates a new .lit file.
GetPackageHost | Returns a parser host to receive the parsed package file.
GetNextCSSHost | Returns a CSS host to receive the stylesheet text.
GetNextContentHost | Returns a parser host to receive the parsed content file.
GetNextImageHost | Returns an image host to receive the raw image file.
Finish | Completes the file.
Fail | Cleans up internal structures and deletes the output file after a failure during content preparation.


ILITWriter::SetCallback

The SetCallback method receives a pointer to a client-implemented callback interface.

Syntax

HRESULT SetCallback (
[in] IUnknown* pCallback
);

Parameters

pCallback

Pointer to ILITCallback implementation to receive text messages during content preparation. This parameter is optional; passing NULL will cause Litgen.dll to release the previously registered ILITCallback, if any, and stop sending messages.

Return Values

S_OK

E_INVALIDARG

Remarks

This call is optional, but highly recommended. It is very helpful for troubleshooting during tool development, and useful to anyone troubleshooting an error.

See Also

  • ILITWriter Interface
  • ILITCallback Interface
  • ILITCallback::Message


ILITWriter::Create

The Create method creates a new .lit file.

Syntax

HRESULT Create (
[in, string] const wchar_t* pwszLitFile,
[in, string] const wchar_t* pwszSourceBasePath,
[in, string] const wchar_t* pwszSource,
[in] int iMinimumReaderVersion
);

Parameters

pwszLitFile

The null-terminated output filename.

pwszSourceBasePath

The null-terminated pathname from which Litgen.dll should resolve relative links. In the context of an OEB publication, this would be the full pathname of the package file.

pwszSource

A null-terminated string containing the owner of the content, usually an author or publisher name.

iMinimumReaderVersion

The minimum version on which the .lit file should run.

0: run on all versions

1: run on all versions except the first Pocket PC ROM release

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

CO_E_NOTINITIALIZED

E_FAIL

Remarks

This method overwrites most target files without warning, including files with normal, archive, and offline bits set. Files with system, hidden, read-only bits set fail with E_FAIL.

You can set iMinimumReaderVersion to prevent older readers from opening books that render badly or cause other problems. For example, the Pocket PC Reader contained a much weaker CSS parser than more recent versions. Some CSS constructs, particularly invalid CSS, cause that version to fail completely. As a result, Litgen.dll refuses to build a book containing such constructs, unless this value is 1 or above.

See Also

  • ILITWriter Interface
  • ILITWriter::Finish


ILITWriter::GetPackageHost

The GetPackageHost method returns a parser host to receive the parsed package file.

Syntax

HRESULT GetPackageHost (
[in] BOOL fEnforceOEB,
[out, retval] IUnknown** ppHost
);

Parameters

fEnforceOEB

Indicates whether an error should be returned for non-OEB content

ppHost

Pointer to interface pointer of new parser host

Return Values

S_OK

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

This is an ILITParserHost being returned.

See Also

  • ILITWriter Interface
  • ILITParserHost Interface


ILITWriter::GetNextCSSHost

The GetNextCSSHost method returns a CSS host to receive the stylesheet text.

Syntax

HRESULT GetNextCSSHost (
[out, retval] IUnknown** ppHost
);

Parameters

ppHost

Pointer to interface pointer of new CSS host

Return Values

S_OK

S_FALSE

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

The S_FALSE return value is the signal for Litgen.dll to move to the next stream.

See Also

  • ILITWriter Interface
  • ILITCSSHost Interface


ILITWriter::GetNextContentHost

The GetNextContentHost method returns a parser host to receive the parsed content file.

Syntax

HRESULT GetNextContentHost (
[out, retval] IUnknown** ppHost
);

Parameters

ppHost

Pointer to the interface pointer of a new parser host

Return Values

S_OK

S_FALSE

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

This is an ILITParserHost being returned.

The S_FALSE return value is the signal for Litgen.dll to move to the next stream.

See Also

  • ILITWriter Interface
  • ILITParserHost Interface


ILITWriter::GetNextImageHost

The GetNextImageHost method returns an image host to receive the raw image file bytes.

Syntax

HRESULT GetNextImageHost (
[out, retval] IUnknown** ppHost
);

Parameters

ppHost

Pointer to the interface pointer of a new image host

Return Values

S_OK

S_FALSE

E_INVALIDARG

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

The S_FALSE return value is the signal for Litgen.dll to move to the next stream.

See Also

  • ILITWriter Interface
  • ILITImageHost Interface


ILITWriter::Finish

The Finish method completes the file.

Syntax

HRESULT Finish (
);

Parameters

none

Return Values

S_OK

E_OUTOFMEMORY

E_UNEXPECTED

E_FAIL

Remarks

This must be called when all content has been written.

See Also

  • ILITWriter Interface
  • ILITWriter::Create


ILITWriter::Fail

The Fail method cleans up internal structures and deletes the output file after a failure during content preparation.

Syntax

HRESULT Fail (
);

Parameters

none

Return Values

S_OK

Remarks

Call this after any failure to abort and clean up.

See Also

  • ILITWriter Interface
  • ILITCallback::Message


Incorporating Litgen.dll into Your Tools

Understanding the Package File

Because Litgen.dll uses the OEB package file as its information source, you should familiarize yourself with the OEB package framework and requirements.

  • For more information, see the Open eBook™ Publication Structure 1.0 at http://www.openebook.com/OEB1.html.

  • For more information about marking up content files to conform to OEB and Microsoft Reader standards, see the Markup Guide.

Running midl

Litgen.dll is not shipped with the litgen.h file and other project files, so you must create the files using midl.exe.

To create the files:

  • Using the command line interface, type midl litgen.idl.
    The midl.exe creates the litgen.h file, the litgen_i.c file and other files crucial to building your project.

Note: The samples show you how this can be done in Visual C++.


Building with the Litgen.dll Code Samples

The Reader Content SDK 1.5 includes two code samples to help you develop your interface. These are:

Sample 1 | Sample 2
Name | LitConvertDemo.exe | LitErrorDemo.exe
Language | C++ | C++
Module Accessed | Litgen.dll | Litgen.dll
Access Method COM

(early binding)

 COM

(early binding)
Parser API | XML DOM | N/A
UI | Command line | Command Line
Information Source OEB publications made up of:
  • An OEB package file. For more information, see the OEB specification at http://www.openebook.com/
    OEB1.html, or review the Legend of Sleepy Hollow (losh.opf) sample book provided in the SDK for the format and framework requirements.

  • 1 or more HTML files

  • 0 or more image files

  • 0 or more CSS files
 This sample code contains arrays of notifications to send as if they were from package and content files. There is a single package array, and a selection of three different content arrays that produce different results.

Note: These code samples are Win32 Console Applications, and should be run from the command line.


LitConvertDemo.exe

LitConvertDemo.exe is a command line tool you can use to create .lit files from OEB compliant sources. LitConvertDemo.exe runs only on the Windows platform, and uses Litgen.dll to create .lit files.

The LitConvertDemo.exe works with files that conform to the Open eBook (OEB) standards. For more information about OEB standards, see http://www.openebook.org.

Note: The .lit format is tamper resistant, and every .lit file is "sealed" to prevent tampering with the contents and to ensure the authenticity of the publication. .lit files created using the Reader Content SDK 1.5 can be further protected using the Microsoft Digital Asset Server, available through both retail and distribution outlets on the Internet.

This tutorial includes:

  • An overview about incorporating Litgen.dll into your tools

  • The LitConvertDemo.exe data flow

  • The LitConvertDemo.exe interface

  • The LitConvertDemo.exe code map

This sample contains:

  • All necessary project and C++ source files.

  • Sets of sample OEB content files for The Legend of Sleepy Hollow, each set containing the .lit file generated from that content. These include:
    • losh480.jpeg (cover image file)

    • losh090.jpeg (thumbnail image file)

    • irving_hollow.htm (content source file)

    • losh.opf (OEB package file)

    • losh.lit (final Reader file)
  • Sample .lit files that show you how Litgen.dll works with various markup tags. These include:
    • goodarray.css (the cascading style sheet)

    • goodarray.htm (the sample content source file)

    • goodarray.opf (the sample package file)


LitConvertDemo.exe Data Flow

The general data flow of the LitConvertDemo tool is shown in the following diagram:

LitConvertDemo Project Data Flow diagram
  1. In the initial step, the OEB source files (the OEB-compliant .htm, .jpg, .css, and .opf) are created and gathered for conversion.
  2. In the second step, LitConvertDemo activates Litgen.dll and the MSXML parser to parse the OEB source files.
  3. In the final step, the Microsoft Reader-compliant .lit files are created.

For more information about marking up content files to create OEB-compliant source files, see the Quick Reference for Reader Markup.

To build and use LITConvertDemo, open the project, build the project, and run the resulting .exe.

Note: These code samples are Win32 Console Applications, and require you to use the command line.


LitConvertDemo.exe Interface

LitConvertDemo uses the following command-line parameters:

  • Package file name – this is the content file name. The content file is in OEB package format.

  • Output file name – this is the name of the .lit file.

  • File path for both Package and Output files – include the file path only if you want to retrieve or save the files in a directory other than the current directory.

Include the parameters in the command line according to the following examples:

LitConvertDemo Project parameters diagram
LitConvertDemo Project parameters diagram 2


LitConvertDemo.exe Code Map

This section shows how the sample code maps to the Litgen.dll code.

LitConvertDemo Project Codemap


LitErrorDemo.exe

LitErrorDemo.exe is a C++ application that demonstrates how to handle error messages generated by Litgen.dll. It contains a package array and 3 content arrays.

Note: This tool takes no user input.

LitErrorDemo.exe has three arrays containing tagged data that is streamed into Litgen.dll. These arrays contain:

Array | Content | Action | File Save Location
GoodArray | Proper OEB content. | This produces a “Success” message, and builds a .lit file with the data from the array. | The generated .lit file, (GoodArray.lit), is saved in the same directory as LitErrorDemo.exe.
WarnArray | Proper OEB content, plus one unrecognized tag. | This produces a “Warning” error, and builds a .lit file with the data from the array. | The generated .lit file, (WarnArray.lit), is saved in the same directory as LitErrorDemo.exe.
BadArray | Malformed content (an invalid <img> tag). | This produces a “Fatal” error, and does not build a .lit file. | N/A

This tutorial includes:

  • The LitErrorDemo.exe data flow

  • The LitErrorDemo.exe interface


LitErrorDemo.exe Data Flow

The general data flow of the LITErrorDemo tool is as follows:

LitErrorDemo project data flow diagram

This sample code is simple and straightforward. This sample contains all necessary project and C++ source files, as well as sample source files for you to work with. These samples include the following files:

  • Sample.css – the cascading style sheet used to build the .lit file layout

  • Sample.htm – the source file containing the marked up content

  • Sample.lit – an example of the .lit file created when you run these files through LitErrorDemo

  • Sample.opf – the OEB package file used to create the .lit file

To build and use LITErrorDemo, open the project, build the project, and run the resulting .exe.

Note: These code samples are Win32 Console Applications, and require you to use the command line.


LitErrorDemo.exe Interface

Code Example Actions
[G] C:\eBookToolsSDK\samples\
LitErrorDemo G
  1. Signals LitErrorDemo.exe to stream the content from GoodArray into Litgen.dll.

  2. Generates goodarray.lit.

  3. Shows a success message on the screen: “Output file ‘goodarray.lit’ created.”
[W] C:\eBookToolsSDK\samples\
LitErrorDemo W
  1. Signals LitErrorDemo.exe to stream the content from WarnArray into Litgen.dll.

  2. Shows a warning message on the screen: “Unrecognized content tag <broken>.”.
  3. Generates warnarray.lit.

  4. Shows a success message on the screen: “Output file ‘warnarray.lit’ created.”
[F] C:\eBookToolsSDK\samples\
LitErrorDemo F
  1. Signals LitErrorDemo.exe to stream the content from BadArray into Litgen.dll.
    LitErrorDemo will not create a .lit file because the content is invalid.

  2. Shows a fatal error message on the screen: “Referenced item ‘css’ is of the wrong mime type.”

The generated .lit files, (goodarray.lit, warnarray.lit), are saved in the same directory as LitErrorDemo.exe. Every time you run LitErrorDemo, these files are overwritten.


Reader Content SDK 1.5 Logo

Litgen.dll Error Message Reference

Message codes are four-digit numbers.

The first digit indicates the major message class, and the second digit indicates the warning or error level.

Message Class | Handling
META | Show to end user
CONTENT | Show to end user
CSS | Show to end user
INT | Show only to tech support personnel. These messages typically indicate circumstances that can only happen under resource exhaustion or bugs in Litgen.dll.
MISC | Decide who should see the message on a message-by-message basis.

The second digit shows whether the message is an error or warning message.

Digit Level | Message Definition/Severity
5 or above | Error messages
1 – 4 | Warning messages (1=most severe, 4=least severe)

  • Review the error message list


Error Message List

This is the complete list of Litgen.dll error messages.

Notes:

  • The strings are representative - they may vary slightly, or may be entirely different (including parameter ordering) in international versions.

  • Do not try to parse these messages; they may change without warning in future versions.
Number | Name | String
1101 | LITGEN_WARN_META_UNKNOWN_TAG | DTD(Ver 1.0): Unrecognized metadata tag <%1>.
1102 | LITGEN_WARN_META_UNKNOWN_ATTR | DTD(Ver 1.0): Unrecognized metadata attribute '%1'.
1103 | LITGEN_WARN_META_UNKNOWN_MIME_TYPE | Mime type '%1' not recognized.
1104 | LITGEN_WARN_META_UNKNOWN_FILE | File '%1' is referenced from the package file, but is not in the manifest.
1105 | LITGEN_WARN_META_FALLBACK_NOTSUP | Item with id ‘%1’ uses a fallback; fallbacks are not supported in all versions of Reader.
1106 | LITGEN_WARN_META_RAPIER_FIND | The 'Find' command will not work across multiple source files on V1 of the Reader on Pocket PC devices.
1201 | LITGEN_WARN_META_MISSING_FILEAS | <dc:Creator> tags should have a file-as attribute.
1202 | LITGEN_WARN_META_NONPORTABLE_IMAGE | Image type '%1' used by image '%2' will not render on all devices.
1203 | LITGEN_WARN_META_INCORRECT_CHILDREN | DTD(Ver 1.0): The <%1> tag cannot have a <%2> tag in it.
1204 | LITGEN_WARN_META_MORE_CHILDREN_FOUND | DTD(Ver 1.0): The <%1> tag cannot have more than one <%2> tag in it.
1205 | LITGEN_WARN_META_TEXT_NOTALLOWED | DTD(Ver 1.0): The <%1> tag cannot have text ‘%2’ as child in its content model.
1206 | LITGEN_WARN_META_ATTR_MISSING | DTD(Ver 1.0): The ‘%1’ attribute is missing in the <%2> tag
1207 | LITGEN_WARN_META_UNIQUE_ATTR_MISSING | DTD(Ver 1.0): Unique identifier not found. There should be a ‘unique-identifier’ attribute on the <package> tag and at least one <dc:Identifier> tag whose ID matches that attribute.
1210 | LITGEN_WARN_META_EMPTY_NOTALLOWED | DTD(Ver 1.0): The <%1> tag should have <%2> in its content. Empty format [<%1 />] is not allowed.
1211 | LITGEN_WARN_META_TEXT_MISSING | DTD(Ver 1.0): The <%1> tag should contain text. Empty format [<%1 />] is not allowed.
1212 | LITGEN_WARN_META_TAG_MISPLACED | DTD(Ver 1.0): The <%1> tag should be nested inside a <%2> tag.
1213 | LITGEN_WARN_META_PACKAGE_INROOTONLY | DTD(Ver 1.0): Only the <package> tag can be the root element in an .opf file.
1214 | LITGEN_WARN_META_ONLYPACKAGE_INROOT | DTD(Ver 1.0): <package> tag can only be the root element in an .opf file and not a child of other tags.
1215 | LITGEN_WARN_META_MISSING_CHILDREN | DTD(Ver 1.0): The <%1> tag should have a <%2> tag in it.
1216 | LITGEN_WARN_META_WRONG_ATTRIBUTES | The attributes of the <%1> tag are incorrect.
1217 | LITGEN_WARN_META_NONOEB_NOFALLBACK | Item with id ‘%1’ is not an OEB core type; it should have a fallback. (Fallbacks are not supported in all versions of Reader.)
1218 | LITGEN_WARN_META_XMLNS_OEBPACKAGE | The ‘xmlns:oebpackage’ attribute should have the value ‘http://openebook.org/namespace/oeb-package/1.0/’.
1219 | LITGEN_WARN_META_XMLNS_DC | The ‘xmlns:dc’ attribute should have the value ‘http://purl.org/dc/elements/1.0/’.
1501 | LITGEN_ERR_META_BAD_TAG_NESTING | Only <%1> tags can be children of <%2> tags.
1502 | LITGEN_ERR_META_MISSING_CHILDREN | <%1> tag must contain at least one <%2> tag.
1504 | LITGEN_ERR_META_INVALID_SPINE_TYPE | Item id '%1' is not a text content type.
1505 | LITGEN_ERR_META_ALREADY_IN_SPINE | Item id '%1' is already in the spine.
1506 | LITGEN_ERR_META_NO_SPINE | Package file must specify a spine.
1507 | LITGEN_ERR_META_NO_CONTENT_FILES | No content filenames found.
1508 | LITGEN_ERR_META_MISMATCHED_TAGS | Unmatched end tag found.
1509 | LITGEN_ERR_META_UNCLOSED_TAGS | Not all metafile tags were closed.
1510 | LITGEN_ERR_META_EMPTY_HREF | Empty href attribute found.
1511 | LITGEN_ERR_META_ATTR_MISSING | The <%2> tag should have a ’%1’ attribute.
1512 | LITGEN_ERR_META_NONOEB_IN_SPINE | Item id ‘%1’ cannot be in the spine of an OEB document (only documents of type text/x-oeb1-document can be in the spine).
1513 | LITGEN_ERR_META_POUND_IN_ID | Item id '%1' contains '#', which isn't allowed in ID attributes.
1514 | LITGEN_ERR_META_POUND_IN_FILENAME | Item href '%1' contains '#', which isn't allowed in URIs. Filenames containing '#' must be escaped in URIs (as '%33').
1515 | LITGEN_ERR_META_DUPLICATE_ID | Item id '%1' already exists. Item ids must be unique.
1516 | LITGEN_ERR_META_FIRSTPAGE_OUTOFSPINE | Guide reference href ‘%1’ does not point into the spine. References of type ‘other.ms-firstpage’ must refer to in-spine content.
1517 | LITGEN_ERR_META_EXTERNAL_COVERIMAGE | Cover image href '%1' is not present in the manifest. This content would fail on the original Pocket PC version of the Reader, and must not appear in files compatible with that version.
2101 | LITGEN_WARN_CONTENT_UNKNOWN_TAG | Unrecognized content tag <%1>.
2102 | LITGEN_WARN_CONTENT_UNKNOWN_ATTR | Unrecognized content attribute '%1' for tag <%2>.
2103 | LITGEN_WARN_CONTENT_UNKNOWN_FILE | File '%1' referenced from content is not listed in the manifest.
2104 | LITGEN_WARN_CONTENT_STYLE_TOO_LATE | This style tag will have no effect. <style> and <link> tags must appear inside the <head> tag, and the <head> tag must be the first tag in <html>.
2201 | LITGEN_WARN_CONTENT_NOHREF_LINK_ IGNORED | <link> tag without href attribute ignored.
2202 | LITGEN_WARN_CONTENT_PAGEBREAK_OL | A pagebreak within an <ol> tag will not render properly on all readers.
2203 | LITGEN_WARN_CONTENT_ANSI_ENCODING | Invalid character value %1 (decimal) found; assumed to be ANSI and converted to Unicode %2 (decimal).
2204 | LITGEN_WARN_CONTENT_NONOEB_LINK_ IGNORED | Most devices will ignore a <link> tag of any type other than ‘text/x-oeb1-css’ in OEB documents.
2205 | LITGEN_WARN_CONTENT_LINK_TYPE_ MISMATCH | The mime type of the <link> tag doesn’t match the type of the stylesheet in the manifest.
2206 | LITGEN_WARN_CONTENT_NONSS_LINK_ IGNORED | Links of relationship other than ‘stylesheet’ ignored.
2207 | Reserved; will never appear |
2208 | LITGEN_WARN_CONTENT_PAGEBREAK_ NONVISIBLEBLOCK | A pagebreak applied to a non-visible or non-blocklike element will be ignored.
2209 | LITGEN_WARN_CONTENT_NONOEB_STYLE_ IGNORED | Most devices will ignore a <style> tag of any type other than 'text/x-oeb1-css' in OEB documents.
2210 | LITGEN_WARN_CONTENT_NONOEB_TAG | Because tag <%1> is not an OEB tag, it will not display with its default HTML formatting in a document of type 'text/x-oeb1-document'.
2211 | LITGEN_WARN_CONTENT_NONOEB_ATTR | Attribute '%1' for tag <%2> is not an OEB attribute, so it will not have its HTML meaning in a document of type 'text/x-oeb1-document'.
2301 | LITGEN_WARN_CONTENT_NONOEB_STYLEATTR_IGNORED | The 'style' attribute on a non-OEB tag in a document of type 'text/x-oeb1-document' will not be interpreted as CSS style data.
2302 | LITGEN_WARN_CONTENT_NONOEB_CLASSATTR_IGNORED | The 'class' attribute on a non-OEB tag in a document of type 'text/x-oeb1-document' will not apply CSS styles.
2303 | LITGEN_WARN_CONTENT_NONOEB_LANGATTR_ IGNORED | The 'lang' attribute on a non-OEB tag in a document of type 'text/x-oeb1-document' will not be interpreted as a language specifier.
2501 | LITGEN_ERR_CONTENT_WRONG_TYPE | Referenced item '%1' is of the wrong mime type.
2502 | LITGEN_ERR_CONTENT_MISMATCHED_TAGS | Unmatched end tag found.
2503 | LITGEN_ERR_CONTENT_UNCLOSED_TAGS | Not all content tags were closed.
2504 | LITGEN_ERR_CONTENT_PAGEBREAK_IN_TABLE | Pagebreaks must not appear within tables.
3101 | LITGEN_WARN_CSS_UNBALANCED_BRACE | Unbalanced brace %1 found in CSS.
3102 | LITGEN_WARN_CSS_UNEXPECTED_TOKEN | Unexpected token '%2' found while parsing CSS '%1'.
3103 | LITGEN_WARN_CSS_UNEXPECTED_EOF | Unexpected end of style data found while parsing CSS '%1’.
3104 | LITGEN_WARN_CSS_EMPTY_VALUE | Empty property values are not allowed in CSS – interpreting as property erase within the ruleset.
3105 | Reserved; will never appear |
3106 | LITGEN_WARN_CSS_NONOEB_PROPERTY | The CSS property ‘%1’ should not appear in style data of type text/x-oeb1-css.
3501 | LITGEN_ERR_CSS_UNEXPECTED_EOF | Unexpected end of CSS data. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
3502 | LITGEN_ERR_CSS_UNEXPECTED_TOKEN | Unexpected CSS token '%1'. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
3503 | LITGEN_ERR_CSS_UNEXPECTED_VALUE | Unexpected CSS property value '%1'. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
3504 | LITGEN_ERR_CSS_UNEXPECTED_IDENT | Unexpected CSS identifier '%1'. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
3505 | LITGEN_ERR_CSS_UNEXPECTED_CLASS | Unexpected CSS chained class '%1'. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
3506 | LITGEN_ERR_CSS_UNRECOGNIZED_TEXT | Unrecognized CSS text: '%1'. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
3507 | LITGEN_ERR_CSS_UNKNOWN_DIRECTIVE | Unrecognized CSS directive: '%1'. This content will cause layout errors on version 1 og the Pocket PC Reader, and must not appear in files compatible with that version.
4101 | LITGEN_MSG_MISC_SUCCESS | Output file '%1' created.
4201 | LITGEN_MSG_MISC_PAGEBREAKS | %1 hard-page-breaks.
4501 | LITGEN_ERR_MISC_OUTPUT_CORRUPT | Errors during build. Output file '%1' could not be deleted and may be corrupt.
4502 | Reserved; will never appear |
4503 | Reserved; will never appear |
4504 | Reserved; will never appear |
4505 | LITGEN_ERR_MISC_PATH_NOT_FOUND | Output file '%1' could not be created; the path does not exist.
5501 | LITGEN_ERR_INT_ADD_MANIFEST_ITEM | Internal error %x adding item '%1' to the manifest.
5502 | LITGEN_ERR_INT_QUERY_ISTITEX_CONT | Internal error %x querying for IStorageITEx from content storage.
5503 | LITGEN_ERR_INT_QUERY_ISTITEX_ROOT | Internal error %x querying for IStorageITEx from root storage.
5504 | LITGEN_ERR_INT_QUERY_ISTITEX_DATA | Internal error %x querying for IStorageITEx from data storage
5505 | LITGEN_ERR_INT_CREATE_CONTENT_STRM | Internal error %x creating content stream for %1.
5506 | LITGEN_ERR_INT_GET_STREAM_POS_TAG | Internal error %x getting stream position for tag.
5507 | LITGEN_ERR_INT_GET_STREAM_POS_PB | Internal error %x getting stream position for page break.
5508 | LITGEN_ERR_INT_GET_STREAM_SIZE | Internal error %x getting stream size for %1.
5509 | LITGEN_ERR_INT_GEN_ANCHOR_STREAMS | Internal error %x generating anchor streams.
5510 | LITGEN_ERR_INT_LOG_ANCHOR_DEST | Internal error %x logging anchor destination.
5511 | LITGEN_ERR_INT_CREATE_STREAM | Internal error %x creating %1 stream.
5512 | LITGEN_ERR_INT_ITSTORAGE_FACTORY | Internal error %x getting ITStorage factory.
5513 | LITGEN_ERR_INT_INSTANTIATE_ITSS | Internal error %x instantiating MSITSS.
5514 | LITGEN_ERR_INT_ITSS_CONTROL_DATA | Internal error %x setting MSITSS control data.
5515 | LITGEN_ERR_INT_CREATE_OUTPUT_FILE | Internal error %x creating output file '%1'.
5516 | LITGEN_ERR_INT_STAMP_CLSID | Internal error %x stamping output file '%1' with CLSID.
5517 | LITGEN_ERR_INT_CREATE_TMP_METASTRM | Internal error %x creating temporary meta stream.
5518 | LITGEN_ERR_INT_GEN_SYMKEY | Internal error %x generating symmetric key.
5519 | LITGEN_ERR_INT_CREATE_DATASPACE | Internal error %x creating encryption dataspace.
5520 | LITGEN_ERR_INT_ATTACH_DRM | Internal error %x attaching DRM to storage.
5521 | LITGEN_ERR_INT_CREATE_SUBSTORAGE | Internal error %x creating sub-storage '%1'.
5522 | LITGEN_ERR_INT_SEAL | Internal error %x sealing '%1'.
5523 | LITGEN_ERR_INT_COMPACT | Internal error %x compacting '%1'.
5524 | LITGEN_ERR_INT_CREATE_IMAGE_STREAM | Internal error %x creating image stream '%1'.
5525 | LITGEN_ERR_INT_CREATE_CSS_STREAM | Internal error %x creating CSS stream '%1'.
5526 | LITGEN_ERR_INT_QUERY_ISEQSTREAM | Internal error %x querying ISequentialStream from IStreamITEx.
5527 | LITGEN_ERR_INT_INSERT_STYLERULE | Internal error %x inserting style rule into table.
5528 | LITGEN_ERR_INT_INSERT_CSS_TAG | Internal error %x adding tag to CSS selector.
5529 | LITGEN_ERR_INT_INSERT_CSS_PROPERTY | Internal error %x adding property to CSS property list.
5530 | LITGEN_ERR_INT_CSS_LEXER_ERROR | Internal error: CSS lexer reports error: '%1'.


Reader Content SDK 1.5 Logo

Markup Guide

What's in this Book

Welcome to Markup Guide for Microsoft Reader, a developer's guide to creating source files for electronic books built for Microsoft Reader. Electronic books offer publishers powerful, flexible tools for delivering content in easily searchable, automatically reflowed text that is generated from existing content sources such as HTML, Quark, XML, Word, and other source files.

This guide contains information for developers about the file formats, layout engine, and markup used to create Microsoft Reader format files. Sample code and discussion of Litgen.dll is available in the Reader Content SDK 1.5 Developers Guide.

Click for more information about:

  • Microsoft Reader layout

  • The package file and cover graphics

  • Layout elements

  • Markup overview

  • Tags

  • Attributes

  • Cascading style properties

  • Tags and structures not currently supported

  • Special characters

  • HTML color name codes and numeric codes

  • ClearType fonts


Microsoft Reader Layout

Source Files & Production Requirements

A paper book can have simple layout requirements—for instance, a popular novel, which may not even have a table of contents—or complex layout requirements, such as a technical manual with graphs, sidebars, and illustrations. The publisher of a paper book needs to understand the book’s complexity, length, and nature, and needs to balance a book’s potential earnings against its cost to produce, which increases with length and production time.

While an eBook does not have length restrictions, layout and production time increase substantially as a book grows more complex. To identify eBook production and layout needs, and to determine whether a book is cost-effective to produce in eBook format, read the Conversion Guide.

Microsoft Reader layout is based on Open E-Book (OEB) specified tags, attributes and style properties. For the official OEB specification, please visit http://openebook.org. However, depending on the tools you use, you can generate Microsoft Reader format files without passing through an OEB-compliant stage. Consult your tools vendor or the Developers Guide for details.

For authors accustomed to designing for the Web, many of the Reader's layout features will be familiar. Although the OEB specification is based on common web standards, the Reader also offers features not available to Web site authors, and prevents the use of HTML features that distract from the reading experience (such as background music or blinking lights). The Reader formatting also has quirks of its own that come from the demands of book publishing for indexing, footnotes, image handling, cover graphics, and so forth.

For content authors accustomed to formatting printed books, Microsoft Reader layout presents new concepts not available to paper books.

For more information about the files and formats used to build eBooks, please read the Conversion Guide. It also contains a list of tools and resources available to publishers to simplify the conversion of content from one format to another.

Click to understand more about:

  • How eBooks differ from paper books

  • How eBooks differ from web content

  • The default Reader layout

  • The default system fonts & leading


Default Reader Layout

While the Reader can display text using different font sizes and even different font faces on different devices, it uses baseline default fonts and font setting for eBooks. These default font choices are applied to any section of text that does not specifically call for other font faces and sizes.

Figure 1 shows the default typeface and page size variables. The primary determinant is the number of pixels available on the screen.

Figure 1. Microsoft Reader Layout Variables

Page Layout Parameters |
Variables: |
H=height of window in pixels | .92 × (Screen Height - Taskbar Height)
W=width of window in pixels | .75 H
F=current font size |
L=current line height in pixels |
Dimensions: |
Top of Title Box | .06H-L
Top of Content Box | .105H-L
Total Left Margin | .10W (no smaller than 1.4 L)
Total Bottom Margin | .08H (no smaller than 1.4 L)
Total Right Margin | .10W (no smaller than 1.4 L)
Left Icon Margin | 1.2L
Right Icon Margin | 1.2L
Bottom Icon Margin | 1.2L
Content Buffer Zone: | .2L

The dimensions listed in the table appear visually in Figure 2, Elements of the Reader Window.

Elements of the Reader Window diagram

The <big> and <small> tags in Figure 3, Standardized Spaces and Values, do not increase the font size by 1 point. Instead, they bump the font up (or down) one row or value as shown in Figure 5, System Font Sizes.

For example, standard Frutiger small is 10 pt text. If this text were enclosed within <big> tags the resulting font would be standard Frutiger medium, or 13 point.

Figure 3. Standardized Spaces and Values

Paragraph Indent: | em |
List Indent | 2.25em, .75em | Bullet indent, bullet zone. Bullet indent is ignored on Pocket PC devices.
Non-breaking space: | space |
Superscript: | .33L |
Subscript: | .33L |
Big: | +1 |
Small: | -1 |

Pocket PC devices use a different set of default system fonts than the desktop Microsoft Reader. For more information about Pocket PC default fonts, see Default System Fonts & Leading.


Default System Fonts & Leading

Various versions of the Microsoft Reader use different default system fonts. The default font sizing is automatically determined when the Reader opens. Reader selects the font so that the line lengths display as close to 66 characters per line as possible (33 characters per line for Pocket PC devices). The leading is automatically generated as a multiple of the font size, as shown in Auto-Leading Parameters.

For information about default heading leading, see Heading Leading.

Figure 4. Default System Fonts

System Fonts | Reader 1.0 (PPC) | Reader 1.5 (laptop)
Serif | — | Berling Antiqua
San-serif | Frutiger Linotype | Frutiger Linotype
Monospace | Courier New | Lucida Sans Typewriter

The system fonts are standardized for six different sizes, and you can select each of them using the Reader's Guidebook. The default font size for the text is set by the content author when the HTML is written; that font size for the entire book can be changed by the reader using the Quick Settings feature in Reader.

Reader selects the default size is during startup. The font it selects depends on the screen size and resolution; typically, this means it chooses the size (from "Fine" to "Extra Big" in Figure 5, System Font Sizes) that most closely matches a line length of 66 characters per line (33 characters per line for Pocket PC devices).

Figure 5. System Font Sizes

Frutiger Linotype | Fine | Standard | Standard+ | Big | Big+ | Extra Big
xxSmall | 6 | 7 | 9 | 10 | 12 | 16
xSmall | 7 | 9 | 10 | 12 | 14 | 22
Small | 9 | 10 | 12 | 14 | 16 | 23
Medium | 10 | 13 | 14 | 16 | 18 | 26
Large | 13 | 14 | 16 | 18 | 20 | 30
xLarge | 14 | 16 | 18 | 20 | 22 | 32
xxLarge | 16 | 18 | 20 | 22 | 24 | 36
H1 | 20 | 22 | 24 | 26 | 28 | 40
H2 | 18 | 20 | 22 | 24 | 26 | 38
H3 | 16 | 18 | 20 | 22 | 24 | 36
H4 | 14 | 16 | 18 | 20 | 22 | 34
H5 | 12 | 14 | 16 | 18 | 20 | 30
H6 | 10 | 12 | 14 | 16 | 18 | 28
Running Head | 9pt Italic | 10pt Italic | 11pt Italic | 12pt Italic | 14pt Italic | 20pt Italic
Page Number | 9pt Roman | 10pt Roman | 11pt Roman | 12pt Roman | 14pt Roman | 20pt Roman
Berling Antiqua | Fine | Standard | Standard+ | Big | Big+ | Extra Big
xxSmall | 7 | 10 | 11 | 13 | 14 | 18
xSmall | 10 | 11 | 13 | 15 | 16 | 26
Small | 11 | 13 | 14 | 16 | 18 | 30
Medium | 13 | 16 | 16 | 18 | 22 | 32
Large | 16 | 18 | 18 | 22 | 26 | 34
xLarge | 18 | 20 | 22 | 26 | 28 | 36
xxLarge | 20 | 22 | 26 | 28 | 30 | 38
H1 | 20 | 24 | 26 | 26 | 28 | 48
H2 | 18 | 22 | 24 | 24 | 26 | 44
H3 | 16 | 20 | 22 | 22 | 24 | 40
H4 | 14 | 18 | 20 | 20 | 22 | 36
H5 | 13 | 16 | 18 | 18 | 20 | 34
H6 | 11 | 14 | 16 | 16 | 18 | 30
Running Head | 11pt Italic | 13pt Italic | 13pt Italic | 14pt Italic | 16pt Italic | 24pt Italic
Page Number | 11pt Roman | 13pt Roman | 13pt Roman | 14pt Roman | 16pt Roman | 24pt Roman
Lucida Sans Typewriter | Fine | Standard | Standard+ | Big | Big+ | Extra Big
xxSmall | 6 | 7 | 8 | 10 | 12 | 16
xSmall | 7 | 8 | 10 | 12 | 14 | 22
Small | 8 | 10 | 11 | 13 | 16 | 23
Medium | 10 | 12 | 13 | 16 | 20 | 28
Large | 12 | 14 | 16 | 20 | 22 | 32
xLarge | 14 | 18 | 20 | 22 | 24 | 34
xxLarge | 18 | 20 | 22 | 24 | 26 | 36
H1 | 22 | 26 | 28 | 30 | 32 | 36
H2 | 20 | 24 | 26 | 26 | 30 | 34
H3 | 18 | 20 | 24 | 24 | 26 | 32
H4 | 14 | 18 | 20 | 20 | 24 | 28
H5 | 12 | 14 | 18 | 18 | 20 | 26
H6 | 10 | 12 | 14 | 14 | 18 | 24
Running Head | 8pt Italic | 10pt Italic | 10pt Italic | 12pt Italic | 14pt Italic | 20pt Italic
Page Number | 8pt Roman | 10pt Roman | 10pt Roman | 12pt Roman | 14pt Roman | 20pt Roman

The leading parameters vary by font, as shown. Notice that Berling Antiqua requires the least leading, and that unknown fonts require the same leading defaults as shown.


Auto-Leading Parameters

Berling Antiqua | 1.26
Frutiger Linotype | 1.4
Lucida Sans Typewriter | 1.4
Unknown Fonts | 1.3

The top and bottom margin for header leading depends on the em size of the header font. The top margin is roughly three times the bottom margin.


Heading Leading

Top Margin: | Heading em
Bottom Margin: | One third of the mean of (Heading em + Body em)


Package File & Cover Graphics

Every eBook requires a package file (.opf file) to be converted into Reader format. This file contains important data that is read by the Reader conversion tools. It determines, among other things, where the user will find the book's contents, images, and other information. The Open eBook Standard requires a package file for each eBook, but, depending on the tool you use to convert print books to eBooks, this file may be generated for you. If the conversion tool you are using does not generate its own .opf files, you must create your own. Use the sample file below and the explanations of the various elements to help you create your .opf files.

Package files are XML-style files that always follow the format shown below. Like all XML files, package files are largely lower-case throughout (the exceptions are the various "dc:Metadata" tags).

The following is a sample package file for Charles Dicken’s Great Expectations.

Click for more detail about each section of the package file:

  • Sample package file

  • Metadata

  • Manifest

  • Spine

  • Tours

  • Guide

  • Default image sequence


Sample Package File

<package unique-identifier="isbn">
 <metadata>
  <dc-metadata
   xmlns:dc="http://purl.org/metadata/dublin_core"
   xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">
    <dc:Title>Great Expectations</dc:Title>
    <dc:Contributor role="aui">Stanley Weintraub</dc:Contributor>
    <dc:Contributor role="art">Robert Braithwaite Martineau</dc:Contributor>
    <dc:Creator file-as="Dickens, Charles" role="aut">Charles Dickens</dc:Creator>
    <dc:Coverage>19th Century England</dc:Coverage>
    <dc:Date>July, © 2000</dc:Date>
    <dc:Identifier id="isbn">0-451-52671-6</dc:Identifier>
    <dc:Language>en</dc:Language>
    <dc:Publisher>Penguin Putnam Inc.</dc:Publisher>
  </dc-metadata>
  <x-metadata>
   <meta name="ms-chaptertour" content="chaptertour"/>
  </x-metadata>
 </metadata>
 <manifest>
  <item id="content" href="Dickens_Expect.htm" media-type="text/x-oeb1-document" />
  <item id="about" href="Dickens_About.htm" media-type="text/x-oeb1-document" />
  <item id="coverstandard" href="GEcover.jpg" media-type="image/jpeg" />
  <item id="thumbstandard" href="GEthumbnail.jpg" media-type="image/jpeg" />
  <item id="titlestandard" href="GEtitle.jpg" media-type="image/jpeg" />
  <item id="cover" href="Dickens480.jpg" media-type="image/jpeg" />
  <item id="thumb" href="Dickens090.jpg" media-type="image/jpeg" />
  <item id="plate 1" href="kit.jpg" media-type="image/jpeg"/>
  <item id="plate 2" href="havisham.jpg" media-type="image/jpeg"/>
  <item id="plate 3" href="jaggers.jpg" media-type="image/jpeg"/>
 </manifest>
 <spine>
  <itemref idref="content" />
 </spine>
 <guide>
  <reference type="toc" title="Table of Contents" href="Dickens_Expect.htm#TOC" />
   <reference type="other.ms-coverimage-standard" title="cover image standard" href="GEcover.jpg" />
   <reference type="other.ms-thumbimage-standard" title="thumb image standard" href="GEthumbnail.jpg" />
   <reference type="other.ms-titleimage-standard" title="title image standard" href="Getitle.jpg" />
   <reference type="other.ms-coverimage" title="PPC cover image" href="Dickens480.jpg" />
   <reference type="other.ms-thumbimage" title="PPC thumbnail image" href="Dickens090.jpg" />
   <reference type="other.ms-firstpage" title="" href="Dickens_Expect.htm#p1"/>
   <reference type="title-page" title="" href="Dickens_About.htm"/>
 </guide>
 <tours>
  <tour id="chaptertour" title="chapter tour">
   <site title="ch1" href="Dickens_Expect.htm#Ch1"/>
   <site title="ch2" href="Dickens_Expect.htm#Ch2"/>
   <site title="ch3" href="Dickens_Expect.htm#Ch3"/>
   <site title="ch4" href="Dickens_Expect.htm#Ch4"/>
   <site title="ch5" href="Dickens_Expect.htm#Ch5"/>
   <site title="ch6" href="Dickens_Expect.htm#Ch6"/>
   <site title="ch7" href="Dickens_Expect.htm#Ch7"/>
   <site title="ch8" href="Dickens_Expect.htm#Ch8"/>
   <site title="ch9" href="Dickens_Expect.htm#Ch9"/>
   <site title="ch10" href="Dickens_Expect.htm#Ch10"/>
   <site title="ch11" href="Dickens_Expect.htm#Ch11"/>
   <site title="ch12" href="Dickens_Expect.htm#Ch12"/>
   <site title="epilogue" href="Dickens_Expect.htm #Epilogue"/>
  </tour>
 </tours>
</package>


Metadata Reference

Metadata provides information about the book itself: author, publisher, language, and so on. This section provides the complete list of metadata tags.

Note: Most of the metadata elements are optional. The required tags for every package file are: identifier, creator, title, and the xmlns (namespace) attribute. The xmlns attribute identifies the xml namespace where the remaining tags are defined.

Metadata falls into three main categories: numbering, book descriptors, and rights metadata.

  1. The numbering metadata can also be called cataloging information; it includes LOC numbers, ISBNs, and similar identifiers.

  2. The book descriptors include the title, author, subject, language, and other consumer information about the book.

  3. In the current Reader, the rights information is the copyright information. In the future, this will be a more elaborate set of rights information based on the XrML standard. For more information about this standard, see www.xrml.com.

Most metadata—other than the required elements—is not displayed by the Pocket PC version of Reader. In fact, the OEB specification does not require or even expect that the metadata will be rendered by OEB-compliant reading systems. However, the eBook files retain this metadata and it can be used by other applications, such as online bookstores.

Microsoft Reader Versions 1.0 and 1.5 do access and display several metadata elements. Readers can access these elements from the cover page of an eBook by clicking the About this Book listing. Conversion tools automatically generate this listing from the package file as the tools create a Microsoft Reader format file. Future versions of the Reader tools will be able to read and display all of the metadata elements.

Note: All metadata categories in the .opf file are case-sensitive. They must always be presented as <dc:Title></dc:Title> with lower-case dc and an initial capital letter on the name of the metadata element. The dc-metadata elements are defined by the Dublin Core initiative (see http://purl.org/dc/ for more information). The descriptions below are included for convenience, and the Dublin Core’s own definitions take precedence (see http://www.ietf.org/rfc/rfc2413.txt).

The metadata elements are:

  • contributor
  • coverage
  • creator (required)
  • date
  • description
  • format
  • identifier (required)
  • language
  • publisher
  • relation
  • rights
  • source
  • subject
  • title (required)
  • type
  • xmlns (required)


contributor

A contributor who is not a primary creator.


coverage

The place and time which the publication's content addresses.


creator (required)

The name of the author(s) and other primary creators of the work. Only the first three such names are displayed in the Reader.

This field can also include file-as and role attributes. The file-as attribute defines how the eBook is alphabetized in the Reader Library and in eBookstores.


date

The publication date, expressed as YYYY-MM-DD: a mandatory 4-digit year, followed by an optional 2-digit month and an optional 2-digit day of the month.


description

A section of plain text describing the publication's content. It is displayed on the Reader as written. Because it is not part of the SML code, this description does not have to be written in lower case only.


format

The list of possible formats is still being developed by the Dublin Core group of the Open eBook standards group.


identifier (required)

A string or number used to uniquely identify the resource, such as an International Standard Book Number (ISBN) or a Digital Object Identifier (DOI) number. This tag is required by the OEB specification.


language

The basic letter codes that define which language is used in the eBook, and thus which hyphenation and justification Microsoft Reader should apply to that content. Most languages have several options (see the OEB specification at http://www.openebook.org/ for details). The text of the eBook can be in any language for which there is font support. For more information about font support, see Font and Character Set Support.

At the moment, hyphenation is only available for English, because a .lex file format dictionary is only available for English. As additional dictionaries become available, hyphenation will be available for other languages as well.

If no language is specified, Reader defaults to English.

ar | Arabic
de | German
el | Greek
en | English
es | Spanish
fr | French
he | Hebrew
hi | Hindi
it | Italian
ja | Japanese
nl | Dutch
pt | Portuguese
ru | Russian
ur | Urdu
zh | Chinese

Note that bi-directional or vertically-written languages such as Japanese, Chinese, and Hebrew will not be displayed in those orientations in Version 1.0 or 1.5 of the Reader.


publisher

The publisher’s name.


relation

A secondary resource and its relationship to the eBook. For instance, a book of film criticism might list a web site containing film clips and summaries, and a textbook might list a teacher's edition of the book and related study materials for interested students. "Other books in this series" may also be listed here.


rights

Deprecated. A copyright statement that is not displayed in the Reader. The Microsoft rights strategy is to adopt the XrML standard. Ignore this portion of the metadata.

While this metadata tag is required by the OEB specification, Reader format eBooks are best served by including an additional separate .htm copyright file. You can make this copyright statement accessible to the reader from the eBook’s cover page. The eBook's cover page link to that copyright information is generated by the other.ms-copyright reference type in the guide section of the package file.


source

Information regarding a prior resource from which this resource was derived, such as an earlier edition or primary sources. For textbooks and reference works, this would be an earlier edition ("Based on the third edition"). For history or literary criticism, this would be a list of primary sources.


subject

A simple description of the eBook's content, such as that supplied by the Library of Congress Subject Heading System. No particular system is preferred, and multiple instances of the subject tag are allowed for a single title.

At the publisher's discretion, this may describe the work’s time, place, topic, and category.


title (required)

The publication’s title. An eBook must contain at least one instance of this tag; multiple instances are supported, though the Microsoft Reader displays only the first. Subtitles are not supported on the cover page, but are supported on the cover image page and on any half-title.


type

A publication category, such as novel, poem, working paper, dictionary, etc.

Note: This tag may change as the OEB specification changes. For more information about the OEB specification, see the Open E-books Web site at http://www.openebook.org/.


xmlns (required)

This attribute of the dc-metadata always follows the form shown:

<dc-metadata xmlns:dc="http://purl.org/metadata/dublin-core/"
xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">

The first namespace validates the dc: tags, the second namespace validates the rest of the package file.

The only valid valid namespaces for OEB documents are dc or "Dublin-core" and oebpackage or "Open eBook".


Manifest

All the files used to create the eBook are listed in the manifest; this is a checklist used by the conversion tools when creating the final Reader format file.

Caution: File converters may misinterpret hyperlink references to or from files that include a pound sign (#) within their name. Do not use a pound sign within a content file name when naming your text or image files for conversion into Reader file format.

The text content and table of contents are listed with the syntax shown. Alternately, you can list individual chapters here, as shown.

<item id="content" href="Author_Title.htm" media-type="text/x-oeb1-document" />
<item id="toc" href="Author_Title.htm#toc" media-type="text/x-oeb1-document" />

OR

<item id="chapter 1" href="Author_Title_Chapter.htm" media-type="text/x-oeb1-document" />
<item id="chapter 2" href="Author_Title_Chapter.htm" media-type="text/x-oeb1-document" />

In this section of the manifest, each text file is declared as either text/x-oeb1-document or text/html. The first declaration acknowledges all OEB-standard tags, attributes, and properties. The second declaration also acknowledges additional styles and properties available to the Reader. These are all listed in Supported Tags, Styles, and Attributes.

The cover (in portrait mode) is listed using a cover-standard item id. The media type may be .png or .gif rather than .jpg.

<item id="coverstandard" href="bigCover.jpg" media-type="image/jpeg" />
<item id="thumbstandard" href="smallCover.jpg" media-type="image/jpeg" />
<item id="titlestandard" href="title.jpg" media-type="image/jpeg" />

The cover (in landscape mode, for Pocket PC) is listed as shown with landscape item ids. These images are required for the cover to display properly on the Pocket PC; without these images, Reader displays the default cover images instead. The media type may be .png or .gif rather than .jpg.

For details of preferred cover, title, and thumbnail sizes, see Images.

<item id="cover" href="bigCover.jpg" media-type="image/jpeg" />
<item id="thumb" href="smallCover.jpg" media-type="image/jpeg" />

Additional images (interior illustrations, graphs, tables, photographs, or maps) are also listed here. They use the following syntax:

<item id="chapter 1 opener" href="chapter1.jpg" media-type="image/jpeg"/>


Spine

The spine lists the core elements of the eBook in the reading order in which they appear in the final .lit file. This does not include out-of-spine content.

Typically, this lists the body file or a sequence of chapter files. Note that while Figure 6 shows the spine as a single file, it could just as easily be a sequence of 30 or 40 individual smaller files. If more than one file is listed in the spine, the .htm files are concatenated in the order presented. If chapter 10 is listed here before chapter 2, it will appear in that sequence in the final Reader format file as well. Images listed here are dumped in between the .htm files that are listed before and after them; the usual way to place images in an ebook is as <img src="picture.jpg" /> references from within the HTML, not in the spine.


Tours

Tours are supported in Microsoft Reader version 1.5, and support the Riffle function by chapters. This function works using the chapter tour, shown here and in Figure 6. The metadata section contains the required package file elements, where <x-metadata> section is added after the standard <dc:metadata> section and in the tours section of the file, found after the <guide> section. See the Metadata Reference to a Chapter Tour and the Chapter Tour Format examples.

Note that the linkage between the tour function and chapters is not hard-coded. A publisher can use the chapter tour function to connect a series of illustrations, parts, poems, volumes, or other book sections rather than a series of chapters. The tour also need not be linear; it can jump forward and backward in a book. Each eBook is allowed one tour.


Metadata Reference to a Chapter Tour

<metadata>
<x-metadata>
<meta name="ms-chaptertour" content="chaptertour"/>
</x-metadata>
</metadata>


Chapter Tour Format

<tours>
<tour id="chapterTourName" title="These are the chapters">
<site title="TOC" href="bookTOC.htm" />>
<site title="Chapter One" href="bookContent.html#c1" />
<site title="Chapter Two" href="bookContent.html#c2" />
<site title="Chapter Three" href="bookContent.html#c3" />
</tour>
</tours>

If these tags are included, the eBook’s riffle function will jump ahead to the next indicated chapter tag (a name="c1", a name="c2", etc) from any given chapter.

A chapter tour should always include the Table of Contents as its first site if the Table of Contents is in-spine (that is, if it is listed in the guide section of the package file and is accessible from the cover page in the Reader).


Guide

This section of the .opf file determines which elements appear on the first page of an eBook. These include:

  • Table of Contents

  • About this Book

  • Copyright and legal

  • Portrait cover

  • Portrait thumbnail

  • Cover page graphic

  • Chapter tour

  • First page

The guide supports only a small group of possible id types and elements, some of them derived from the OEB standard, and several derived using that standard's other category to add important new elements to Reader.

Guide Reference Type | Related File
Toc | anchor within body .htm
content | body .htm
Title-page | copyright notices/About this Book
other.ms-chaptertour | blank (href="")
other.ms-copyright | rights page .htm
other.ms-coverimage-standard | portrait cover graphic
other.ms-coverimage | landscape Pocket PC cover graphic
other.ms-firstpage | link to the first page of eBook content
other.ms-thumbimage-standard | portrait thumbnail graphic
other.ms-thumbimage | landscape Pocket PC thumbnail graphic
other.ms-titleimage-standard | cover (title) page graphic


Table of Contents

To place the Table of Contents among the in-spine content, add it to the <spine> section of the package file, and in the manifest and guide sections. In addition, create an <a name="toc"></a> anchor at the appropriate location within the spine content to make it possible to jump to the TOC from the cover page link.

<reference type="toc" title="Table of Contents" href="AuthorTitle.htm#toc" />

This format sets the TOC within the standard pagination of the book, rather than giving it an independent set of page numbers or leaving it unnumbered. If you do not list the TOC in the guide section, the TOC will appear as a pagelet. The TOC links will always be fully functional regardless of whether the Table of Contents is listed in the guide section or not.

When you produce an eBook with an in-spine Table of Contents format, provide a firstpage reference to allow readers to skip past front matter and into the body of the book from the cover page. For more information about the other.ms-firstpage reference type, see First Page.


About This Book

<reference type="title-page" title="About This Book" href="AboutThisBook.htm" />

Format this information in a file separate from the Table of Contents, chapters, notes, and other body files for the eBook. Create a link to this file from the cover page using the Title Page reference type. Despite the reference type name, this information is not necessarily equivalent to what would be found on the title page of a paper book.

This is also the preferred location for general information about abridgement, the compositor, and other eBook modifications to works that were originally published as paper books. This information may include, but is not limited to, the book's title, creators and their roles, other contributors and their roles, subject/category, publisher, publisher contact information, other books by the same author, about the author, other books in this series, version/edition/revision information, ISBN or DOI number, Library of Congress CIP or other cataloging information, colophon (convertors, designers, typefaces, etc), and abridgement information.

The contents of this file appear as a pagelet when selected from the cover page. Keep the HTML file that this reference points to out of spine.


Copyright and Legal

<reference type="other.ms-copyright" title="Copyright" href="copyright.htm" />

Because the <dc:rights> metadata in the package file is not displayed in the Reader, if you want a book's rights information to be viewable, link it here. This is typically a trademark statement and the copyright statements for the text and images.

Keep the HTML file that this reference points to out of spine.


Portrait Cover

<reference type="other.ms-coverimage-standard" title="cover image standard" href="bigCover.jpg" />

This is the splash page and book cover that appears the first time a book is opened. For an example, see First Page.


Portrait Thumbnail

<reference type="other.ms-thumbimage-standard" title="thumb image standard" href="smallCover.jpg" />

Thumbnails are used in the Library, shown in Figure 7.

Figure 7. The Library in Microsoft Reader. Thumbnails are on the left.

Reader Library showing portrait thumbnails


Cover Page Graphic

<reference type="other.ms-titleimage-standard" title="title image standard" href="smallCover.jpg" />

This is the tall, narrow image found on the left side of the cover (title) page. See Figure 8 for an example of the cover page graphic.


Chapter Tour

<reference type="chapterdata" title="chapterTourName" href="" />

The chapter tour also requires a change to the metadata portion of the package file. For more information, see Tours.


First Page

<reference type="other.ms-firstpage" title="first page" href="content.htm#p1" />

The first page link takes the reader from the cover page (shown below) to the first page of the body of the book. Typically, this is the first page of Chapter 1, rather than the first page of the introduction, dedication, or other front matter. For the first page link to function correctly, place the anchor tag <a name="p1"> at the top of the first page the publisher chooses as the first important page of the book. Whether this is literally the first page (such as an Introduction or Acknowledgements page), or is the first page of the body text, is the publisher's choice.

The PocketPC devices do not acknowledge a first-page reference; the link does not appear on the cover page for this platform.

Figure 8. Cover Image Page (left) and Cover Page (right) in Microsoft Reader

Reader Cover Image Page and Cover Page


Default Image Sequence

The images are loaded in the following sequence for the Library: thumbnail images, the cover image page, and the spine on the cover page.

If an image on the list is not present, Reader attempts to display the image listed below it; if nothing else is available, it displays the default image. The default cover, cover page, and thumbnail images vary depending on the conversion tool. These images are supplied by the converter if it cannot find other files.

Click to find out more about the default image sequence for:

  • Library thumbnail

  • Cover image page

  • Cover page

  • Pocket PC thumbnail

  • Pocket PC landscape image


Library thumbnail

  • Thumb Image (often a detail)

  • Cover Art(scaled down)

  • Default Thumbnail


Cover Image Page

  • Cover Art

  • Thumbnail Image (scaled up)

  • Default Image


Cover Page

  • Title Image

  • Default Image


Pocket PC Thumbnail

  • Landscape Thumbnail

  • Landscape Image (scaled down)

  • Default Thumbnail


Pocket PC Landscape Image

  • Landscape Image

  • Landscape Thumbnail (scaled up)

  • Default Image


Layout Elements

The design elements described by the OEB specification fall into four categories:

Design Element | Description
Block-level elements | These are areas of content that may be thought of as rectangular containers. They may hold text, graphics, or combinations of both. They may also contain other block-level elements. If so, properties of an outer element may often be inherited by inner elements it contains.
Character-level formatting | These are the properties that describe the specific characteristics of text elements, including font, font size, font weight, etc. Character level formatting may be applied to single characters or to large blocks of characters.
Tables | These are similar to tables in HTML. Reader tables provide the ability to display content in two-dimensional grids.
Miscellaneous | These include a small number of additional elements that cannot be described as belonging to any of the above groups.


Block Level Elements

Each block level element possesses peripheral characteristics called margins, padding, and border. Together, these elements control how elements appear relative to text and graphical content contained within them, and when positioned next to or within each other:

Element | Description
Text Area | All runs of text describe a rectangle defined by the most extreme points at the top, right, bottom and left of the text. The text rectangle includes the leading between lines of text. In Microsoft Reader, italic fonts may produce a degree of horizontal overhang that may cause runs of text to extend slightly outside of the official text rectangle on the right side of the block.
Padding | This area is controllable in tables and in most HTML block elements when displayed in web browsers, but it is not a property recognized by the OEB specification, and is therefore not exposed in Microsoft Reader.
Border Box | The border box allows content authors to create a border around block elements that can be any supported color or width.
Margins (top, left, right, and bottom) | Margins can be individually specified by top, right, left and bottom dimensions. Margins are always transparent.

When you position text for display in Microsoft Reader, be aware of:

  • border dimensions It's the "Border Box" section described above.

  • all four default margin dimensions and

  • default indentation

Block-level elements include:

  • margins

  • indentation

  • line-height

  • justification

  • narrow margins and justification

  • headings justification

  • language exceptions

  • hyphenation

  • format-preserving tags

  • bullets and lists

  • blockquotes

  • headings

  • empty blocks


Margins

Margin Element | Behavior
Shared Margins | Top and bottom margins on adjacent block elements are always shared. Left and right margins on adjacent block elements are never shared. Instead, left and right margins are added together to determine the active margin between two adjacent elements.
Negative Margins | In Pocket PC versions of the Reader, all negative margins are treated as equaling zero. In the Windows version of Reader, negative margin values are allowed for the right and left margins of a block element, but not for the top and bottom. Top and bottom margin values that are either specified or negotiated to equal a negative value are treated as zero, instead.
Containment Model | When one block element is contained inside another block element, the two elements share their top and bottom margins. The dimensions of the shared margin are determined by adding the largest positive margin value and the smallest negative margin value. Unlike HTML, Reader does not render a negative vertical margin value shared by two block level elements. Therefore, if Reader calculates that a page has a negative margin value, it assigns a value of zero.
Annotations Zones | Reader pages contain special areas around the outer edge of the page that are used for various control elements, such as icons representing the placement of annotations. These annotation zones cannot display content, regardless of negative left or right margins which may specify an overlap. Margins that would potentially cause an overlap are truncated before overlapping the annotation zone. For more information about the sizes of each annotation zone, see Default System Fonts and Leading. Note: The annotation zones do not accept background color.


Indentation

Unlike web browsers, Microsoft Reader places a default positive indentation in front of the first line of text contained in a block element. You can override this value by specifying a negative value for the CSS property indent. The default value for a standard indentation is one em. Indentation is measured from the current active margin of the block immediately containing the text.

When a block level element contains another block level element, and the contained element appears within text that is contained immediately by the outer element, indentation is applied at the first line of text in the outer element and is also applied at the first line of text following the contained element.

The text-indent property is not inherited from one block element to another block element contained within it.

To accomplish hanging indents, specify a negative indentation value using the CSS text-indent property (you might also choose to increase the value of the element's left margin as well). Note, however, that a negative indentation causes text to appear over the margin area, which is always transparent and therefore takes on the color of the underlying page. If a color other than the page color is specified for the background color of a text zone of a block element, the negative indent causes the first line of text to extend outside the colored text zone, and over the transparent margin zone. This causes a colored section hanging in the right margin.


Line-Height

Although line-height, or leading, might ordinarily be considered a text formatting property, it is treated as a block element when designing for Microsoft Reader.

The line-height property of text in a container is inherited by text in nested containers.

Generally speaking, there are two ways to specify line-height: absolute and scalable. You can define an absolute specification in any number of units, such as points, centimeters, or pixels. However, it is generally best to avoid these absolute units because:

  1. The range of available page sizes is such that a line-height value specified to be 18 points might look reasonable on a Windows version of the Reader, but it might look enormous on a Pocket PC version of the Reader.

  2. Reader default font sizes are defined by a table of values that creates a well-tuned relationship between font size and line-height. When an absolute line-height value is specified, this default tuning is likely to be lost.

The recommended choice is to leave line-height to its default value based on font size and to use CSS properties such as larger, smaller, x-small, etc.; or HTML tags such as <big> and <small> instead.


Justification

In traditional CSS, the text-align property has four values: right, left, center and justify. The default value is justify.

In Microsoft Reader, the default justification style may be thought of as "smart-justify", though a CSS style property for this value does not exist in the OEB specification and is therefore not exposed in Reader. This generally results in right-left justified text, though there are several notable exceptions:

  • Narrow margins and justification

  • Headings justification

  • Language exceptions

  • Hyphenation

  • Format-preserving tags


Narrow Margins and Justification

In the Pocket PC version of Microsoft Reader, text is left justified in smart-justify mode if the width of any horizontal margin is set to any value greater than the default (that is, if the active area of the page is reduced). In Windows versions of Reader, any active margin area that results in an average of less than 33 characters per line will display smart-justified text as left-justified.


Headings Justification

Text contained between <h#> tags is left justified by default in all versions of Microsoft Reader.


Language Exceptions

If the language attribute of a tag is set to anything other than English (specifically, any language specification containing the prefix "en"), text contained in that tag will not display as justified. Good text justification relies on proper hyphenation, and current versions of the Reader only support hyphenation in English.


Hyphenation

It is generally a good idea not to justify text if hyphenation is not active. However, hyphenation is applied at the character level, while justification is applied at the paragraph level. As a result, a range of text that may be defined as a non-English language (and therefore not hyphenated) will still appear justified, because the property cannot be reset at the character level.

Text contained between <h#> tags is never hyphenated.


Format-Preserving Tags

Text contained within mono-space tags is displayed left-justified in smart-justify mode. These tags include: <pre>, <samp>, <code>.

Note that even though conditions exist where right-left justification is turned off while in smart-justify mode, and text appears left-justified, the underlying justification mode remains smart-justify unless the mode has been explicitly specified otherwise.

Alternately, the text is still tagged as smart-justify, but anything within MONOSPACE tags display as if it were left-justified anyway.


Bullets and Lists

As in HTML, lists are bulleted or numbered. For the purposes of this description, however, the distinction between bulleted and numbered lists is not significant.

Bullets always appear relative to a pre-defined text position. Text is never re-positioned to accommodate a bullet. Positive text indentation has no affect on bullet positioning, because the bullet is positioned relative to the text box of the block element containing the text. If a text block has a negative text-indent value, however, the bullet is repositioned to the left in order to accommodate the negative indentation.

As shown in the following diagram, bullet positioning takes into account two separate zones beyond the standard margin increase generated by the <ol> or <ul> tag to create the list block. One zone is the area where the bullet or number can appear, and the second zone is the space between the bullet zone and the beginning of the text. In Pocket PC versions of the Reader, the default value for the bullet zone is two em's, while the default value for the space between the bullet zone and the text is one en. In Windows versions of the Reader, the bullet zone equal 2.25 em and the space equals .75 em.

Bullet Position diagram

In the Pocket PC version of the Reader, bullets are positioned at the left side of the bullet zone. In the Windows version, bullets are positioned at the right edge of the bullet zone.

Normally, the <li> tag, which creates a list item, does not increase the active margin. It is assumed that the <ul>, <dl> or <ol> tag, which creates the list block, generates the appropriate margin. However, if the block level tag is omitted, the <li> tag increases the list item margin. In Pocket PC versions of the Reader, the standard margin increase for a list item equals a paragraph indentation. In the Windows version of the Reader, it equals two paragraph indentations.

Make sure that all text in a list block is preceded by the <li> tag. While browsers tend to place such text blocks within the list block's active area, Reader aligns such text alongside the left edge of the active area of the containing block.


Blockquotes

In Reader, blockquotes gain 1-em top and bottom margins. Left margins are one paragraph indent in size. Right margins are one paragraph indent in size on Windows versions, and one half paragraph indent in size on PocketPC versions.


Headings

In Microsoft Reader, all headings have a default top margin of 1-em. The default bottom margin equals one-third of the mean of the heading em and the body em.

On Windows versions of Reader, headings are not formatted with a default font weight of bold, as they are on web browsers. On Pocket PC versions of Reader, headings do appear bold.


Empty Blocks

In Reader, empty blocks have no effect on content layout.


Character Level Formatting

Character-level formatting changes the properties of a unit of text as small as a single character. Character-level formatting includes:

  • Font properties

  • Font-size and line height

  • Default font families

  • Text decoration


Font Properties

Although use of the HTML <font> tag is allowed (though deprecated), use the CSS style of font value specification wherever possible. The following style properties are supported by Microsoft Reader: font-family, font-size, font-weight, font-style.

The Pocket PC version of Microsoft Reader does not support comma-separated lists of font-family values. Comma-separated font values are applied equally to the entire range of specified text and not on a glyph-by-glyph basis. The result is that non-supported glyphs in a specific font may not render properly.


Font-Size and Line-Height

Line-height is a character formatting property, as well as a block level element. This section includes information about working with fonts and specifying font sizes.

Reader controls line height by specifying:

  • an absolute line-height at the block level, which cannot be overridden.

  • an "at-least" value which may be expanded if circumstances warrant.

When you specify line-height in absolute terms, Reader invokes the absolute line height mode. This means that a span of larger text contained within a block of text with an absolute line-height specified, will not be accommodated and the larger text will be likely to break the boundary. This means that the tops of the ascenders on the larger text will disappear.

Generally, it is best to specify font sizes in scalable terms and allow the appropriate default line-height to be applied.

An exception to this guideline applies if you use a subscript or superscript. The "at-least" line height mode may increase the line-height of the line containing the subscript or superscript resulting in uneven line-spacing at the paragraph level.

Note that if you are using numbered sizes (1 through 7) to specify font sizes, and you apply a style property such as larger or smaller (which bump the font size either up over size 7 or under size 1) the property has no effect on actual size of the font or the line-height. However, Reader recognizes the size increase or decrease to theoretical sizes that it can't display. A subsequent property that reverses the specification also has no visible effect because it neutralizes the previously unrendered property value.


Default Font Families

Microsoft Reader provides fonts corresponding to the OEB specified serif, sans-serif and monospace values. For more details about these default ClearType fonts, see Default System Fonts & Leading.

If you specify a font that is not accessible to the Reader, it defaults to serif in Windows and sans-serif in PocketPC.


Text Decoration

Microsoft Reader supports the text-decoration properties of underline and strikethrough, but does not support the simultaneous application of these properties on a single range of text.

Both text-decoration properties are inherited in Reader.


Tables

Tables are supported in version 1.5 of Microsoft Reader, but not in version 1.0.

When you author tables for Pocket PC, use images to present tabular data, instead of table tags. Note, however, that the Pocket PC version of Reader compresses images to a very small size, so highly-detailed images of complex tables are inappropriate for this format.

When you author tables for the Windows version of Reader, use image tags as described in the Markup Overview.


Images

When images are larger than the page margins allow, Reader automatically scales images to fit the page. When images are scaled, their aspect ratio is always maintained and images are shrunk only as much as needed to fit the image on the page. Reader moves an image to the next page to fit without shrinking, even if this results in a large amount of white space remaining on the page where the image might have normally appeared.

Express image sizes as percentages of the active area of the page so that image resizing control is performed according to guidelines provided by the content author and not automatically by the system.

Reader supports .jpg, .gif and .png image formats. .jpg and .png images are the most tolerant of resizing. Resizing occurs whenever an image is larger or smaller than the Reader size—and the Reader footprint on the screen is quite variable. In fact, the Reader always scales to 92% of the height of the screen. This determines the page height, which then influences every image, beginning with the cover. For instance, because the aspect ratio of the cover graphic is always 3:4, the width of the Reader is always 75% of 92% of the page height. The title-standard image is then 18% of that width.

Warning: Reader does not support and cannot display .jpg images made with 4 colors (CMYK), such as those used in Adobe PhotoShop 3.0 (but not PhotoShop 4.0). The image library in Reader handles only 1 color (for grayscale) or three (RGB) colors.

Finally, Reader does not support the alt attribute to display text associated with an image, or the lowsrc attribute to encode alternative images.

Click to find out more about:

  • Specifying percentages

  • Avoiding scaling problems


Specifying Percentages

In HTML tags, using percentage-based attribute values is relatively straightforward. With the exception of table content, percentages always refer to the width or height of the current page area. In tables, percentages refer to the width or height of the immediate container.

In specifying values for style properties, percentages apply differently depending on the tag. For more detailed information, see Tags, Attributes and Cascading Style Properties.


Avoiding Scaling Problems

When images in an eBook are too big to display on the current device, the image is automatically scaled down to fit the available space on screen. This scaling invariably reduces the quality of the .jpeg, .gif, or .png image, though the degree of image degradation depends on the amount of scaling, the presence or absence of text, and the presence or absence of high-contrast lines. In particular, text in an image always suffers in comparison to text rendered with ClearType, so scaling text in an image can sometimes create a jarring mismatch with the body of the book.

To minimize the negative affects of scaled images, make sure that the images aren't scaled in the first place. To do this, use the recommended image sizes for covers, cover page images, and thumbnails, and keep interior illustrations small enough to fit within the active page area.

In particular, an 800 x 600 pixel screen can only display an interior image that is 300 pixels wide (or less) without scaling. Many laptop monitors use 800x600 pixel screens.

A 1024 x 768 pixel monitor is fairly standard for desktop monitors. A screen of this size can display an interior eBook illustration up to 400 pixels wide without scaling. Images wider than 400 pixels will scale and may suffer from a loss of image clarity.

Publishers can—and in some cases, should—ignore these limits for books that require especially crisp or especially large graphics. Many monitors are capable of displaying as much as 1152 x 864, 1280 x 1024, or even 1600 x 1200 pixels. Include warnings to readers to reset monitors when reading certain eBooks to provide better quality graphics for photo- or image-heavy eBooks.

Caution: Overlapping images can drop characters. When two images are floated, one float: right and one float: left, the Reader layout engine can sometimes drop letters if the two images overlap. Be sure to include a <br clear="all" /> between images.


Line Breaks

The <br> tag creates a line break inside a block element. A trailing <br> tag at the end of a block element may or may not result in a visible line break.

Reader ignores the first trailing <br> tag at the end of a block-level element because a line break is already implied at the end of the block element's contents. Additional <br> tags are compared against the element's bottom margin, and any calculations are applied regarding adjacent elements. As a result, <br> tags may or may not be applied depending on whether they add up to a distance greater than the largest positive margin in the calculation.


Markup Overview

Markup is the basic element of authoring any eBook. To make a book that reflows automatically, you must tag the various page elements as headers, paragraphs, and rules. That information is combined with the package file and cover images to create a Microsoft Reader format eBook.

Authoring for Microsoft Reader format is generally no more demanding than authoring for a browser. Most of the tags and attributes will be familiar to anyone who has marked up text for the Web. Furthermore, many unnecessary, distracting, or inappropriate tags are not part of the Open eBook (OEB) specification, and thus are not available. For more information, review Preferred Formatting for the Microsoft Reader.

Caution: Many tags, attributes, and style properties that are fully supported in the Windows Reader Version 1.5 are not supported by the Pocket PC Reader version. For more information, see Tags and Structures not Currently Supported and Supported Tags, Styles, and Attributes.

This section describes the tags, attributes and style properties included in the Open eBook (OEB) specification and their behavior. It also describes the non-OEB HTML and CSS elements supported by the Microsoft Reader. While some of these tags, attributes and style properties work in Reader exactly as they do in HTML, their differences are designed to provide a higher degree of readability. These differences are detailed in the tag and attribute descriptions in this book.

For a complete description of the OEB standard, the conversion process, and the tools involved in that process, see the Conversions Guide.


Preferred Formatting for the Microsoft Reader

When preparing an OEB-compliant document, apply XHTML rules for producing well-formed markup (see the OEB specification, http://www.openebook.org/). Follow these rules to ensure smooth conversion using all electronic book-publishing tools.

Note, however, that you can sometimes ignore these rules, depending on the strength of your conversion tools. This is because the conversion process involves two steps:

  1. Validating and cleaning up documents in "wild" HTML and other formats to meet the Reader criteria.

  2. Writing a new file in the Reader format.

Some tools have a stronger system for the cleanup step than others, and so not all of the following rules may apply. Consult your tools vendor documentation for exact details. The rules are:

  • Tag pairs must be lower case. Some conversion tools will correct upper-case tags before converting them into the Reader file format, but all Reader conversions rely on XHTML formatting, so lower-case tags are generally preferred.

    Singleton tags must be "closed" with a space and a forward slash ( /), for example:

    <br />
    <img src="photo.jpg" />
  • Nesting requirements are strict; tags may be nested but they may not overlap one another.

  • All attributes must have values specified and use quotes in their syntax, even for boolean or numeric attributes. For example: <img src="image.jpg" />
    <font size="1">

These requirements result in well-formed XML or HTML that is easily converted to .lit, the Microsoft Reader file format. For more information on writing well-formed XML, please see the XHTML specification at http://www.w3.org/TR/xhtml1/.

When non-OEB-compliant documents of MIME type text/html are used as source documents for conversion to .lit files, you can use upper case and lower case forms of predefined tags interchangeably.

For more information, see:

  • OEB Tags and Reader-Only Tags

  • Active Margins and Sizing of Images and Tables


OEB Tags and Reader-Only Tags

The Tags section includes Reader supported tags from the Open eBook specification. It also includes tags supported by the Microsoft Reader for non-OEB-compliant source documents of MIME type text/html. OEB tags are identified with the OEB 1.0 icon, and Microsoft Reader tags are identified by the initials (MSR) in the header as well as the Microsoft Reader icon.

Note: (MSR) tags and attributes are ignored in documents of MIME type text/x-oeb1-document.


Active Margins and Sizing of Images and Tables

When using percentage-based values to specify the dimensions of an image or a table, the percentages are applied to the relevant active area of the element containing the image or table. This often refers to the page area. The term "relevant" indicates that vertical measurements are derived from the vertical page dimension and horizontal measurements are derived from the left and right margins active at the point at which the table or image appears.


Supported Tags, Styles, and Attributes

This is a complete list of the tags, attributes, styles, and OEB markup supported by the Pocket PC version 1.0 of Microsoft Reader and the Windows version 1.5 of Microsoft Reader.

Items marked "Yes" are fully supported. Items marked "No" are not supported. Items marked Ignored can be coded into eBooks and will be ignored by conversion tools, but may be active in future Reader releases. Items marked "Dep" are deprecated by the OEB specification and should be avoided whenever possible.

OEB, Pocket PC Reader 1.0, and Reader 1.5 Support

Tags | OEB v1.0 | PPC 1.0 | Reader 1.5 | Notes
XML | Yes | Yes | Yes |
!-- -- |  | Yes | Yes | Comments
!DOCTYPE | Yes | Yes | Yes | Properly formatted DOCTYPE only.
A | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Href - external | Yes | Yes | Yes | Displayed as text. Do not render.
Href - internal | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Name | Dep. | Yes | Yes |
Rel | Yes | Ignored | Ignored |
Rev | Yes | Ignored | Ignored |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
<AREA /> | Yes | No | No |
Alt | Yes | No | No |
Coords | Yes | No | No |
Href | Yes | No | No |
Nohref | Yes | No | No |
Shape | Yes | No | No |
B | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
BASE | Yes | No | Yes |
Href | Yes | No | Yes |
BIG | Yes | Yes | Yes |
BLOCKQUOTE | Yes | Yes | Yes |
Cite | Yes | Ignored | Ignored |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
BODY | Yes | Yes | Yes |
Bgcolor | Dep. | No | No |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Text | Dep. | Yes | Yes |
Title | Yes | Ignored | Ignored |
BR | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Clear | Dep. | No | Yes |
Id | Yes | Yes | Yes |
Style | Yes | Yes | Yes |
CAPTION | Yes | No | No |
CENTER | Dep. | Yes | Yes |
CITE | Yes | No | Yes |
CODE | Yes | No | Yes |
DD | Yes | Yes | Yes |
Class |  | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
DFN | Yes | No | Yes |
DEL | No | Yes | Yes | Line through the text.
DIR | No | Yes | Yes | Text in a list style.
DIV | Yes | Yes | Yes |
Align | Dep. | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
DL | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
DT | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
EM | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
FONT | Dep. | Yes | Yes |
Class | Yes | Yes | Yes |
Color | Dep. | Yes | Yes | MS: numeric, plus sixteen standard color names
Face | Dep. | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Size | Dep. | Yes | Yes |
Style | Yes | Yes | Yes |
HEAD | Yes | Yes | Yes |
Hn | Yes | Yes | Yes |
Align | Dep. | Yes | Yes | OEB: left, center, right, justify
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
HR | Yes | Yes | Yes |
Align | Dep. | Yes | Yes | OEB: left, center, right
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Noshade | No | Yes | Yes |
Size | Dep. | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
Width | Dep. | Yes | Yes |
HTML | Yes | Yes | Yes |
xmlns |  | No | Yes |
I | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
IMG | Yes | Yes | Yes |
Align | Dep. | No | Yes |
Alt | Yes | Ignored | Ignored |
Border | Dep. | No | Yes |
Class | Yes | Yes | Yes |
Height | Dep. | Yes | Yes |
Hspace | Dep. | No | No |
Id | Yes | Yes | Yes |
Longdesc | Yes | Ignored | Ignored |
Lang | No | Yes | Yes |
Lowsrc | Yes | No | No |
Src | Yes | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
Usemap | Dep. | No | No |
Vspace | Dep. | No | No |
Width | Dep. | Yes | Yes |
INS | No | Yes | Yes | Reader underlines the text.
KBD | Yes | Yes | Yes |
LI | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
Type | No | No | Yes |
LINK | Yes | Yes | Yes | Style sheets only
Href | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Media | Yes | Yes | Yes |
Rel | Yes | Yes | Yes | Must equal "stylesheet" or ignored
Rev | Yes | No | No |
Title | Yes | Ignored | Ignored |
Type | Yes | No | Yes |
LISTING | No | No | Yes |
Class | No | No | Yes |
Id | No | No | Yes |
Lang | No | No | Yes |
Style | No | No | Yes |
Title | No | No | Ignored |
MAP | Yes | No | No |
Name | Dep. | No | No |
MENU | Yes | No | Yes |
Id | No | No | Yes |
META | Yes | Ignored | Ignored |
Name | Yes | Ignored | Ignored |
Content | Yes | Ignored | Ignored |
Scheme | Yes | Ignored | Ignored |
OBJECT | Yes | No | No |
Align | Dep. | No | No |
Archive | Yes | No | No |
Border | Dep. | No | No |
Classid | Yes | No | No |
Codebase | Yes | No | No |
Codetype | Yes | No | No |
Data | Yes | No | No |
Height | Dep. | No | No |
Hspace | Dep. | No | No |
Type | Yes | No | No |
Usemap | Yes | No | No |
Vspace | Dep. | No | No |
Width | Dep. | No | No |
OL | Yes | Yes | Yes | Nesting supported, numbered only
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Start | No | No | No |
Style | Yes | Yes | Yes |
Type | Dep. | No | Yes |
P | Yes | Yes | Yes |
Align | Dep. | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
PARAM | Yes | No | No |
Name | Yes | No | No |
Value | Yes | No | No |
Valuetype | Yes | No | No | OEB: data, ref, object
Type | Yes | No | No |
PLAINTEXT | MSR, Dep. | No | Yes |
PRE | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
Q | Yes | No | Yes |
Cite | Yes | No | Yes |
S | Dep. | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
SAMP | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang |  | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
SCRIPT | No | No | No | Text within should be ignored
SMALL | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
SPAN | Yes | Yes | Yes |
STRIKE | Dep. | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
STRONG | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
STYLE | Yes | Yes | Yes | See style property list below.
Type | Yes | Yes | Yes |
SUB | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
SUP | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
TABLE | Yes | No | Yes |
Align | Dep. | No | Ignored |
Bgcolor | Dep. | No | Yes |
Border | Yes | No | Yes |
Cellpadding | Yes | No | Yes |
Cellspacing | Yes | No | Ignored |
Summary | Yes | No | No |
Width | Dep. | No | No |
TD | Yes | No | Yes |
Abbr | Yes | No | No |
Align | Yes | No | Yes |
Bgcolor | Dep. | No | Yes |
Colspan | Yes | No | Yes | Slightly different from HTML
Height | Dep. | No | Yes | Not %
Nowrap | Dep. | No | Yes |
Rowspan | Yes | No | Yes |
Valign | Yes | No | Yes |
Width | Yes | No | No |
TH | Yes | No | Yes |
Abbr | Yes | No | No |
Align | Yes | No | Yes |
Bgcolor | Dep. | No | Yes |
Colspan | Yes | No | Yes | Slightly different from HTML
Height | Dep. | No | Yes | Not %
Nowrap | Dep. | No | Yes |
Rowspan | Yes | No | Yes |
Valign | Yes | No | Yes |
Width | Dep. | No | No |
TR | Yes | No | Yes |
Align | No | No | No |
Bgcolor | Dep. | No | Yes |
Valign | Yes | No | Yes |
TITLE | Yes | Yes | Yes |
TT | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
U | Dep. | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
UL | Yes | Yes | Yes |
Class | Yes | Yes | Yes |
Id | Yes | Yes | Yes |
Lang | No | Yes | Yes |
Style | Yes | Yes | Yes |
Title | Yes | Ignored | Ignored |
VAR | Yes | No | Yes |
Style Properties | OEB v1.0 | PPC 1.0 | Reader 1.5 | Notes
Background-color | Yes | No | Yes | Applies only to table, tr, td
Basic color names | Yes | No | Yes |
6- and 3-digit hex | Yes | No | Yes |
RGB, int and percentage | Yes | No | Yes |
Border | Yes | No | Yes |
None | Yes | No | Yes |
Solid | Yes | No | Yes |
Dotted | Yes | No | Yes | Renders as solid
Dashed | Yes | No | Yes | Renders as solid
Double | Yes | No | Yes | Renders as solid
Groove | Yes | No | Yes | Renders as solid
Ridge | Yes | No | Yes | Renders as solid
Inset | Yes | No | Yes | Renders as solid
Outset | Yes | No | Yes | Renders as solid
Thin | Yes | No | Yes |
Medium | Yes | No | Yes |
Thick | Yes | No | Yes |
Border-color | No | No | Yes | Subset of OEB border property
Border-style | No | No | Yes | Subset of OEB border property
None | Yes | No | Yes |
Solid | Yes | No | Yes |
Dotted | Yes | No | Yes | Renders as solid
Dashed | Yes | No | Yes | Renders as solid
Double | Yes | No | Yes | Renders as solid
Groove | Yes | No | Yes | Renders as solid
Ridge | Yes | No | Yes | Renders as solid
Inset | Yes | No | Yes | Renders as solid
Outset | Yes | No | Yes | Renders as solid
Border-width | No | No | Yes | Subset of OEB border property
Thin | No | No | Yes |
Medium | No | No | Yes |
Thick | No | No | Yes |
Color | Yes | No | Yes |
Basic color names | Yes | No | Yes |
6- and 3-digit hex | Yes | No | Yes |
RGB, int and percentage | Yes | No | Yes |
Clear | Yes | No | Yes |
None | Yes | No | Yes |
Left | Yes | No | No | Equivalent to "both"
Right | Yes | No | No | Equivalent to "both"
Both | Yes | No | Yes |
Display | Yes | Yes | Yes | all elements
in-line | Yes | Yes | Yes |
block | Yes | Yes | Yes |
oeb-page-head | Yes | Ignored | Ignored | Same as none.
oeb-page-foot | Yes | Ignored | Ignored | Same as none.
Float | Yes | No | Yes |
Left | Yes | No | Yes |
Right | Yes | No | Yes |
None | Yes | No | Yes |
Font | No | No | Yes |
Font-family | Yes | No | Yes |
Serif | Yes | No | Yes |
Sans-Serif | Yes | No | Yes |
Monospace | Yes | No | Yes |
Font-size | Yes | Yes | Yes | 9 supported names, all elements
name | Yes | Yes | Yes |
Font-style | Yes | Yes | Yes | all elements
normal | Yes | Yes | Yes |
italic | Yes | Yes | Yes |
Font-weight | Yes | Yes | Yes | all elements
normal | Yes | Yes | Yes |
bold | Yes | Yes | Yes |
Height | Yes | No | Yes | MS: image and HR
Line-height | Yes | Yes | Yes |
normal | Yes | Yes | Yes | length or percentage, on block elements only
numeric values | Yes | Yes | Yes |
List-style-type | Yes | No | Yes |
Decimal | Yes | No | Yes |
Lower-Roman | Yes | No | Yes |
Upper-Roman | Yes | No | Yes |
Lower-Alpha | Yes | No | Yes |
Upper-Alpha | Yes | No | Yes |
None | Yes | No | Yes | Supported for UL
Margin-right | Yes | Yes | Yes |
Margin-left | Yes | Yes | Yes |
Margin-top | Yes | Yes | Yes | Negative numbers treated as zero
Margin-bottom | Yes | Yes | Yes | Negative numbers treated as zero
OEB-column-number | Yes | No | No |
Auto | Yes | No | No |
Positive Integer | Yes | No | No |
Page-break-after | Yes | Yes | Yes | block level
left | Yes | Yes | Yes |
right | Yes | Yes | Yes |
always | Yes | Yes | Yes |
auto | Yes | Yes | Yes |
Page-break-before | Yes | Yes | Yes | block level
left | Yes | Yes | Yes |
right | Yes | Yes | Yes |
always | Yes | Yes | Yes |
auto | Yes | Yes | Yes |
Page-break-inside | Yes | No | No |
Auto | Yes | No | No |
Avoid | Yes | No | No |
Text-align | Yes | Yes | Yes | block level
left | Yes | Yes | Yes |
right | Yes | Yes | Yes |
centered | Yes | Yes | Yes |
justify | Yes | Yes | Yes |
Text-decoration | Yes | No | Yes |
None | Yes | No | Yes |
Underline | Yes | No | Yes |
Text-indent | Yes | Yes | Yes | A length or percentage, block level
margin-left | Yes | Yes | Yes |
margin-right | Yes | Yes | Yes |
Vertical-align | Yes | No | Yes |
Top | Yes | No | Yes |
Middle | Yes | No | Yes |
Bottom | Yes | No | Yes |
Width | Yes | No | Yes | MS: image and HR


Tag Reference

The tags are listed alphabetically. Tags that are specific to Microsoft Reader, and are not part of the OEB standard, are identified as "Reader-specific" tags in their description, and do not include the OEB icon in their header.

Note: Some markup is “deprecated.” This means that the OEB standard prefers the use of the more current CSS equivalents. Do not use these tags and attributes. Instead, use the CSS equivalent, which follows. Deprecated markup may become obsolete in future releases of Microsoft Reader, causing elements of the book to render improperly, and preventing the use of future features that depend on proper CSS tags.

Tags listed without an attribute section have no modifying attributes available.

Source Icons

The three small icons shown indicate the source of each tag, attribute or style property. Most tags in this section are HTML-based, OEB-specified, and supported by the Reader; a few are non-OEB tags.

Icon | Description | Source
 | HTML tags, attributes, properties | This markup comes from the HTML 4.0 specification.
 | OEB tags, attributes, properties | This markup is OEB-compliant; it comes from the OEB 1.0 specification.
 | Reader Version1.0 markup | This markup is supported in Microsoft Reader 1.0, the Pocket PC version of the Reader.
 | Reader Version1.5 markup | This markup is supported in Microsoft Reader 1.5, the desktop version of the Reader.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <?xml ?>XML Declaration

This tag identifies a document as an xml document. This must precede all other tags and content. Note that there is no corresponding end-marker. This tag is often added by content formatting tools and may not be of significance to most content developers.

Attributes

version, encoding

© © 2000 Microsoft Corporation. All rights reserved. Terms of use.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <?xml-stylesheet ?>XML Stylesheet

This OEB tag acts as an alternate mechanism for specifying external stylesheets.

For more information, see the description at http://www.w3.org/TR/xml-stylesheet/. This tag is often added by content formatting tools and may not be significant to most content developers.

Attributes

href, type, title (ignored), media, charset, alternate


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <!-- -->Comment

This tag identifies commented text that is not displayed in Microsoft Reader. If comment tags are applied inside a set of <style></style> tags, as is commonly done in HTML to prevent style data from being rendered by older browsers, the content within the <style> tags is not ignored. Comments cannot contain “--”.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <!doctype>Document Type

Optional. If used, this must be a properly formatted document type. For more information about DTDs, see the XML specification at http://www.w3.org/XML/.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <a>Link Anchor

This tag creates an anchor point (href) or target point (name or id) for hyperlinking within a book. By default, links are presented underlined and displayed in colored text, but you can override this rendering using CSS properties. External links are displayed as non-underlined text, and are not functional.

The <a> tag always comes in pairs, one with a name attribute and one with the corresponding href attribute and path. See the name and href attributes for details.

Attributes

class, href, id, lang, name, rel (ignored), rev (ignored), style, title (ignored)

Sample

Anchor Point Sample diagram

Sample Code

<head>
<style>
.red {color:red; text-decoration: none}
</style>
</head>
<body>
<h3>Anchor</h3>
<a name="anchor"></a>
<p>This is an <a href="#target">anchor point</a> that links to a target point elsewhere on the page; the linking text is blue and underlined by default.</p>
<p>This sentence contains the <a name="target">target point.</a> The anchor tag does not affect how this text is displayed.</p>
<p>This <a class="red" href="#target">link</a> has been altered by the use of CSS changes to color and text-decoration properties.</p>
</body>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <b>Bold

This tag makes the enclosed text bold. You can also use the CSS property font-weight to achieve the same goal, or the <strong> tag, which has the same effect. Often the <strong> tag is preferred.

Attributes

Class, id, lang, style, title (ignored)

Sample

Bold Sample diagram

Sample Code

<h3>Bold</h3>
The &lt;bold&gt; tag is functionally the same as the &lt;strong&gt; tag, and makes the enclosed text <b>bold-faced</b>.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <base />Base URL Reference

This tag establishes a base file path for hyperlinks (href's); uncommon in eBooks. No closing tag required, so be sure to note proper XML syntax.

If you use this tag, <base> must be the first element in the heading, and the URL must be explicit.

Attributes

href

Sample Code

<base href="file://c:\my books\" />

or

<base href="c:\my books\" />

This makes a reference within the body shorter, for instance:

<img src="image/pic.jpg" />

The complete source path for the image is then "c:\my books\image\pic.jpg"


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <big>Larger Font

This tag makes the enclosed text one font size larger than the current or default font size. There are 7 numbered font sizes, 1 through 7, with 7 being the largest. If you use the <big> tag when the current font size is already at maximum, there is no visible effect.

If the current font size has been set to an exact font size (such as 18pt) in a CSS, then <big> determines the new font size by multiplying the current font size by 1.2. Note that using absolute font sizes override the user's ability to change font size on the fly in Reader using the Quick Settings feature in Reader, and is not recommended.

Attributes

class, id, lang, style, title (ignored)

Sample

Big Sample diagram

Sample Code

<big>one size larger</big><br />
<big><big>two sizes larger</big></big><br />
<big><big><big>three sizes larger</big></big></big><br />
<big><big><big><big>four sizes larger</big></big></big></big><br />
<big><big><big><big><big>five sizes larger</big></big></big></big></big><br />
<big><big><big><big><big><big>six sizes larger</big></big></big></big></big></big><br />
<big><big><big><big><big><big><big>seven sizes larger</big></big></big></big></big></big></big><br />


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <blockquote>Block Quote

This tag generates a 1-em margin above the text it encloses, increases the left and right margins on that block of text by one standard paragraph indent (see the "Default Page and Font Sizes" section), and generates a 1-em margin below the enclosed text. Note that 1 em is smaller than a line-space, because it excludes any external leading.

For more information regarding margin widths for block elements, see Layout Elements.

Attributes

class, id, lang, style, title (ignored)

Sample

Block Quote Sample diagram

Sample Code

<p>This is text within paragraph tags. Note that it is indented on the first line, but not on following lines.</p>
<blockquote>
This is blockquoted text. Non equidem insector delendave carmina Livi esse reor, memini quae plagosum mihi parvo Orbilium dictare; sed emendata videri pulchraque et exactis minimum distantia miror.
</blockquote>
<p>This is further paragraph text. It is marked up as the continuation of text would be after a blockquote was inserted.</p>
<br />


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <body>Body Text

This tag encloses the body text of an eBook source file. To specify margins, apply CSS style properties within this tag.

While you can set font colors using the text attribute, you cannot modify the background color for the body text. Neither the bgcolor attribute of the <body> tag nor the CSS property background-color are currently supported in Reader.

Attributes

bgcolor (ignored), class, id, lang, style, text, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <br />Line Break

This singleton tag requires a space and a forward slash; it generates a line break of a size equal to the current line-height. You can use the clear attribute to move succeeding text below any active floating image. Version 1 of Microsoft Reader treats the clear values of left or right as if they were all. For more information on the <br /> tag and its effect on trailing margins, see Layout Elements and Clear.

Attributes

class, clear, id, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <caption>Table Caption

This tag creates a table caption. Default layout for a caption centers it above the table. The caption can be aligned using CSS properties.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <center>Center

Deprecated. This tag is equivalent to <div align=”center”>. It centers text horizontally; the use of the CSS property text-align:center is preferred.

Attributes

class, id, lang, style, title (ignored)

Sample

Centering Sample diagram

Sample Code

<h3><a name="center.htm">Centering</a></h3> The &lt;center&gt; tag centers text horizontally. <hr width="30%" /> <br /> <center> Indignor quicquam reprehendi, non quia crasse compositum illepedeve putetur, sed quia nuper, nec veniam antiquis, sed honorem et praemia posci. </center>

Sample

Center Sample diagram

Sample Code

<h3>Center</h3> The following is the same text, but with line break tags at the end of each clause.<br /> <hr width="30%" /> <br /> <center>Indignor quicquam reprehendi,<br /> non quia crasse compositum illepedeve putetur,<br /> sed quia nuper,<br /> nec veniam antiquis,<br /> sed honorem et praemia posci.<br /> </center>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <cite>Citation

This tag indicates that a section of text is quoted from another source.

This tag is not supported in the Pocket PC version of Microsoft Reader. The <blockquote> tag is preferred for that platform.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <code>Code

This tag displays the enclosed text in a monospace font, as sample computer code. Unlike the <pre> tag, the <code> tag does not affect handling of white space within the enclosed text, nor does it introduce a “block” (paragraph-like) boundary.

In version 1.0 of the Microsoft Pocket PC Reader, this tag is ignored.

Attributes

class, id, lang, style, title (ignored)

Sample

Code Sample diagram

Sample Code

<h4>Code</h4> Displays the enclosed text in a monospace font, <code>as sample computer code.</code> Unlike the &lt;pre&gt; tag, the &lt;code&gt; tag does not affect the handling of white space within the enclosed text, nor does it introduce a &ldquo;block&rdquo; or paragraph-like boundary. <hr width="30%" align="center" /> <br /> <code>&lt;code&gt; makes things look like a screen full of source code.</code>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <dd>Definition Description

Used within a <dl> or definition list block, this tag encloses the definition of a term that makes up part of a definition list. The <dd> tag’s default layout is a margin-left of 3 em, and no default text-indent. It is preceded by a <dt> or definition term tag for the term it defines.

Attributes

class, id, lang, style, title (ignored)

Sample

Definition Description Sample diagram

Sample Code

<dl>
<dt>eBook</dt>
<dd>An electronic book, usually read on a laptop&rsquo;s LCD screen or on a palmtop computer.</dd>
</dl>


HTML 4.0 Logo Reader Icon PPC Logo <del>Delete

Deleted text. Rendered with a line through the enclosed text, similarly to <s> and <strike>. This is a Microsoft-specific tag.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <dfn>Definition

This tag is used at first mention when a term is defined, and renders enclosed text as italics. It can also be used with CSS or with the ID attribute to simply style and references to definitions within an eBook.

In version 1.0 of the Microsoft Pocket PC Reader, this tag is ignored.

Attributes

class, id, lang, style, title (ignored)

Sample

Definition Sample diagram

Sample Code

<h3>DFN, or Definition</h3>
This tag is used at first mention when a term is <dfn>defined</dfn>, and italicizes the text it encloses.


HTML 4.0 Logo Reader Icon PPC Logo <dir>Directory List

This tag creates a directory-style list from the list items that it encloses. Its primary effect on formatting and layout is to introduce a 1-em top and bottom margin above and below the contents of the tag. It’s uses are similar to <dl>, <ul>, and <menu>.

This is a Microsoft Reader-specific tag. For more information about lists and list formatting, see Layout Elements.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <div>Division

This tag defines a “block” whose formatting is then controlled through CSS. You can use the <div> tag to group together nested blocks so that the <div> element’s formatting may be inherited by the inner blocks. The <div> tag itself has no properties; it merely provides a container for the style attribute or for CSS style properties to be attached to.

Because CSS may be used to associate hard-page-breaks with a <div> it is often useful for introducing such hard-page-breaks before or after a contained image. (Too many image files close together in an eBook may lead to memory and performance problems on version 1 of the Microsoft Pocket PC Reader.)

Attributes

align, class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <dl>Definition List

This tag creates a glossary-style list containing <dt> and <dd> tags. Its primary effect on formatting and layout is to introduce a 1-em top and bottom margin above and below the contents of the tag. Similar to <dir>, <ul>, and <menu>, for more information, see Layout Elements. The definition terms and definitions are laid out as nested blocks within the <dl>. See <dt> and <dd>, respectively.

Attributes

class, id, lang, style, title (ignored)

Sample

Definition List Sample diagram

Sample Code

<dl>
<dt>eBook</dt>
<dd>An electronic book, usually read on a laptop&rsquo;s LCD screen or on a palmtop computer.</dd>
<dt>pBook</dt>
<dd>A paper book, made of groundwood pulp and bound with glue or stitching. Common until the early 21st century.</dd>
<dt>Publish</dt>
<dd>To release a text to the public, as in to release an eBook to the Internet.</dd>
<dd>To create a hard copy of a text for sale to the public; to create a pBook.</dd>
</dl>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <dt>Definition Term

This tag encloses a term to be defined in a definition list. Contents are rendered in their own block, without any first-line indent or margin-indent.

The <dt> tag acts like a heading in that hyphenation is suppressed within the tag, and it defaults to left-alignment rather than justification.

Attributes

class, id, lang, style, title (ignored)

Sample

Definition Term Sample diagram

Sample Code

<dl>
<dt>eBook</dt>
<dd>An electronic book, usually read on a laptop&rsquo;s LCD screen or on a palmtop computer.</dd>
</dl>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <em>Emphasis

This tag emphasizes a text element. In the Microsoft Reader, it renders like the <i> tag. The <em> tag is preferred in OEB over the <i> tag.

Attributes

class, id, lang, style, title (ignored)

Sample

Emphasis Sample diagram

Sample Code

<h3>&lt;EM&gt; or Emphasis </h3>
The &lt;em&gt; tag <em>emphasizes</em> the text it surrounds, and is similar to italicizing.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <font>Font

Deprecated. This tag alters the font appearance of the text it encloses.

The preferred CSS style properties that replace this tag are color, font-weight, font-family, font-size, and font-style. For more information, see Cascading Style Properties.

Attributes

class, color, face, id, lang, size, style, title (ignored)

Sample

Font Sample diagram

Sample Code

<font color="#FFA500" size="1" face="frutiger linotype">Recte necne crocum floresque perambulet Attae fabula si dubitem.</font> <br />
<font color="blue" size="3" face="lucida sans typewriter">Recte necne crocum floresque perambulet Attae fabula si dubitem.</font> <br />
<font color="gray" size="5" face="berling antiqua">Recte necne crocum floresque perambulet Attae fabula si dubitem.</font>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <head>Head

This tag typically encloses the <title>, <base>, <style>, and <link> tags of any HTML source document, at the start of the document before the body text begins. Tags enclosed by <head> are processed before any tags enclosed within the <body> tag are addressed.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <h1 to h6>Heading

These tags define heading styles of varying sizes, with <h1> being the largest and <h6> being the smallest. The exact details of each type of heading are described in Default System Fonts and Leading.

Attributes

align, id, lang, style, class, title (ignored)

Sample

Heading Numbers Sample diagram

Sample Code

<h1>This is the h1 header size</h1>
<h2>This is the h2 header size</h2>
<h3>This is the h3 header size</h3>
<h4>This is the h4 header size</h4>
<h5>This is the h5 header size</h5>
<h6>This is the h6 header size</h6>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <hr />Horizontal Rule

This singleton tag creates a rule of the size and shape indicated by its attributes. Note the non-OEB color attribute is not supported. The non-OEB noshade attribute is a supported (MSR) extension. By default, the <hr> tag generates a horizontal rule with a height of two pixels.

Attributes

align, class, color (ignored), id, lang, noshade (MSR), size, style, title (ignored), width

Sample

Horizontal Rule Sample diagram

Sample Code

<h4>Plain horizontal rule</h4>
<hr />
<h4>Horizontal rule, 10 pixel size</h4>
<hr size="10" />
<h4>Horizontal rule, width 25% of window</h4>
<hr width="25%" />
<h4>Horizontal rule, align right, 25% of the window</h4>
<hr width="25%" align="right" />
<h4>Unshaded horizontal rule</h4>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <html>HTML

This tag indicates that a document is in HTML format.

Attributes

class, id, xmlns, xml:lang


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <i> Italic

Text enclosed within this tag is rendered as italic. The <em> tag is often preferred.

Attributes

class, id, lang, style, title (ignored)

Sample

Italic Sample diagram

Sample Code

<h2>Italics</h2>
<i>This text is presented as italics.</i>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <img />Image

This singleton tag places an inline image within the text. The image must be formatted as either a .jpg, .gif, or .png.

You can specify image sizes as percentages of the active area of the page, as pixel counts, or by using CSS mechanisms.

Width and height attributes expressed as percentages are treated as percentages with respect to the block element immediately containing them, which is often the page area. Pixel-based sizes are generally discouraged because the resulting layout does not scale well as the content is moved to different sized displays, or is rendered together with different user-chosen font-sizes.

You can make images into block-level elements using the display: block CSS property.

For more information, see Images.

Attributes

align, alt (ignored), border, class, height, hspace, id, longdesc (ignored), lang, lowsrc (ignored), src, style, title (ignored), usemap (ignored), vspace, width


HTML 4.0 Logo Reader Icon PPC Logo <ins>Insert

This tag indicates inserted text, such as that included after an update on a Web site or in a new edition of a book. In the Microsoft Reader, it renders identically to the <u> tag, underlining the inserted text.

This is a Microsoft Reader-specific tag.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <kbd>Keyboard Text

This tag sets the enclosed text in a monospace font, and represents an example of a user’s typed input. Typically used only by specialized books such as software manuals.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <li>List Item

This tag indicates an item in an ordered, unordered, directory, or menu list. The list item formatting depends on the list type; it may be bulleted or numbered. For more information, see Bullets and Lists.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <link />Link

In eBooks, this tag is used exclusively to link to external style sheets. Proper syntax for this tag is discussed in Attributes.

Attributes

href, id, media (ignored), rel, rev (ignored), title (ignored), type

Sample Code

<html xmlns:x="http://www.w3.org/TR/REC-html40">
<head>
<title>CSS Margin Bottom</title>
<link type="text/x-oeb1-css" href="margin-bottom.css" rel="stylesheet" />
<style>
.newpage {page-break-before:auto}
x\:desc {display:block; font-size:14pt; font-weight:bold}
x\:testb {page-break-before:always; display:block; color:red; font-size:9pt}
x\:test {display:block; color:red; font-size:9pt}
x\:msr {color:lime; font-size:11pt; font-weight:bold}
listing {color:lime}
xmp {color:lime}
</style>
</head>


HTML 4.0 Logo Reader Icon <listing> Listing

This tag creates a block rendered with indented margins, preserved white space and the default monospaced font. All markup nested within <listing> tags appears as text.

This is a Microsoft Reader-specific tag.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <menu> Menu List

This tag creates a menu list from the list items it contains. Its primary effect on formatting and layout is to introduce a 1-em top and bottom margin above and below the contents of the tag. Similar to <dir>, <dl>, and <ul>, see Bullets and Lists.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <meta> Metadata

This tag commonly tells web browsers basic host information about a site or the tools that created the source files of the site. This information is also used by search engines.

In ebooks, meta records information about the eBook; this information cannot be accessed through the Microsoft Reader client software or tools. In the future, it may be accessible by tools designed to extract information about tools versioning or preferred platforms. When that happens, the <meta> tag can provide useful background information for future editions of the eBook.

Do not confuse this tag with the x-meta tag used in the package file to activate chapter tours and other meta elements.

Attributes

name, content (ignored), scheme (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <ol> Ordered List

This tag creates a numbered list from the list items it contains, each of which is designated with the <li> tag. Nesting is supported, so lists can be created within other lists. For more information, see Bullets and Lists.

Attributes

class, id, lang, style, title (ignored), type


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <p> Paragraph

This tag defines a paragraph of text, indents the first line of the paragraph, and creates a line break at the end of the enclosed text. (Note: standard HTML adds two line breaks.)

Attributes

align, class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon <plaintext> Plain Text

Deprecated. This tag changes the font to monospace and preserves whitespace. The <plaintext> tag does not recognize a closing tag.

Version 1 of the Microsoft Pocket PC Reader does not preserve white space within the <plaintext> tag.

This is a Microsoft Reader-specific tag.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <pre> Preformatted

This tag preserves all the white space within the text it contains. It also changes the font to monospace within the tag pair.

Attributes

class, id, lang, style, title (ignored)

Sample

Preformatting Sample diagram

Sample Code

<h2>Preformatting</h2>
Preformatted text preserves all the white space within the text contained by the tag, and also changes the font to a monospaced font.<br />
<hr width="25%" />
<br />
<pre>      White space at the start of this line is preserved.<br />

White             space             between             words             is             preserved.<br />

A S   I S   W H I T E   S P A C E   B E T W E E N   L E T T E R S</pre>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <q> Quotation

This tag indicates a short, in-line quotation. In its default state, it has no actual affect on rendering.

Attributes

cite, class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <s> Strikethrough

Deprecated. This tag is identical to <strike>; it puts a line through the text it contains. The use of the CSS text-decoration property is preferred.

Attributes

class, id, lang, style, title (ignored)

Sample

Strikethrough Sample diagram

Sample Code

<h2>S and Strike</h2>
The S tag and the Strike tag perform the same function as the &lt;del&gt; (delete text) tag. Both render the enclosed text with a line through it. <s>This text is enclosed in &lt;s&gt; tags, and has a line drawn through it</s>, while <strike>this text is enclosed in &lt;strike&gt; tags. It also has a line drawn through it.</strike>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <samp> Sample Output

This tag indicates character strings literally, or indicates that text is output from a program or script. Text appears in a monospace font.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo <script> Script

Content within these tags is ignored by Microsoft Reader. The <script> tag is not a part of the OEB specification. However, it is common on Web pages, and so the best practices for eliminating it are important.

All script tags must be formatted within CDATA blocks. CDATA sections may occur anywhere character data may occur. They are used to escape blocks of text containing characters which would otherwise be recognized as markup. CDATA sections begin with the string <![CDATA[ and end with the string ]]>

Sample Code

<script event="onclick" language="JavaScript" type="text/js">
<![CDATA[
alert('Java Script')
]]>
</script>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <small> Small

This tag reduces the current font size by one. There are 7 numbered font sizes, with 1 being the smallest. Using the <small> tag when the current font size is already at minimum has no visible effect. If the current font size has been set via CSS to be an exact font size (like 12pt), then <small> determines the new font size by multiplying the current font size by .833. For a complete list of default and modified system font sizes, see Default System Fonts and Leading.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <span> Local formatting

This tag acts as a container for in-line text, and associates style information or a name or id to the enclosed text.

Attributes

class, id, lang, name, style, title (ignored)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <strike> Strikethrough

Deprecated. Identical to the <s> tag, this tag creates strikethrough text. The CSS text-decoration property is preferred for text decoration.

Attributes

class, id, lang, style, title (ignored)

Sample

Strikethrough Sample diagram

Sample Code

<h2>S and Strike</h2>
The S tag and the Strike tag perform the same function as the &lt;del&gt; (delete text) tag. Both render the enclosed text with a line through it. <s>This text is enclosed in &lt;s&gt; tags, and has a line drawn through it</s>, while <strike>this text is enclosed in &lt;strike&gt; tags. It also has a line drawn through it.</strike>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <strong> Strong emphasis

This tag contains text which should be rendered with strong emphasis. Default rendering is identical to the <b> tag. Use of the <strong> tag is preferred over <b> in OEB.

Attributes

class, id, lang, style, title (ignored)

Sample

Strong Sample data

Sample Code

<h2>Strong</h2>
The &lt;strong&gt; tag renders text with <strong>strong emphasis</strong>, much like using the &lt;b&gt; tag. It is usually reserved for headers or call outs.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <style> Style data

This tag allows an eBook source document to contain cascading style information. The style tag encloses rules which, when applied to the tags and attributes contained within the document, determine the final layout for the eBook. The <style> tag always appears within the <head> tags at the top of an eBook source document.

The type attribute has two values, text/x-oeb1-css for OEB compliant style sheets, and text/css for non-OEB-compliant, standard CSS style sheets.

If you add a <style> tag outside the <head> section of an HTML document, Reader generates a blank page at that location.

Attributes

type

Sample Code

<html>
<head>
<title>San Marco</title>
<style>
a {text-decoration: none}
h3 {page-break-before: left; margin-top: 20%; color: green}
h2 {page-break-before: left; margin-top: 15%}
h1 {margin-top: 30%; align: center}
.fl {text-indent: 0em}
.hang {text-indent: -2em}
.fn {color: red}
</style>
</head>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <sub> Subscript

This tag reduces the font size of the enclosed text and floats it below the baseline as subscripted text. It is often combined with a link to a footnote or endnote, or is used in chemical formulae.

When used with footnotes, leave a space between the last character before the subscript and the numeral of the subscript. This makes it easier to select the word using Reader’s highlighting, copy, and lookup functions.

Attributes

class, id, lang, style, title (ignored)

Sample

Subscript Sample diagram

Sample Code

<h4>Subscript</h4>
Subscripted text is displayed <sub>below</sub> the baseline. <br />
<br />
<h4>Superscript</h4>
Superscripted text goes <sup>above</sup> the baseline, as shown.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <sup> Superscript

This tag reduces the font size of the enclosed text and floats it up above the baseline as superscripted text. It is usually combined with a link tag to a footnote or endnote.

When used with footnotes, leave a space between the last character before the superscript and the numeral of the superscript. This makes it easier to select the word using Reader’s highlighting, copy, and lookup functions.

Attributes

class, id, lang, style, title (ignored)

Sample

Superscript Sample diagram

Sample Code

<h4>Subscript</h4>
Subscripted text is displayed <sub>below</sub> the baseline. <br />
<br />
<h4>Superscript</h4>
Superscripted text goes <sup>above</sup> the baseline, as shown.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <table> Table

This tag creates a table, which must be filled using the <td>, <th>, and <tr> tags. This tag is only supported in Version 1.5 of the Reader; it is not supported for the Pocket PC version.

Note that <tbody>, <thead> and <tfoot> (table body, table header, and table footer) are not available for use with OEB-compliant books. They are ignored when HTML files are converted to the Reader format.

Attributes

align, bgcolor, border, cellpadding, cellspacing, class, id, lang, style, summary (ignored), title (ignored), width

Sample

Table Sample diagram

Sample Code

<table border="1" cellpadding="4">
<caption> <b><i>Horse Exercise for the Week</i></b> </caption>
 <tbody>
 <tr> <th rowspan="2"></th>
  <th colspan="2" align="center">Exercise</th> </tr>
 <tr> <th align="center">Turnout</th>
  <th align="center">Other</th> </tr>
 <tr> <th>Monday</th>
  <td align="center" bgcolor="olive">Yes</td>
  <td>Day Off</td></tr>
 <tr> <th>Tuesday</th>
  <td align="center" bgcolor="olive">Yes</td>
  <td bgcolor="red">Ride</td> </tr>
 <tr> <th>Wednesday</th>
  <td align="center" bgcolor="olive">Yes</td>
  <td bgcolor="yellow">Lunge</td> </tr>
 <tr> <th>Thursday</th>
  <td align="center" bgcolor="olive">Yes</td>
  <td bgcolor="red">Ride</td> </tr>
 <tr> <th>Friday</th>
  <td align="center" bgcolor="olive">Yes</td>
  <td bgcolor="red">Ride</td> </tr>
 <tr> <th>Saturday</th>
  <td align="center" bgcolor="gray">No</td>
  <td bgcolor="green">Trail</td> </tr>
 <tr> <th>Sunday</th>
  <td align="center" bgcolor="gray">No</td>
  <td bgcolor="purple">Lesson</td> </tr>
 </tbody></table>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <td> Table Cell

This tag creates a cell within a table.

Attributes

abbr (ignored), align, bgcolor, class, colspan, height, id, lang, nowrap, rowspan, style, title (ignored), valign, width

Warning: When a table cell runs beyond the length of a single Reader page, its content is truncated to the length of that single page. This is most commonly encountered when a long table-style article is formatted from a news site or online magazine into the Microsoft Reader file format. The bottom margin is not honored, and the text beyond the length of the first Reader page of the table is simply dropped.

In addition, when text is truncated this way the bottom margin of the Reader page is ignored, and text spills over onto the bottom of the page.

Page breaks not nested directly within a table cell can crash a Reader eBook; all page breaks are rejected within tables. Do not use page breaks within a table.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <th> Table Header

This tag indicates a table header for a row or column. The header itself is displayed as bold.

Attributes

abbr (ignored), align, bgcolor, class, colspan, height, id, lang, nowrap, rowspan, style, title (ignored), valign, width


,document title tag,defining">

HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <title> Document Title

This tag encloses the title of a document. When an HTML file is displayed by a browser, the title is displayed in the Windows title bar. This tag always appears within the <head> tag.

Note: If this tag is not enclosed within the <head> tag, it generates a blank page at the beginning of the book.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <tr> Table Row

This tag creates a row within a table. This tag is always used within a <table> tag.

Attributes

bgcolor, valign


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <tt> Teletype Text

Like the <kbd> tag, this tag encloses text to be displayed in a monospaced font.

Attributes

class, id, lang, style, title (ignored)

Sample

Teletype Sample diagram

Sample Code

<tt>This text is monospaced in the Lucida Sans Typewriter typeface.</tt>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <u> Underline

Deprecated. This tag underlines any text it encloses. However, the tag is deprecated in favor of the CSS text-decoration property.

Attributes

class, id, lang, style, title (ignored)

Sample

Underline Sample diagram

Sample Code

<h4>U, or underline</h4>
This tag is used to <u>underline text</u>, which it should have just done. <u>Underlined text</u> may look like a link if it is also <u><span style="color:blue">colored text,</span></u> so this tag is best used sparingly.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo <ul> Unordered List

This tag generates a bulleted list from the list items it contains. Its primary effect on formatting and layout is to introduce a 1-em top and bottom margin above and below the contents of the tag. Similar to <dir>, <dl>, and <menu>.

For more information, see Bullets and Lists.

Attributes

class, id, lang, style, title (ignored), type (ignored)

Sample

Unordered Lists Sample diagram

Sample Code

<h2>An Ordered List</h2>
<ol>
<li>Write a book.</li>
<li>Edit the book.</li>
<li>Convert to OEB-compliant HTML.</li>
<li>Convert to .lit file format.</li>
<li>Sell via secure web server.</li>
<li>Collect royalties.</li>
</ol>
<h2>An Unordered List</h2>
<ul>
<li>Milk</li>
<li>Eggs</li>
<li>Cereal</li>
</ul>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo <var> Variable

This tag indicates a variable name or program argument. It is often used to indicate a placeholder value when text must by input by a user. This tag has little application in eBooks, and is not supported by the Pocket PC version of Microsoft Reader. Default rendering should be identical to <i>.

Attributes

class, id, lang, style, title (ignored)


HTML 4.0 Logo Reader Icon <xmp> Example

This tag creates a block rendered with indented margins, preserved white space and the default monospaced font. All markup nested within <xmp> tags appears as text.

This is a Microsoft Reader-specific tag.

Attributes

class, id, lang, style, title (ignored)


Attribute Reference

Each of the tags described in Tags may have one or more attributes associated with it. These attributes modify the layout or behavior of the tag, or provide additional information about the source or extent of a given text or graphic element of the eBook.

In the Attributes section, "Syntax" shows an example of how the attribute is applied and what values it might specify. A tag listed without a syntax sample is simply added to the tag it modifies without further elaboration.

"Associated Tags" lists all the tags that the attribute may be used to modify.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo abbr

This attribute allows an abbreviated form of the content to be used when tables are automatically compressed in size.

Associated Tags

td, th


HTML 4.0 Logo Reader Icon OEB 1.0 Logo align

This attribute aligns a given tag's contents as indicated. There are several forms of the align attribute, which apply to the following categories:

  • most block elements and table cells

  • image elements

  • tables and horizontal rules

Block Elements

For block elements, default alignment behavior does not correspond precisely with the behavior specified by any of the documented values for the align property. Default alignment behavior may or may not justify, depending upon a number of factors – the active margin widths, the availability of a hyphenation engine for the current content, and whether or not the text is a heading tag. The non-OEB, common-HTML-use, just value is supported in addition to justify.

Image Elements

For image elements, vertical-alignment options are not supported. Bottom, middle and top have no effect.

For images, the values left and right cause the image to float such that text can wrap around it.

Table Elements

For tables, the values left and right cause the table to float so that text can wrap around it. Default behavior is for a table to be rendered at the left margin, but without floating, and thus without text wrapping around it.

Block elements and table cells

Syntax

align="right|left|center|justify|just"

Associated Tags

div, h#, p, td, th

Images

Syntax

align="right|left|bottom|middle|top"

Associated Tags

img

Tables and horizontal rules

Syntax

align="right|left|center"

Associated Tags

hr, table


HTML 4.0 Logo Reader Icon OEB 1.0 Logo border

This attribute creates a border for an image or for a table. The number used in the syntax shown specifies the size of the border in pixels. Set this attribute to 0, which is the default value, to make borders invisible.

For a table or a hyperlinking image, the default border color is transparent.

Syntax

border="number"

Associated Tags

img, table


HTML 4.0 Logo Reader Icon OEB 1.0 Logo cellpadding

This attribute specifies the width of the padding around text or graphics contained in a table cell.

Syntax

cellpadding="number"

Associated Tags

table


HTML 4.0 Logo Reader Icon OEB 1.0 Logo cellspacing

This attribute specifies the width of the combined margins between adjacent table cells.

Syntax

cellspacing="number"


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo class

This attribute determines which style rules in the <head> section or in linked CSS stylesheets are applied to a given tag.

Syntax

class="foostyle"

Associated Tags

virtually all tags


HTML 4.0 Logo Reader Icon OEB 1.0 Logo clear

This attribute controls the relationship between text and images embedded in it. Using the clear attribute allows text that is wrapping around an image to resume flowing after the end of the image. The values left and right are equivalent to all in version 1 of Microsoft Reader. The default value, none, is the same as not using clear.

Syntax

clear="(left|right|all|none)"

Associated Tags

br


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo color

This attribute controls the color of text and horizontal rules, though setting color for horizontal rules is not supported in OEB or in version 1.0 of Microsoft Reader. Colors must be given by name or by 6-digit hex; RGB (integer and percentage) and 3-digit hex are only supported for the CSS style property, color, not for this attribute.

The 16 basic color names must be given as lower case, as they are case-sensitive. For a list of color names and 6-digit-hex colors, see HTML Color Name Codes and Numeric Codes.

Note: White text does not display properly on some PocketPC devices, which still display ClearType hinting on the white-on-white characters. Most devices (and all desktop Readers) display white text correctly.

Syntax

color="(number|name)"

Associated Tags

font, hr


HTML 4.0 Logo Reader Icon OEB 1.0 Logo colspan

This attribute allows a single column in a table to occupy space that might ordinarily be occupied by several columns.

Associated Tags

td, th

Warning: If the colspan specified is greater than the number of columns in the table, then a new column is created on the far right. While HTML usually ignores numbers greater than the number of columns and makes the row span all columns without creating new columns, Reader creates an empty, additional column.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo encoding

This attribute specifies the UTF encoding of XML data. The default is UTF-8.

Associated Tags

xml


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo face

Deprecated. This attribute specifies a font face for the text. The use of CSS font properties is preferred. The use of comma-separated font lists is not supported in the Pocket PC version of Microsoft Reader.

Syntax

face="fontname,fontname2,fontname3"

Associated Tags

font

Sample

Face Attribute sample

Sample Code

<font face="frutiger linotype">Recte necne crocum floresque perambulet Attae fabula si dubitem.</font> <br />
<font face="lucida sans typewriter">Recte necne crocum floresque perambulet Attae fabula si dubitem.</font> <br />
<font face="berling antiqua">Recte necne crocum floresque perambulet Attae fabula si dubitem.</font>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo height

This attribute specifies the height of the table cell, image, or table header. The image or table is scaled to that height in pixels if a number value is given, or scaled to that percentage of active page size (or containing table cell size) if a number is followed by a percent sign (%). Generally used in combination with width. If image height is used without specifying the width attribute, the width is changed so that the image's aspect ratio is maintained.

Syntax

height="pixels|percentage%"

Associated Tags

img, td, th, table

Sample

Height Attribute sample

Sample Code

<img src="testimg1.jpg" height="100" align="left" /><br clear="all"/>
<br />
<img src="testimg1.jpg" height="25%" align="right" />


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo href

This attribute links the <a> tag it modifies to a specified anchor elsewhere within the eBook. For instance, an anchor link may be linked to additional text or to a footnotes section using this attribute. The #destination syntax allows anchors to link to positions inside documents, which are created by using the <a> tag with the name attribute (see name, below), or by placing an id attribute on any tag.

Syntax

href="sourcefile#destinationname"

Associated Tags

a, area, base, link

Sample

Href Attribute sample

Sample Code

Links within an eBook can point to another location <a href="#hspace">within the same file,</a> or they can point to a location <a href="SG Graphic Samples.htm#anchor">within a separate file.</a> Hrefs are always paired with <a name="target">name attributes,</a> which determine the locations that hrefs point to.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo hspace

This attribute creates a horizontal margin around an image. Provides both right and left margin.

Syntax

hspace="pixels"

Associated Tags

img

Sample

Hspace Attribute sample

Sample Code

<p>Quod si tam Graecis novitas invisa fuisset quam nobis, quid nunc esset vetus? Aut quid haberet quod legeret tereretque <img src="testimg1.jpg" hspace="20" height="150" align="left" /> viritim. Ut primum positis nugari Graecia bellis coepit et in vitium fortuna labier aequa, nunc athletarum studiis, nunc arsit equorum, marmoris aut eboris fabros aut aeris amavit, tibicinibus, nunc est gavisa tragoedis; sub nutrice puella. </p>
<br clear="all" />


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo id Identification

This attribute provides a unique identifying number or string to the tag it modifies. This is especially useful in works with extensive cross-referencing and linking, such as dictionaries, encyclopedias, or travel guides. Use of id numbers or alphanumeric strings simplifies linking and updates.

Syntax

id="string"

Associated Tags

virtually all tags


HTML 4.0 Logo Reader Icon PPC Logo lang

This attribute establishes the language used in the text it describes. This value prevents improper hyphenation for non-English content. If xml:lang is specified, the xml:lang value over-rides the setting of lang.

Note that because this is not an OEB-supported attribute, in documents of media type text\x-oeb1-document you must use the xml:lang attribute instead. In documents of media type text\html you can use either lang or xml: lang to specify the book’s language.

This is a Microsoft Reader-specific tag.

Syntax

lang="language"

Associated Tags

all tags


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo name

This attribute creates a hypertext anchor that is a destination for a hyperlink created using the href attribute of the <a> tag. The text portion of the attribute is the anchor that the hyperlink must link to.

Syntax

name="text"

Associated Tags

a, map, param

Sample

Name Attribute sample

Sample Code

Links within an eBook can point to another location <a href="#hspace">within the same file,</a> or they can point to a location <a href="SG Graphic Samples.htm#anchor">within a separate file.</a> Hrefs are always paired with <a name="target">name attributes,</a> which determine the locations that hrefs point to.


HTML 4.0 Logo Reader Icon PPC Logo noshade

This attribute ensures that a horizontal rule is not shaded. This is a Microsoft Reader-specific attribute.

Syntax

noshade="noshade"

Associated Tags

hr


HTML 4.0 Logo Reader Icon OEB 1.0 Logo nowrap

This attribute prevents text from wrapping within a table cell. Note that if a table does not otherwise fit within the active page width, then nowrap behavior may be over-ridden.

Associated Tags

td, th


HTML 4.0 Logo Reader Icon OEB 1.0 Logo rel

This attribute provides information regarding the relationship of the item being linked to. This attribute is ignored on <a> tags; for <link> tags, if the value is not stylesheet, the link is ignored.

Syntax

rel=”relationship”

Associated Tags

a, link


HTML 4.0 Logo Reader Icon OEB 1.0 Logo rev

This attribute specifies the relationship of this document to the document being linked to. Currently ignored.

Syntax

rev=”relationship”

Associated Tags

a, link


HTML 4.0 Logo Reader Icon OEB 1.0 Logo rowspan

This attribute allows a single row in a table to occupy space that might ordinarily be occupied by several rows.

Associated Tags

td, th


HTML 4.0 Logo Reader Icon OEB 1.0 Logo scheme

Ignored in version 1.0 of Microsoft Reader. This attribute names a scheme for interpreting the content property value of the <meta> tag.

Associated Tags

meta


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo size

Deprecated. this attribute specifies a particular font size between 1 and 7, with 7 being the largest. Using a plus or minus sign before the numeral makes the change in font size relative to the default or base body font size.

Syntax

size="number"

Associated Tags

font

Sample

Size Attribute sample

Sample Code

<font size="1"><p class="fl"><b>Size 1:</b> Nunc vero fatemur, acuti hebetesne, valentes imbecilline simus, non esse id in nobis, qui autem ex eo cogi putat ne ut sedeamus quidem aut ambulemus voluntatis esse, is non videt quae quamque rem res consequatur.</p></font>
<p><font size="2"><b>Size 2:</b> Haec disserens qua de re agatur et in quo causa consistat non videt.</font></p>
<p><font size="3"><b>Size 3:</b> Non enim si alii ad alia propensiores sunt propter causas naturales et antecedentes, idciro etiam nostrarum voluntatum atque appetitionum sunt causae naturales at antecedentes; nam nihil esset in nostra potestate si res ita se haberet. </font></p>
<p><font size="4"><b>Size 4:</b> Haec disserens qua de re agatur et in quo causa consistat non videt.</font></p>
<p><font size="5"><b>Size 5:</b> Non enim si alii ad alia propensiores sunt propter causas naturales et antecedentes, idciro etiam nostrarum voluntatum atque appetitionum sunt causae naturales at antecedentes; nam nihil esset in nostra potestate si res ita se haberet. </font></p>
<p><font size="6"><b>Size 6:</b> Haec disserens qua de re agatur et in quo causa consistat non videt.</font></p>
<p><font size="7"><b>Size 7:</b> Non enim si alii ad alia propensiores sunt propter causas <font size="-1">naturales et antecedentes,<font size="+1"> idciro etiam nostrarum</font></font> voluntatum atque appetitionum sunt causae naturales at antecedentes; nam nihil esset in nostra potestate si res ita se haberet. </font></p>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo src

This attribute specifies a source URL for an image.

Syntax

src="URL"

Associated Tags

img


HTML 4.0 Logo Reader Icon OEB 1.0 Logo style

This attribute attaches a list of inline (name:value paired) CSS properties to a specific tag.

A <style> that specifies a media type other than "text/x-oeb1-css" will be ignored with a warning in a document of type "text/x-oeb1-document".

Syntax

style="name:value;name:value"

Associated Tags

virtually all tags


HTML 4.0 Logo Reader Icon OEB 1.0 Logo summary

This attribute provides a summary of a table’s content for accessibility purposes.

Associated Tags

table


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo text

Deprecated. This attribute specifies the color of text contained within a document.

Associated Tags

body


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo type

In version 1 of the Microsoft Reader, supported only for the <link> tag and the <ol> tag. For <link> tags, values other than text/css or text/x-oeb1-css cause the <link> to be ignored. For the <ol> tag, type determines the form of counter to be used for each list-item.

Syntax (<ol>)

type="I|i|A|a|1"

Associated Tags

ul, ol, menu, dir, link, object, param


HTML 4.0 Logo Reader Icon OEB 1.0 Logo valign

This attribute aligns text along the vertical axis in table cells.

Syntax

valign="top|middle|bottom"

Associated Tags

td, th, tr


HTML 4.0 Logo Reader Icon OEB 1.0 Logo vspace

This attribute creates a vertical margin around an image. This attribute defines both top and bottom margin.

Syntax

vspace="pixels"

Associated Tags

img


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo width

This attribute specifies the width of the table cell, image, or table header; the image or table is scaled to that width in pixels. Generally used in combination with the height attribute. If image width is used without specifying the height attribute, the height is changed so that the image's aspect ratio is maintained.

Note that this attribute defines an image with respect to the active page area (or containing table-cell size) when a percentage is used, not with respect to the original image size. Content authors should specify widths in terms of percentages of relevant page margins.

Syntax

width="pixels|percentage%"

Associated Tags

img, td, th, table


HTML 4.0 Logo Reader Icon OEB 1.0 Logo xmlns

This attribute points to a specific namespace. The tag definitions within that namespace are then applied to the rest of the document that this attribute modifies.

Some .lit conversion tools generate a warning if any unrecognized tag is present in a document of MIME type text/html or text/x-oeb1-document unless that tag uses a namespace prefix. Others will simply drop the unrecognized tag without a warning. Consult your tools vendor for details.

Associated Tags

html

Sample Code

<html xmlns:x="http://www.w3.org/TR/REC-html40">
....
<style>
x\:msr {color:lime; font-size:11pt; font-weight:bold}
</style>
<body>
<x:msr>This is a XML element</x:msr>


HTML 4.0 Logo Reader Icon OEB 1.0 Logo xml:lang

This attribute establishes the language used in the text it describes. This value prevents improper hyphenation for non-English content.

The lang attribute performs much the same function as xml:lang, but if xml:lang is specified, the xml:lang value over-rides the setting of lang.

Note that because this is not an OEB-supported attribute, in documents of media type text\x-oeb1-document you must use the xml:lang attribute instead. In documents of media type text\html you can use either lang or xml: lang to specify the book’s language.

A publication as a whole can have its language specified by the <dc:Language> tag in the package-file, but the lang and xml:lang attributes in the component documents can override this package file value.

For a list of OEB-compliant language codes, see Metadata.

Syntax

xml:lang="language"

Associated Tags

all tags


HTML 4.0 Logo Reader Icon OEB 1.0 Logo xml:space

This attribute specifies how white space should be handled in a given tag. This tag is primarily useful in combination with arbitrary author-defined tags, which are supported by OEB and by the Microsoft Reader.

Tools targeting version of 1 of the Microsoft Pocket PC Reader ignore this attribute, but subsequent tools support it.

Syntax

xml:space="preserve | default"

Associated Tags

all tags


Cascading Style Properties Reference

For many layout decisions, the use of cascading style sheets (CSS1) is preferred over the use of standard HTML tags and attributes. The style properties required by the OEB standard and supported in the Microsoft Reader are listed below, along with suggestions for its use.

Note that Reader supports space-separated class names when matching rules, as per CSS2. For example, you can write:

<style>
.pbb { page-break-before: left }
.ti5 { text-indent: 50% }
</style>
...
<p class="pbb ti5">This text will start halfway across the top of a page.</p>

Before you incorporate CSS properties into your files, review the following:

  • Reader CSS Grammar for Units of Measurement

  • Linking CSS Style Sheets


Reader CSS Grammar for Units of Measurement

Standard CSS grammar does not allow white space between a number and that number’s unit of measurement. For example, “line-height: 12pt” is valid, while “line-height: 12 pt” is not. However, the latter usage is not uncommon in HTML authoring for the web.

The Reader interprets units strictly. For example, it interprets “line-height: 12 pt” as equivalent to “line-height: 12” because of the space between number and the unit of measurement. As a result, the CSS is meaningless without an associated unit.

When taking HTML using CSS, global searches for “ pt” and “ em” and similar poorly-formed CSS and remove the spaces. When authoring for Reader, never place a space between a number and the corresponding unit.


Linking CSS Style Sheets

You can incorporate existing CSS style sheets into Microsoft Reader files using the <link> tag in the source HTML’s header section. For example, a <link rel="stylesheet" href="tagclass.css" type="text/css" /> tag calls the tagclass.css stylesheet to be applied to the remainder of the document.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Background-color

This CSS style property defines the background color for tables, table rows, and table cells.

Values

16 basic color names (lower case, case-sensitive), 6- and 3-digit hex, RGB, integer (0-255) and percentage (0.0% to 100.0%)

Applies

Table, tr, td

Default

White

Inheritance

Yes

Percentages

Apply to weighting of primary colors (r%, b%, g%)


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Border

This property defines the style of a block element's border. All border style values except "None" default to solid. Use border-color:colorname to specify color.

Values

None, solid, dashed, dotted, double, groove, inset, outset, ridge, thin, medium, thick, absolute width values, plus all color attributes. Border style always maps to solid in version 1.5 of Microsoft Reader.

Applies

Block elements (image and table only)

Default

None

Inheritance

No


HTML 4.0 logo Reader icon Border-color

A subset of the border property, the border-color property defines only the color of a block element's border. All border style values default to none.

This is a Microsoft Reader-specific property.

Values

All color attributes (see HTML Color Name Codes and Numeric Codes).

Applies

Block elements (image and table only)

Default

Black

Inheritance

No


HTML 4.0 Logo Reader Icon Border-style

A subset of the border property, the border-style property defines only the style of a block element's border. All border-style values except "None" default to solid.

This is a Microsoft Reader-specific property.

Values

None, solid, dashed, dotted, double, groove, inset, outset, ridge. Border-style always maps to solid in version 1.5 of Microsoft Reader.

Applies

Block elements (image and table only)

Default

Solid

Inheritance

No


HTML 4.0 Logo Reader Icon Border-width

A subset of the border property, the border-width property defines only the width of a block element's border.

This is a Microsoft Reader-specific property.

Values

Thin, medium, thick, absolute width values.

Applies

Block elements (image and table only)

Default

None

Inheritance

No


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Clear

This property is equivalent to the deprecated <br clear=> tag syntax. In version 1.0 of Microsoft Reader, the values left and right are equivalent to both.

Values

None, left, right, both

Applies

All elements

Default

None

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Color

This property sets the color of font contained within all elements. Note that the value “transparent” is not supported for this property. For a list of supported colors, see the HTML Color Name Codes and Numeric Codes.

Values

16 basic color names (lower case, case-sensitive), 6- and 3-digit hex, RGB, integer (0-255) and percentage (0.0% to 100.0%)

Applies

Text within all elements

Default

Black

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Display

This property controls how an element is displayed. A value of none hides the element. oeb-page-head and oeb-page-foot are not displayed in version 1 of Microsoft Reader

Values

inline, block, none, oeb-page-head, oeb-page-foot

Applies

All elements

Default

As appropriate, by element category (for block elements, display defaults to block, etc.)

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Float

This property removes images from inline flow to allow text to float. The text wraps around the image at the distance specified by the hspace and vspace values. Currently, tables cannot be floated.

Values

Left, right, none

Applies

img

Default

None

Inheritance

No

Caution: Overlapping images can drop characters. When two images are floated, one with float: right and one with float: left, the Reader layout engine can sometimes drop letters if the two images overlap. Be sure to include a <br clear="all" /> between images.

Caution: Images at end of chapter or section. Floating images at the end of a “chapter” (that is, before a hard-page-break or end of text) may not be rendered correctly, especially if the images come after the last text in the section. Do not float multiple images near the end of a book, chapter, or hard break. (It's perfectly fine to float one image.)


HTML 4.0 Logo Reader Icon Font

This HTML shorthand property can be used to set the font-style, font-weight, font-size, line-height, and font-family property in a single style sheet declaration. For example, ".myfonts {font:bold 12pt Arial}" is equivalent to ".myfonts  {font-weight:bold font-size:12pt font-family:Arial}". Note that the order is specific.

This is a Microsoft Reader-specific property.

Values

As required for the font-style, font-weight, font-size, line-height, and font-family properties.

Applies

All elements

Default

See Default System Fonts and Families.

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Font-family

This property is the preferred method for specifying text fonts. Do not quote an entire list when quoting font names that contain spaces; quote only that name.

You can specify both ClearType and nonClearType fonts as desired. Note, however, that the fonts that are rendered are limited by the fonts installed on the system or device being used to read the text.

Values

Specific font names (quoted if they contain spaces), Serif, sans-serif, monospace

Applies

All elements

Default

Serif, Sans Serif in Pocket PC versions of Microsoft Reader

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Font-size

This property sets the font size of text elements within a container. Specifying absolute values is discouraged in favor of using named values. Percentage values are based on parent font size.

Any type set to an absolute size always displays at that size. It can never be changed by the user with the Reader’s Quick Settings.

Values

Named font sizes: xx-small, x-small, small, medium, large, x-large, xx-large, smaller, and larger. Also absolute numeric values using the following units: centimeters (cm), x-height (ex), inches (in), millimeters (mm), m-space (em), percentage (%), picas (pc), pixels (px), points (pt).

Applies

All elements

Default

Small

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Font-style

This property sets the style of text elements within a container.

Values

normal, italic

Applies

All elements

Default

Normal

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Font-weight

Versions 1 and 1.5 of Microsoft Reader do not support all possible CSS values. Values not supported include: bolder, lighter, 100, 200, 300, etc.

Values

normal, bold

Applies

All elements

Default

Normal

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Height

This property sets the height of an image, object or horizontal rule.

Values

Absolute measurements expressed in pixels, also values followed by a % sign are treated as equal to the specified percentage of the containing block element's height (which is often the active page area).

Applies

<image>, <hr />

Default

Maximum height of contents

Inheritance

No


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Line-height

This property sets the line-height of a range of text; equivalent to "leading" in print production terminology. Use of absolute values is discouraged. For a detailed discussion of the use of the line-height property, see Line-Height.

Values

normal, percentage, or absolute value

Applies

Block elements only

Default

See Line-Height

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo List-style-type

The type attribute for list elements is deprecated in favor of this property. This property applies only to <ol> lists, with the exception of “none”, which applies to <ul>, <dir>, and <menu>.

Values

decimal, lower-roman, upper-roman, lower-alpha, upper-alpha, none (for <ul>, <dir>, and <menu>)

Applies

Ordered list-style block elements (primarily <ol>, but <ul>, <dir>, and <menu> for “none”)

Default

Decimal (in Microsoft Reader, this defaults to standard bullet point)

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Margin-bottom

This property applies to the bottom margin of a block element. Margins are always transparent. Negative numbers are treated as zero. For more information, see Margins.

Values

Absolute value or percentage of containing element's width

Applies

Block level and replaced

Default

See Default System Fonts and Families.

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Margin-left

This property applies to the left margin of a block element. Margins are always transparent. For more information, see Margins.

Values

Absolute value or percentage of containing element's width

Applies

Block level and replaced

Default

See Default Reader Layout.

Inheritance

Yes

Caution: Lists with negative indents
The combination of a <ul> or <ol> tag with a negative value for the margin-left property can sometimes result in a fatal error. The margin-left property can be assigned to <li> safely, but avoid using this CSS property on list tags.


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Margin-right

This property applies to the right margin of a block element. Margins are always transparent. For more information, see Margins.

Values

Absolute value or percentage of containing element's width

Applies

Block level and replaced

Default

See Default Reader Layout.

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Margin-top

This property applies to the top margin of a block element. Margins are always transparent. Negative numbers are treated as zero. For more information, see Margins.

Values

Absolute value or percentage of containing element's width

Applies

Block level and replaced

Default

For more information about default page margins, see Margins.

Inheritance

Yes


HTML 4.0 Logo Reader Icon PPC Logo Page-break-after

This property specifies that a page-break should follow the element. The values always and auto provide for either a forced page-break, or a page-break determined by Reader for best results in all conditions. Specify page-breaks whenever practical to improve performance of Reader and to reduce load times between sections of content within a book.

Note: Page breaks serve as reference points for the Reader pagination engine. Authoring an eBook without page breaks decreases performance and increases the time required to load a book from the Library; authoring an eBook with frequent page breaks (at the start of every chapter or section) improves load time and performance, especially on smaller devices with less memory and less processor power.

This style property is not required by the OEB specification. This is a Microsoft Reader-specific property.

Note: Specifying a value of left or right is preferred so content is compatible with possible future two-page versions of Reader. These choices are functionally equivalent to the value always in single page implementations of Reader.

Values

left, right, always, auto

Applies

All elements

Default

Auto

Inheritance

No


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Page-break-before

This property specifies that a page-break should precede the element. The values always and auto provide for either a forced page-break, or a page-break determined by Reader for best results in all conditions. Specify page-breaks whenever practical to improve performance of Reader and to reduce load times between sections of content within a book.

Note: Page breaks serve as reference points for the Reader pagination engine. Authoring an eBook without page breaks decreases performance and increases the time required to load a book from the Library; authoring an eBook with frequent page breaks (at the start of every chapter or section) improves load time and performance, especially on smaller devices with less memory and less processor power.

Note: The use of the values left and right is preferred for page-break-before property because it enables correct pagination in future, 2-page versions of Microsoft Reader. Page-break-before:left forces one or two page breaks so that the following content begins on a left-hand page. Page-break-before: right forces one or two page breaks so that the following content begins on a right-hand page. These choices are functionally equivalent to the value always in single page implementations of Reader.

Values

always, auto, left, right

Applies

All elements

Default

Auto

Inheritance

No


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Text-align

This property controls text alignment within a text area defined by a block element. Note that Reader applies "smart-justification" when the value of this property is set to justify. For more information about smart-justification, see Justification.

Values

left, right, center, justify

Applies

Block elements

Default

Justify

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Text-decoration

This property applies underline and strike-through characteristics to ranges of text. Preferred syntax over tags such as <s>, <u> and <strike>. This style property is not supported in version 1 of the Pocket PC version of Reader.

Values

None, underline, line-through

Applies

All elements

Default

None

Inheritance

Yes


HTML 4.0 Logo Reader Icon OEB 1.0 Logo PPC Logo Text-indent

This property indents the first line of a block-level element. Unlike web browsers, Microsoft Reader renders the default value of this property for all containers to a fixed value. For more information about default text-indent sizes, see Indentation.

Values

Percentage value based on parent's width, absolute em value

Applies

Block elements

Default

Normal

Inheritance

No


HTML 4.0 Logo Reader Icon OEB 1.0 Logo Width

This property sets the width of an image or horizontal rule.

Values

Absolute measurements expressed in centimeters (cm), inches (in), millimeters (mm), m-spaces (em), picas (pc), pixels (px), or points (pt). Values followed by a % sign are treated as equal to the specified percentage of the containing block element's width (which is often the active page area)

Applies

<image>, <hr />, table

Default

Maximum width of contents

Inheritance

No


HTML 4.0 Logo Reader Icon White-space

This property specifies whether to display multiple consecutive spaces as white space within container.

This is a Microsoft Reader-specific property.

Values

normal, pre

Applies

Block, in-line, replaced

Default

normal on most elements. pre on pre-formatted elements such as <pre>, <code>, etc.

Inheritance

Yes


Tags and Structures Not Currently Supported

Microsoft Reader is the first real-world implementation of the Open eBook specification, and therefore includes both more and less than the OEB standard requires. This section describes tags and constructs being developed for future versions of Microsoft Reader.

These tags and structures include:

  • Active content & web links

  • Multi-column text and page break manipulation

  • Objects, variables, and parameters

  • Image maps

  • Miscellaneous unsupported tags and attributes


Active Content & Web Links

The various forms of Web scripting, DHTML, VizAct, and other forms of active content are not supported in Versions 1 and 1.5 of Microsoft Reader. Any material within <script> tags will be ignored.

In a broader context, links to external material (such as web sites, ftp sites, or even intranet destinations) are not active in Versions 1.0 and 1.5 of Microsoft Reader. The link appears on the book page, but clicking the link brings up the Reader's text menu rather than accessing the Web content.

Links internal to the book work normally.


Multi-Column Text and Page Break Manipulation

All body text and lists are formatted as single-column text in the current version of the Reader. The Open eBook specification suggests that the CSS style-property OEB-column-number be used to implement this function, but this property is not supported in Versions 1 and 1.5 of Microsoft Reader.

For more information, click:

  • OEB-column-number

  • Page-break-inside

OEB-column-number

Definition | Specifies the number of columns of text to display inside a given element.
Values | Auto, positive integer
Applies | Block elements
Default | 1
Inheritance | No

Page-break-inside

Definition | The value avoid shifts the entire element to new page, if necessary, to avoid splitting it over a page-break.
Values | Auto, avoid
Applies | Block elements
Default | Auto
Inheritance | No


Objects, Variables, and Parameters: <object>, <param>

This set of tags imports applets into an eBook. These tags are not supported in Version 1 of Microsoft Reader.

These include:

  • <object>

  • <param>

  • archive

  • value

  • valuetype


<object>Object Embedding

This tag embeds images, documents, and applets within an eBook.

Attributes

align, archive, border, height, hspace, type, usemap, vspace, width


<param>Object Parameter

This tag is used in conjunction with the <object> tag to provide parameters for images, documents, and applets within a Web document or eBook.

Attributes

name, value, valuetype, type


archive

Not supported in versions 1 or 1.5 of Microsoft Reader.

Associated Tags

object


value

Not supported in versions 1 or 1.5 of Microsoft Reader.

Associated Tags

param


valuetype

Not supported in versions 1 or 1.5 of Microsoft Reader.

Associated Tags

param


Image Maps: <area>, <map>

Images divided into hotspots and non-clickable areas are not supported in versions 1 or 1.5 of Microsoft Reader. Entire images may still be hyperlinked normally. The tags involved are the <area> and <map> tags; the relevant attributes are coords, nohref, shape, and usemap.

The unsupported image map tags and structures are:

  • <area />

  • <map>

  • coords

  • nohref

  • shape

  • usemap


<area />Area

This tag creates a link hotspot within an image. While the OEB-required alt attribute is supported for this tag, it currently serves no function in the Microsoft Reader.

Attributes

alt, coords, href, nohref, shape, title (ignored)


<map>Image Map

This tag encloses the <area> tags used to define the clickable areas within image maps.

Attributes

class, id, lang, name, style, title (ignored)


coords

This attribute specifies the hot spots in an area map with mouseovers. The shape attribute is used to specify rect|circle|poly|default, which affects the syntax used by this attribute.

Syntax

coords="x1, y1, x2, y2" [top-left and bottom-right]

coords="x, y, r" [center point and radius]

coords="x1, y1, x2, y2, x3, y3, etc" [vertices of polygon]

Associated Tags

area


nohref

This attribute indicates that when the chosen area or image is clicked, it does not link to anywhere else in the eBook.

Associated Tags

area


shape

This attribute defines the shape of a linking image, or mouseover hot spot, in an eBook. It is used in combination with the area tag and a set of coord attributes to describe for rectangles, circles, polygons, and the default shape.

Syntax

shape="rect|circle|poly|default"

Tag | Usage
rect | Defined by an upper left corner and bottom right corner. For an area tag, this attribute might read as follows: <area shape=rect coords="x1,y1,x2,y2>
circle | Defined by its center points and its radius r, for example: <area shape=circle coords="x,y,r">
Poly | Defined by a list of coordinates; each x-y pair is the next coordinate in the polygon, and the last pair connects back to the first pair. <area shape=poly coords="x1,y1,x2,y2,x3,y3,x4,y4,x5,y5,x6,y6">
default | This location has no coordinates, and it is only used to specify a link destination for when a user clicks on an area not defined by any other coordinates.

Associated Tags

area


usemap

This attribute links data for image maps specified elsewhere in the document using the <area> tag.

Associated Tags

img


Miscellaneous Unsupported Tags and Attributes

A number of OEB tags and attributes are currently not supported in Reader. The tags are listed in angle brackets; the attributes are listed without brackets.

The unsupported tags and attributes are:

  • alt

  • bgcolor

  • content

  • longdesc

  • media

  • title

  • vertical-align


alt

In HTML, this attribute is used to provide a text description for an image that cannot be displayed in a browser.

Syntax

alt="text"

Associated Tags

area, img


bgcolor

This attribute sets the background color for text or tables. The use of the CSS property background-color is preferred.

Syntax

bgcolor="(##RRGGBB|colorname)"

Associated Tags

body, table, td, th, tr


content

This attribute supplies values for properties defined by the name attribute within a <meta> tag.

Associated Tags

meta


longdesc

This attribute provides a long text description of an image.

Syntax

longdesc="text"

Associated Tags

img


media

Not supported in Versions 1.0 and 1.5 of Microsoft Reader.

Associated Tags

link


title

This attribute provides "pop-up" advisory information about an object. Do not confuse it with the <title> tag.

Associated Tags

Virtually all tags.


vertical-align

This style property is preferred over the <img> attribute-value pairs: align="top", align="middle" and align="bottom." Unlike common CSS-2 usage, this property is only applied to the <img> tag.

Values

top, middle, bottom

Applies

img, tables (MSR)

Default

Bottom

Inheritance

No


Special Character Reference

Characters in text can be incorporated into .htm source files for the Reader eBook as:

  • actual typed characters

  • codes

Codes are usually the appropriate HTML 4.0 mnemonic codes, but some codes from the Unicode Standards, Version 3.0 are used. Unicode is fully supported in Reader—all UTF-8, UTF-16be, and UTF-16le characters can be called.

Typed characters that function in Reader eBooks are listed in the Character column of the Special Character Table. When a typed character does not exist or is not available, the correct code for Reader format source files is listed in the Code column.

Greek characters and many other special characters are fully supported in the Berling Antiqua and Frutiger Linotype font faces, but are not supported in Lucida Sans Typewriter. For a complete listing of the Open eBook character set, see http://www.openebook.org/dtds/oeb-1.0/oeb1.ent.

Note: For characters not listed here, use Unicode equivalents.


Special Character Table

Description | Character | Code
“at” sign | @ |
ampersand |  | &amp;
approximately equal to |  | &cong;
asterisk | * |
backslash | \ |
bracket, left curly | { |
bracket, left square | [ |
bracket, right curly | } |
bracket, right square | ] |
bullet |  | &bull;
caret | ^ |
cent sign |  | &cent;
circumflex |  | &circ;
colon | : |
comma | , |
copyright sign |  | &copy;
currency sign, general |  | &curren;
dagger |  | &dagger;
dagger, double |  | &Dagger;
degree sign |  | &deg;
delta, capital |  | &Delta;
diamond, open |  | &#x2756;
diamond, solid |  | &#x2726; not yet supported
diamond, white (contains small black) |  | &#x25c8;
division sign |  | &#x247;
dollar sign | $ |
ellipse |  | &hellip;
em-dash |  | &mdash;
en-dash |  | &ndash;
equal sign | = |
Eurodollar |  | &euro;
exclamation mark | ! |
exclamation mark, inv |  | &iexcl;
fleuron |  | &#x2766;
florin |  | &fnof;
fraction, one-quarter |  | &frac14;
fraction, one-half |  | &frac12;
fraction, three-quarters |  | &frac34;
grave accent | ‘ |
greater-than sign |  | &gt;
greater-or-equal sign |  | &ge;
hyphen | - |
infinity sign |  | &infin;
Lb sign |  | &pound;
less-than sign |  | &lt;
less-or-equal sign |  | &le;
letters, lowercase | a-z |
letters, uppercase | A-Z |
micro sign (mu, lc) |  | &micro;
middle dot |  | &middot;
multiplication sign |  | &#x215;
not sign |  | &not;
numerals | 0-9 |
omega |  | &omega;
ordinal, feminine |  | &ordf;
ordinal, masculine |  | &ordm;
parenthesis, left | ( |
parenthesis, right | ) |
percentage sign | % |
percentile/mil |  | &permil;
period | . |
Pi, cap |  | &Pi;
pi, lc |  | &pi;
plus sign | + |
plus/minus sign |  | &plusmn;
pound sign | # |
question mark | ? |
question mark, inverted |  | &iquest;
quote, double | " |
quote, left double angle |  | &laquo;
quote, left double |  | &ldquo;
quote, left single |  | &lsquo;
quote, left single angle |  | &lsaquo;
quote, right double angle |  | &raquo;
quote, right double |  | &rdquo;
quote, right single |  | &rsquo;
quote, right single angle |  | &rsaquo;
quote, single | ‘ |
registered sign |  | &reg;
section sign |  | &sect;
Semicolon | ; |
sigma, cap |  | &Sigma;
slash | / |
space, non-breaking |  | &nbsp;
square root |  | &radic;
superscript 1 |  | &sup1;
superscript 2 |  | &sup2;
superscript 3 |  | &sup3;
superscript numerals |  | use <sup>tags</sup>
tilde | ~ |
trademark sign |  | &#x8482;
underline | __ | or use <u>tags</u>
Yen sign |  | &yen;
A-acute, cap |  | &Aacute;
a-acute, lc |  | &aacute;
A-circumflex, cap |  | &Acirc;
a-circumflex, lc |  | &acirc;
AE ligature, cap |  | &AElig;
ae ligature, lc |  | &aelig;
A-grave, cap |  | &Agrave;
a-grave, lc |  | &agrave;
A-ring, cap |  | &Aring;
a-ring, lc |  | &aring;
A-tilde, cap |  | &Atilde;
a-tilde, lc |  | &atilde;
A-umlaut, cap |  | &Auml;
a-umlaut, lc |  | &auml;
C-cedille, cap |  | &Ccedil;
c-cedille, lc |  | &ccedil;
E-acute, cap |  | &Eacute;
e-acute, lc |  | &eacute;
E-circumflex, cap |  | &Ecirc;
e-circumflex, lc |  | &ecirc;
E-grave, cap |  | &Egrave;
e-grave, lc |  | &egrave;
Eth, cap (Icelandic) |  | &ETH;
eth, lc (Icelandic) |  | &eth;
E-umlaut, cap |  | &Euml;
e-umlaut, lc |  | &euml;
I-acute, cap |  | &Iacute;
i-acute, lc |  | &iacute;
I-circumflex, cap |  | &Icirc;
i-circumflex, lc |  | &icirc;
I-grave, cap |  | &Igrave;
i-grave, lc |  | &igrave;
I-umlaut, cap |  | &Iuml;
i-umlaut, lc |  | &iuml;
N-tilde, cap |  | &Ntilde;
n-tilde, lc |  | &ntilde;
O-acute, cap |  | &Oacute;
o-acute, lc |  | &oacute;
O-circumflex, cap |  | &Ocirc;
o-circumflex, lc |  | &ocirc;
OE ligature, cap |  | &OElig;
oe ligature, lc |  | &oelig;
O-grave, cap |  | &Ograve;
o-grave, lc |  | &ograve;
O-slash, cap |  | &Oslash;
o-slash, lc |  | &oslash;
O-tilde, cap |  | &Otilde;
o-tilde, lc |  | &otilde;
O-umlaut, cap |  | &Ouml;
o-umlaut, lc |  | &ouml;
S-caron, cap |  | &Scaron;
s-caron, lc |  | &scaron;
sz ligature, lc (German) |  | &szlig;
Thorn, cap (Icelandic) |  | &THORN;
thorn, lc (Icelandic) |  | &thorn;
U-acute, cap |  | &Uacute;
u-acute, lc |  | &uacute;
U-circumflex, cap |  | &Ucirc;
u-circumflex, lc |  | &ucirc;
U-grave, cap |  | &Ugrave;
u-grave, lc |  | &ugrave;
U-umlaut, cap |  | &Uuml;
u-umlaut, lc |  | &uuml;
Y-acute, cap |  | &Yacute;
y-acute, lc |  | &yacute;
y-umlaut, lc |  | &yuml;


HTML Color Name Codes and Numeric Codes

In HTML, color is provided by:

  • name codes

  • number codes


HTML Color Name Codes

Sixteen name codes are supported by Microsoft Reader:

Name | RGB Color Value
Black | RGB (0, 0, 0)
White | RGB (255, 255, 255)
Aqua | RGB (0, 255, 255)
Blue | RGB (0, 0, 255)
Fuchsia | RGB (255, 0, 255)
Gray | RGB (128, 128, 128)
Green | RGB (0, 128, 0)
Lime | RGB (0, 255, 0)
Maroon | RGB (128, 0, 0)
Navy | RGB (0, 0, 128)
Olive | RGB (128, 128, 0)
Purple | RGB (128, 0, 128)
Red | RGB (255, 0, 0)
Silver | RGB (192, 192, 192)
Teal | RGB (0, 128, 128)
Yellow | RGB (255, 255, 0)


HTML Color Number Codes

The number codes are all supported by Microsoft Reader. These include:

Numeric Code | Name Code
F0F8FF | aliceblue
FAEBD7 | antiquewhite
00FFFF | aqua
7FFFD4 | aquamarine
F0FFFF | azure
F5F5DC | beige
FFE4C4 | bisque
000000 | black
FFEBCD | Blanchedalmond
0000FF | Blue
8A2BE2 | Blueviolet
A52A2A | Brown
DEB887 | Burlywood
5F9EA0 | Cadetblue
7FFF00 | Chartreuse
D2691E | Chocolate
FF7F50 | Coral
6495ED | Cornflowerblue
FFF8DC | Cornsilk
DC143C | Crimson
00FFFF | Cyan
00008B | Darkblue
008B8B | Darkcyan
B8860B | Darkgoldenrod
A9A9A9 | Darkgray
006400 | Darkgreen
BDB76B | Darkkhaki
8B008B | Darkmagenta
556B2F | Darkolivegreen
FF8C00 | Darkorange
9932CC | Darkorchid
8B0000 | Darkred
E9967A | Darksalmon
8FBC8F | Darkseagreen
483D8B | Darkslateblue
2F4F4F | Darkslategray
00CED1 | Darkturquoise
9400D3 | Darkviolet
FF1493 | Deeppink
00BFFF | Deepskyblue
696969 | Dimgray
1E90FF | Dodgerblue
B22222 | Firebrick
FFFAF0 | Floralwhite
228B22 | Forestgreen
FF00FF | Fuchsia
DCDCDC | Gainsboro
F8F8FF | Ghostwhite
FFD700 | Gold
DAA520 | Goldenrod
808080 | Gray
008000 | Green
ADFF2F | Greenyellow
F0FFF0 | Honeydew
FF69B4 | Hotpink
CD5C5C | Indianred
4B0082 | Indigo
FFFFF0 | Ivory
F0E68C | Khaki
E6E6FA | Lavender
FFF0F5 | Lavenderblush
7CFC00 | Lawngreen
FFFACD | Lemonchiffon
ADD8E6 | Lightblue
F08080 | Lightcoral
E0FFFF | Lightcyan
FAFAD2 | Lightgoldenrodyellow
90EE90 | Lightgreen
D3D3D3 | Lightgrey
FFB6C1 | Lightpink
FFA07A | Lightsalmon
20B2AA | Lightseagreen
87CEFA | Lightskyblue
778899 | Lightslategray
B0C4DE | Lightsteelblue
FFFFE0 | Lightyellow
00FF00 | Lime
32CD32 | Limegreen
FAF0E6 | Linen
FF00FF | Magenta
800000 | Maroon
66CDAA | Mediumaquamarine
0000CD | Mediumblue
BA55D3 | Mediumorchid
9370DB | Mediumpurple
3CB371 | Mediumseagreen
7B68EE | Mediumslateblue
00FA9A | Mediumspringgreen
48D1CC | Mediumturquoise
C71585 | Mediumvioletred
191970 | Midnightblue
F5FFFA | Mintcream
FFE4E1 | Mistyrose
FFE4B5 | Moccasin
FFDEAD | Navajowhite
000080 | Navy
FDF5E6 | Oldlace
808000 | Olive
6B8E23 | Olivedrab
FFA500 | Orange
FF4500 | Orangered
DA70D6 | Orchid
EEE8AA | Palegoldenrod
98FB98 | Palegreen
AFEEEE | Paleturquoise
DB7093 | Palevioletred
FFEFD5 | Papayawhip
FFDAB9 | Peachpuff
CD853F | Peru
FFC0CB | Pink
DDA0DD | Plum
B0E0E6 | Powderblue
800080 | Purple
FF0000 | Red
BC8F8F | Rosybrown
4169E1 | Royalblue
8B4513 | Saddlebrown
FA8072 | Salmon
F4A460 | Sandybrown
2E8B57 | Seagreen
FFF5EE | Seashell
A0522D | Sienna
C0C0C0 | Silver
87CEEB | Skyblue
6A5ACD | Slateblue
708090 | Slategray
FFFAFA | Snow
00FF7F | Springgreen
4682B4 | Steelblue
D2B48C | Tan
008080 | Teal
D8BFD8 | Thistle
FF6347 | Tomato
40E0D0 | Turquoise
EE82EE | Violet
F5DEB3 | Wheat
FFFFFF | White
F5F5F5 | Whitesmoke
FFFF00 | Yellow
9ACD32 | yellowgreen


Font and Character Set Support

Microsoft Reader 1.5 ships with three default font families. Each font family consists of Roman, Bold, Italic and Bold Italic.

  • The default Serif font is Berling Antiqua,

  • The default Sans Serif font is Frutiger Linotype,

  • The default Monospaced font is Lucida Sans Typewriter.

The Microsoft Reader for Windows is a Unicode Based Application. The Unicode ranges

  • Basic Latin

  • Latin-1 Supplement

  • Latin Extended – A

  • Greek

are supported by the default serif font Berling Antiqua, and the sans serif font Frutiger Linotype in Version 1.5 of Reader.

The Unicode ranges

  • Basic Latin

  • Latin –1 Supplement

are supported by the Default Monospaced Font, Lucida Sans Typewriter.

Berling Antiqua and Frutiger Linotype provide complete character set coverage of the Character entities for the Open eBook publication structure version 1.0. For more information about the Open E-Book structure, see http://www.openebook.org/dtds/oeb-1.0/oeb1.ent.

The Default Monospaced font Lucida Sans Typewriter has Character Set support for Code page 1252. For more information about code page 1252, see http://www.microsoft.com/typography/unicode/1252.gif?fname=Verdana&fsize=10pt.

The meaning of the term codepage has evolved over time. Only one definition concerns us now: A codepage is a list of selected character codes in a certain order. Codepages are usually defined to support specific languages or groups of languages which share common writing systems. For example, codepage 1253 provides character codes required in the Greek writing system.

For more information on Character sets and Code pages see http://www.microsoft.com/typography/unicode/cscp.htm?fname=Verdana&fsize=10pt.


Code Page and Language Support

This section describes exactly which code pages are supported for each ClearType font, and which languages these code pages cover, for the Microsoft Reader version 1.5.


Berling Antiqua and Frutiger Linotype Code Pages

  • 1252 Latin 1

  • 1250 Latin 2: East Europe

  • 1253 Greek

  • 1254 Turkish

  • 1257 Windows Baltic

  • Macintosh Character Set (US Roman)

Languages supported on the desktop Microsoft Reader version 1.5 for the serif font Berling Antiqua and sans serif font Frutiger Linotype are listed alphabetically with their corresponding Windows code pages.

Afrikaans – 1252 | German (Austria) –1252
Albania – 1250 | German (Luxembourg) – 1252
Basque – 1252 | German (Liechtenstein) – 1252
Catalan – 1252 | Greek – 1253
Croatia – 1250 | Hungarian – 1250
Czech – 1252 | Icelandic – 1252
Danish – 1252 | Indonesian – 1252
Dutch (Standard) – 1252 | Italian – 1252
Dutch (Belgium) – 1252 | Italian (Switzerland) – 1252
English (United States) – 1252 | Latvian – 1257
English (Britain) – 1252 | Lithuanian – 1257
English (Canada) – 1252 | Norwegian (Bokmål) – 1252
English (New Zealand) – 1252 | Norwegian (Nynorsk) – 1252
English (Australia) – 1252 | Polish – 1250
English (Ireland) – 1252 | Portuguese (Standard) – 1252
English (South Africa) – 1252 | Portuguese (Brazil) – 1252
Estonian – 1257 | Romanian – 1250
Faeroese – 1250 | Serbian (Latin) – 1250
Finnish – 1252 | Slovak – 1250
French (Standard) – 1252 | Slovenian – 1250
French (Belgium) – 1252 | Spanish (Mexico) – 1250
French (Switzerland) – 1252 | Spanish (Traditional Sort) – 1252
French (Canada) – 1252 | Spanish (Modern Sort) – 1252
French (Luxembourg) – 1252 | Swedish – 1252
German (Standard) – 1252 | Turkish – 1254
German (Switzerland) –1252 |


Lucida Sans Typewriter (Monospaced font) Code Pages

  • 1252 Latin 1. For more information about Code page 1252, see http://www.microsoft.com/typography/unicode/1252.gif?fname=Verdana&fsize=10pt.

  • Macintosh Character Set (US Roman)

Languages supported on the desktop Microsoft Reader version 1.5 for the monospaced font Lucida Sans Typewriter are listed alphabetically with their corresponding Windows code pages.

Afrikaans – 1252 | French (Canada) – 1252
Basque – 1252 | French (Luxembourg) – 1252
Catalan – 1252 | German (Standard) – 1252
Czech – 1252 | German (Switzerland) –1252
Danish – 1252 | German (Austria) –1252
Dutch (Standard) – 1252 | German (Luxembourg) – 1252
Dutch (Belguim) – 1252 | German (Liechtenstein) – 1252
English (United States) – 1252 | Icelandic – 1252
English (Britian) – 1252 | Indonesian – 1252
English (Canada) – 1252 | Italian – 1252
English (New Zealand) – 1252 | Italian (Switzerland) – 1252
English (Australia) – 1252 | Norwegian (Bokmål) – 1252
English (Ireland) – 1252 | Norwegian (Nynorsk) – 1252
English (South Africa) – 1252 | Portuguese (Standard) – 1252
Finnish – 1252 | Portuguese (Brazil) – 1252
French (Standard) – 1252 | Spanish (Traditional Sort) – 1252
French (Belguim) – 1252 | Spanish (Modern Sort) – 1252
French (Switzerland) – 1252 | Swedish – 1252


Pocket PC Font Support

This section describes the font and character set support for Reader 1.0, or Pocket PC version of the Reader.


Frutiger Linotype (Sans Serif) and Courier New (Monospaced font) Code Pages

  • 1252 Latin 1. For a graphic representation of the 1252 Code Page, see http://www.microsoft.com/typography/unicode/1252.gif?fname=Verdana&fsize=10pt.

The following Languages are supported by Frutiger Linotype and Courier New on the Pocket PC, and are listed alphabetically with their corresponding Windows code pages.

Afrikaans – 1252 | French (Canada) – 1252
Basque – 1252 | French (Luxembourg) – 1252
Catalan – 1252 | German (Standard) – 1252
Czech – 1252 | German (Switzerland) –1252
Danish – 1252 | German (Austria) –1252
Dutch (Standard) – 1252 | German (Luxembourg) – 1252
Dutch (Belguim) – 1252 | German (Liechtenstein) – 1252
English (United States) – 1252 | Icelandic – 1252
English (Britian) – 1252 | Indonesian – 1252
English (Canada) – 1252 | Italian – 1252
English (New Zealand) – 1252 | Italian (Switzerland) – 1252
English (Australia) – 1252 | Norwegian (Bokmål) – 1252
English (Ireland) – 1252 | Norwegian (Nynorsk) – 1252
English (South Africa) – 1252 | Portuguese (Standard) – 1252
Finnish – 1252 | Portuguese (Brazil) – 1252
French (Standard) – 1252 | Spanish (Traditional Sort) – 1252
French (Belguim) – 1252 | Spanish (Modern Sort) – 1252
French (Switzerland) – 1252 | Swedish – 1252


ClearType Fonts

The font faces are shown in the sizes corresponding to the default small font-size tag, and then modified through the six absolute numerical sizes provided by the Reader Guidebook defaults. When seen on Microsoft Reader, font size may vary slightly depending on hardware factors (such as pixel alignment) and software factors (such as video drivers and settings).

Click to see:

  • Berling Antiqua

  • Frutiger Linotype

  • Lucida Sans Typewriter


Berling Antiqua

Berling Antiqua Fonts diagram


Frutiger Linotype

Frutiger Linotype Fonts diagram


Lucida Sans Typewriter

Lucida Sans Typewriter Font diagram


Reader Content SDK 1.5 Logo

Reader Content SDK Glossary

This section includes brief definitions of printing and eBooks terms used in the Reader Content SDK 1.5 documentation.


A

acknowledgments

The creator’s statement identifying people or groups who have contributed to the book in some fashion. Usually in the front matter.

afterword

The creator’s statement about the book, after the main body of the book.

ancillary elements

The elements included in an eBook that are not core or non-core elements. This overlaps extensively with sales matter. Because of their nonessential nature, these materials are often candidates for inclusion in a guide or tour. Examples of are teaching guides and authors’ essays about their work.

appendix

Any supplemental content, contained in the back matter of the book.

author bio

Biographical data about the author(s), often including an image. Often on the back jacket or inside back jacket of a hardcover, or on the inside back cover or last few pages of a paperback book.

author notes

The creator comments on the book, often after the main body of the text.

author(s)

The writer(s) or creator(s) of the text. Creator types are described in Open eBook (OEB) Publication Structure 1.0 [http://www.openebook.org/specification.htm], Section 2.26.

authoring process

The sequence of actions that starts with an idea for a book, and ends with a book being determined as ready to be published.


B

back ads or publisher catalog

Ads selling other books by a publisher, used to fill blank pages at the back of a paperback book. In Reader eBooks, where pages are not limited, this can be an actual catalog.

back matter

A paper book term meaning all elements in the book after the final page of the text.

bibliography

Creator’s list of titles relevant to the book, usually after the main body of the book.

blurb/promotional copy

250 words maximum, used on the outside of a paperback book or the inside jacket of a hardcover to describe the book, or supply a hook to cause the reader to buy the book.

body

The main text and images that make up the core of a book; the largest part of the core reading experience.

book

A long literary composition, either fiction or nonfiction.


C

caption

Any text directly describing or related to an image.

category

A group of books of similar genre, form, or readership, gathered together for sales and marketing purposes: e.g., modern fiction, bestsellers. A category is not necessarily a genre, since it isn’t always content-based.

chapter

Shorter sections that logically divide a book-length work.

chapter epigraph

Quote at the beginning of a chapter.

chapter head

All the elements making up the beginning of a chapter, before the main text of the book begins again. This can include chapter titles, numbers, epigraphs, illustrations, etc.

chapter number

The chapter's identifier in the sequence of chapters.

chapter title

The chapter's title.

ClearType

Display technology that makes digital fonts dramatically more readable, using existing font technology and hardware. For more information, see the Open eBooks Web site at http://www.microsoft.com/OpenType/cleartype.

colophon

Inscription at the end of a book with information relative to its production: fonts, size, paper, printers, etc., can all be part of this. Occasionally colophon is used to mean the publisher logo.

content

The matter contained in a book.

content provider

The individual or organization that supplies the original content for an eBook or paper book. The content supplier can be an author or other creator, publisher, or packager.

conversion

The process of changing material from one form to another.

copyright notice

Legally required statement of who owns what rights in the book.

core book elements

The elements required for the core reading experience: the book at its most streamlined. This always includes the author, title, and text; and occasionally includes illustrations or other elements.

core reading experience

The trancelike experience a reader has when she plunges into a book and finds herself immersed in the story or content, without sidetracks or delays caused by things like footnotes and forewords. This is the linear book experience cut to its essential bones: the title, author, and body.

cover art

Art or graphic presentation used on the paper book’s cover to attract attention and set expectations for the book’s content.

cover copy

The text on the front and back cover and spine of a (paperback) book.

cover flats

The printed cover or jacket of a paper book, unfolded, used as a marketing tool.

creator

The author or other individual or group responsible for generating or supplying content of a book.


D

dedication

Creator’s statement presenting the book as tribute to an individual, group, or cause.

DRM (Digital Rights Management)

Copy protection and rights management for Reader eBooks.

DRM level

Level of security for a Reader eBook.


E

EANS code

Barcode encoding the ISBN and price of a paper book, to be readable by a digital scanner.

eBook

A book or other content in electronic written format.

edition

Which version of a book this is: first edition, third edition. “Edition” is sometimes used to mean printing but more accurately, a new edition indicates some content changes, if no more than a price change.

editor

The person or persons responsible for correcting and improving the text (and sometimes images) of a book.

element

A part of a book’s content.

#endnotes

Notes referring to or further elaborating the body of a book, gathered together at the end of the chapter or book.

epigraph

Quote at the beginning of a book, part or chapter.


F

fallback sequence

The order in which Reader will look for files to use in place of an unfound file, or one not in a recognized format.

footnotes

Notes referring to or further elaborating the body of a book, placed at the bottom of the page with the relevant text.

foreword

Comments before a book, usually written by someone other than the creator.

front matter

A paper book term, meaning all material in the book before page one of the text.

frontispiece

Art that faces the title page of a paper book.


G

genre

A group of books gathered together because of similar content: for example, cookbooks or mysteries. A genre such as science fiction is often also a category.

.gif

A type of file compression format for image files. gif files are not currently supported in Microsoft Reader.

glossary

A lexicon of special words that appear in a text, and their meanings.

guide

In the package file, a set of references to non-core structural elements of the publication: table of contents, appendices, etc.


H

half title

A right-hand page on which the title of a paper book appears alone (no author, no image), either before the title page, or just before the main body of a book.

.htm

Preferred input text file format for the Reader.


I

illustration(s), interior

Image(s) appearing in the main body of a book.

image file

A file containing graphics (illustrations, photographs, etc.) or other visual information.

images

The graphical elements in a book. This can include ornamental initials, which are treated as images.

index

List of items, terms, or people referred to in a book and where the references occur. In an eBook, index entries may have a link to the references.

introduction

Part of a book preliminary to the main body of the book.

ISBN

The 10-digit code that identifies a book by: country of publication, publisher, a code unique to that book, and a checking digit.


J

jacket copy

The text on the front, back, spine, and inside flaps of the jacket on a (hardcover) book.

.jpg

One of the two preferred image file formats for the Reader, the other being .png.


K

key/answers

The answers to any questions presented in a book’s text, such as a textbook. Usually presented either after the main body of the book, or at the end of each chapter.


L

layout

How the elements of a book are arranged in the spine and on the page or screen.

Library of Congress CIP data

The data by which the Library of Congress will catalog the book, usually included on the copyright page of a paper book.

line

A thematically connected subset of a publisher’s books, with an identity independent of the publisher (as Avon’s science fiction line, Avonova).

link

A word, series of words, or image that have a slightly different appearance from surrounding content (such as being bordered or underlined in blue). When clicked on, a link takes the reader to a different page or portion of a page (for spine material), or brings up a sidebar, footnote, or pagelet (for out of spine material ).

.lit

Microsoft Reader eBook file format.


M

manifest

In the package file, a list of the files (documents, images, style sheets, etc.) that make up the publication. The manifest also includes fallback sequence declarations for files of types not supported by the Reader.

map

Geographical illustration.

material

A file or physical object (such as paper pages) that contains an element or elements of a book.

metadata

In the package file, <metadata> tags identify information about an eBook’s publication: cataloging information, publisher, author, title, etc.


N

non-core book elements

The material that is part of the book proper, but is not part of the linear core reading experience. These parts are often front or back matter, or inserted material such as footnotes, sidebars, and many illustrations. In a package file, these materials will show up in the guide and tours.

notes

General term for comments, either before or after the main body of the book.


O

OCR (Optical Character Recognition)

The process that allows software to recognize letters by their shapes, and thus convert images of text to actual text.

Open eBook (OEB)

The Open eBook Publication Structure 1.0 (Available at Open eBook Publication Structure 1.0, at http://www.openebook.com/specification.htm, gives content providers minimal and common guidelines for presenting electronic content.

.opf (Open eBook Packaging File)

Also known as package file. The OEB-type file used to describe and organize the .htm and image source files that comprise an Open eBook publication.

other books by the author

List of other titles written by the creator.

out of spine content

That part of an eBook’s content that is not included in the spine portion of the .opf file.


P

package file

.opf file; the OEB-type file used to describe and organize the .htm and image source files that comprise an Open eBook publication.

packager

A person or corporate entity that pulls together source material for books or lines of books into an integrated whole. Often responsible for many elements of the publishing process, including acquisition, editing, and art direction.

page number

Sequential identifier of a page.

pagelet

A small page that pops up over a portion of a book page when certain links are clicked (links to out of spine material), or when the reader uses the Lookup function to define a word in text.

paper book

A book printed or written on paper or another physical medium.

part number

A part’s place in the order of parts. A part usually contains a number of chapters; a book with parts usually contains 3-10 parts.

part title

The name for the part. Also, the page with the part identifier on it, and nothing else, that comes between two parts (similar usage to half title).

.png

One of the two preferred image file formats for the Reader, the other being .jpg.

preface

Comments written to preface the document, usually before introductions or forewords.

price(s)

Cost to buy the book. Most U.S. publishers include a U.S. and a Canadian price.

printing

For paper books only: which printing this is, or which time it went on the presses.

production editor

The person or persons responsible for overseeing a book through the production process.

production process

The sequence of actions required to move from the end of the authoring process (the book is ready to be published) to the finished product being ready for distribution. In paper books the production process ends with printing and binding; in electronic books, it ends with generation of the eBook file and quality assurance.

production service bureau

The individual or organization that converts the materials provided by the content provider for an eBook or paper book. The content production supplier may add value in the form of images, non-core book elements or ancillary elements, either generated internally or externally, perhaps from sales and marketing or other groups.

publisher

The person or corporate entity responsible for the publication and/or distribution of a book.

publisher address

Mailing address and URL for a publisher.

publisher catalog number

If the ISBN is not used, the unique number assigned by the publisher to a title. Often this is the unique portion of the ISBN.

publisher logo

Graphic representing a publisher or a line. This is sometimes called a colophon.

publisher name

Name of the publisher.


Q

quote, review

Comment or review from critic, other author or other. In a paper book this is usually a short extraction.


R

Reader

Electronic book software application from Microsoft.

reader

The person reading a book.

running foot

Text running on every page (or most pages) below the main block of text. In a paper book, it can be different on left- and right-facing pages; it is often the page number.

running head

Text running on every page (or most pages) above the main block of text. In a paper book, it can be different on the left- and right-facing pages. It usually—but not always—is the title and author of the book, but can be the chapter title or part title, or (for a lexicon) the starting and ending words on a page.


S

sales line

The short, 10-word-maximum phrase which shows up on the cover of a paper book, designed to sell the book: “By the author of Dognoses of Mars;” “A Regency romance by—” “the towering bestseller.”

sales matter

The material generated to promote or sell this book; other books in this genre or by this author; or other books from this publisher. This can, by extension, include author bios or pictures. This material might show up in the manifest of a package file, in tours or guides, or in separate sales information files.

series title

Title for the group of books in which a specific book is a member. This is the case for fiction (The Hipdeep Trilogy) or nonfiction (The Time-Life Science Library).

sidebar

Text related in some way to the main text of a book, but presented as a separate body of information, often in a box.

signature

The section of a paper book that is cut from a single sheet paper after printing, usually 16 or 32 pages.

spine

In the package file for an eBook, the arrangement of files that produces a linear reading order; also:the core book elements that comprise the core reading experience.

STM (Scientific/Technical/Medical)

A term that identifies books with tables, graphs, special notations, and notational fonts.

style type, basic (A-E)

A means of defining a book by the basic layout and style requirements and restrictions that apply to it. Basic types are a hierarchy of complexity, with Type A (the simplest style: simple layout, text only), B (A + pictures), C (B + complex layout), D (C + technical data), and E (D + extreme design). A book of a specific basic type will have no elements not in that type’s description—except as added by coexistent style types.

style type, coexistent

A means of defining a specific subcategory of layout requirements that can coexist with a basic style type. For instance, a published play has specific text layout requirements that are independent of its basic type requirements regarding general layout, text, and images.

style type, special

A subcategory of layout requirements; specifically, nonlinear books and print-dependent books.

subtitle

Subordinate title further elaborating or clarifying the title of a book.


T

table of contents (TOC)

List of book elements and where they appear, before the main body of the book.

Table of Illustrations (TOI)

List of illustrations, maps and/or tables. A Table of Contents for images.

table(s), graph(s)

Graphic presentation of data.

teaching guide

Information for teachers describing how to teach the materials found in a book, presented before or after the main body of the book, or as sidebars or notes after each chapter.

teaser/front sales

The short, 100-word-maximum excerpt from the book which appears on the first page of a paperback book. The front sales page can be used for quotes or other elements, but is usually a teaser.

text

The words in a book.

text file

A file containing text.

thumbnail image

Image for the Reader’s Library, associated with an eBook. Thumbnails are usually the cover image displayed at a reduced size.

title

What the book is called.

title page

The page that contains the title of the book and the author or creator’s name(s). Generally referred to as "cover pages" in eBooks.

tours

In the package file for an eBook, a set of alternate reading sequences through the publication, such as selective views for various reading purposes, reader expertise levels, etc.


V

version

Can mean either edition or printing.