Mercurial > hg > xemacs-beta
comparison man/w3.texi @ 24:4103f0995bd7 r19-15b95
Import from CVS: tag r19-15b95
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:51:03 +0200 |
parents | 8fc7fe29b841 |
children | 441bb1e64a06 |
comparison
equal
deleted
inserted
replaced
23:0edd3412f124 | 24:4103f0995bd7 |
---|---|
1 \input texinfo | 1 \input texinfo |
2 @c | 2 @c |
3 @c Please note that this file uses some constructs not supported by earlier | 3 @c Please note that this file uses some constructs not supported by earlier |
4 @c versions of TeXinfo. You must be running one of the newer TeXinfo | 4 @c versions of TeXinfo. You must be running one of the newer TeXinfo |
5 @c releases (I currently use version 3.9 from ftp://prep.ai.mit.edu/pub/gnu | 5 @c releases (I currently use version 3.9 from ftp://prep.ai.mit.edu/pub/gnu/) |
6 @c | 6 @c |
7 @c Please do not send in bug reports about not being able to format the | 7 @c Please do not send in bug reports about not being able to format the |
8 @c document with 'makeinfo' or 'tex', just upgrade your installation. | 8 @c document with 'makeinfo' or 'tex', just upgrade your installation. |
9 @c | 9 @c |
10 @c Info formatted files are provided in the distribution, and you can | 10 @c Info formatted files are provided in the distribution, and you can |
594 @findex turn-on-lynx-emulation | 594 @findex turn-on-lynx-emulation |
595 @findex w3-netscape-emulation-minor-mode | 595 @findex w3-netscape-emulation-minor-mode |
596 @findex w3-lynx-emulation-minor-mode | 596 @findex w3-lynx-emulation-minor-mode |
597 @vindex w3-mode-hook | 597 @vindex w3-mode-hook |
598 :: WORK :: Document lynx emulation | 598 :: WORK :: Document lynx emulation |
599 @table @key | 599 @table @bullet |
600 @item Down arrow | 600 @item Down arrow |
601 Highlight next topic | 601 Highlight next topic |
602 @item Up arrow | 602 @item Up arrow |
603 Highlight previous topic | 603 Highlight previous topic |
604 @item Right arrow, Return, Enter | 604 @item Right arrow, Return, Enter |
1198 In the above example, the color of the 'P' element would be | 1198 In the above example, the color of the 'P' element would be |
1199 red. Although the specificity is the same for both declarations, the | 1199 red. Although the specificity is the same for both declarations, the |
1200 declaration in the 'STYLE' attribute will override the one in the | 1200 declaration in the 'STYLE' attribute will override the one in the |
1201 'STYLE' element because of cascading rule number 5. | 1201 'STYLE' element because of cascading rule number 5. |
1202 | 1202 |
1203 The UA may choose to honor other stylistic HTML attributes, for example | 1203 The @sc{ua} may choose to honor other stylistic @sc{html} attributes, |
1204 'ALIGN'. If so, these attributes are translated to the corresponding CSS | 1204 for example 'ALIGN'. If so, these attributes are translated to the |
1205 rules with specificity equal to 1. The rules are assumed to be at the | 1205 corresponding @sc{css} rules with specificity equal to 1. The rules are |
1206 start of the author style sheet and may be overridden by subsequent | 1206 assumed to be at the start of the author style sheet and may be |
1207 style sheet rules. In a transition phase, this policy will make it | 1207 overridden by subsequent style sheet rules. In a transition phase, this |
1208 easier for stylistic attributes to coexist with style sheets. | 1208 policy will make it easier for stylistic attributes to coexist with |
1209 style sheets. | |
1209 | 1210 |
1210 @node Properties, Font Properties, The Cascade, Stylesheets | 1211 @node Properties, Font Properties, The Cascade, Stylesheets |
1211 @section Properties | 1212 @section Properties |
1213 | |
1214 In the text below, the allowed values for each property are listed | |
1215 with a syntax like the following: | |
1216 | |
1217 @example | |
1218 Value: N | NW | NE | |
1219 Value: [ <length> | thick | thin ]@{1,4@} | |
1220 Value: <uri>? <color> [ / <color> ]? | |
1221 Value: <uri> || <color> | |
1222 @end example | |
1223 | |
1224 The words between < and > give a type of value. The most common types | |
1225 are <length>, <percentage>, <url>, <number>and <color> these are | |
1226 described in the section on [[units]]. The more specialized types | |
1227 (e.g. <font-family>and <border-style>) are described under the property | |
1228 where they appear. | |
1229 | |
1230 Other words are keywords that must appear literally, without quotes. The | |
1231 slash (/) and the comma (,) must also appear literally. | |
1232 | |
1233 Several things juxtaposed mean that all of them must occur, in the given | |
1234 order. A bar (|) separates alternatives: one of them must occur. A | |
1235 double bar (A || B) means that either A or B or both must occur, in any | |
1236 order. Brackets ([]) are for grouping. Juxtaposition is stronger than | |
1237 the double bar, and the double bar is stronger than the bar. Thus "a b | | |
1238 c || d e" is equivalent to "[ a b ] | [ c || [ d e ]]". | |
1239 | |
1240 Every type, keyword, or bracketed group may be followed by one of the | |
1241 following modifiers: | |
1242 | |
1243 @itemize @bullet | |
1244 @item | |
1245 An asterisk (*) indicates that the preceding type, word or group is | |
1246 repeated zero or more times. | |
1247 @item | |
1248 A plus (+) indicates that the preceding type, word or group is repeated | |
1249 one or more times. | |
1250 @item | |
1251 A question mark (?) indicates that the preceding type, word or group is | |
1252 optional. | |
1253 @item | |
1254 A pair of numbers in curly braces (@{A,B@}) indicates that the preceding | |
1255 type, word or group is repeated at least A and at most B times. | |
1256 @end itemize | |
1257 | |
1258 Other than the value the following information is also shown. | |
1259 | |
1260 @multitable @columnfractions .20 .8 | |
1261 @item Supported Values: @tab If this is present, it lists the parts of | |
1262 the specification that Emacs-W3 currently supports. | |
1263 @item Unsupported Values: @tab If this is present, it represents the | |
1264 parts of the specifcation that Emacs-W3 does not support. | |
1265 @item Initial: @tab The default value for the property, unless | |
1266 explicitly set in a stylesheet. | |
1267 @item Applies to: @tab What type of elements this property can be attached to. | |
1268 @item Inherited: @tab Yes or no | |
1269 @item Percentage values: @tab What a percentage value applies to when given. | |
1270 @end multitable | |
1271 | |
1212 @ifinfo | 1272 @ifinfo |
1213 @menu | 1273 @menu |
1214 * Font Properties:: Selecting fonts, styles, and sizes. | 1274 * Font Properties:: Selecting fonts, styles, and sizes. |
1215 * Colors and Backgrounds:: Controlling colors, front and back. | 1275 * Colors and Backgrounds:: Controlling colors, front and back. |
1216 * Text Properties:: Alignment, decoration, and more! | 1276 * Text Properties:: Alignment, decoration, and more! |
1217 * Box Properties:: Borders, padding, and margins, oh my! | 1277 * Box Properties:: Borders, padding, and margins, oh my! |
1218 * Classification:: Changing whitespace and display policies. | 1278 * Classification:: Changing whitespace and display policies. |
1219 * Media Selection:: | 1279 * Media Selection:: Conditionalize stylesheets on media-type. |
1220 * Speech Properties:: | 1280 * Speech Properties:: Speech output controlled by stylesheets. |
1221 @end menu | 1281 @end menu |
1222 @end ifinfo | 1282 @end ifinfo |
1223 | 1283 |
1224 @node Font Properties, font-family, Properties, Properties | 1284 @node Font Properties, font-family, Properties, Properties |
1225 @subsection Font Properties | 1285 @subsection Font Properties |
1605 background image, one should also set a background color that will be | 1665 background image, one should also set a background color that will be |
1606 used when the image is unavailable. When the image is available, it is | 1666 used when the image is unavailable. When the image is available, it is |
1607 overlaid on top of the background color. | 1667 overlaid on top of the background color. |
1608 | 1668 |
1609 @example | 1669 @example |
1610 BODY @{ background-image: url(marble.gif) @} | 1670 BODY @{ background-image: url(marble.png) @} |
1611 P @{ background-image: none @} | 1671 P @{ background-image: none @} |
1612 @end example | 1672 @end example |
1613 | 1673 |
1614 @node background-repeat, background-attachment, background-image, Colors and Backgrounds | 1674 @node background-repeat, background-attachment, background-image, Colors and Backgrounds |
1615 @subsubsection background-repeat | 1675 @subsubsection background-repeat |
1669 @end ifinfo | 1729 @end ifinfo |
1670 | 1730 |
1671 @node word-spacing, letter-spacing, Text Properties, Text Properties | 1731 @node word-spacing, letter-spacing, Text Properties, Text Properties |
1672 @subsubsection word-spacing | 1732 @subsubsection word-spacing |
1673 @multitable @columnfractions .2 .8 | 1733 @multitable @columnfractions .2 .8 |
1674 @end multitable | 1734 @item Supported Values: @tab normal |
1735 @item Unsupported Values: @tab <length> | |
1736 @item Initial: @tab normal | |
1737 @item Applies to: @tab all elements | |
1738 @item Inherited: @tab yes | |
1739 @item Percentage values: @tab N/A | |
1740 @end multitable | |
1741 | |
1742 The length unit indicates an addition to the default space between | |
1743 words. Values can be negative, but there may be implementation-specific | |
1744 limits. The UA is free to select the exact spacing algorithm. The word | |
1745 spacing may also be influenced by justification (which is a value of the | |
1746 'align' property). | |
1747 | |
1748 @example | |
1749 H1 @{ word-spacing: 0.4em @} | |
1750 @end example | |
1751 | |
1752 Here, the word-spacing between each word in 'H1' elements would be | |
1753 increased by '1em'. | |
1754 | |
1755 NOTE: Emacs-W3 cannot currently support this, due to limitations in | |
1756 Emacs. It may be implemented in the future. | |
1675 | 1757 |
1676 @node letter-spacing, text-decoration, word-spacing, Text Properties | 1758 @node letter-spacing, text-decoration, word-spacing, Text Properties |
1677 @subsubsection letter-spacing | 1759 @subsubsection letter-spacing |
1678 @multitable @columnfractions .2 .8 | 1760 @multitable @columnfractions .2 .8 |
1679 @end multitable | 1761 @item Supported Values: normal |
1762 @item Unsupported Values: @tab <length> | |
1763 @item Initial: @tab normal | |
1764 @item Applies to: @tab all elements | |
1765 @item Inherited: @tab yes | |
1766 @item Percentage values: @tab N/A | |
1767 @end multitable | |
1768 | |
1769 The length unit indicates an addition to the default space between | |
1770 characters. Values can be negative, but there may be | |
1771 implementation-specific limits. The UA is free to select the exact | |
1772 spacing algorithm. The letter spacing may also be influenced by | |
1773 justification (which is a value of the 'align' property). | |
1774 | |
1775 @example | |
1776 BLOCKQUOTE @{ letter-spacing: 0.1em @} | |
1777 @end example | |
1778 | |
1779 Here, the letter-spacing between each character in 'BLOCKQUOTE' elements | |
1780 would be increased by '0.1em'. | |
1781 | |
1782 NOTE: Emacs-W3 cannot currently support this, due to limitations in | |
1783 Emacs. It may be implemented in the future. | |
1680 | 1784 |
1681 @node text-decoration, vertical-align, letter-spacing , Text Properties | 1785 @node text-decoration, vertical-align, letter-spacing , Text Properties |
1682 @subsubsection text-decoration | 1786 @subsubsection text-decoration |
1683 @multitable @columnfractions .2 .8 | 1787 @multitable @columnfractions .2 .8 |
1684 @end multitable | 1788 @item Supported Values: @tab none | underline | line-through | blink |
1789 @item Unsupported Values: @tab overline | |
1790 @item Initial: @tab none | |
1791 @item Applies to: @tab all elements | |
1792 @item Inherited: @tab no, but see clarification below | |
1793 @item Percentage values: @tab N/A | |
1794 @end multitable | |
1795 | |
1796 This property describes decorations that are added to the text of an | |
1797 element. If the element has no text (e.g. the 'IMG' element in HTML) or | |
1798 is an empty element (e.g. '<EM></EM>'), this property has no effect. A | |
1799 value of 'blink' causes the text to blink. | |
1800 | |
1801 The color(s) required for the text decoration should be derived from the | |
1802 'color' property value. | |
1803 | |
1804 This property is not inherited, but elements should match their | |
1805 parent. E.g., if an element is underlined, the line should span the | |
1806 child elements. The color of the underlining will remain the same even | |
1807 if descendant elements have different 'color' values. | |
1808 | |
1809 @example | |
1810 A:link, A:visited, A:active @{ text-decoration: underline @} | |
1811 @end example | |
1812 | |
1813 The example above would underline the text of all links (i.e., all 'A' | |
1814 elements with a 'HREF' attribute). | |
1815 | |
1816 NOTE: The 'line-through' property is only supported under XEmacs | |
1817 currently. A patch has been sent to the Emacs maintainers to add | |
1818 support for this, but it has not made it into the main distribution | |
1819 yet. | |
1685 | 1820 |
1686 @node vertical-align, text-transform, text-decoration, Text Properties | 1821 @node vertical-align, text-transform, text-decoration, Text Properties |
1687 @subsubsection vertical-align | 1822 @subsubsection vertical-align |
1688 @multitable @columnfractions .2 .8 | 1823 This is currently unsupported in Emacs-W3. |
1689 @end multitable | |
1690 | 1824 |
1691 @node text-transform, text-align, vertical-align, Text Properties | 1825 @node text-transform, text-align, vertical-align, Text Properties |
1692 @subsubsection text-transform | 1826 @subsubsection text-transform |
1693 @multitable @columnfractions .2 .8 | 1827 @multitable @columnfractions .2 .8 |
1694 @end multitable | 1828 @item Supported Values: @tab none |
1829 @item Unsupported Values: @tab capitalize | uppercase | lowercase | |
1830 @item Initial: @tab none | |
1831 @item Applies to: @tab all elements | |
1832 @item Inherited: @tab yes | |
1833 @item Percentage values: @tab N/A | |
1834 @end multitable | |
1835 | |
1836 @table @b | |
1837 @item 'capitalize' | |
1838 Uppercases the first character of each word. | |
1839 @item 'uppercase' | |
1840 Uppercases all letters of the element. | |
1841 @item 'lowercase' | |
1842 Lowercases all letters of the element. | |
1843 @item 'none' | |
1844 Neutralizes inherited value. | |
1845 @end table | |
1846 | |
1847 The actual transformation in each case is human language dependent. | |
1848 | |
1849 @example | |
1850 H1 @{ text-transform: uppercase @} | |
1851 @end example | |
1852 | |
1853 The example above would put 'H1' elements in uppercase text. | |
1854 | |
1855 NOTE: This capability was in the previous version of Emacs-W3, but has | |
1856 not been reimplemented in the new display code yet. Please feel free to | |
1857 send me patches. | |
1695 | 1858 |
1696 @node text-align, text-indent, text-transform, Text Properties | 1859 @node text-align, text-indent, text-transform, Text Properties |
1697 @subsubsection text-align | 1860 @subsubsection text-align |
1698 @multitable @columnfractions .2 .8 | 1861 @multitable @columnfractions .2 .8 |
1699 @end multitable | 1862 @item Value: @tab left | right | center | justify |
1863 @item Initial: @tab User specific | |
1864 @item Applies to: @tab block-level elements | |
1865 @item Inherited: @tab yes | |
1866 @item Percentage values: @tab N/A | |
1867 @end multitable | |
1868 | |
1869 This property describes how text is aligned within the element. The | |
1870 actual justification algorithm used is UA and human language dependent. | |
1871 | |
1872 Example: | |
1873 @example | |
1874 DIV.center @{ text-align: center @} | |
1875 @end example | |
1876 | |
1877 Since 'text-align' inherits, all block-level elements inside the 'DIV' | |
1878 element with 'CLASS=center' will be centered. Note that alignments are | |
1879 relative to the width of the element, not the canvas. | |
1700 | 1880 |
1701 @node text-indent, line-height, text-align, Text Properties | 1881 @node text-indent, line-height, text-align, Text Properties |
1702 @subsubsection | 1882 @subsubsection text-indent |
1703 @multitable @columnfractions .2 .8 | 1883 Not currently implemented in Emacs-W3. |
1704 @end multitable | |
1705 | 1884 |
1706 @node line-height, Box Properties, text-indent, Text Properties | 1885 @node line-height, Box Properties, text-indent, Text Properties |
1707 @subsubsection | 1886 @subsubsection line-height |
1708 @multitable @columnfractions .2 .8 | 1887 Not currently implemented in Emacs-W3. |
1709 @end multitable | |
1710 | 1888 |
1711 @node Box Properties, Classification, line-height, Properties | 1889 @node Box Properties, Classification, line-height, Properties |
1712 @subsection Box Properties | 1890 @subsection Box Properties |
1713 @multitable @columnfractions .2 .8 | 1891 @multitable @columnfractions .2 .8 |
1714 @end multitable | 1892 @end multitable |
1715 | 1893 |
1716 @node Classification, Media Selection, Box Properties, Properties | 1894 @node Classification, display, Box Properties, Properties |
1717 @subsection Classification | 1895 @subsection Classification |
1896 These properties classify elements into categories more than they set | |
1897 specific visual parameters. | |
1898 | |
1899 The list-style properties describe how list items (i.e. elements with a | |
1900 'display' value of 'list-item') are formatted. The list-style properties | |
1901 can be set on any element, and it will inherit normally down the | |
1902 tree. However, they will only be have effect on elements with a | |
1903 'display' value of 'list-item'. In HTML this is typically the case for | |
1904 the 'LI' element. | |
1905 | |
1906 @ifinfo | |
1907 @menu | |
1908 * display:: | |
1909 * white-space:: | |
1910 * list-style-type:: | |
1911 * list-style-image:: | |
1912 * list-style-position:: | |
1913 * list-style:: | |
1914 @end menu | |
1915 @end ifinfo | |
1916 | |
1917 @node display, white-space, Classification, Classification | |
1918 @subsubsection display | |
1718 @multitable @columnfractions .2 .8 | 1919 @multitable @columnfractions .2 .8 |
1719 @end multitable | 1920 @item Value: @tab block | inline | list-item | none |
1720 | 1921 @item Extensions: @tab line |
1721 @node Media Selection, Speech Properties, Classification, Properties | 1922 @item Initial: @tab inline |
1923 @item Applies to: @tab all elements | |
1924 @item Inherited: @tab no | |
1925 @item Percentage values: @tab N/A | |
1926 @end multitable | |
1927 | |
1928 This property describes how/if an element is displayed on the canvas | |
1929 (which may be on a printed page, a computer display etc.). | |
1930 | |
1931 An element with a 'display' value of 'block' opens whitespace suitable | |
1932 for a paragraph break. Typically, elements like 'H1' and 'P' are of | |
1933 type 'block'. A value of 'list-item' is similar to 'block' except that a | |
1934 list-item marker is added. In HTML, 'LI' will typically have this value. | |
1935 | |
1936 An element with a 'display' value of 'inline' results in a new inline | |
1937 box on the same line as the previous content. | |
1938 | |
1939 A value of 'none' turns off the display of the element, including | |
1940 children elements and the surrounding box. | |
1941 | |
1942 @example | |
1943 P @{ display: block @} | |
1944 EM @{ display: inline @} | |
1945 LI @{ display: list-item @} | |
1946 IMG @{ display: none @} | |
1947 @end example | |
1948 | |
1949 The last rule turns off the display of images. | |
1950 | |
1951 A value of 'line' results in a single line break. Emacs-W3 needs this | |
1952 extension to be able to fully specify the behaviour of @sc{br} and | |
1953 @sc{hr} elements within a stylesheet. | |
1954 | |
1955 NOTE: Emacs-W3 defaults to using 'inline' for this property, which is a | |
1956 slight deviation from the specification. | |
1957 | |
1958 @node white-space, list-style-type, display, Classification | |
1959 @subsubsection white-space | |
1960 @multitable @columnfractions .2 .8 | |
1961 @item Value: @tab normal | pre | nowrap | |
1962 @item Initial: @tab normal | |
1963 @item Applies to: @tab block-level elements | |
1964 @item Inherited: @tab yes | |
1965 @item Percentage values: @tab N/A | |
1966 @end multitable | |
1967 | |
1968 This property declares how whitespace inside the element is handled: the | |
1969 'normal' way (where whitespace is collapsed), as 'pre' (which behaves | |
1970 like the 'PRE' element in HTML) or as 'nowrap' (where wrapping is done | |
1971 only through BR elements): | |
1972 | |
1973 @example | |
1974 PRE @{ white-space: pre @} | |
1975 P @{ white-space: normal @} | |
1976 @end example | |
1977 | |
1978 @node list-style-type, list-style-image, white-space, Classification | |
1979 @subsubsection list-style-type | |
1980 @multitable @columnfractions .2 .8 | |
1981 @item Value: @tab disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none | |
1982 @item Initial: @tab disc | |
1983 @item Applies to: @tab elements with 'display' value 'list-item' | |
1984 @item Inherited: @tab yes | |
1985 @item Percentage values: @tab N/A | |
1986 @end multitable | |
1987 | |
1988 This property is used to determine the appearance of the list-item | |
1989 marker if 'list-style-image' is 'none' or if the image pointed to by the | |
1990 URL cannot be displayed. | |
1991 | |
1992 Fo example: | |
1993 @example | |
1994 OL @{ list-style-type: decimal @} /* 1 2 3 4 5 etc. */ | |
1995 OL @{ list-style-type: lower-alpha @} /* a b c d e etc. */ | |
1996 OL @{ list-style-type: lower-roman @} /* i ii iii iv v etc. */ | |
1997 @end example | |
1998 | |
1999 @node list-style-image, list-style-position, list-style-type, Classification | |
2000 @subsubsection list-style-image | |
2001 @multitable @columnfractions .2 .8 | |
2002 @item Value: @tab <url> | none | |
2003 @item Initial: @tab none | |
2004 @item Applies to: @tab elements with 'display' value 'list-item' | |
2005 @item Inherited: @tab yes | |
2006 @item Percentage values: @tab N/A | |
2007 @end multitable | |
2008 | |
2009 This property sets the image that will be used as the list-item | |
2010 marker. When the image is available it will replace the marker set with | |
2011 the 'list-style-type' marker. | |
2012 | |
2013 NOTE: This is currently unimplemented in Emacs-W3. | |
2014 | |
2015 @example | |
2016 UL @{ list-style-image: url(http://png.com/ellipse.png) @} | |
2017 @end example | |
2018 | |
2019 @node list-style-position, list-style, list-style-image, Classification | |
2020 @subsubsection list-style-position | |
2021 @multitable @columnfractions .2 .8 | |
2022 @item Supported Values: @tab outside | |
2023 @item Unsupported Values: @tab inside | |
2024 @item Initial: @tab outside | |
2025 @item Applies to: @tab elements with 'display' value 'list-item' | |
2026 @item Inherited: @tab yes | |
2027 @item Percentage values: @tab N/A | |
2028 @end multitable | |
2029 | |
2030 The value of 'list-style-position' determines how the list-item marker | |
2031 is drawn with regard to the content. For a formatting example see | |
2032 section 4.1.3. | |
2033 | |
2034 @node list-style, Media Selection, list-style-position, Classification | |
2035 @subsubsection list-style | |
2036 @multitable @columnfractions .2 .8 | |
2037 @item Value: <keyword> || <position> || <url> | |
2038 @item Initial: @tab not defined for shorthand properties | |
2039 @item Applies to: @tab elements with 'display' value 'list-item' | |
2040 @item Inherited: @tab yes | |
2041 @item Percentage values: @tab N/A | |
2042 @end multitable | |
2043 | |
2044 The 'list-style' property is a shorthand notation for setting the three | |
2045 properties 'list-style-type', 'list-style-image' and | |
2046 'list-style-position' at the same place in the style sheet. | |
2047 | |
2048 @example | |
2049 UL @{ list-style: upper-roman inside @} | |
2050 UL UL @{ list-style: circle outside @} | |
2051 LI.square @{ list-style: square @} | |
2052 @end example | |
2053 | |
2054 Setting 'list-style' directly on 'LI' elements can have unexpected | |
2055 results. Consider: | |
2056 | |
2057 @example | |
2058 <STYLE TYPE="text/css"> | |
2059 OL.alpha LI @{ list-style: lower-alpha @} | |
2060 UL LI @{ list-style: disc @} | |
2061 </STYLE> | |
2062 <BODY> | |
2063 <OL CLASS=alpha> | |
2064 <LI>level 1 | |
2065 <UL> | |
2066 <LI>level 2 | |
2067 </UL> | |
2068 </OL> | |
2069 </BODY> | |
2070 @end example | |
2071 | |
2072 Since the specificity (as defined in the cascading order) is higher for | |
2073 the first rule in the style sheet in the example above, it will override | |
2074 the second rule on all 'LI' elements and only 'lower-alpha' list styles | |
2075 will be used. It is therefore recommended to set 'list-style' only on | |
2076 the list type elements: | |
2077 | |
2078 @example | |
2079 OL.alpha @{ list-style: lower-alpha @} | |
2080 UL @{ list-style: disc @} | |
2081 @end example | |
2082 | |
2083 In the above example, inheritance will transfer the 'list-style' values | |
2084 from 'OL' and 'UL' elements to 'LI' elements. | |
2085 | |
2086 A URL value can be combined with any other value: | |
2087 | |
2088 @example | |
2089 UL @{ list-style: url(http://png.com/ellipse.png) disc @} | |
2090 @end example | |
2091 | |
2092 In the example above, the 'disc' will be used when the image is | |
2093 unavailable. | |
2094 | |
2095 @node Media Selection, Speech Properties, list-style, Properties | |
1722 @subsection Media Selection | 2096 @subsection Media Selection |
2097 To specify that a stylesheet declaration should only apply when using a | |
2098 certain media type (ie: different font families preferred when printing | |
2099 versus on-screen presentation), the declarations should be wrapped in | |
2100 the proposed @b{@@media} directive. | |
2101 | |
2102 The @@media directive takes two arguments, the media type, and a block | |
2103 of style declarations. | |
2104 | |
2105 @example | |
2106 @@media print @{ | |
2107 BODY @{ font-size: 10pt @} | |
2108 H1 @{ font-size: 14pt @} | |
2109 @} | |
2110 @end example | |
2111 The '@@media' construct also allows to put include style sheet rules | |
2112 for various media in the same style sheet: | |
2113 | |
2114 @example | |
2115 @@media print @{ | |
2116 BODY @{ font-size: 10pt @} | |
2117 @} | |
2118 @@media screen @{ | |
2119 BODY @{ font-size: 12pt @} | |
2120 @} | |
2121 @end example | |
2122 | |
2123 Currently, the following media types are defined. | |
2124 @table @b | |
2125 @item Print | |
2126 Output for paged opaque material, and for documents viewed on screen in | |
2127 print preview mode. | |
2128 @item Screen | |
2129 A continuous presentation for computer screens. | |
2130 @item Projector | |
2131 Paged presentation for projected presentations. | |
2132 @item Braille | |
2133 For braille tactile feedback devices. | |
2134 @item Speech | |
2135 Aural presentation. | |
2136 @item Emacs | |
2137 The stylesheet will only be applied if the user is running in Emacs 19. | |
2138 @item XEmacs | |
2139 The stylesheet will only be applied if the user is running in XEmacs 19. | |
2140 @item All | |
2141 The default value, the style sheet applies to all output devices | |
2142 @end table | |
2143 | |
2144 @node Speech Properties, volume, Media Selection, Properties | |
2145 @subsection Speech Properties | |
2146 Those of us who are sighted are accustomed to visual presentation of | |
2147 @sc{html} documents, frequently on a bitmapped display. This is not the | |
2148 only possible presentation method, however. Aural presentation, using a | |
2149 combination of speech synthesis and 'audio icons', provides an | |
2150 alternative presentation. This form of presentation is in current use by | |
2151 the blind and print-impaired communities. | |
2152 | |
2153 Often such aural presentation occurs by converting the document to plain | |
2154 text and feeding this to a 'screen reader' -- software or hardware that | |
2155 simply reads all the characters on the screen. This results in less | |
2156 effective presentation than would be the case if the document structure | |
2157 were retained. | |
2158 | |
2159 There are other large markets for aural presentation, including in-car | |
2160 and home entertainment use; aurual or mixed aural/visual presentation is | |
2161 thus likely to increase in importance over the next few years. Realizing | |
2162 that that the aural rendering is essentially independent of the visual | |
2163 rendering: | |
2164 | |
2165 @itemize @bullet | |
2166 @item | |
2167 Allows orthogonal aural and visual views. | |
2168 @item | |
2169 Allows browsers to optionally implement both aural and visual views to | |
2170 produce truly multimodal documents. | |
2171 @end itemize | |
2172 | |
2173 @ifinfo | |
2174 @menu | |
2175 * volume:: | |
2176 * pause-before:: | |
2177 * pause-after:: | |
2178 * pause:: | |
2179 * cue-before:: | |
2180 * cue-after:: | |
2181 * cue:: | |
2182 * play-during:: | |
2183 * speed:: | |
2184 * voice-family:: | |
2185 * pitch:: | |
2186 * pitch-range:: | |
2187 * stress:: | |
2188 * richness:: | |
2189 * speak-punctuation:: | |
2190 * speak-date:: | |
2191 * speak-numeral:: | |
2192 * speak-time:: | |
2193 @end menu | |
2194 @end ifinfo | |
2195 | |
2196 @node volume, pause-before, Speech Properties, Speech Properties | |
2197 @subsubsection volume | |
1723 @multitable @columnfractions .2 .8 | 2198 @multitable @columnfractions .2 .8 |
1724 @end multitable | 2199 @item Value: @tab <percentage> | mute | x-soft | soft | medium | loud | x-loud |
1725 | 2200 @item Initial: @tab medium |
1726 @node Speech Properties, Units, Media Selection, Properties | 2201 @item Applies to: @tab all elements |
1727 @subsection Speech Properties | 2202 @item Inherited: @tab yes |
2203 @item Percentage values: @tab relative to user-specified mapping | |
2204 @end multitable | |
2205 | |
2206 The legal range of percentage values is 0% to 100%. There is a fixed | |
2207 mapping between keyword values and percentages: | |
2208 | |
2209 @itemize @bullet | |
2210 @item | |
2211 'x-soft' = '0%' | |
2212 @item | |
2213 'soft' = '25%' | |
2214 @item | |
2215 'medium' = '50%' | |
2216 @item | |
2217 'loud' = '75%' | |
2218 @item | |
2219 'x-loud' = '100%' | |
2220 @end itemize | |
2221 | |
2222 Volume refers to the median volume of the waveform. In other words, a | |
2223 highly inflected voice at a volume of 50 might peak well above | |
2224 that. Note that '0%' does not mean the same as "mute". 0% represents the | |
2225 minimum audible volume level and 100% corresponds to the maximum | |
2226 comfortable level. The UA should allow the values corresponding to 0% | |
2227 and 100% to be set by the user. Suitable values depend on the equipment | |
2228 in use (speakers, headphones), the environment (in car, home theater, | |
2229 library) and personal preferences. Some examples: | |
2230 | |
2231 @itemize @bullet | |
2232 @item | |
2233 A browser for in-car use has a setting for when there is lots of | |
2234 background noise . 0% would map to a fairly high level and 100% to a | |
2235 quite high level. The overall values are likely to be human adjustable | |
2236 for comfort, for example with a physical volume control: what this | |
2237 proposal does is adjust the dynamic range. | |
2238 @item | |
2239 Another speech browser is being used in the home, late at night, (don't | |
2240 annoy the neighbors) or in a shared study room. 0% is set to very quiet | |
2241 and 100% to a fairly quiet level, too. As with the first example, there | |
2242 is a low slope; the dynamic range is reduced. The actual volumes are low | |
2243 here, wheras they were high in the first example. | |
2244 @item | |
2245 In a quiet and isolated house, an expensive hifi home theatre setup. 0% | |
2246 is set fairly low and 100% to quite high; there is wide dynamic range. | |
2247 @end itemize | |
2248 | |
2249 The same authors stylesheet could be used in all cases, simply by | |
2250 mapping the 0 and 100 points suitably at the client side. | |
2251 | |
2252 @node pause-before, pause-after, volume, Speech Properties | |
2253 @subsubsection pause-before | |
1728 @multitable @columnfractions .2 .8 | 2254 @multitable @columnfractions .2 .8 |
1729 @end multitable | 2255 @item Value: @tab <time> | <percentage> |
1730 | 2256 @item Initial: @tab UA specific |
1731 @node Units, Length Units, Speech Properties, Stylesheets | 2257 @item Applies to: @tab all elements |
2258 @item Inherited: @tab no | |
2259 @item Percentage values: @tab speed | |
2260 @end multitable | |
2261 | |
2262 This property specifies the pause before elements. It may be given in an | |
2263 absolute units (seconds, milliseconds) or as a relative value in which | |
2264 case it is relative to the reciprocal of the 'speed' property: if speed | |
2265 is 120 words per minute (ie a word takes half a second -- 500 | |
2266 milliseconds) then a pause-before of 100% means a pause of 500 ms and a | |
2267 pause-before of 20% means 100ms. | |
2268 | |
2269 Using relative units gives more robust stylesheets in the face of large | |
2270 changes in speed. | |
2271 | |
2272 @node pause-after, pause, pause-before, Speech Properties | |
2273 @subsubsection pause-after | |
2274 @multitable @columnfractions .2 .8 | |
2275 @item Value: @tab <time> | <percentage> | |
2276 @item Applies to: @tab all elements | |
2277 @item Inherited: @tab no | |
2278 @item Percentage values: @tab speed | |
2279 @end multitable | |
2280 | |
2281 This property specifies the pause after elements. Values are specified | |
2282 the same way as 'pause-before'. | |
2283 | |
2284 @node pause, cue-before, pause-after, Speech Properties | |
2285 @subsubsection pause | |
2286 @multitable @columnfractions .2 .8 | |
2287 @item Value: @tab [<time> | <percentage> ]@{1,2@}; | |
2288 @item Applies to: @tab all elements | |
2289 @item Inherited: @tab no | |
2290 @item Percentage values: @tab speed | |
2291 @end multitable | |
2292 | |
2293 The 'pause' property is a shorthand for setting 'pause-before' and | |
2294 'pause-after'. The first value is pause-before and the second is | |
2295 pause-after. If only one value is given, it applies to both properties. | |
2296 | |
2297 Examples: | |
2298 | |
2299 @example | |
2300 H1 @{ pause: 20ms @} /* pause-before: 20ms; pause-after: 20ms */ | |
2301 H2 @{ pause: 30ms 40ms @} /* pause-before: 30ms; pause-after: 40ms */ | |
2302 H3 @{ pause-after: 10ms @} /* pause-before: ?; pause-after: 10ms */ | |
2303 @end example | |
2304 | |
2305 @node cue-before, cue-after, pause, Speech Properties | |
2306 @subsubsection cue-before | |
2307 @multitable @columnfractions .2 .8 | |
2308 @item Value: @tab <url> | none | |
2309 @item Initial: @tab none | |
2310 @item Applies to: @tab all elements | |
2311 @item Inherited: @tab no | |
2312 @end multitable | |
2313 Auditory icons are another way to distinguish semantic elements. Sounds | |
2314 may be played before, and/or after the element to delimit it. The same | |
2315 sound can be used both before and after, using the cue property. | |
2316 | |
2317 Examples: | |
2318 | |
2319 @example | |
2320 A @{ cue-before: url(bell.aiff); cue-after: url(dong.wav) @} | |
2321 H1 @{ cue-before: url(pop.au); cue-after: url(pop.au) @} | |
2322 H1 @{ cue: url(pop.au) @} /* same as previous */ | |
2323 @end example | |
2324 | |
2325 @node cue-after, cue, cue-before, Speech Properties | |
2326 @subsubsection cue-after | |
2327 @xref{cue-before} | |
2328 | |
2329 @node cue, play-during, cue-after, Speech Properties | |
2330 @subsubsection cue | |
2331 @xref{cue-before} | |
2332 | |
2333 @node play-during, speed, cue, Speech Properties | |
2334 @subsubsection cue-during | |
2335 @multitable @columnfractions .2 .8 | |
2336 @item Value: @tab <url> | mix | none | |
2337 @item Initial: @tab mix | |
2338 @item Applies to: @tab all elements | |
2339 @item Inherited: @tab no | |
2340 @end multitable | |
2341 Similar to the cue-before and cue-after properties, this indicates sound | |
2342 to be played during an element as a background (ie the sound is mixed in | |
2343 with the speech). | |
2344 | |
2345 Examples: | |
2346 | |
2347 @example | |
2348 BLOCKQUOTE.sad @{ cue-during: url(violins.aiff) @} | |
2349 @end example | |
2350 | |
2351 @node speed, voice-family, play-during, Speech Properties | |
2352 @subsubsection speed | |
2353 @multitable @columnfractions .2 .8 | |
2354 @item Value: @tab <words-per-minute> | x-slow | slow | medium | fast | x-fast | faster | slower | |
2355 @item Initial: @tab medium | |
2356 @item Applies to: @tab all elements | |
2357 @item Inherited: @tab yes | |
2358 @end multitable | |
2359 | |
2360 Specifies the speaking rate. Note that both absolute and relative | |
2361 keyword values are allowed (compare with @ref{font-weight}). | |
2362 | |
2363 @node voice-family, pitch, speed, Speech Properties | |
2364 @subsubsection voice-family | |
2365 @multitable @columnfractions .2 .8 | |
2366 @item Value: @tab [[<specific-voice> | <generic-voice>],]* [<specific-voice> | <generic-voice>] | |
2367 @item Initial: @tab device-specific | |
2368 @item Applies to: @tab all elements | |
2369 @item Inherited: @tab yes | |
2370 @end multitable | |
2371 | |
2372 The value is a prioritized list of voice family names. Generic families | |
2373 are male, female, and child. | |
2374 | |
2375 Examples of specific voice families are: comedian, paul, lisa | |
2376 | |
2377 Examples | |
2378 | |
2379 @example | |
2380 H1 @{ voice-family: announcer, male @} | |
2381 P.part.romeo @{ voice-family: romeo, male @} | |
2382 P.part.juliet @{ voice-family: juliet, female @} | |
2383 @end example | |
2384 | |
2385 @node pitch, pitch-range, voice-family, Speech Properties | |
2386 @subsubsection pitch | |
2387 @multitable @columnfractions .2 .8 | |
2388 @end multitable | |
2389 | |
2390 @node pitch-range, stress, pitch, Speech Properties | |
2391 @subsubsection pitch-range | |
2392 @multitable @columnfractions .2 .8 | |
2393 @end multitable | |
2394 | |
2395 @node stress, richness, pitch-range, Speech Properties | |
2396 @subsubsection stress | |
2397 @multitable @columnfractions .2 .8 | |
2398 @item Value: @tab <percentage> | |
2399 @item Initial: @tab medium | |
2400 @item Applies to: @tab all elements | |
2401 @item Inherited: @tab yes | |
2402 @end multitable | |
2403 | |
2404 Specifies the level of stress (assertiveness or emphasis) of the | |
2405 speaking voice. English is a stressed language, and different parts of a | |
2406 sentence are assigned primary, secondary or tertiary stress. The value | |
2407 of property 'stress' controls the amount of inflection that results from | |
2408 these stress markers. | |
2409 | |
2410 Increasing the value of this property results in the speech being more | |
2411 strongly inflected. It is in a sense dual to property 'pitch-range' and | |
2412 is provided to allow developers to exploit higher-end auditory displays. | |
2413 | |
2414 @node richness, speak-punctuation, stress, Speech Properties | |
2415 @subsubsection richness | |
2416 @multitable @columnfractions .2 .8 | |
2417 @item Value: @tab <percentage> | |
2418 @item Initial: @tab medium (50%) | |
2419 @item Applies to: @tab all elements | |
2420 @item Inherited: @tab yes | |
2421 @end multitable | |
2422 | |
2423 Specifies the richness (brightness) of the speaking voice. Different | |
2424 speech devices may require the setting of one or more device-specific | |
2425 parameters to achieve this effect. | |
2426 | |
2427 The effect of increasing richness is to produce a voice that carries -- | |
2428 reducing richness produces a soft, mellifluous voice. | |
2429 | |
2430 @node speak-punctuation, speak-date, richness, Speech Properties | |
2431 @subsubsection speak-punctuation | |
2432 @multitable @columnfractions .2 .8 | |
2433 @item Value: @tab code | none | |
2434 @item Initial: @tab none | |
2435 @item Applies to: @tab all elements | |
2436 @item Inherited: @tab yes | |
2437 @end multitable | |
2438 | |
2439 'code' indicates that punctuation such as semicolons, braces, and so on | |
2440 are to be spoken literally. The default value of 'none' means that | |
2441 punctuation is not spoken but instead is rendered naturally as various | |
2442 pauses. | |
2443 | |
2444 @node speak-date, speak-numeral, speak-punctuation, Speech Properties | |
2445 @subsubsection speak-date | |
2446 @multitable @columnfractions .2 .8 | |
2447 @item Value: @tab myd | dmy | ymd | none | |
2448 @item Initial: @tab none | |
2449 @item Applies to: @tab all elements | |
2450 @item Inherited: @tab no | |
2451 @end multitable | |
2452 | |
2453 This is a hint that the element contains a date and also how that date | |
2454 should be spoken. month-day-year is common in the USA, while | |
2455 day-month-year is common in Europe and year-month-day is also used. | |
2456 | |
2457 This should really be an HTML tag not a stylesheet property, since it | |
2458 gives semantic information about the content. | |
2459 | |
2460 @node speak-numeral, speak-time, speak-date, Speech Properties | |
2461 @subsubsection speak-numeral | |
2462 @multitable @columnfractions .2 .8 | |
2463 @item Value: @tab digits | continous | |
2464 @item Initial: @tab none | |
2465 @item Applies to: @tab all elements | |
2466 @item Inherited: @tab yes | |
2467 @end multitable | |
2468 | |
2469 @node speak-time, Units, speak-numeral, Speech Properties | |
2470 @subsubsection speak-time | |
2471 @multitable @columnfractions .2 .8 | |
2472 @item Value: @tab 24 | 12 | none | |
2473 @item Initial: @tab none | |
2474 @item Applies to: @tab all elements | |
2475 @item Inherited: @tab yes | |
2476 @end multitable | |
2477 | |
2478 @node Units, Length Units, speak-time, Stylesheets | |
1732 @section Units | 2479 @section Units |
1733 | 2480 |
1734 @ifinfo | 2481 @ifinfo |
1735 @menu | 2482 @menu |
1736 * Length Units:: | 2483 * Length Units:: |
1754 @node URLs, Angle Units, Color Units, Units | 2501 @node URLs, Angle Units, Color Units, Units |
1755 @subsection URLs | 2502 @subsection URLs |
1756 | 2503 |
1757 @node Angle Units, Time Units, URLs, Units | 2504 @node Angle Units, Time Units, URLs, Units |
1758 @subsection Angle Units | 2505 @subsection Angle Units |
2506 These are the legal angle units: | |
2507 @itemize @bullet | |
2508 @item | |
2509 deg: degrees | |
2510 @item | |
2511 grad | |
2512 @item | |
2513 rad: radians | |
2514 @end itemize | |
1759 | 2515 |
1760 @node Time Units, Supported URLs, Angle Units, Units | 2516 @node Time Units, Supported URLs, Angle Units, Units |
1761 @subsection Time Units | 2517 @subsection Time Units |
2518 These are the legal time units: | |
2519 | |
2520 @itemize @bullet | |
2521 @item | |
2522 ms: milliseconds | |
2523 @item | |
2524 s: seconds | |
2525 @end itemize | |
1762 | 2526 |
1763 @node Supported URLs, MIME Support, Time Units, Top | 2527 @node Supported URLs, MIME Support, Time Units, Top |
1764 @chapter Supported URLs | 2528 @chapter Supported URLs |
1765 | 2529 |
1766 ::WORK:: List supported URL types, specific RFCs, etc. | 2530 ::WORK:: List supported URL types, specific RFCs, etc. |
2531 | |
2532 @ifinfo | |
2533 @menu | |
2534 @end menu | |
2535 @end ifinfo | |
1767 | 2536 |
1768 @node MIME Support, Adding MIME types based on file extensions, Supported URLs, Top | 2537 @node MIME Support, Adding MIME types based on file extensions, Supported URLs, Top |
1769 @chapter MIME Support | 2538 @chapter MIME Support |
1770 @sc{mime} is an emerging standard for multimedia mail. It offers a very | 2539 @sc{mime} is an emerging standard for multimedia mail. It offers a very |
1771 flexible typing mechanism. The type of a file or message is specified | 2540 flexible typing mechanism. The type of a file or message is specified |
1772 in two parts, separated by a '/'. The first part is the general | 2541 in two parts, separated by a '/'. The first part is the general |
1773 category of the data (text, application, image, etc.). The second part | 2542 category of the data (text, application, image, etc.). The second part |
1774 is the specific type of data (postscript, gif, jpeg, etc.). So | 2543 is the specific type of data (postscript, png, jpeg, etc.). So |
1775 @samp{text/html} specifies an @sc{html} document, whereas | 2544 @samp{text/html} specifies an @sc{html} document, whereas |
1776 @samp{image/x-xwindowdump} specifies an image of an Xwindow taken with | 2545 @samp{image/x-xwindowdump} specifies an image of an Xwindow taken with |
1777 the @file{xwd} program. | 2546 the @file{xwd} program. |
1778 | 2547 |
1779 | 2548 |
1780 This typing allows much more flexibility in naming files. @sc{http}/1.0 | 2549 This typing allows much more flexibility in naming files. @sc{http}/1.0 |
1781 servers can now send back content-type headers in response to a request, | 2550 servers can now send back content-type headers in response to a request, |
1782 and not have the client second-guess it based on file extensions. @sc{html} | 2551 and not have the client second-guess it based on file extensions. @sc{html} |
1783 files can now be named @file{something.gif} (not a great idea, but | 2552 files can now be named @file{something.png} (not a great idea, but |
1784 possible). | 2553 possible). |
1785 | 2554 |
1786 @ifinfo | 2555 @ifinfo |
1787 @menu | 2556 @menu |
1788 * Adding MIME types based on file extensions:: How to map file | 2557 * Adding MIME types based on file extensions:: How to map file |
1789 extensions onto MIME | 2558 extensions onto MIME |
1790 types (e.g., @samp{.gif -> | 2559 types (e.g., @samp{.png -> |
1791 image/gif)}. | 2560 image/png)}. |
1792 * Specifying Viewers:: How to specify external and internal viewers | 2561 * Specifying Viewers:: How to specify external and internal viewers |
1793 for files that Emacs-W3 cannot handle natively. | 2562 for files that Emacs-W3 cannot handle natively. |
1794 @end menu | 2563 @end menu |
1795 @end ifinfo | 2564 @end ifinfo |
1796 | 2565 |
1855 Not all files look as they should when parsed as an @sc{html} document | 2624 Not all files look as they should when parsed as an @sc{html} document |
1856 (whitespace is stripped, paragraphs are reformatted, and lots of little | 2625 (whitespace is stripped, paragraphs are reformatted, and lots of little |
1857 changes that make the document look unrecognizable). Files may be | 2626 changes that make the document look unrecognizable). Files may be |
1858 passed to external programs or Emacs Lisp functions to be viewed. | 2627 passed to external programs or Emacs Lisp functions to be viewed. |
1859 | 2628 |
1860 Not all files can be viewed accurately from within an Emacs session (GIF | 2629 Not all files can be viewed accurately from within an Emacs session (PNG |
1861 files for example, or audio files). For this reason, the user can | 2630 files for example, or audio files). For this reason, the user can |
1862 specify file "viewers" based on MIME content-types. This is done with | 2631 specify file "viewers" based on MIME content-types. This is done with |
1863 a standard mailcap file. @xref{Mailcap Files} | 2632 a standard mailcap file. @xref{Mailcap Files} |
1864 | 2633 |
1865 @findex mm-add-mailcap-entry | 2634 @findex mm-add-mailcap-entry |
1866 As an alternative, the function @code{mm-add-mailcap-entry} can also be | 2635 As an alternative, the function @code{mm-add-mailcap-entry} can also be |
1867 used from an appropriate hook.@xref{Hooks} This functions takes three | 2636 used from an appropriate hook.@xref{Hooks} This functions takes three |
1868 arguments, the major type ("@i{image}"), the minor type ("@i{gif}"), and | 2637 arguments, the major type ("@i{image}"), the minor type ("@i{png}"), and |
1869 an assoc list of information about the viewer. Please see the @sc{url} | 2638 an assoc list of information about the viewer. Please see the @sc{url} |
1870 documentation for more specific information on what this assoc list | 2639 documentation for more specific information on what this assoc list |
1871 should look like. | 2640 should look like. |
1872 | 2641 |
1873 @node Security, Non-Unix Operating Systems, , Top | 2642 @node Security, Non-Unix Operating Systems, , Top |