09-04-2019, 09:27 PM | #1 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
Compact format with headers--can it be done?
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 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? |
09-04-2019, 09:40 PM | #2 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Convert to azw3 not mobi for your paperwhite.
|
Advert | |
|
09-05-2019, 11:07 AM | #3 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
That is what I am doing. The displays are from AZW3 files. Is there a way that I could generate a usable TOC in the original HTML file? I think I could figure out the table itself, but not how to get it converted to something that the Kindle would recognize.
|
09-05-2019, 11:24 AM | #4 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Calibre has 2 places that there is a TOC tool available. (Icon is a list with a hand pointing) 1)inside the Editor. 2) as a toolbar Icon (may need to be added) This tool offers a number of ways to create or edit the (NCX) TOC of a book The Editor also has a tool to create an INLINE TOC from the NCX one. It is on the Tools TOC menu You can move that from where it was created (beginning), if you desire |
|
09-05-2019, 01:10 PM | #5 |
creator of calibre
Posts: 43,857
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
azw3 has full support for css 2 so you can control margins and padding to your hearts content.
|
Advert | |
|
09-05-2019, 01:36 PM | #6 |
Resident Curmudgeon
Posts: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Once you've converted to KF8 for your Kindle, you can use the Calibre Editor to edit it to fix any formatting you feel needs fixing.
|
09-05-2019, 03:55 PM | #7 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
Do I understand that any style attributes that I specify for Hn will override the ones which Calibre sets in the CSS file that it adds? If so, I will try that. Otherwise I will be back with more questions (and probably misunderstandings).
I "theducks" (which family? Whistling, dabbling, scaups?) means about "the original HTML". I thought I made it clear that what I am feeding into the conversion program is an .HTML file which has been generated by a small LISP program. While I have written a bit of HTML and JAVASCRIPT in the distant past, most of my programing has been either LISP or machine assembler code, so I find it simpler to throw together a LISP program to generate the HTML. That's why I'm trying to avoid having to hand tinker with the e-book code. |
09-05-2019, 05:07 PM | #8 |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You can specify additional CSS in the Conversion settings.
That is added to the end, so the last one defining applies (just takes an efficiency hit) It may look bloated, ugly and a pain to debug... but it works |
09-05-2019, 05:37 PM | #9 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
I'm going to experiment (probably won't be back until next week, be out of town). I did notice that the bit I added at the start:
Code:
<STYLE> H3 {margin: 0.0in} H4 {margin: 0.2in} </STYLE> Thanks for the info, I may have understood it! I know, RTFM! |
09-05-2019, 06:20 PM | #10 | |
Well trained by Cats
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
h3 h4 |
|
09-05-2019, 08:33 PM | #11 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Jul 2012
Device: none
|
Well, it was at least seven year before I had a key-punch that had lower case. Just stuck in the past. But they do work in UC!
|
Tags |
headings, toc, vertical spacing |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A literal compact ereader | BenG | General Discussions | 4 | 04-03-2018 04:21 AM |
Bought the Xperia compact | jocampo | Android Devices | 1 | 02-16-2015 03:52 AM |
Format Compact flash | Fermthe | iRex | 4 | 09-03-2009 01:50 PM |
Iliad V2 Compact flash | Fermthe | iRex | 2 | 09-28-2008 06:39 AM |
Wikipedia Compact and others | MatYadabyte | Reading Recommendations | 0 | 07-28-2006 09:06 AM |