BookBuilder Tech Tips: More Common Tagging Errors

Posted on: December 17th, 2006 by Craig Rairdin

The HTML parsing engine we use in BookBuilder is more sensitive to HTML syntax errors than your typical Web browser. We continue our article from a couple months ago regarding some common tagging habits that may cause errors when you try to build your book.

Multi-line Tags

BookBuilder can handle tags that span multiple lines but some of the other tools cannot. It’s best to keep your tags all on one line. For example this is bad:

<table border=0

Instead, do this:

<table border=0 cellpadding=10 cellspacing=3>

Spaces Between Attributes

The following tag may not be handled correctly in all of our tools because of the missing spaces between the attribute values and the name of the next attribute:

<table border="0"cellpadding="10"cellspacing="3">

It’s best to add the spaces:

<table border="0" cellpadding="10" cellspacing="3">

Color Values

Literal color values of the form RRGGBB (eg. 00FF00 for "green") must be preceded by a pound sign. Some browsers will accept color values without the pound sign; BookBuilder will not. So this is incorrect:

<font color=FF0000>

Instead do this:

<font color=#FF0000>

Improper placement of <pb_sync> tags

In a commentary, <pb_sync type=verse value="John 3:16"> identifies the point in the commentary where information about John 3:16 can be found. When the user is looking at John 3:16 in the Bible and synchronization is turned on, the reader program will scroll your commentary to the table of contents entry that contains this tag. The following is the correct use of this tag:

<h1 pb_toc=index>John</h1>
<h2 pb_toc=index>John 3</h2>
<h3 pb_toc=index>John 3:15</h3>
<pb_sync type=verse value="John 3:15">
<p><b>15</b> Comments on John 3:15...</p>
<h3 pb_toc=index>John 3:16</h3>
<pb_sync type=verse value="John 3:16">
<p><b>16</b> Comments on John 3:16...</p>
<h3 pb_toc=index>John 3:17</h3>
<pb_sync type=verse value="John 3:17">
<p><b>17</b> Comments on John 3:17...</p>

We have seen the following incorrect syntax:

<h1 pb_toc=index>John</h1>

<h2 pb_toc=index>John 3</h2>

<pb_sync type=verse value=”John 3:15″>
<h3 pb_toc=visible>John 3:15</h3>
<p><b>15</b> Comments on John 3:15…</p>

<pb_sync type=verse value=”John 3:16″>
<h3 pb_toc=visible>John 3:16</h3>
<p><b>16</b> Comments on John 3:16…</p>

<pb_sync type=verse value=”John 3:17″>
<h3 pb_toc=visible>John 3:17</h3>
<p><b>17</b> Comments on John 3:17…</p>

In this case, the author of the reference material is thinking that the program will scroll the commentary to the point identified by the <pb_sync> tag, so they put it before the heading for each section. While this makes some sense, it’s not the way the program works. The <pb_sync> tags need to be inside the section to which you want the user to go when synchronizing on the verse. In the case above where the heading tag includes pb_toc=visible and is therefore visible to the user, that will be the first line of text the user sees when synchronizing on the verse.

Using Word or other WYSIWYG HTML editors to create your books

Since BookBuilder doesn’t accept the full range of HTML tags and attributes, it’s counterproductive to use Word or an HTML editor to create your documents. These programs insert a lot of extra HTML tags in order to attempt to make your HTML document look exactly like what you see on the screen. This may include things like fractional point sizes for fonts, detailed line and character spacing, and unsupported features such as small caps. Some of these will cause syntax errors in BookBuilder; others will make it through but will not have any effect.

It’s best to just use a standard text editor such as TextPad, which we distribute with BookBuilder, to create your documents.

Comments are closed.

©2017 Laridian