summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Rackham <srackham@methods.co.nz>2011-01-27 10:50:38 +1300
committerStuart Rackham <srackham@methods.co.nz>2011-01-27 10:50:38 +1300
commit5c1186b3b998131fe0a9a466877242b558579561 (patch)
treed927b3942e2c7ff288e0d7b0209f87991167eb41
parent7b0c5419d5d7abb2a255b95d648f7aa261289abe (diff)
downloadasciidoc-5c1186b3b998131fe0a9a466877242b558579561.tar.gz
Single and double quote characters are now set using the {lsq}, {rsq},
{ldq} and {rdq} attributes. This makes is easy to customise language specific quotes. See: http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940
-rw-r--r--asciidoc.conf5
-rw-r--r--doc/asciidoc.txt31
-rw-r--r--docbook45.conf4
-rw-r--r--html4.conf4
-rw-r--r--lang-de.conf5
-rw-r--r--xhtml11.conf4
6 files changed, 33 insertions, 20 deletions
diff --git a/asciidoc.conf b/asciidoc.conf
index 7100138..6eced9d 100644
--- a/asciidoc.conf
+++ b/asciidoc.conf
@@ -43,6 +43,11 @@ two-semicolons=;;
# DEPRECATED: underscore attribute names.
two_colons=::
two_semicolons=;;
+# Left and right single and double quote characters.
+lsq=&#8216;
+rsq=&#8217;
+ldq=&#8220;
+rdq=&#8221;
[titles]
subs=specialcharacters,quotes,replacements,macros,attributes,replacements2
diff --git a/doc/asciidoc.txt b/doc/asciidoc.txt
index eba92ca..a0f8345 100644
--- a/doc/asciidoc.txt
+++ b/doc/asciidoc.txt
@@ -4131,12 +4131,11 @@ predefined intrinsic attributes:
{basebackend-<base>} empty string ''
{basebackend} html or docbook
{brvbar} broken vertical bar (|) character
- {revdate} document revision date (from document header)
{docdate} document last modified date
- {doctime} document last modified time
- {docname} document file name without extension (note 6)
- {docfile} document file name (note 5)
{docdir} document input directory name (note 5)
+ {docfile} document file name (note 5)
+ {docname} document file name without extension (note 6)
+ {doctime} document last modified time
{doctitle} document title (from document header)
{doctype-<doctype>} empty string ''
{doctype} document type specified by `-d` option
@@ -4151,10 +4150,12 @@ predefined intrinsic attributes:
{indir} input file directory name (note 2,5)
{infile} input file name (note 2,5)
{lastname} author last name (from document header)
+ {ldq} Left double quote character (note 7)
{level} title level 1..4 (in section titles)
{listindex} the list index (1..) of the most recent list item
{localdate} the current date
{localtime} the current time
+ {lsq} Left single quote character (note 7)
{lt} less than (<) character entity
{manname} manpage name (defined in NAME section)
{manpurpose} manpage (defined in NAME section)
@@ -4165,8 +4166,11 @@ predefined intrinsic attributes:
{notitle} do not display the document title
{outdir} document output directory name (note 2)
{outfile} output file name (note 2)
+ {rdq} Right double quote character (note 7)
{reftext} running block xreflabel generated by BlockId elements
+ {revdate} document revision date (from document header)
{revnumber} document revision number (from document header)
+ {rsq} Right single quote character (note 7)
{sectnum} formatted section number (in section titles)
{showcomments} send comment lines to the output
{title} section title (in titled elements)
@@ -4180,14 +4184,11 @@ predefined intrinsic attributes:
======
1. Intrinsic attributes are global so avoid defining custom attributes
with the same names.
-
2. `{outfile}`, `{outdir}`, `{infile}`, `{indir}` attributes are
effectively read-only (you can set them but it won't affect the
input or output file paths).
-
3. See also the <<X88,Backend Attributes>> section for attributes
that relate to AsciiDoc XHTML file generation.
-
4. The entries that translate to blank strings are designed to be used
for conditional text inclusion. You can also use the `ifdef`,
`ifndef` and `endif` System macros for conditional inclusion.
@@ -4195,16 +4196,18 @@ predefined intrinsic attributes:
differs from attribute conditional inclusion in that the former
occurs when the file is read while the latter occurs when the
contents are written.]
-
-5. `{docfile}` and `{docdir}` refer to root document specified on
- the asciidoc(1) command-line; `{infile}` and `{indir}` refer to
- the current input file which may be the root document or an
- included file. When the input is being read from the standard
- input (`stdin`) these attributes are undefined.
-
+5. `{docfile}` and `{docdir}` refer to root document specified on the
+ asciidoc(1) command-line; `{infile}` and `{indir}` refer to the
+ current input file which may be the root document or an included
+ file. When the input is being read from the standard input
+ (`stdin`) these attributes are undefined.
6. If the input file is the standard input and the output file is not
the standard output then `{docname}` is the output file name sans
file extension.
+7. See
+ http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks[non-English
+ usage of quotation marks].
+
======
diff --git a/docbook45.conf b/docbook45.conf
index ec66834..f637e21 100644
--- a/docbook45.conf
+++ b/docbook45.conf
@@ -197,8 +197,8 @@ text=<simpara>|</simpara>
emphasis=<emphasis>{1?<phrase role="{1}">}|{1?</phrase>}</emphasis>
strong=<emphasis role="strong">{1?<phrase role="{1}">}|{1?</phrase>}</emphasis>
monospaced=<literal>{1?<phrase role="{1}">}|{1?</phrase>}</literal>
-singlequoted={amp}#8216;{1?<phrase role="{1}">}|{1?</phrase>}{amp}#8217;
-doublequoted={amp}#8220;{1?<phrase role="{1}">}|{1?</phrase>}{amp}#8221;
+singlequoted={lsq}{1?<phrase role="{1}">}|{1?</phrase>}{rsq}
+doublequoted={ldq}{1?<phrase role="{1}">}|{1?</phrase>}{rdq}
unquoted={1?<phrase role="{1}">}|{1?</phrase>}
subscript=<subscript>{1?<phrase role="{1}">}|{1?</phrase>}</subscript>
superscript=<superscript>{1?<phrase role="{1}">}|{1?</phrase>}</superscript>
diff --git a/html4.conf b/html4.conf
index 8f52aeb..cf1a135 100644
--- a/html4.conf
+++ b/html4.conf
@@ -146,8 +146,8 @@ text=<p>|</p>
emphasis=<em>{1?<span class="{1}">}|{1?</span>}</em>
strong=<strong>{1?<span class="{1}">}|{1?</span>}</strong>
monospaced=<tt>{1?<span class="{1}">}|{1?</span>}</tt>
-singlequoted={amp}#8216;{1?<span class="{1}">}|{1?</span>}{amp}#8217;
-doublequoted={amp}#8220;{1?<span class="{1}">}|{1?</span>}{amp}#8221;
+singlequoted={lsq}{1?<span class="{1}">}|{1?</span>}{rsq}
+doublequoted={ldq}{1?<span class="{1}">}|{1?</span>}{rdq}
unquoted={1?<span class="{1}">}|{1?</span>}
superscript=<sup>{1?<span class="{1}">}|{1?</span>}</sup>
subscript=<sub>{1?<span class="{1}">}|{1?</span>}</sub>
diff --git a/lang-de.conf b/lang-de.conf
index a3ff367..cfa2d4c 100644
--- a/lang-de.conf
+++ b/lang-de.conf
@@ -4,6 +4,11 @@
#
[attributes]
+# Left and right single and double quote characters.
+lsq=&#8218;
+rsq=&#8216;
+ldq=&#8222;
+rdq=&#8220;
# Captions, used by (X)HTML backends.
# Captions on RHS are displayed in outputs.
ifdef::basebackend-html[]
diff --git a/xhtml11.conf b/xhtml11.conf
index 5e74376..1103c95 100644
--- a/xhtml11.conf
+++ b/xhtml11.conf
@@ -214,8 +214,8 @@ text=<p>|</p>
emphasis=<em>{1?<span class="{1}">}|{1?</span>}</em>
strong=<strong>{1?<span class="{1}">}|{1?</span>}</strong>
monospaced=<tt>{1?<span class="{1}">}|{1?</span>}</tt>
-singlequoted={amp}#8216;{1?<span class="{1}">}|{1?</span>}{amp}#8217;
-doublequoted={amp}#8220;{1?<span class="{1}">}|{1?</span>}{amp}#8221;
+singlequoted={lsq}{1?<span class="{1}">}|{1?</span>}{rsq}
+doublequoted={ldq}{1?<span class="{1}">}|{1?</span>}{rdq}
unquoted={1?<span class="{1}">}|{1?</span>}
superscript=<sup>{1?<span class="{1}">}|{1?</span>}</sup>
subscript=<sub>{1?<span class="{1}">}|{1?</span>}</sub>