View Full Version : Landscaping


Sharlene
03-12-2012, 04:23 PM
How would I go about landscaping just one page in a book? Can it be done? What's the code? I have a chart that I need to put in a book, however, it is too squished in portrait orientation. If i can put it in landscape that would be best.

I've searched online, and all i've come up with is a bunch of gardening books :(

Thanks for your help :)

mmat1
03-12-2012, 07:52 PM
How would I go about landscaping just one page in a book? Can it be done? What's the code? I have a chart that I need to put in a book, however, it is too squished in portrait orientation. If i can put it in landscape that would be best.

I've searched online, and all i've come up with is a bunch of gardening books :(


AFAIK theres no way to "landscape" text. Not all devices support landscape!

I guess your chart is a picture of some kind, if not, make it to a picture (make a screenshot, get some processing software to cut the borders and flip it around by 90 degrees)...

This will probablly not look as nice as text, but it will work on any device, even it has no gyro sensor/landscape support.

Sharlene
03-12-2012, 10:21 PM
Thank you very much MMAT1...I was thinking of doing that, when i couldn't find any information on the subject.

I will create an image of it, and hope that it turns out well.

Thank you again.
Cheers.:thanks:

Jellby
03-13-2012, 09:02 AM
Two options:

1. Leave it as is. Many ebook readers can change the orientation between portrait and landscape on the fly, some with a buttor or menu, some just by rotating the reader physically.

2. If it's a picture, rotate the picture itself. The drawback is that if the ebook reader supports changing orientation by physical rotation, it must be disabled in order to view the picture properly, and that can be annoying. Also, what if someone is already reading a book in landscape (some people prefer this).

I would prefer the first, because it's more natural and makes fewer assumptions about the device that would be use and the preferences of the user.

Sharlene
03-13-2012, 12:56 PM
Thank you Jellby, but I can't leave it the way that it is. There are about 6 columns in this table, so viewing it as portrait creates a squished, unreadable table. It is also between text, so if i were to leave it, it would always look wrong no matter if you rotated the device or not.

SBT
03-13-2012, 02:52 PM
SVG would be a possibility. I've used it to create captions for landscape images and for making a genealogy tree. Then you'd have a nice, scalable, rotatable text.

mmat1
03-13-2012, 02:55 PM
SVG would be a possibility. I've used it to create captions for landscape images and for making a genealogy tree. Then you'd have a nice, scalable, rotatable text.

Can you give us a Code-Snippet / Sample ??

SBT
03-13-2012, 04:20 PM
A couple of samples from "Paa ski oer Grønland" by Fridtjof Nansen. First, an evolutionary tree of the ski:
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="33%" version="1.1" viewBox="0 0 600 300">
<g transform="translate(320 30)">
<g transform="translate(0 5)">
<polyline
points=" -150 180, -130 200, 0 200, 0 230, 0 200,130 200, 150 180"
style="stroke: black; stroke-width: 1; fill: none;"/>
</g>
<line style="stroke: black;" x1="150" x2="150" y1="125" y2="160"/>
<line style="stroke: black;" x1="-150" x2="-150" y1="125" y2="160"/>
<line style="stroke: black;" x1="-150" x2="-150" y1="65" y2="100"/>
<line style="stroke: black;" x1="-150" x2="-150" y1="5" y2="40"/>
<text id="TextElement" x="-260" y="0" font-style="italic" font-size="22">
ikke-skindklædte ski (30:1)
<tspan x="-210" y="60">
aandrer (18:1)
</tspan>
<tspan x="-220" y="120">
tungusski (9:1)
</tspan>
<tspan x="75" >
indianske snesko
</tspan>
<tspan x="-270" y="180">
aflange skindklædte plader
</tspan>
<tspan x="65">
vidjeplader, truger
</tspan>
<tspan x="-75" y="260">
runde træplader.
</tspan>
</text>
</g>
</svg>

, and here is an example of an image and caption rotated 90 degrees:
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 380 962" preserveAspectRatio="xMidYMid meet">
<image x="0" y="0" width="379" height="962" xlink:href="img/159.jpg" />
<g transform="translate(350 575) rotate(270 0 0)">
<text id="TextElement" x="0" y="0" font-style="italic" font-size="16">
<tspan x="-204px" y="8px">Vestmannaøerne og Eyafjallajökull ved solnedgang. (Af Th. Homlboe efter en skisse, taget af forf. mai 1882.)</tspan>
</text>
</g>
</svg>

SVG is a slightly tricky beast. Mainly because support is so patchy. In both the above examples, using SVG's support for centered text would make sense, but that feature is not supported by e.g. PRS-505. And of course it is tedious to code a table by hand, but with a soupcon of creativity and digital legerdemain it shouldn't be too time-consuming; a spreadsheet could do much of the work, I suppose.

Jellby
03-13-2012, 05:07 PM
With tables, the question is: can't you find a better way of showing the information than a table? Tables are good for fixed-size media, but for devices that range from a mobile phone to an overhead proyector, maybe there's some better way.

If you must keep the table, good or not, then I'd convert it to an image.

SBT
03-13-2012, 05:46 PM
If you are willing to be right at the bleeding edge, you could go for EPUB3; the new standard supports CSS3 transformations, does it not?

JSWolf
03-13-2012, 05:55 PM
If you are willing to be right at the bleeding edge, you could go for EPUB3; the new standard supports CSS3 transformations, does it not?

And just who will be able to actually read it?

SBT
03-13-2012, 06:47 PM
Well, I sorta imagined EPUB3 books were made to be read;)
You've got Readium already; surely Android/iOS EPUB3 apps can't be far off?
I suppose it's a tech/time trade-off; spend 6 months finding a decent solution in EPUB2, or make it in EPUB3 now and wait 6 months before most people can read it:D

mmat1
03-13-2012, 06:54 PM
, and here is an example of an image and caption rotated 90 degrees:


Thanks !

I've no experience with svg right now, but that it rotates the text as well is quite interesting.

I'll to play a bit with the code, i guess....

Jellby
03-14-2012, 11:41 AM
With SVG you can also rotate it by any angle or mirror it, very useful for Tom Sawyer or Through the Looking-Glass ;)

Sharlene
03-16-2012, 12:33 PM
Thank you very much for the code snippets. I will also take some time to play around with it.

I was tired and stressed trying to figure it out, as well as running out of time, so, I just made all of the tables into images.

Thank you all for your help.