Skip to content

Commit b367e9b

Browse files
committed
[css2] Added note about quotes in multilingual documents.
--HG-- extra : convert_revision : svn%3A73dc7c4b-06e6-40f3-b4f7-9ed1dbc14bfc/trunk%401273
1 parent 4a857d8 commit b367e9b

1 file changed

Lines changed: 76 additions & 16 deletions

File tree

css2/generate.src

Lines changed: 76 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,14 @@ Centaurs: ... have hoofs
352352
</pre>
353353
</div>
354354

355-
<h2><a name="quotes">Quotation marks</a></h2>
355+
<h2><a name="quotes">Quotation marks: the 'quotes' property</a></h2>
356356

357357
<!-- #include src=properties/quotes.srb -->
358358

359359
<P>So that user agents may handle nested quotation marks in a
360360
language-dependent way, CSS provides the <span
361-
class="propinst-quotes">'quotes'</span> property. Values have
361+
class="propinst-quotes">'quotes'</span> property. It defines the
362+
quotation marks to use in generated text. Values have
362363
the following meanings:</p>
363364

364365
<dl>
@@ -379,32 +380,49 @@ agent must apply the appropriate pair of quotation marks according to
379380
the level of embedding.
380381
</dl>
381382

382-
<P>Applying the following style sheet:</p>
383+
<div class="example">
384+
<P>For example, applying the following style sheet:</p>
383385

384386
<PRE class="example">
385-
[LANG|="en"] { quoting: �"� �"� "�" "�" �"� �"� }
386-
[LANG|="fr"] { quoting: "� " " �" �"� �"� "�" "�" }
387-
[LANG|="no"] { quoting: "�" "�" "'" "'" "\"" "\"" }
388-
<!-- [LANG|="se"] { quoting: "�" "�" �"� �"� "�" "�" }-->
389-
</PRE>
387+
[LANG|="en"] { quoting: �"� �"� "�" "�" �"� �"� }
388+
[LANG|="fr"] { quoting: "� " " �" �"� �"� "�" "�" }
389+
[LANG|="no"] { quoting: "�" "�" "'" "'" "\"" "\"" }
390+
<!-- [LANG|="se"] { quoting: "�" "�" �"� �"� "�" "�" }--></PRE>
390391

391392
<P>to the following HTML fragment:</p>
392393

393394
<PRE class="html-example">
394-
&lt;BODY lang="en"&gt;
395-
&lt;P&gt;&lt;Q&gt;Quote me!&lt;/Q&gt;
396-
&lt;P LANG="no"&gt;&lt;Q&gt;Siter &lt;Q&gt;meg&lt;/Q&gt;!&lt;/Q&gt;
397-
&lt;/BODY&gt;
395+
&lt;HTML lang="en"&gt;
396+
&lt;BODY&gt;
397+
&lt;P&gt;&lt;Q&gt;Quote me!&lt;/Q&gt;
398+
&lt;/BODY&gt;
399+
&lt;/HTML&gt;
398400
</PRE>
399401

400-
<P>would allow a user agent to render:</p>
402+
would allow a user agent to render:</p>
401403

402-
<PRE>
403-
"Quote me!"
404+
<PRE class="asciiart">
405+
"Quote me!"
406+
</PRE>
407+
408+
<p>While this HTML fragment:
404409

405-
�Siter 'meg'!�
410+
<PRE class="html-example">
411+
&lt;HTML lang="no"&gt;
412+
&lt;BODY&gt;
413+
&lt;P&gt;&lt;Q&gt;Siter &lt;Q&gt;meg&lt;/Q&gt;!&lt;/Q&gt;
414+
&lt;/BODY&gt;
415+
&lt;/HTML&gt;
406416
</PRE>
407417

418+
would produce:
419+
420+
<PRE class="ascii-art">
421+
�Siter 'meg'!�
422+
</PRE>
423+
</div>
424+
425+
408426
<p>Authors may insert quotation marks in generated text with the <span
409427
class="index-def" title="open-quote"><a class="value-def"
410428
name="value-def-open-quote">'open-quote'</a></span> and <span
@@ -457,6 +475,48 @@ title="no-open-quote"><a class="value-def"
457475
name="value-def-no-open-quote">'no-open-quote'</a></span> keyword,
458476
which inserts nothing, but increments the quotation depth by one.
459477

478+
<div class="note">
479+
<p>Note. If a quotation is in a different language than the
480+
surrounding text, it is customary to quote the text with the quote
481+
marks of the surrounding language, not the language of the quotation
482+
itself. For example, French inside English:
483+
484+
<blockquote>
485+
The device of the order of the garter is &#8220;honi soit qui mal y
486+
pense&#8221;
487+
</blockquote>
488+
489+
<p>English inside French:
490+
491+
<blockquote>
492+
Il disait: �&nbsp;Il faut mettre l'action en &#8249;&nbsp;fast
493+
forward&nbsp;&#8250;.�
494+
</blockquote>
495+
496+
<p>For French-English documents, a style sheet like the following will
497+
ensure the right quotes everywhere. Note the use of the ">" to set
498+
quotes on the children of elements with a "lang" attribute.
499+
500+
<pre class="example">
501+
HTML:lang(fr) {quotes: "�" "�" "\2039" "\203A"}
502+
HTML:lang(en) {quotes: "\201C" "\201D" "\2018" "\2019"}
503+
[LANG|=fr] > * {quotes: "�" "�" "\2039" "\203A"}
504+
[LANG|=en} > * {quotes: "\201C" "\201D" "\2018" "\2019"}
505+
</pre>
506+
507+
<p>The quotation marks are shown here in a form that most people will
508+
be able to type. If you can type them directly, they will look like
509+
this:
510+
511+
<blockquote class="example">
512+
HTML:lang(fr) {quotes: "�" "�" "&#8249;" "&#8250;"}<br>
513+
HTML:lang(en) {quotes: "&#8220;" "&#8221;" "&#8216;" "&#8217;"}<br>
514+
[LANG|=fr] > * {quotes: "�" "�" "&#8249;" "&#8250;"}<br>
515+
[LANG|=en} > * {quotes: "&#8220;" "&#8221;" "&#8216;" "&#8217;"}
516+
</blockquote>
517+
518+
</div>
519+
460520

461521
<h2>Automatic <span class="index-def" title="counters"><a name="counters">counters</a></span>
462522
and numbering</h2>

0 commit comments

Comments
 (0)