![]() |
#1 |
Blueberry!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
|
Tags for Bold, Italic, Center, Etc. in LRF?
I'm a total newb here, but I'm looking for some info on tags.
I see that the LRF format uses UTF-16 (LE) for the book text. I have successfully edited makelrf3 to use "curly quotes" and reflow paragraphs. Now I am wondering how you indicate a certain section of text should be bold, italic, super/sub-script, center, or whatnot. My feeling is that there must be some start/stop tag embedded in the text, maybe a pair of 16 bit numeric values that indicate the beginning and end of (say) bold text. I would also like to know how a Table of Contents is generated in an LRF, but maybe leave that for later. I'd appreciate any help! -Pie |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
makelrf is not really suited for using advanced LRF features. You could try inserting LRF tags manulaly ([url=http://www.sven.de/librie/Librie/LrfTag]here is an incomplete reference) but there are more convenient ways:
1) Make an LRS file (manually or in BookCreator) and compile to LRF using LRS2LRF 2) Use Book Designer 3) Use pylrs (if you know Python) Last edited by igorsk; 04-04-2007 at 06:42 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Hi Pie,
I would second Igorsk's recommendation of using Book Designer. I've used it to create dozens of books (eg see the "Book Uploads" forum section) and it's both powerful and reasonably straightforward to use. |
![]() |
![]() |
![]() |
#4 |
Blueberry!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
|
Thanks for the tags reference igorsk. I'll give them a shot... if those work, I'll be back with questions on TOC creation.
In terms of LRS files, is there a format reference? Looks like an XML based system, but again I need to know tags. And since I missed the boat on the freebie BookCreator from Canon, I'm stuck doing things by hand if I go that route. Looks like pylrs requires an input LRS already formatted. I don't know Python, but I know about 8 different languages and can read it pretty easily (again pylrs). But before I go that route, I would still prefer to pursue my modifications to makelrf3 since I already have C down. -Pie |
![]() |
![]() |
![]() |
#5 |
Blueberry!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
|
Forgot to mention...
I'm hoping to start an eBook project that will require a LOT of programatic intervention -- way too hard to tagging by hand. Hence my desire to get a good, solid progamatic solution, some of which I already have done in C. Other eBooks of this particular project lack a TOC, and it's absolutely imperative to be even close to useful IMHO (the book is huge). -Pie |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Pie,
Book Designer's works with HTML files (or perhaps they are XML - the point is they are text files with tags). It would be very easy to programmatically create (or edit) a file which BD could then process into an LRF file for you. Perhaps worth taking a look at, at least? |
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
1) you can't create TOC with makelrf (it's a separate object from the text).
2) pylrf doesn't need a source LRS. It can generate one though. 3) if you use Book Designer to create an LRF book, you can find the source LRS in its "temp" subfolder. 4) you can decompile most LRF books with lrf2lrs.py. As for LRS reference, here it is: https://www.mobileread.com/forums/showthread.php?t=8795 |
![]() |
![]() |
![]() |
#8 | |
Blueberry!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
|
Quote:
I have BookDesigner, and I find it really problematic. It strikes me as very difficult to "tweak" it correctly, and one point of contention is that it does not generate curly-quotes (I've heard others complain of this). Even when passed the correct html tags for curly-open/close, it uses the non-curly version. I think I'll be learning some Python if I want to continue down the path I'm on at this point. The TOC issue is imperative. I notice that the Tags reference doesn't have BOLD text! At least I couldn't get it to work... though I was successful with italalics and sub/super scripting. -Pie |
|
![]() |
![]() |
![]() |
#9 | |
Blueberry!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
|
Quote:
-Pie |
|
![]() |
![]() |
![]() |
#10 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,300
Karma: 1479
Join Date: Jul 2006
Location: Peoples Republic of Washington
Device: Reader / iPhone / Librie / Kindle
|
Pie, I've got a ~12,000 page ebook project waiting on me to finish the Java LRS to LRF compiler. I just crunched the HTML into LRS. How big is your book?
The BBeB(OZ-US-TOC).lrs from prslabs shows how to build a TOC. You could convert the LRS into LRF by hand in C for makelrf. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Italic fonts dropping in epubs. | Lester. | ePub | 9 | 08-31-2010 02:59 PM |
Italic-Schnitt verschwindet mit Sigil | Alaska | Erste Hilfe | 4 | 05-01-2010 04:40 AM |
LRF with aligned HTML tags | Dahak | LRF | 4 | 08-12-2009 01:22 PM |
Bold font in LRF - or just Calibre | FizzyWater | Calibre | 6 | 03-24-2009 03:20 PM |
PRS-500 Span tags in LRS and LRF files -- do I understand them? | Falstaff | Sony Reader Dev Corner | 2 | 01-31-2007 10:34 AM |