Home  Beta programs 
  Welcome to Mobipocket Developer Center
powered by FreeFind

Creating Content

Getting Started
What is the Mobipocket file formatHow do I create a Mobipocket eBookStandard eBooksAdvanced eBooks
eBook features
Cross-platform feature supportImage supportTable supportCover PageParagraph rendering and hyphenationHyperlinksGuide itemsFramesIndexes and DictionariesSectionsAuthoring tips
Extended eBook features
DatabasesSQL queriesJavascriptHTML forms
Reference
Open-eBook HTML tagsSupported HTML entitiesHTML form tagsMobipocket custom tagsOPF x-metadata tagsMobipocket URLsMobipocket Document Object Model (DOM)Mobipocket Active Server Pages (ASP)Mobipocket Active Data Objects (ADO)Mobipocket Javascript Objects
Medical
Drug interaction module
Advanced topics
Setting margins
Home | Hide TOC | Download Sample | Add to Favorites updated: 2008-04-24


Contents
Advanced content
  a) A simple dictionary
  b) An advanced dictionary
  c) Scientific content / collection of articles


Advanced content

How to create advanced content

The digital assets for advanced content like scientific reference books or dictionaries usually are maintained in a structured format like a database or XML files. In order to create a Mobipocket dictionary, you will need some sort of program or script to transform the structured source data into formatted HTML with special indexing tags. Mobipocket does not impose any form of source data. However, we do not provide any standard transformation system either. You should develop the transformation tool that is the most adapted for your content.

The Mobipocket Creator and KindleGen do however natively support XML+XSL to transform structured XML content into XHTML. We do not impose nor provide a DTD for the source XML nor an XSL to produce the right kind of XHTML.

If you have exported your source data to XML and have built the right XSL stylesheet to transform this data, here is how you can use them in the Creator:

  • Start the Mobipocket Creator Publisher Edition
  • Open your publication or create a new one
  • In the "publication files" view, click on the "Add File (Item)" link in the left column
  • Select you XML file in the "Open" dialog box and click on "Open"
  • Select the newly added file in the publication files list and click on "Properties"
  • Click on "Browse..." next to the "XSL stylesheet" field and select your XSL file
  • Click on "Update" at the bottom of the page
  • Save your publication
  • The XML+XSL transformation will happen when you build the eBook

a) A simple dictionary

Introduction

Dictionaries are special types of Mobipocket eBooks.

  • They contain a primary "index". An index is a list of words or sentences that are sorted in alphabetical order. Users are able to quickly search in this list by typing the begining of the word or sentence and selecting the entry they want in the list.
  • They are marked as being a dictionary. This way the Mobipocket Reader knows that this book should be taken into account for the "lookup" feature in the Mobipocket Reader. For this, the input and ouput languages of the dictionary should be properly defined. For instance, an English (monolingual) dictionary will have "English" both as input and output language. A French-English dictionary will have "French" as input language and "English" as output language.

Note: If you want to build a bidirectional bilingual dictionary (French-English and English-French for example), you absolutely have to create two separate eBooks. One for the French-English part and one for the English-French part. The lookup mechanism requires dictionaries to be setup this way. It is However possible to sell these two books bundled together.

Setting up a publication to make a dictionary

  • Start the Mobipocket Creator Publisher Edition
  • Open your publication or create a new one
  • Click on the "Book settings" link in the left column
  • Check the "This eBook is a dictionary" checkbox
  • Select the correct input language
  • Select the correct output language
  • Click on "Update" at the bottom of the page
  • Save your publication

Special index tags to use in the content

In order to make an alphabetical index, you have to use special tags that do not exist in HTML to tell the Mobipocket Creator or KindleGen to index certain words.

The <idx:entry> tag is used to mark the scope of an entry in the index. In a dictionary, all definitions should be between <idx:entry> and </idx:entry>. You can put any type of HTML within this tag.

The <idx:orth>...</idx:orth> tag is used to delimit the label that will appear in the index list. This is the text that users can enter in the search box to find an entry. For a dictionary, this is typically the headword.

Here is an example of an extremely simple entry that could be part of an English dictionary. In this example, the word "chair" will appear in the index list and can be searched by users.

<idx:entry>
  <idx:orth>chair</idx:orth>
  a seat for one person, which has a back, usually four legs and sometimes two arms
<idx:entry>

Simple dictionary sample

This example only uses the <idx:entry> and the <idx:orth> tags that were described above with some formatting:

<idx:entry>
  <h1 bgcolor="#FFEBD6">&nbsp;<idx:orth>chair</idx:orth></h1>
  <p><font color="#AA0000">noun</font> a seat for one person, which has a back, usually four legs and sometimes two arms</p>
  <p><b>Etymology:</b> from Latin "cathedra"</p>
  <p>&nbsp;</p>
  <div align="center" bgcolor="#FFEBD6"><a onclick="index_search();">Lookup</a> | <a onclick="history.back();">Back</a></div>
<idx:entry>

In the final Mobipocket eBook, this appears as:

 chair

noun a seat for one person, which has a back, usually four legs and sometimes two arms

Etymology: from Latin "cathedra"

Lookup | Back



Download Sample


b) A complete dictionary

Description coming soon...(april. 2008), check the sample now :


Download Sample


c) Scientific content / collection of articles

Introduction

Mobipocket indexes are especially adapted to Scientific content:

  • The primary "index" contains both the articles names and the associated keywords. Users will be able to access to the list of articles, or to the list of keywords, each keyword redirecting to an index containing the list of associated articles.
  • These list are always sorted in alphabetical order. Users are able to quickly search in these lists by typing the begining of the word or sentence and selecting the entry they want in the list.

Special index tags to use in the content

In order to make an alphabetical index, you have to use special tags that do not exist in HTML to tell the Mobipocket Creator or KindleGen to index certain words.

The <idx:entry> tag is used to mark the scope of an entry in the index. In a collection of articles, all articles should be between <idx:entry> and </idx:entry>. You can put any type of HTML within this tag.

The <idx:orth>...</idx:orth> tag is used to delimit the label that will appear in the index list. This is the text that users can enter in the search box to find an entry. For a dictionary, this is typically the headword.

The <idx:key>...</idx:key> tag is used to delimit one keyword redirecting to this entry. The user will be able to enter this keyword in the keyword index and find the list of articles corresponding to this keyword.

Here is an example of an extremely simple entry that could be part of a collection of articles. In this example, the article "Algebraic number" will appear in the index list and can be searched by users and keywords "algebraic", "number", "root", "polynomial", ... will appear in the keyword index list.

<idx:entry>
  <idx:orth>Algebraic number</idx:orth>
  An <idx:key name="keyword">algebraic</idx:key> <idx:key name="keyword">number</idx:key> is the
  <idx:key name="keyword">root</idx:key> of a non-zero <idx:key name="keyword">polynomial</idx:key> with
  <idx:key name="keyword">integer</idx:key> (or equivalently <idx:key name="keyword">rational</idx:key>) coefficients.
  Numbers that are not algebraic are called <idx:key name="keyword">transcendental</idx:key> numbers.
<idx:entry>

Simple article sample

This example only uses the <idx:entry>, the <idx:orth>and the <idx:key> tags that were described above with some formatting:

<idx:entry>
  <h2 bgcolor="#FFEBD6" id="Algebraic_number"> <idx:orth><idx:key name="keyword">Algebraic number</idx:key></idx:orth></h2>
  <p>An <idx:key name="keyword">algebraic</idx:key> <idx:key name="keyword">number</idx:key> is the
  <idx:key name="keyword">root</idx:key> of a non-zero <idx:key name="keyword">polynomial</idx:key> with
  <idx:key name="keyword">integer</idx:key> (or equivalently <idx:key name="keyword">rational</idx:key>) coefficients.
  Numbers that are not algebraic are called <idx:key name="keyword">transcendental</idx:key> numbers.
  </p>
  <p> 
  </p>
  <div align="center" bgcolor="#FFEBD6">
    <a onclick="index_search()">Articles</a> |
    <a onclick="filtered_index_search('','keyword');">Keywords</a> |
    <a onclick="history.back()">Back</a>
  </div>
</idx:entry>
<mbp:pagebreak />


Try and play with the following sample of articles collection in the Mobipocket reader :

Download Sample


Copyright 2000-2007 Mobipocket.com