Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader > Sony Reader Dev Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2007, 11:56 PM   #1
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
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
EatingPie is offline   Reply With Quote
Old 04-04-2007, 04:13 AM   #2
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
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.
igorsk is offline   Reply With Quote
Advert
Old 04-04-2007, 05:33 AM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
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.
HarryT is offline   Reply With Quote
Old 04-04-2007, 11:37 AM   #4
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
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
EatingPie is offline   Reply With Quote
Old 04-04-2007, 11:41 AM   #5
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
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
EatingPie is offline   Reply With Quote
Advert
Old 04-04-2007, 11:55 AM   #6
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
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?
HarryT is offline   Reply With Quote
Old 04-04-2007, 12:58 PM   #7
igorsk
Wizard
igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.igorsk ought to be getting tired of karma fortunes by now.
 
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
igorsk is offline   Reply With Quote
Old 04-04-2007, 04:59 PM   #8
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by HarryT
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?
Ah, I was confusing this with BookCreator!

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
EatingPie is offline   Reply With Quote
Old 04-06-2007, 04:30 PM   #9
EatingPie
Blueberry!
EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.EatingPie puts his or her pants on both legs at a time.
 
EatingPie's Avatar
 
Posts: 888
Karma: 133343
Join Date: Mar 2007
Device: Sony PRS-500 (RIP); PRS-600 (Good Riddance); PRS-505; PRS-650; PRS-350
Quote:
Originally Posted by igorsk
1) you can't create TOC with makelrf (it's a separate object from the text).
Is there a C code example for generating TOCs? I could then add the capability to makelrf.

-Pie
EatingPie is offline   Reply With Quote
Old 04-07-2007, 01:06 AM   #10
scotty1024
Banned
scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.scotty1024 is no ebook tyro.
 
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.
scotty1024 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 03:15 PM.


MobileRead.com is a privately owned, operated and funded community.