2012-05-23 7:59, tlvp wrote:
> I'd like to find a systematic way of ensuring that there is one line of
> leading -- a visible vertical separation (of height roughly 1em) -- between
> the upper edge of the source-citation half-line and the lower edge of the
> quotation proper.
If I understand you correctly, you would like to have an empty line
between two blocks of text (quotation and source-citation), unless the
last line of the first block is so short that the second block (a
one-liner, at least normally) would fit on that line. That is, the empty
line would be suppressed when it is not needed for visual separation, as
the empty space at the end of the last line of the first block does that
job.
I'm not sure what typography books say about this. I had better not look
this up, since the question is too intriguing to be waived just on the
grounds that you should not want to do such things. :-)
I almost wrote "Can't be done", but see
http://www.cs.tut.fi/~jkorpela/test/quotations.html8
The idea:
Use a <blockquote> element so that the citation is inside it, in <p
class=src align=right>...</p>. This gives a tolerable default (i.e.,
non-CSS) rendering. If people criticize you on "semantic" grounds, for
putting the citation inside <blockquote>, which "should" contain just
the actual quoted text, and for using a "presentational" attribute like
align, then you can say: "OK, give me <credits>, make all browsers honor
it, and I'll use it; meanwhile, I keep using things that work."
Now, in CSS, make the citation an inline element, float it to right, and
forbid line breaks inside it. This will make a browser try to fit it as
a box into the last line of the quoted text, and put it on a new line if
it does not fit. This is not quite what we want, so we put a 1.2em top
padding on it, assuming that we use a line height of 1.2 so that 1.2em
is one line, counting the leading. The padding will then act as the
visual separator.
(I have also set the text justified on my test page. The reason is that
right-aligned text looks odd when relating to text that isn't justified
on both sides. This in turn makes hyphenation rather necessary.
Unfortunately, the CSS way for it is poorly supported - and for some odd
reason, though Firefox has support in general, it fails to have
hyphenation for Polish. But fortunately, the problem can reasonably well
be solved using a JavaScript hyphenator.)
--
Yucca,
http://www.cs.tut.fi/~jkorpela/