![]() |
#1 |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Typesetting Shakespeare
Any thoughts on how to go about doing up the coding to typeset a Shakespeare play nicely?
I can think of a variety of ways of offsetting the character's name who is speaking from the lines that they're speaking, i.e. Hamlet: To be, or not to be... ...(where "Hamlet" is the speaker's name, and "To be..." is his line, of course), but I'd be open to suggestions for any ways to do that nicely in an ebook format, if anyone has worked on plays before (Shakespeare or otherwise). I think the biggest issue that concerns me, though, is places where one "line" of text is split between two or more speakers -- if you know what I mean. Like, see the attached image here, and the lines near the bottom of Curio which then go to Orsino, then back to Curio. Is there any way to tackle things like that? I'm sure you can see the problem here -- I can't think of any practical way to do that. I could plop in a bunch of non-breaking spaces (perhaps alternating with regular spaces, so the line will at least break if it has to) until it "looks good" in Sigil, but I guess there's no guarantee that that will translate to various e-reader devices. If anyone has any other thoughts on any aspects of e-typesetting Shakespeare (or plays in general), feel free to fire away! ![]() |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
There are any number of ways to set the display for character name before their line. That pretty much just depends on how you want to do it. CSS can be very powerful. The problem is - as you mentioned - making sure all the devices will display it properly. Personally, I would go with the most basic coding that would still appear properly.
Code:
<p class="char">Name</p> <p class="line">What they say</p> css: .char {text-transform:uppercase; font-family:serif; margin-left: .5em} .line {font-family:sans-serif; margin-left: 2em} I personally don't see any added benefit to having those spaces...just align them to the left like the other lines. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I have seen a couple of screenplays that used the <dt> and <dd> tags. With styling you can make it exactly what you want, depending on the reader of course.
|
![]() |
![]() |
![]() |
#4 | |||
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
![]() Quote:
I know what you mean, though, about lines wrapping and stuff -- but don't forget, Shakespeare's writings are all written in a way that they require being typset the same as poetry, i.e. not where each sentence just continues on "in a straight line" and then wrapping wherever the page ends over to the next line, but instead it's "line-by-line," like a poem. Even without adding in spaces to lines like those that I described, there will always be the potential for lines to wrap over to the next and for things to end up "looking funny." Also, from Toxaris... Quote:
Thanks, guys, for the replies! I do look forward to any more, if you or anyone else has anything something more to add. ![]() |
|||
![]() |
![]() |
![]() |
#5 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
![]() However, your question got me thinking, and I came up with the following result. It's certainly not perfect, but it might be acceptable. Code:
p {text-transform:uppercase; margin: .25em; font-family:serif} span {text-transform:none; display:block; margin-left:2em} span.right {float:right} <p>Orsino <span>If music be the food of love, play on.<br />Give me excess of it, that, surfeiting,<br />The appetit may sicken and so die.<br />That strain again! It had a dying fall.<br />O, it came o'er my ear like the sweet sound<br />That breathes upon a bank of violets,<br />Stealing and giving odor. Enough; no more.<br />'Tis not so sweet now as it was before.<br />O spirit of love, how quick and fresh art thou,<br />That, notwithstanding thy capacity<br />Receiveth as the sea, naught enters there,<br />Of what validity and pitch soe'er,<br />But falls into abatement and low price<br />Even in a minute. So full of shapes is fancy<br />That it alone is high fantastical.</span></p> <p>Curio <span>Will you go hunt, my lord?</span></p> <p>Orsino <span class="right">What, Curio? </span></p> <p>Curio <span class="right">The hart.</span></p> <p>Orsino <span>Why, so I do, the noblest that I have.</span></p> |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I suppose the other alternative is to do a fixed-format layout...but that is not an easy task - even the professional formatters avoid fixed format whenever possible.
|
![]() |
![]() |
![]() |
#7 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Gah!! I hate it when I get curious about something... I can't let it go!
![]() So, wrapping the above code in a div with a maximum width would fix the wide display issue (attachment 1). Setting the max-width to the perfect width of your verse would fix a few things...assuming the display is at least that wide. [edit] perhaps you could put a notice at the beginning of the book stating that the material is best viewed in landscape mode?? And if you add the min-width element, then that solves the narrow display issue (attachment 2)...assuming the app/reader creates scroll bars to see text off the edge of the screen...I don't think this is too common, but I thought I would throw that out there. Here's the code again with the div and the line numbers added: Code:
div.verse {width:100%; min-width:490px; max-width:535px; margin:0} p {text-transform:uppercase; margin: .25em; font-family:serif} span {text-transform:none; display:block; margin-left:2em} span.right {float:right} <div class="verse"> <p>Orsino <span>If music be the food of love, play on.<br />Give me excess of it, that, surfeiting,<br />The appetit may sicken and so die.<br />That strain again! It had a dying fall.<br />O, it came o'er my ear like the sweet sound<span class="right">5</span><br />That breathes upon a bank of violets,<br />Stealing and giving odor. Enough; no more.<br />'Tis not so sweet now as it was before.<br />O spirit of love, how quick and fresh art thou,<br />That, notwithstanding thy capacity<span class="right">10</span><br />Receiveth as the sea, naught enters there,<br />Of what validity and pitch soe'er,<br />But falls into abatement and low price<br />Even in a minute. So full of shapes is fancy<br />That it alone is high fantastical.<span class="right">15</span></span></p> <p>Curio <span>Will you go hunt, my lord?</span></p> <p>Orsino <span class="right">What, Curio? </span></p> <p>Curio <span class="right">The hart.</span></p> <p>Orsino <span>Why, so I do, the noblest that I have.</span></p> </div> Last edited by Turtle91; 06-15-2016 at 02:11 PM. |
![]() |
![]() |
![]() |
#8 | ||
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
![]() Anyway, thanks SO much for your time and effort on this, Turtle! I can't help but wonder, though, if it's "overkill" to do it your way. I'm thinking back to that comment you made in your first reply here... Quote:
Don't you think so? In that regard, isn't the non-breaking space method really just not only the easiest, but also most practical way of doing things? Although I haven't actually tried it yet, I would think that chances are that if I got the spacing looking okay in Sigil, then that would probably turn out okay on whatever the end device is, too. And if it wraps, well, it wraps -- but if it's wrapping, then I can only imagine that lines are wrapping all over the place where they're not supposed to be wrapping. |
||
![]() |
![]() |
![]() |
#9 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Well, I happen to be on 2nd-shift today - and my wife woke me up at 7am so I had half a day to spend!
![]() As far as being overkill...it's probably a lot easier to do it this way than adding a bunch of nbsp. You can create a clip in Sigil so a click of the mouse will insert the <span> around selected text (or insert empty spans if no text is selected). You could even create a fairly simple regex to automagically add the spans, drastically reducing the number of lines you would have to handle individually. the nbsps would only need to be added AFTER the text that needs to be spaced in the middle. Adding the <div> with a max-width would remove the necessity for people to mess with the font-size...and some of your older readers would probably be very thankful for not making them get out the magnifying glass to read that incredibly small font. ![]() And...as a last comment... using pixels to determine the maximum width is probably not the best way to go - for exactly the reason that people could change the font size. If the font-size is too large/small then pixels wouldn't do what you'd want. It's probably better to go with something like EM when determining max-width....or, even better, using media queries to adjust your layout depending on the type/size of the display. OK, now I have to go to work! Cheers, |
![]() |
![]() |
![]() |
#10 | ||
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
![]() Quote:
And then you brought in the issue of using pixels vs ems for the max-width specs, and then suggested doing "media queries," which I know nothing about... it all sounds like it's getting so "programmy" just to do up one line of text, and having it look maybe about as good as it would if I simply added in a bunch of nbsps the way I'd originally proposed anyway. As I said earlier, I would think that anyone reading Shakespeare would do so in a way so that the lines won't break awkwardly anyway -- whether by adjusting the font size, or going into landscape mode. I'm still thinking that that would be such an easier, simpler way to go, and not only just as effective, but perhaps even moreso. I suspect that adding in a bunch of nbsps coming in from the left side would bring the text up to the point that it's supposed to be far more accurately than trying to do so from the right side, and coming up with all sorts of convoluted ways to "guess" at where the right-hand margin will end up, and still not having the text end up landing where you'd like it to be (ideally). Rest assured that I do most heartily appreciate your efforts on this, though! Don't get me wrong on that! ![]() ![]() |
||
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,727
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
|
@Turtle91: BTW, if you limit the supported devices to iBooks, ePub3 apps and current Kindle models, you could automatically generate line numbers.
Last year, I created a very simple proof of concept that demonstrates this concept. |
![]() |
![]() |
![]() |
#12 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#13 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Thanks! |
|
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
There are ebooks in the MR library which show one way of doing it: Aristophanes and War, by (of course) Aristophanes; and The Trojan Women by Euripides.
|
![]() |
![]() |
![]() |
#15 | |
Chief Bohemian Misfit
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
Thanks! I managed to find the Aristophanes one, but couldn't find any books at all by Euripides, nor any books with that latter title (by any author). In any case, looking at the former title (Aristophanes), I'm not sure the format of that one would work as well for Shakespeare, since it's written more like prose, rather than how Shakespeare's stuff needs to be typeset more like poetry. Thanks for the suggestion(s), though! ![]() [edit] PS. I do see there's some Shakespeare ebooks there for download -- those were nice to peruse, and see the ideas those various creators came up with re formatting. ![]() Last edited by Psymon; 06-17-2016 at 02:44 PM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Historical Fiction Shakespeare, William: Shakespeare's Histories. v1, 15 Jan 2009 | HarryT | Kindle Books | 4 | 11-30-2015 05:30 AM |
Other Fiction Shakespeare, William: Shakespeare's Comedies. v1, 21 Jan 2009 | HarryT | Kindle Books | 7 | 02-20-2011 04:04 AM |
Poetry Shakespeare, William: Shakespeare's Poetry. v2, 22 Jan 2009 | HarryT | BBeB/LRF Books | 2 | 12-11-2010 07:40 AM |
Poetry Shakespeare, William: Shakespeare's Poetry. v2, 22 Jan 2009 | HarryT | Kindle Books | 2 | 08-10-2010 07:28 PM |
Other Fiction Shakespeare, William: Shakespeare's Comedies. v1, 21 Jan 2009 | HarryT | BBeB/LRF Books | 0 | 01-21-2009 11:36 AM |