diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-01-08 15:24:32 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2021-01-08 15:24:32 +0000 |
| commit | 5dfcf0afcfa37f96ba7f382ceb52eed649ffa5cd (patch) | |
| tree | 06c57888b807a56882133ade92c5b794d3ed624b /docs/ref/rst | |
| parent | 32029a631157548fd169e6e11b0c43b96586e797 (diff) | |
| download | docutils-5dfcf0afcfa37f96ba7f382ceb52eed649ffa5cd.tar.gz | |
Make "meta" elements available for "latex" and "odt".
Basic "odt" support exists, "latex" support is planned.
In future, the `meta directive`__ may insert <meta> instead of
pending nodes, `making transforms/components.Filter` obsolete
(solves bug #241).
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@8603 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docs/ref/rst')
| -rw-r--r-- | docs/ref/rst/directives.txt | 126 | ||||
| -rw-r--r-- | docs/ref/rst/restructuredtext.txt | 2 |
2 files changed, 71 insertions, 57 deletions
diff --git a/docs/ref/rst/directives.txt b/docs/ref/rst/directives.txt index d03ef792c..c58ba8691 100644 --- a/docs/ref/rst/directives.txt +++ b/docs/ref/rst/directives.txt @@ -1224,62 +1224,6 @@ Citations HTML-Specific --------------- -Meta -==== - -:Directive Type: "meta" -:Doctree Element: meta (non-standard) -:Directive Arguments: None. -:Directive Options: None. -:Directive Content: Must contain a flat field list. - -The "meta" directive is used to specify HTML metadata stored in HTML -META tags. "Metadata" is data about data, in this case data about web -pages. Metadata is used to describe and classify web pages in the -World Wide Web, in a form that is easy for search engines to extract -and collate. - -Within the directive block, a flat field list provides the syntax for -metadata. The field name becomes the contents of the "name" attribute -of the META tag, and the field body (interpreted as a single string -without inline markup) becomes the contents of the "content" -attribute. For example:: - - .. meta:: - :description: The reStructuredText plaintext markup language - :keywords: plaintext, markup language - -This would be converted to the following HTML:: - - <meta name="description" - content="The reStructuredText plaintext markup language"> - <meta name="keywords" content="plaintext, markup language"> - -Support for other META attributes ("http-equiv", "scheme", "lang", -"dir") are provided through field arguments, which must be of the form -"attr=value":: - - .. meta:: - :description lang=en: An amusing story - :description lang=fr: Une histoire amusante - -And their HTML equivalents:: - - <meta name="description" lang="en" content="An amusing story"> - <meta name="description" lang="fr" content="Une histoire amusante"> - -Some META tags use an "http-equiv" attribute instead of the "name" -attribute. To specify "http-equiv" META tags, simply omit the name:: - - .. meta:: - :http-equiv=Content-Type: text/html; charset=ISO-8859-1 - -HTML equivalent:: - - <meta http-equiv="Content-Type" - content="text/html; charset=ISO-8859-1"> - - Imagemap ======== @@ -1914,6 +1858,76 @@ initial default interpreted text role of the standard reStructuredText parser is "title-reference". +Metadata +======== + +:Directive Type: "meta" +:Doctree Element: pending_, meta (non-standard) +:Directive Arguments: None. +:Directive Options: None. +:Directive Content: Must contain a flat field list. + +The "meta" directive is used to specify metadata\ [#]_ to be stored +in, e.g., HTML META tags or as ODT file properties. If the output +format does not support "invisible" metadata, it is silently +dropped by the writer. + +.. note:: Data from some `bibliographic fields`_ is automatically + extracted and stored in META tags, too. However, Bibliographic + Fields are also visible in the document's screen rendering or + printout. + + For an "invisible" *document title*, see the `metadata document + title`_ directive below. + +Within the directive block, a flat field list provides the syntax for +metadata. The field name becomes the contents of the "name" attribute +of the META tag, and the field body (interpreted as a single string +without inline markup) becomes the contents of the "content" +attribute. For example:: + + .. meta:: + :description: The reStructuredText plaintext markup language + :keywords: plaintext, markup language + +This would be converted to the following HTML:: + + <meta name="description" + content="The reStructuredText plaintext markup language"> + <meta name="keywords" content="plaintext, markup language"> + +Support for other META attributes ("http-equiv", "scheme", "lang", +"dir") are provided through field arguments, which must be of the form +"attr=value":: + + .. meta:: + :description lang=en: An amusing story + :description lang=fr: Une histoire amusante + +And their HTML equivalents:: + + <meta name="description" lang="en" content="An amusing story"> + <meta name="description" lang="fr" content="Une histoire amusante"> + +Some META tags use an "http-equiv" attribute instead of the "name" +attribute. To specify "http-equiv" META tags, simply omit the name:: + + .. meta:: + :http-equiv=Content-Type: text/html; charset=ISO-8859-1 + +HTML equivalent:: + + <meta http-equiv="Content-Type" + content="text/html; charset=ISO-8859-1"> + +.. [#] "Metadata" is data about data, in this case data about the + document. Metadata is, e.g., used to describe and classify web + pages in the World Wide Web, in a form that is easy for search + engines to extract and collate. + +.. _bibliographic fields: restructuredtext.html#bibliographic-fields + + Metadata Document Title ======================= diff --git a/docs/ref/rst/restructuredtext.txt b/docs/ref/rst/restructuredtext.txt index a350ef090..bca2e9532 100644 --- a/docs/ref/rst/restructuredtext.txt +++ b/docs/ref/rst/restructuredtext.txt @@ -3117,7 +3117,7 @@ Markup errors are handled according to the specification in `PEP http://www.w3.org/TR/WCAG10-HTML-TECHS/#link-text .. _image: directives.html#image .. _replace: directives.html#replace -.. _meta: directives.html#meta +.. _meta: directives.html#metadata .. _figure: directives.html#figure .. _admonition: directives.html#admonitions .. _role: directives.html#custom-interpreted-text-roles |
