Note. This is not about chapters, though it is about TOC. This is basically a formatted list. I am trying to generate a catalog of .mp3 albums from my digital music library. I am using a fairly simple LISP program to generate HTML based on the directory structure of the library Following is the head and a fragment of the body.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<META NAME="author" CONTENT="Cyril N. Alberga">
<META NAME="generator" CONTENT="GNU Common Lisp">
<META NAME="copy-right" CONTENT="© 2019 Cyril N. Alberga">
<TITLE>Catalogue of .mp3 Albums</TITLE>
<STYLE>
H3 {margin: 0.0in}
H4 {margin: 0.2in}
</STYLE>
</HEAD>
<H3>Anglo-American</H3>
<H4>2nd South Carolina String Band</H4>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
Camp Songs of the American Civil War - 2nd South Carolina String Band
</p>
<p style="margin-left:0.9in;text-indent:-0.3in;margin-top:-1em">
1 Southern Soldier
</p>
<p style="margin-left:0.9in;text-indent:-0.3in;margin-top:-1em">
2 Hard Road
</p>
<p style="margin-left:0.9in;text-indent:-0.3in;margin-top:-1em">
3 In High Cotton
</p>
<H4>Adrienne Young</H4>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
Plow to the End of the Row - Adrienne Young
</p>
<H4>Alan Lomax</H4>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
Texas Folk Songs - Alan Lomax
</p>
<H4>America's Children</H4>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
America's Children - America's Children
</p>
<H4>Anita Carter</H4>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
Ring Of Fire - Anita Carter
</p>
<H4>Ann Mayo Muir</H4>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
The Music of Ann Mayo Muir - Ann Mayo Muir
</p>
<p style="margin-left:0.7in;text-indent:-0.3in;margin-top:-1em">
The Music of Ann Mayo Muir - Ann Mayo Muir {R}
</p>
The H3 and H4 tags are to generate a TOC. H2 tags resulted in text which overlapped the following text unless a <br> was inserted, so I eliminated them. (There is a higher level structure for which I use H1 tags.)
The result has two levels of problem. When I view this using the Calibre reader it is passable though I would prefer less white space between the H4 groups, see first image. But when displayed on a Kindle Paperwhite the spacing is ridiculous. Is there an alternative way produce the document I want?