Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 11-26-2013, 04:27 AM   #1
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
SVG vertical captions and layout

Errrrr, yeah. I know I said I wouldn't be messing with rotation, but it is a woman's right to change her mind, isn't it?

I would like to run some captions along the *left* edge of the page, and by looking at one of SBT's books in the MR library, I got the caption placement and rotation kind of figured out. But I'm not so sure if my twiddles on the image placement is the correct way to do this (it was all by trial and error, you see).


Code:
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="-75 0 600 720" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">

<image height="720" width="500" xlink:href="../Images/001.jpg"/> 

 <g transform="translate(-50 360) rotate(90 0 0)">
<text style="font-style:italic;font-size:20pt" x="-80pt">"My Weird Caption"</text></g> 
 
 </svg>
</div>
So are the negative coordinates really the correct way to do this, or did I just stumble on something that happened to work out?
Attached Thumbnails
Click image for larger version

Name:	SVG_VerticalCaption.jpg
Views:	330
Size:	40.1 KB
ID:	115781  
GrannyGrump is offline   Reply With Quote
Old 11-26-2013, 07:03 AM   #2
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
It works in the Sony Reader Library, right or not. I suspect you can not scale it because you have to set a viewbox of a given size, but it is still a good step forward.
mrmikel is offline   Reply With Quote
Old 11-27-2013, 03:17 AM   #3
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
mrmikel, thanks for responding.

I've viewed this in the Sony software (Sony is very sluggish on every pc I try it on, takes 3 - 5 seconds just for a page turn!), with ADE, and Calibre, and the images seem to scale ok when the window is resized. I am going to push ahead on the assumption that this code will work.
GrannyGrump is offline   Reply With Quote
Old 11-28-2013, 08:28 PM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by GrannyGrump View Post
I would like to run some captions along the *left* edge of the page...
You have several ways to accomplish that with SVG; read this article:

http://commons.oreilly.com/wiki/inde...#Vertical_Text

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 11-29-2013, 03:05 AM   #5
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Rubén, thank you for that link. That is a very nice source of information. Excuse me, I have to go study now...
GrannyGrump is offline   Reply With Quote
Old 11-29-2013, 07:35 PM   #6
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Quote:
Originally Posted by RbnJrg View Post
You have several ways to accomplish that with SVG; read this article:

http://commons.oreilly.com/wiki/inde...#Vertical_Text

Regards
Rubén
Indeed, that link will get you to the whole book on SVG. The TOC is in the upper right of the page. Now I can see if I wrote good code or if the PRS-T1 has some bugs in its SVG rendering. Thanks again, Rubén.
pholy is offline   Reply With Quote
Old 11-30-2013, 05:52 AM   #7
SBT
Fanatic
SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.SBT ought to be getting tired of karma fortunes by now.
 
SBT's Avatar
 
Posts: 580
Karma: 810184
Join Date: Sep 2010
Location: Norway
Device: prs-t1, tablet, Nook Simple, assorted kindles, iPad
I do remember muttering some reprehensible phrases, struggling with PRS-505's wretched SVG implementation, which doesn't even support text centering.
Even though SVG support is much improved now, I've ended up just rotating landscape illustrations to portrait, but without reducing the resolution accordingly.
My reasons are a yearning for simplicity (or laziness, as some call it), but also that most readers support display in landscape mode, so if I really want to admire a landscape, I can flip it around. The turning point came when I read one of my books containing landscape-mode illustrations on a tablet in auto-rotate mode – whenever I flipped the tablet sideways to look at a painting, it was flipped to portrait mode...
SBT is offline   Reply With Quote
Old 11-30-2013, 06:15 AM   #8
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by pholy View Post
Indeed, that link will get you to the whole book on SVG. The TOC is in the upper right of the page. Now I can see if I wrote good code or if the PRS-T1 has some bugs in its SVG rendering. Thanks again, Rubén.
You are very welcome!
RbnJrg is offline   Reply With Quote
Old 11-30-2013, 08:03 AM   #9
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by SBT View Post
My reasons are a yearning for simplicity (or laziness, as some call it), but also that most readers support display in landscape mode, so if I really want to admire a landscape, I can flip it around. The turning point came when I read one of my books containing landscape-mode illustrations on a tablet in auto-rotate mode – whenever I flipped the tablet sideways to look at a painting, it was flipped to portrait mode...
Exactly. Now I always include the pictures in their natural orientation.
Jellby is offline   Reply With Quote
Old 12-01-2013, 09:37 PM   #10
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
"Natural" meaning in the way they were layed out in the print book, or natural as in the horizon is always horizontal?


edit to add PS: I still have not found any info to confirm if using negative coordinates to position the image in the SVG wrapper is legitimate code. Anybody?

Last edited by GrannyGrump; 12-01-2013 at 09:57 PM.
GrannyGrump is offline   Reply With Quote
Old 12-02-2013, 03:03 AM   #11
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by GrannyGrump View Post
"Natural" meaning in the way they were layed out in the print book, or natural as in the horizon is always horizontal?
The latter, the way they are intended to be viewed.

Quote:
edit to add PS: I still have not found any info to confirm if using negative coordinates to position the image in the SVG wrapper is legitimate code. Anybody?
I would be surprised if it wasn't.
Jellby is offline   Reply With Quote
Old 12-02-2013, 04:12 AM   #12
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
@Jellby, thanks for confirming. And big thanks for your patience, I'm slow on the uptake these days...
GrannyGrump is offline   Reply With Quote
Reply

Tags
captions, images, svg, vertical layout


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to specifiy vertical text layout (e.g. Japanese) totsubo Sigil 7 04-13-2013 02:01 AM
SVG & Layout fun - need some help ldolse ePub 10 02-02-2011 10:54 AM
DR1000 Chinese Vertical Layout uds plugin plaintext Release spuggy iRex 4 09-18-2010 02:00 PM
DR1000 DR1000 Chinese Vertical Layout TXT plugin install Problem spuggy iRex 0 08-28-2010 02:30 PM
Supporting vertical layout for certain languages? ericshliao EPUBReader 4 06-07-2010 11:32 AM


All times are GMT -4. The time now is 04:36 PM.


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