diff -Nru asciidoc-8.6.10/a2x.py asciidoc-10.1.2/a2x.py --- asciidoc-8.6.10/a2x.py 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/a2x.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,965 +0,0 @@ -#!/usr/bin/env python2 -''' -a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other - file formats) - -Copyright: Stuart Rackham (c) 2009 -License: MIT -Email: srackham@gmail.com - -''' - -import os -import fnmatch -import HTMLParser -import re -import shutil -import subprocess -import sys -import traceback -import urlparse -import zipfile -import xml.dom.minidom -import mimetypes -import codecs - -PROG = os.path.basename(os.path.splitext(__file__)[0]) -VERSION = '8.6.10' - -# AsciiDoc global configuration file directory. -# NOTE: CONF_DIR is "fixed up" by Makefile -- don't rename or change syntax. -CONF_DIR = '/etc/asciidoc' - - -###################################################################### -# Default configuration file parameters. -###################################################################### - -# Optional environment variable dictionary passed to -# executing programs. If set to None the existing -# environment is used. -ENV = None - -# External executables. -ASCIIDOC = 'asciidoc' -XSLTPROC = 'xsltproc' -DBLATEX = 'dblatex' # pdf generation. -FOP = 'fop' # pdf generation (--fop option). -W3M = 'w3m' # primary text file generator. -LYNX = 'lynx' # alternate text file generator. -XMLLINT = 'xmllint' # Set to '' to disable. -EPUBCHECK = 'epubcheck' # Set to '' to disable. -# External executable default options. -ASCIIDOC_OPTS = '' -BACKEND_OPTS = '' -DBLATEX_OPTS = '' -FOP_OPTS = '' -LYNX_OPTS = '-dump' -W3M_OPTS = '-dump -cols 70 -T text/html -no-graph' -XSLTPROC_OPTS = '' - -###################################################################### -# End of configuration file parameters. -###################################################################### - - -##################################################################### -# Utility functions -##################################################################### - -OPTIONS = None # These functions read verbose and dry_run command options. - -def errmsg(msg): - sys.stderr.write('%s: %s\n' % (PROG,msg)) - -def warning(msg): - errmsg('WARNING: %s' % msg) - -def infomsg(msg): - print '%s: %s' % (PROG,msg) - -def die(msg, exit_code=1): - errmsg('ERROR: %s' % msg) - sys.exit(exit_code) - -def trace(): - """Print traceback to stderr.""" - errmsg('-'*60) - traceback.print_exc(file=sys.stderr) - errmsg('-'*60) - -def verbose(msg): - if OPTIONS.verbose or OPTIONS.dry_run: - infomsg(msg) - -class AttrDict(dict): - """ - Like a dictionary except values can be accessed as attributes i.e. obj.foo - can be used in addition to obj['foo']. - If self._default has been set then it will be returned if a non-existant - attribute is accessed (instead of raising an AttributeError). - """ - def __getattr__(self, key): - try: - return self[key] - except KeyError, k: - if self.has_key('_default'): - return self['_default'] - else: - raise AttributeError, k - def __setattr__(self, key, value): - self[key] = value - def __delattr__(self, key): - try: del self[key] - except KeyError, k: raise AttributeError, k - def __repr__(self): - return '' - def __getstate__(self): - return dict(self) - def __setstate__(self,value): - for k,v in value.items(): self[k]=v - -def isexecutable(file_name): - return os.path.isfile(file_name) and os.access(file_name, os.X_OK) - -def find_executable(file_name): - ''' - Search for executable file_name in the system PATH. - Return full path name or None if not found. - ''' - def _find_executable(file_name): - if os.path.split(file_name)[0] != '': - # file_name includes directory so don't search path. - if not isexecutable(file_name): - return None - else: - return file_name - for p in os.environ.get('PATH', os.defpath).split(os.pathsep): - f = os.path.join(p, file_name) - if isexecutable(f): - return os.path.realpath(f) - return None - if os.name == 'nt' and os.path.splitext(file_name)[1] == '': - for ext in ('.cmd','.bat','.exe'): - result = _find_executable(file_name + ext) - if result: break - else: - result = _find_executable(file_name) - return result - -def write_file(filename, data, mode='w', encoding='utf-8'): - f = codecs.open(filename, mode, encoding) - try: - f.write(data) - finally: - f.close() - -def read_file(filename, mode='r'): - f = open(filename, mode) - try: - return f.read() - finally: - f.close() - -def shell_cd(path): - verbose('chdir %s' % path) - if not OPTIONS.dry_run: - os.chdir(path) - -def shell_makedirs(path): - if os.path.isdir(path): - return - verbose('creating %s' % path) - if not OPTIONS.dry_run: - os.makedirs(path) - -def shell_copy(src, dst): - verbose('copying "%s" to "%s"' % (src,dst)) - if not OPTIONS.dry_run: - shutil.copy(src, dst) - -def shell_rm(path): - if not os.path.exists(path): - return - verbose('deleting %s' % path) - if not OPTIONS.dry_run: - os.unlink(path) - -def shell_rmtree(path): - if not os.path.isdir(path): - return - verbose('deleting %s' % path) - if not OPTIONS.dry_run: - shutil.rmtree(path) - -def shell(cmd, raise_error=True): - ''' - Execute command cmd in shell and return tuple - (stdoutdata, stderrdata, returncode). - If raise_error is True then a non-zero return terminates the application. - ''' - if os.name == 'nt': - # TODO: this is probably unnecessary, see: - # http://groups.google.com/group/asciidoc/browse_frm/thread/9442ee0c419f1242 - # Windows doesn't like running scripts directly so explicitly - # specify python interpreter. - # Extract first (quoted or unquoted) argument. - mo = re.match(r'^\s*"\s*(?P[^"]+)\s*"', cmd) - if not mo: - mo = re.match(r'^\s*(?P[^ ]+)', cmd) - if mo.group('arg0').endswith('.py'): - cmd = 'python ' + cmd - # Remove redundant quoting -- this is not just cosmetic, - # quoting seems to dramatically decrease the allowed command - # length in Windows XP. - cmd = re.sub(r'"([^ ]+?)"', r'\1', cmd) - verbose('executing: %s' % cmd) - if OPTIONS.dry_run: - return - stdout = stderr = subprocess.PIPE - try: - popen = subprocess.Popen(cmd, stdout=stdout, stderr=stderr, - shell=True, env=ENV) - except OSError, e: - die('failed: %s: %s' % (cmd, e)) - stdoutdata, stderrdata = popen.communicate() - if OPTIONS.verbose: - print stdoutdata - print stderrdata - if popen.returncode != 0 and raise_error: - die('%s returned non-zero exit status %d' % (cmd, popen.returncode)) - return (stdoutdata, stderrdata, popen.returncode) - -def find_resources(files, tagname, attrname, filter=None): - ''' - Search all files and return a list of local URIs from attrname attribute - values in tagname tags. - Handles HTML open and XHTML closed tags. - Non-local URIs are skipped. - files can be a file name or a list of file names. - The filter function takes a dictionary of tag attributes and returns True if - the URI is to be included. - ''' - class FindResources(HTMLParser.HTMLParser): - # Nested parser class shares locals with enclosing function. - def handle_startendtag(self, tag, attrs): - self.handle_starttag(tag, attrs) - def handle_starttag(self, tag, attrs): - attrs = dict(attrs) - if tag == tagname and (filter is None or filter(attrs)): - # Accept only local URIs. - uri = urlparse.urlparse(attrs[attrname]) - if uri[0] in ('','file') and not uri[1] and uri[2]: - result.append(uri[2]) - if isinstance(files, str): - files = [files] - result = [] - for filename in files: - verbose('finding resources in: %s' % filename) - if OPTIONS.dry_run: - continue - parser = FindResources() - # HTMLParser has problems with non-ASCII strings. - # See http://bugs.python.org/issue3932 - contents = read_file(filename) - mo = re.search(r'\A<\?xml.* encoding="(.*?)"', contents) - if mo: - encoding = mo.group(1) - parser.feed(contents.decode(encoding)) - else: - parser.feed(contents) - parser.close() - result = list(set(result)) # Drop duplicate values. - result.sort() - return result - -# NOT USED. -def copy_files(files, src_dir, dst_dir): - ''' - Copy list of relative file names from src_dir to dst_dir. - ''' - for filename in files: - filename = os.path.normpath(filename) - if os.path.isabs(filename): - continue - src = os.path.join(src_dir, filename) - dst = os.path.join(dst_dir, filename) - if not os.path.exists(dst): - if not os.path.isfile(src): - warning('missing file: %s' % src) - continue - dstdir = os.path.dirname(dst) - shell_makedirs(dstdir) - shell_copy(src, dst) - -def find_files(path, pattern): - ''' - Return list of file names matching pattern in directory path. - ''' - result = [] - for (p,dirs,files) in os.walk(path): - for f in files: - if fnmatch.fnmatch(f, pattern): - result.append(os.path.normpath(os.path.join(p,f))) - return result - -def exec_xsltproc(xsl_file, xml_file, dst_dir, opts = ''): - cwd = os.getcwd() - shell_cd(dst_dir) - try: - shell('"%s" %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file)) - finally: - shell_cd(cwd) - -def get_source_options(asciidoc_file): - ''' - Look for a2x command options in AsciiDoc source file. - Limitation: options cannot contain double-quote characters. - ''' - def parse_options(): - # Parse options to result sequence. - inquotes = False - opt = '' - for c in options: - if c == '"': - if inquotes: - result.append(opt) - opt = '' - inquotes = False - else: - inquotes = True - elif c == ' ': - if inquotes: - opt += c - elif opt: - result.append(opt) - opt = '' - else: - opt += c - if opt: - result.append(opt) - - result = [] - if os.path.isfile(asciidoc_file): - options = '' - f = open(asciidoc_file) - try: - for line in f: - mo = re.search(r'^//\s*a2x:', line) - if mo: - options += ' ' + line[mo.end():].strip() - finally: - f.close() - parse_options() - return result - - -##################################################################### -# Application class -##################################################################### - -class A2X(AttrDict): - ''' - a2x options and conversion functions. - ''' - - def execute(self): - ''' - Process a2x command. - ''' - self.process_options() - # Append configuration file options. - self.asciidoc_opts += ' ' + ASCIIDOC_OPTS - self.dblatex_opts += ' ' + DBLATEX_OPTS - self.fop_opts += ' ' + FOP_OPTS - self.xsltproc_opts += ' ' + XSLTPROC_OPTS - self.backend_opts += ' ' + BACKEND_OPTS - # Execute to_* functions. - if self.backend: - self.to_backend() - else: - self.__getattribute__('to_'+self.format)() - if not (self.keep_artifacts or self.format == 'docbook' or self.skip_asciidoc): - shell_rm(self.dst_path('.xml')) - - def load_conf(self): - ''' - Load a2x configuration file from default locations and --conf-file - option. - ''' - global ASCIIDOC - CONF_FILE = 'a2x.conf' - a2xdir = os.path.dirname(os.path.realpath(__file__)) - conf_files = [] - # From a2x.py directory. - conf_files.append(os.path.join(a2xdir, CONF_FILE)) - # If the asciidoc executable and conf files are in the a2x directory - # then use the local copy of asciidoc and skip the global a2x conf. - asciidoc = os.path.join(a2xdir, 'asciidoc.py') - asciidoc_conf = os.path.join(a2xdir, 'asciidoc.conf') - if os.path.isfile(asciidoc) and os.path.isfile(asciidoc_conf): - self.asciidoc = asciidoc - else: - self.asciidoc = None - # From global conf directory. - conf_files.append(os.path.join(CONF_DIR, CONF_FILE)) - # From $HOME directory. - home_dir = os.environ.get('HOME') - if home_dir is not None: - conf_files.append(os.path.join(home_dir, '.asciidoc', CONF_FILE)) - # If asciidoc is not local to a2x then search the PATH. - if not self.asciidoc: - self.asciidoc = find_executable(ASCIIDOC) - if not self.asciidoc: - die('unable to find asciidoc: %s' % ASCIIDOC) - # From backend plugin directory. - if self.backend is not None: - stdout = shell(self.asciidoc + ' --backend list')[0] - backends = [(i, os.path.split(i)[1]) for i in stdout.splitlines()] - backend_dir = [i[0] for i in backends if i[1] == self.backend] - if len(backend_dir) == 0: - die('missing %s backend' % self.backend) - if len(backend_dir) > 1: - die('more than one %s backend' % self.backend) - verbose('found %s backend directory: %s' % - (self.backend, backend_dir[0])) - conf_files.append(os.path.join(backend_dir[0], 'a2x-backend.py')) - # From --conf-file option. - if self.conf_file is not None: - if not os.path.isfile(self.conf_file): - die('missing configuration file: %s' % self.conf_file) - conf_files.append(self.conf_file) - # From --xsl-file option. - if self.xsl_file is not None: - if not os.path.isfile(self.xsl_file): - die('missing XSL file: %s' % self.xsl_file) - self.xsl_file = os.path.abspath(self.xsl_file) - # Load ordered files. - for f in conf_files: - if os.path.isfile(f): - verbose('loading configuration file: %s' % f) - execfile(f, globals()) - - def process_options(self): - ''' - Validate and command options and set defaults. - ''' - if not os.path.isfile(self.asciidoc_file): - die('missing SOURCE_FILE: %s' % self.asciidoc_file) - self.asciidoc_file = os.path.abspath(self.asciidoc_file) - if os.path.splitext(self.asciidoc_file)[1].lower() == '.xml': - self.skip_asciidoc = True - else: - self.skip_asciidoc = False - if not self.destination_dir: - self.destination_dir = os.path.dirname(self.asciidoc_file) - else: - if not os.path.isdir(self.destination_dir): - die('missing --destination-dir: %s' % self.destination_dir) - self.destination_dir = os.path.abspath(self.destination_dir) - if not self.format in ('chunked','epub','htmlhelp','xhtml','manpage'): - warning('--destination-dir option is only applicable to HTML and manpage based outputs') - self.resource_dirs = [] - self.resource_files = [] - if self.resource_manifest: - if not os.path.isfile(self.resource_manifest): - die('missing --resource-manifest: %s' % self.resource_manifest) - f = open(self.resource_manifest) - try: - for r in f: - self.resources.append(r.strip()) - finally: - f.close() - for r in self.resources: - r = os.path.expanduser(r) - r = os.path.expandvars(r) - if r.endswith('/') or r.endswith('\\'): - if os.path.isdir(r): - self.resource_dirs.append(r) - else: - die('missing resource directory: %s' % r) - elif os.path.isdir(r): - self.resource_dirs.append(r) - elif r.startswith('.') and '=' in r: - ext, mimetype = r.split('=') - mimetypes.add_type(mimetype, ext) - else: - self.resource_files.append(r) - for p in (os.path.dirname(self.asciidoc), CONF_DIR): - for d in ('images','stylesheets'): - d = os.path.join(p,d) - if os.path.isdir(d): - self.resource_dirs.append(d) - verbose('resource files: %s' % self.resource_files) - verbose('resource directories: %s' % self.resource_dirs) - if not self.doctype and self.format == 'manpage': - self.doctype = 'manpage' - if self.doctype: - self.asciidoc_opts += ' --doctype %s' % self.doctype - for attr in self.attributes: - self.asciidoc_opts += ' --attribute "%s"' % attr -# self.xsltproc_opts += ' --nonet' - if self.verbose: - self.asciidoc_opts += ' --verbose' - self.dblatex_opts += ' -V' - if self.icons or self.icons_dir: - params = [ - 'callout.graphics 1', - 'navig.graphics 1', - 'admon.textlabel 0', - 'admon.graphics 1', - ] - if self.icons_dir: - params += [ - 'admon.graphics.path "%s/"' % self.icons_dir, - 'callout.graphics.path "%s/callouts/"' % self.icons_dir, - 'navig.graphics.path "%s/"' % self.icons_dir, - ] - else: - params = [ - 'callout.graphics 0', - 'navig.graphics 0', - 'admon.textlabel 1', - 'admon.graphics 0', - ] - if self.stylesheet: - params += ['html.stylesheet "%s"' % self.stylesheet] - if self.format == 'htmlhelp': - params += ['htmlhelp.chm "%s"' % self.basename('.chm'), - 'htmlhelp.hhp "%s"' % self.basename('.hhp'), - 'htmlhelp.hhk "%s"' % self.basename('.hhk'), - 'htmlhelp.hhc "%s"' % self.basename('.hhc')] - if self.doctype == 'book': - params += ['toc.section.depth 1'] - # Books are chunked at chapter level. - params += ['chunk.section.depth 0'] - for o in params: - if o.split()[0]+' ' not in self.xsltproc_opts: - self.xsltproc_opts += ' --stringparam ' + o - if self.fop_opts: - self.fop = True - - def dst_path(self, ext): - ''' - Return name of file or directory in the destination directory with - the same name as the asciidoc source file but with extension ext. - ''' - return os.path.join(self.destination_dir, self.basename(ext)) - - def basename(self, ext): - ''' - Return the base name of the asciidoc source file but with extension - ext. - ''' - return os.path.basename(os.path.splitext(self.asciidoc_file)[0]) + ext - - def asciidoc_conf_file(self, path): - ''' - Return full path name of file in asciidoc configuration files directory. - Search first the directory containing the asciidoc executable then - the global configuration file directory. - ''' - f = os.path.join(os.path.dirname(self.asciidoc), path) - if not os.path.isfile(f): - f = os.path.join(CONF_DIR, path) - if not os.path.isfile(f): - die('missing configuration file: %s' % f) - return os.path.normpath(f) - - def xsl_stylesheet(self, file_name=None): - ''' - Return full path name of file in asciidoc docbook-xsl configuration - directory. - If an XSL file was specified with the --xsl-file option then it is - returned. - ''' - if self.xsl_file is not None: - return self.xsl_file - if not file_name: - file_name = self.format + '.xsl' - return self.asciidoc_conf_file(os.path.join('docbook-xsl', file_name)) - - def copy_resources(self, html_files, src_dir, dst_dir, resources=[]): - ''' - Search html_files for images and CSS resource URIs (html_files can be a - list of file names or a single file name). - Copy them from the src_dir to the dst_dir. - If not found in src_dir then recursively search all specified - resource directories. - Optional additional resources files can be passed in the resources list. - ''' - resources = resources[:] - resources += find_resources(html_files, 'link', 'href', - lambda attrs: attrs.get('type') == 'text/css') - resources += find_resources(html_files, 'img', 'src') - resources += self.resource_files - resources = list(set(resources)) # Drop duplicates. - resources.sort() - for f in resources: - if '=' in f: - src, dst = f.split('=') - if not dst: - dst = src - else: - src = dst = f - src = os.path.normpath(src) - dst = os.path.normpath(dst) - if os.path.isabs(dst): - die('absolute resource file name: %s' % dst) - if dst.startswith(os.pardir): - die('resource file outside destination directory: %s' % dst) - src = os.path.join(src_dir, src) - dst = os.path.join(dst_dir, dst) - if not os.path.isfile(src): - for d in self.resource_dirs: - d = os.path.join(src_dir, d) - found = find_files(d, os.path.basename(src)) - if found: - src = found[0] - break - else: - if not os.path.isfile(dst): - die('missing resource: %s' % src) - continue - # Arrive here if resource file has been found. - if os.path.normpath(src) != os.path.normpath(dst): - dstdir = os.path.dirname(dst) - shell_makedirs(dstdir) - shell_copy(src, dst) - - def to_backend(self): - ''' - Convert AsciiDoc source file to a backend output file using the global - 'to_' function (loaded from backend plugin a2x-backend.py - file). - Executes the global function in an A2X class instance context. - ''' - eval('to_%s(self)' % self.backend) - - def to_docbook(self): - ''' - Use asciidoc to convert asciidoc_file to DocBook. - args is a string containing additional asciidoc arguments. - ''' - docbook_file = self.dst_path('.xml') - if self.skip_asciidoc: - if not os.path.isfile(docbook_file): - die('missing docbook file: %s' % docbook_file) - return - shell('"%s" --backend docbook -a "a2x-format=%s" %s --out-file "%s" "%s"' % - (self.asciidoc, self.format, self.asciidoc_opts, docbook_file, self.asciidoc_file)) - if not self.no_xmllint and XMLLINT: - shell('"%s" --nonet --noout --valid "%s"' % (XMLLINT, docbook_file)) - - def to_xhtml(self): - self.to_docbook() - docbook_file = self.dst_path('.xml') - xhtml_file = self.dst_path('.html') - opts = '%s --output "%s"' % (self.xsltproc_opts, xhtml_file) - exec_xsltproc(self.xsl_stylesheet(), docbook_file, self.destination_dir, opts) - src_dir = os.path.dirname(self.asciidoc_file) - self.copy_resources(xhtml_file, src_dir, self.destination_dir) - - def to_manpage(self): - self.to_docbook() - docbook_file = self.dst_path('.xml') - opts = self.xsltproc_opts - exec_xsltproc(self.xsl_stylesheet(), docbook_file, self.destination_dir, opts) - - def to_pdf(self): - if self.fop: - self.exec_fop() - else: - self.exec_dblatex() - - def exec_fop(self): - self.to_docbook() - docbook_file = self.dst_path('.xml') - xsl = self.xsl_stylesheet('fo.xsl') - fo = self.dst_path('.fo') - pdf = self.dst_path('.pdf') - opts = '%s --output "%s"' % (self.xsltproc_opts, fo) - exec_xsltproc(xsl, docbook_file, self.destination_dir, opts) - shell('"%s" %s -fo "%s" -pdf "%s"' % (FOP, self.fop_opts, fo, pdf)) - if not self.keep_artifacts: - shell_rm(fo) - - def exec_dblatex(self): - self.to_docbook() - docbook_file = self.dst_path('.xml') - xsl = self.asciidoc_conf_file(os.path.join('dblatex','asciidoc-dblatex.xsl')) - sty = self.asciidoc_conf_file(os.path.join('dblatex','asciidoc-dblatex.sty')) - shell('"%s" -t %s -p "%s" -s "%s" %s "%s"' % - (DBLATEX, self.format, xsl, sty, self.dblatex_opts, docbook_file)) - - def to_dvi(self): - self.exec_dblatex() - - def to_ps(self): - self.exec_dblatex() - - def to_tex(self): - self.exec_dblatex() - - def to_htmlhelp(self): - self.to_chunked() - - def to_chunked(self): - self.to_docbook() - docbook_file = self.dst_path('.xml') - opts = self.xsltproc_opts - xsl_file = self.xsl_stylesheet() - if self.format == 'chunked': - dst_dir = self.dst_path('.chunked') - elif self.format == 'htmlhelp': - dst_dir = self.dst_path('.htmlhelp') - if not 'base.dir ' in opts: - opts += ' --stringparam base.dir "%s/"' % os.path.basename(dst_dir) - # Create content. - shell_rmtree(dst_dir) - shell_makedirs(dst_dir) - exec_xsltproc(xsl_file, docbook_file, self.destination_dir, opts) - html_files = find_files(dst_dir, '*.html') - src_dir = os.path.dirname(self.asciidoc_file) - self.copy_resources(html_files, src_dir, dst_dir) - - def update_epub_manifest(self, opf_file): - ''' - Scan the OEBPS directory for any files that have not been registered in - the OPF manifest then add them to the manifest. - ''' - opf_dir = os.path.dirname(opf_file) - resource_files = [] - for (p,dirs,files) in os.walk(os.path.dirname(opf_file)): - for f in files: - f = os.path.join(p,f) - if os.path.isfile(f): - assert f.startswith(opf_dir) - f = '.' + f[len(opf_dir):] - f = os.path.normpath(f) - if f not in ['content.opf']: - resource_files.append(f) - opf = xml.dom.minidom.parseString(read_file(opf_file)) - manifest_files = [] - manifest = opf.getElementsByTagName('manifest')[0] - for el in manifest.getElementsByTagName('item'): - f = el.getAttribute('href') - f = os.path.normpath(f) - manifest_files.append(f) - count = 0 - for f in resource_files: - if f not in manifest_files: - count += 1 - verbose('adding to manifest: %s' % f) - item = opf.createElement('item') - item.setAttribute('href', f.replace(os.path.sep, '/')) - item.setAttribute('id', 'a2x-%d' % count) - mimetype = mimetypes.guess_type(f)[0] - if mimetype is None: - die('unknown mimetype: %s' % f) - item.setAttribute('media-type', mimetype) - manifest.appendChild(item) - if count > 0: - write_file(opf_file, opf.toxml()) - - def to_epub(self): - self.to_docbook() - xsl_file = self.xsl_stylesheet() - docbook_file = self.dst_path('.xml') - epub_file = self.dst_path('.epub') - build_dir = epub_file + '.d' - shell_rmtree(build_dir) - shell_makedirs(build_dir) - # Create content. - exec_xsltproc(xsl_file, docbook_file, build_dir, self.xsltproc_opts) - # Copy resources referenced in the OPF and resources referenced by the - # generated HTML (in theory DocBook XSL should ensure they are - # identical but this is not always the case). - src_dir = os.path.dirname(self.asciidoc_file) - dst_dir = os.path.join(build_dir, 'OEBPS') - opf_file = os.path.join(dst_dir, 'content.opf') - opf_resources = find_resources(opf_file, 'item', 'href') - html_files = find_files(dst_dir, '*.html') - self.copy_resources(html_files, src_dir, dst_dir, opf_resources) - # Register any unregistered resources. - self.update_epub_manifest(opf_file) - # Build epub archive. - cwd = os.getcwd() - shell_cd(build_dir) - try: - if not self.dry_run: - zip = zipfile.ZipFile(epub_file, 'w') - try: - # Create and add uncompressed mimetype file. - verbose('archiving: mimetype') - write_file('mimetype', 'application/epub+zip') - zip.write('mimetype', compress_type=zipfile.ZIP_STORED) - # Compress all remaining files. - for (p,dirs,files) in os.walk('.'): - for f in files: - f = os.path.normpath(os.path.join(p,f)) - if f != 'mimetype': - verbose('archiving: %s' % f) - zip.write(f, compress_type=zipfile.ZIP_DEFLATED) - finally: - zip.close() - verbose('created archive: %s' % epub_file) - finally: - shell_cd(cwd) - if not self.keep_artifacts: - shell_rmtree(build_dir) - if self.epubcheck and EPUBCHECK: - if not find_executable(EPUBCHECK): - warning('epubcheck skipped: unable to find executable: %s' % EPUBCHECK) - else: - shell('"%s" "%s"' % (EPUBCHECK, epub_file)) - - def to_text(self): - text_file = self.dst_path('.text') - html_file = self.dst_path('.text.html') - if self.lynx: - shell('"%s" %s --conf-file "%s" -b html4 -a "a2x-format=%s" -o "%s" "%s"' % - (self.asciidoc, self.asciidoc_opts, self.asciidoc_conf_file('text.conf'), - self.format, html_file, self.asciidoc_file)) - cmd = '"%s" %s "%s" > "%s"' % (LYNX, LYNX_OPTS, html_file, text_file) - shell(cmd) - else: - # Use w3m(1). - self.to_docbook() - docbook_file = self.dst_path('.xml') - opts = '%s --output "%s"' % (self.xsltproc_opts, html_file) - exec_xsltproc(self.xsl_stylesheet(), docbook_file, - self.destination_dir, opts) - cmd = '"%s" %s "%s" > "%s"' % (W3M, W3M_OPTS, html_file, text_file) - shell(cmd) - if not self.keep_artifacts: - shell_rm(html_file) - - -##################################################################### -# Script main line. -##################################################################### - -if __name__ == '__main__': - description = '''A toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats)''' - from optparse import OptionParser - parser = OptionParser(usage='usage: %prog [OPTIONS] SOURCE_FILE', - version='%s %s' % (PROG,VERSION), - description=description) - parser.add_option('-a', '--attribute', - action='append', dest='attributes', default=[], metavar='ATTRIBUTE', - help='set asciidoc attribute value') - parser.add_option('--asciidoc-opts', - action='append', dest='asciidoc_opts', default=[], - metavar='ASCIIDOC_OPTS', help='asciidoc options') - #DEPRECATED - parser.add_option('--copy', - action='store_true', dest='copy', default=False, - help='DEPRECATED: does nothing') - parser.add_option('--conf-file', - dest='conf_file', default=None, metavar='CONF_FILE', - help='configuration file') - parser.add_option('-D', '--destination-dir', - action='store', dest='destination_dir', default=None, metavar='PATH', - help='output directory (defaults to SOURCE_FILE directory)') - parser.add_option('-d','--doctype', - action='store', dest='doctype', metavar='DOCTYPE', - choices=('article','manpage','book'), - help='article, manpage, book') - parser.add_option('-b','--backend', - action='store', dest='backend', metavar='BACKEND', - help='name of backend plugin') - parser.add_option('--epubcheck', - action='store_true', dest='epubcheck', default=False, - help='check EPUB output with epubcheck') - parser.add_option('-f','--format', - action='store', dest='format', metavar='FORMAT', default = 'pdf', - choices=('chunked','epub','htmlhelp','manpage','pdf', 'text', - 'xhtml','dvi','ps','tex','docbook'), - help='chunked, epub, htmlhelp, manpage, pdf, text, xhtml, dvi, ps, tex, docbook') - parser.add_option('--icons', - action='store_true', dest='icons', default=False, - help='use admonition, callout and navigation icons') - parser.add_option('--icons-dir', - action='store', dest='icons_dir', - default=None, metavar='PATH', - help='admonition and navigation icon directory') - parser.add_option('-k', '--keep-artifacts', - action='store_true', dest='keep_artifacts', default=False, - help='do not delete temporary build files') - parser.add_option('--lynx', - action='store_true', dest='lynx', default=False, - help='use lynx to generate text files') - parser.add_option('-L', '--no-xmllint', - action='store_true', dest='no_xmllint', default=False, - help='do not check asciidoc output with xmllint') - parser.add_option('-n','--dry-run', - action='store_true', dest='dry_run', default=False, - help='just print the commands that would have been executed') - parser.add_option('-r','--resource', - action='append', dest='resources', default=[], - metavar='PATH', - help='resource file or directory containing resource files') - parser.add_option('-m', '--resource-manifest', - action='store', dest='resource_manifest', default=None, metavar='FILE', - help='read resources from FILE') - #DEPRECATED - parser.add_option('--resource-dir', - action='append', dest='resources', default=[], - metavar='PATH', - help='DEPRECATED: use --resource') - #DEPRECATED - parser.add_option('-s','--skip-asciidoc', - action='store_true', dest='skip_asciidoc', default=False, - help='DEPRECATED: redundant') - parser.add_option('--stylesheet', - action='store', dest='stylesheet', default=None, - metavar='STYLESHEET', - help='HTML CSS stylesheet file name') - #DEPRECATED - parser.add_option('--safe', - action='store_true', dest='safe', default=False, - help='DEPRECATED: does nothing') - parser.add_option('--dblatex-opts', - action='append', dest='dblatex_opts', default=[], - metavar='DBLATEX_OPTS', help='dblatex options') - parser.add_option('--backend-opts', - action='append', dest='backend_opts', default=[], - metavar='BACKEND_OPTS', help='backend plugin options') - parser.add_option('--fop', - action='store_true', dest='fop', default=False, - help='use FOP to generate PDF files') - parser.add_option('--fop-opts', - action='append', dest='fop_opts', default=[], - metavar='FOP_OPTS', help='options for FOP pdf generation') - parser.add_option('--xsltproc-opts', - action='append', dest='xsltproc_opts', default=[], - metavar='XSLTPROC_OPTS', help='xsltproc options for XSL stylesheets') - parser.add_option('--xsl-file', - action='store', dest='xsl_file', metavar='XSL_FILE', - help='custom XSL stylesheet') - parser.add_option('-v', '--verbose', - action='count', dest='verbose', default=0, - help='increase verbosity') - if len(sys.argv) == 1: - parser.parse_args(['--help']) - source_options = get_source_options(sys.argv[-1]) - argv = source_options + sys.argv[1:] - opts, args = parser.parse_args(argv) - if len(args) != 1: - parser.error('incorrect number of arguments') - opts.asciidoc_opts = ' '.join(opts.asciidoc_opts) - opts.dblatex_opts = ' '.join(opts.dblatex_opts) - opts.fop_opts = ' '.join(opts.fop_opts) - opts.xsltproc_opts = ' '.join(opts.xsltproc_opts) - opts.backend_opts = ' '.join(opts.backend_opts) - opts = eval(str(opts)) # Convert optparse.Values to dict. - a2x = A2X(opts) - OPTIONS = a2x # verbose and dry_run used by utility functions. - verbose('args: %r' % argv) - a2x.asciidoc_file = args[0] - try: - a2x.load_conf() - a2x.execute() - except KeyboardInterrupt: - sys.exit(1) diff -Nru asciidoc-8.6.10/asciidoc/a2x.py asciidoc-10.1.2/asciidoc/a2x.py --- asciidoc-8.6.10/asciidoc/a2x.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/a2x.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1014 @@ +#!/usr/bin/env python3 + +""" +a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other + file formats) + +Free use of this software is granted under the terms of the MIT license. + +Copyright (C) 2002-2013 Stuart Rackham. +Copyright (C) 2013-2020 AsciiDoc Contributors. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +""" + +# Please note, the contents of this module are considered "private" and may +# change within the 10.0+ releases. If you come to depend on a specific method +# or class, please leave a GitHub issue stating as much. + +import io +import os +import fnmatch +from html.parser import HTMLParser +import re +import shutil +import subprocess +import sys +import traceback +from typing import List, NoReturn, Tuple, Union +from urllib.parse import urlparse +import zipfile +import xml.dom.minidom +import mimetypes + +from . import asciidoc +from .collections import DefaultAttrDict as AttrDict + +CONF_DIR = os.path.join(os.path.dirname(__file__), 'resources') +METADATA = {} +with open(os.path.join(os.path.dirname(__file__), '__metadata__.py')) as f: + exec(f.read(), METADATA) +VERSION = METADATA['__version__'] + +PROG = os.path.basename(os.path.splitext(__file__)[0]) + + +###################################################################### +# Default configuration file parameters. +###################################################################### + +# Optional environment variable dictionary passed to +# executing programs. If set to None the existing +# environment is used. +ENV = None + +# External executables. +ASCIIDOC = 'asciidoc' +XSLTPROC = 'xsltproc' +DBLATEX = 'dblatex' # pdf generation. +FOP = 'fop' # pdf generation (--fop option). +W3M = 'w3m' # primary text file generator. +LYNX = 'lynx' # alternate text file generator. +XMLLINT = 'xmllint' # Set to '' to disable. +EPUBCHECK = 'epubcheck' # Set to '' to disable. +# External executable default options. +ASCIIDOC_OPTS = [] +BACKEND_OPTS = '' +DBLATEX_OPTS = '' +FOP_OPTS = '' +LYNX_OPTS = '-dump' +W3M_OPTS = '-dump -cols 70 -T text/html -no-graph' +XSLTPROC_OPTS = '' + +###################################################################### +# End of configuration file parameters. +###################################################################### + + +##################################################################### +# Utility functions +##################################################################### + +OPTIONS = None # These functions read verbose and dry_run command options. + + +def errmsg(msg: str) -> None: + print('%s: %s\n' % (PROG, msg), file=sys.stderr) + + +def warning(msg: str) -> None: + errmsg('WARNING: %s' % msg) + + +def infomsg(msg: str) -> None: + print('%s: %s' % (PROG, msg)) + + +def die(msg: str, exit_code: int = 1) -> NoReturn: + errmsg('ERROR: %s' % msg) + sys.exit(exit_code) + + +def trace() -> None: + """Print traceback to stderr.""" + errmsg('-'*60) + traceback.print_exc(file=sys.stderr) + errmsg('-'*60) + + +def verbose(msg: str) -> None: + if OPTIONS.verbose or OPTIONS.dry_run: + infomsg(msg) + + +def flatten(array: Union[List, Tuple]) -> List: + ret = [] + for x in array: + if isinstance(x, (list, tuple)): + ret += x + else: + ret.append(x) + return ret + + +def isexecutable(file_name: str) -> bool: + return os.path.isfile(file_name) and os.access(file_name, os.X_OK) + + +def find_executable(file_name): + ''' + Search for executable file_name in the system PATH. + Return full path name or None if not found. + ''' + def _find_executable(file_name): + if os.path.split(file_name)[0] != '': + # file_name includes directory so don't search path. + if not isexecutable(file_name): + return None + else: + return file_name + for p in os.environ.get('PATH', os.defpath).split(os.pathsep): + f = os.path.join(p, file_name) + if isexecutable(f): + return os.path.realpath(f) + return None + if os.name == 'nt' and os.path.splitext(file_name)[1] == '': + for ext in ('.cmd', '.bat', '.exe'): + result = _find_executable(file_name + ext) + if result: + break + else: + result = _find_executable(file_name) + return result + + +def write_file(filename, data, mode='w', encoding='utf-8'): + with open(filename, mode=mode, encoding=encoding) as f: + f.write(data) + + +def read_file(filename, mode='r', encoding='utf-8'): + with open(filename, mode=mode, encoding=encoding) as f: + return f.read() + + +def shell_cd(path): + verbose('chdir %s' % path) + if not OPTIONS.dry_run: + os.chdir(path) + + +def shell_makedirs(path): + if os.path.isdir(path): + return + verbose('creating %s' % path) + if not OPTIONS.dry_run: + os.makedirs(path) + + +def shell_copy(src, dst): + verbose('copying "%s" to "%s"' % (src, dst)) + if not OPTIONS.dry_run: + shutil.copy(src, dst) + + +def shell_rm(path): + if not os.path.exists(path): + return + verbose('deleting %s' % path) + if not OPTIONS.dry_run: + os.unlink(path) + + +def shell_rmtree(path): + if not os.path.isdir(path): + return + verbose('deleting %s' % path) + if not OPTIONS.dry_run: + shutil.rmtree(path) + + +def shell(cmd, raise_error=True): + ''' + Execute command cmd in shell and return tuple + (stdoutdata, stderrdata, returncode). + If raise_error is True then a non-zero return terminates the application. + ''' + if os.name == 'nt': + # TODO: this is probably unnecessary, see: + # http://groups.google.com/group/asciidoc/browse_frm/thread/9442ee0c419f1242 + # Windows doesn't like running scripts directly so explicitly + # specify python interpreter. + # Extract first (quoted or unquoted) argument. + mo = re.match(r'^\s*"\s*(?P[^"]+)\s*"', cmd) + if not mo: + mo = re.match(r'^\s*(?P[^ ]+)', cmd) + if mo.group('arg0').endswith('.py'): + cmd = 'python ' + cmd + # Remove redundant quoting -- this is not just cosmetic, + # quoting seems to dramatically decrease the allowed command + # length in Windows XP. + cmd = re.sub(r'"([^ ]+?)"', r'\1', cmd) + verbose('executing: %s' % cmd) + if OPTIONS.dry_run: + return + stdout = stderr = subprocess.PIPE + try: + popen = subprocess.Popen(cmd, stdout=stdout, stderr=stderr, + shell=True, env=ENV, universal_newlines=True) + except OSError as e: + die('failed: %s: %s' % (cmd, e)) + stdoutdata, stderrdata = popen.communicate() + if OPTIONS.verbose: + print(stdoutdata) + print(stderrdata) + if popen.returncode != 0 and raise_error: + die('%s returned non-zero exit status %d' % (cmd, popen.returncode)) + return (stdoutdata, stderrdata, popen.returncode) + + +def find_resources(files, tagname, attrname, filter=None): + ''' + Search all files and return a list of local URIs from attrname attribute + values in tagname tags. + Handles HTML open and XHTML closed tags. + Non-local URIs are skipped. + files can be a file name or a list of file names. + The filter function takes a dictionary of tag attributes and returns True + if the URI is to be included. + ''' + class FindResources(HTMLParser): + # Nested parser class shares locals with enclosing function. + def handle_startendtag(self, tag, attrs): + self.handle_starttag(tag, attrs) + + def handle_starttag(self, tag, attrs): + attrs = dict(attrs) + if tag == tagname and (filter is None or filter(attrs)): + # Accept only local URIs. + uri = urlparse(attrs[attrname]) + if uri[0] in ('', 'file') and not uri[1] and uri[2]: + result.append(uri[2]) + + if isinstance(files, str): + files = [files] + result = [] + for filename in files: + verbose('finding resources in: %s' % filename) + if OPTIONS.dry_run: + continue + parser = FindResources() + with open(filename, 'rb') as open_file: + contents = open_file.read() + mo = re.search(b'\A<\?xml.* encoding="(.*?)"', contents) + if mo is None: + mo = re.search(br'', contents) + contents = contents.decode(mo.group(1).decode('utf-8') if mo else 'utf-8') + parser.feed(contents) + parser.close() + result = list(set(result)) # Drop duplicate values. + result.sort() + return result + + +# NOT USED. +def copy_files(files, src_dir, dst_dir): + ''' + Copy list of relative file names from src_dir to dst_dir. + ''' + for filename in files: + filename = os.path.normpath(filename) + if os.path.isabs(filename): + continue + src = os.path.join(src_dir, filename) + dst = os.path.join(dst_dir, filename) + if not os.path.exists(dst): + if not os.path.isfile(src): + warning('missing file: %s' % src) + continue + dstdir = os.path.dirname(dst) + shell_makedirs(dstdir) + shell_copy(src, dst) + + +def find_files(path, pattern): + ''' + Return list of file names matching pattern in directory path. + ''' + result = [] + for (p, dirs, files) in os.walk(path): + for f in files: + if fnmatch.fnmatch(f, pattern): + result.append(os.path.normpath(os.path.join(p, f))) + return result + + +def exec_xsltproc(xsl_file, xml_file, dst_dir, opts=''): + cwd = os.getcwd() + shell_cd(dst_dir) + try: + shell('"%s" %s "%s" "%s"' % (XSLTPROC, opts, xsl_file, xml_file)) + finally: + shell_cd(cwd) + + +def get_source_options(asciidoc_file): + ''' + Look for a2x command options in AsciiDoc source file. + Limitation: options cannot contain double-quote characters. + ''' + def parse_options(): + # Parse options to result sequence. + inquotes = False + opt = '' + for c in options: + if c == '"': + if inquotes: + result.append(opt) + opt = '' + inquotes = False + else: + inquotes = True + elif c == ' ': + if inquotes: + opt += c + elif opt: + result.append(opt) + opt = '' + else: + opt += c + if opt: + result.append(opt) + + result = [] + if os.path.isfile(asciidoc_file): + options = '' + with open(asciidoc_file, 'rb') as f: + line_number = 0 + for line in f: + line_number += 1 + mo = re.search(b'^//\s*a2x:', line) + if mo: + try: + options += ' ' + line[mo.end():].strip().decode('ascii') + except UnicodeDecodeError as e: + warning( + "Could not decode option to %s " % e.encoding + + "on line %s in %s" % (line_number, asciidoc_file) + ) + parse_options() + return result + + +##################################################################### +# Application class +##################################################################### + +class A2X(AttrDict): + ''' + a2x options and conversion functions. + ''' + + def execute(self): + ''' + Process a2x command. + ''' + self.process_options() + # Append configuration file options. + self.asciidoc_opts += ASCIIDOC_OPTS + self.dblatex_opts += ' ' + DBLATEX_OPTS + self.fop_opts += ' ' + FOP_OPTS + self.xsltproc_opts += ' ' + XSLTPROC_OPTS + self.backend_opts += ' ' + BACKEND_OPTS + # Execute to_* functions. + if self.backend: + self.to_backend() + else: + self.__getattribute__('to_'+self.format)() + if not (self.keep_artifacts or self.format == 'docbook' or self.skip_asciidoc): + shell_rm(self.dst_path('.xml')) + + def load_conf(self): + ''' + Load a2x configuration file from default locations and --conf-file + option. + ''' + CONF_FILE = 'a2x.conf' + a2xdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'resources') + conf_files = [] + # From a2x.py directory. + conf_files.append(os.path.join(a2xdir, CONF_FILE)) + # If the asciidoc executable and conf files are in the a2x directory + # then use the local copy of asciidoc and skip the global a2x conf. + asciidoc_conf = os.path.join(a2xdir, 'asciidoc.conf') + + # TODO: CONF_DIR work + # From global conf directory. + # conf_files.append(os.path.join(CONF_DIR, CONF_FILE)) + + # From $HOME directory. + home_dir = os.environ.get('HOME') + if home_dir is not None: + conf_files.append(os.path.join(home_dir, '.asciidoc', CONF_FILE)) + + # From backend plugin directory. + if self.backend is not None: + outfile = io.StringIO() + asciidoc.execute('asciidoc', [('--backend', 'list'), ('--out-file', outfile)], []) + backends = [(i, os.path.split(i)[1]) for i in outfile.getvalue().splitlines()] + backend_dir = [i[0] for i in backends if i[1] == self.backend] + if len(backend_dir) == 0: + die('missing %s backend' % self.backend) + if len(backend_dir) > 1: + die('more than one %s backend' % self.backend) + verbose('found %s backend directory: %s' % + (self.backend, backend_dir[0])) + conf_files.append(os.path.join(backend_dir[0], 'a2x-backend.py')) + # From --conf-file option. + if self.conf_file is not None: + if not os.path.isfile(self.conf_file): + die('missing configuration file: %s' % self.conf_file) + conf_files.append(self.conf_file) + # From --xsl-file option. + if self.xsl_file is not None: + if not os.path.isfile(self.xsl_file): + die('missing XSL file: %s' % self.xsl_file) + self.xsl_file = os.path.abspath(self.xsl_file) + # Load ordered files. + for f in conf_files: + if os.path.isfile(f): + verbose('loading configuration file: %s' % f) + exec(open(f).read(), globals()) + + def process_options(self): + ''' + Validate and command options and set defaults. + ''' + if not os.path.isfile(self.asciidoc_file): + die('missing ASCIIDOC_FILE: %s' % self.asciidoc_file) + self.asciidoc_file = os.path.abspath(self.asciidoc_file) + if os.path.splitext(self.asciidoc_file)[1].lower() == '.xml': + self.skip_asciidoc = True + else: + self.skip_asciidoc = False + if not self.destination_dir: + self.destination_dir = os.path.dirname(self.asciidoc_file) + else: + if not os.path.isdir(self.destination_dir): + die('missing --destination-dir: %s' % self.destination_dir) + self.destination_dir = os.path.abspath(self.destination_dir) + if self.format not in ('chunked', 'epub', 'htmlhelp', 'xhtml', 'manpage'): + warning('--destination-dir option is only applicable to HTML and manpage based outputs') + self.resource_dirs = [] + self.resource_files = [] + if self.resource_manifest: + if not os.path.isfile(self.resource_manifest): + die('missing --resource-manifest: %s' % self.resource_manifest) + with open(self.resource_manifest) as f: + for r in f: + self.resources.append(r.strip()) + for r in self.resources: + r = os.path.expanduser(r) + r = os.path.expandvars(r) + if r.endswith('/') or r.endswith('\\'): + if os.path.isdir(r): + self.resource_dirs.append(r) + else: + die('missing resource directory: %s' % r) + elif os.path.isdir(r): + self.resource_dirs.append(r) + elif r.startswith('.') and '=' in r: + ext, mimetype = r.split('=') + mimetypes.add_type(mimetype, ext) + else: + self.resource_files.append(r) + for d in ('images', 'stylesheets'): + d = os.path.join(CONF_DIR, d) + if os.path.isdir(d): + self.resource_dirs.append(d) + verbose('resource files: %s' % self.resource_files) + verbose('resource directories: %s' % self.resource_dirs) + if not self.doctype and self.format == 'manpage': + self.doctype = 'manpage' + if self.doctype: + self.asciidoc_opts.append(('--doctype', self.doctype)) + for attr in self.attributes: + self.asciidoc_opts.append(('--attribute', attr)) +# self.xsltproc_opts += ' --nonet' + if self.verbose: + self.asciidoc_opts.append(('--verbose',)) + self.dblatex_opts += ' -V' + if self.icons or self.icons_dir: + params = [ + 'callout.graphics 1', + 'navig.graphics 1', + 'admon.textlabel 0', + 'admon.graphics 1', + ] + if self.icons_dir: + params += [ + 'admon.graphics.path "%s/"' % self.icons_dir, + 'callout.graphics.path "%s/callouts/"' % self.icons_dir, + 'navig.graphics.path "%s/"' % self.icons_dir, + ] + else: + params = [ + 'callout.graphics 0', + 'navig.graphics 0', + 'admon.textlabel 1', + 'admon.graphics 0', + ] + if self.stylesheet: + params += ['html.stylesheet "%s"' % self.stylesheet] + if self.format == 'htmlhelp': + params += ['htmlhelp.chm "%s"' % self.basename('.chm'), + 'htmlhelp.hhp "%s"' % self.basename('.hhp'), + 'htmlhelp.hhk "%s"' % self.basename('.hhk'), + 'htmlhelp.hhc "%s"' % self.basename('.hhc')] + if self.doctype == 'book': + params += ['toc.section.depth 1'] + # Books are chunked at chapter level. + params += ['chunk.section.depth 0'] + for o in params: + if o.split()[0]+' ' not in self.xsltproc_opts: + self.xsltproc_opts += ' --stringparam ' + o + if self.fop_opts: + self.fop = True + + def dst_path(self, ext): + ''' + Return name of file or directory in the destination directory with + the same name as the asciidoc source file but with extension ext. + ''' + return os.path.join(self.destination_dir, self.basename(ext)) + + def basename(self, ext): + ''' + Return the base name of the asciidoc source file but with extension + ext. + ''' + return os.path.basename(os.path.splitext(self.asciidoc_file)[0]) + ext + + @staticmethod + def asciidoc_conf_file(path): + ''' + Return full path name of file in asciidoc configuration files directory. + Search first the directory containing the asciidoc executable then + the global configuration file directory. + ''' + f = os.path.join(CONF_DIR, path) + if not os.path.isfile(f): + die('missing configuration file: %s' % f) + return os.path.normpath(f) + + def xsl_stylesheet(self, file_name=None): + ''' + Return full path name of file in asciidoc docbook-xsl configuration + directory. + If an XSL file was specified with the --xsl-file option then it is + returned. + ''' + if self.xsl_file is not None: + return self.xsl_file + if not file_name: + file_name = self.format + '.xsl' + return self.asciidoc_conf_file(os.path.join('docbook-xsl', file_name)) + + def copy_resources(self, html_files, src_dir, dst_dir, resources=[]): + ''' + Search html_files for images and CSS resource URIs (html_files can + be a list of file names or a single file name). + Copy them from the src_dir to the dst_dir. + If not found in src_dir then recursively search all specified + resource directories. + Optional additional resources files can be passed in the resources + list. + ''' + resources = resources[:] + resources += find_resources( + html_files, + 'link', + 'href', + lambda attrs: attrs.get('type') == 'text/css' + ) + resources += find_resources(html_files, 'img', 'src') + resources += self.resource_files + resources = list(set(resources)) # Drop duplicates. + resources.sort() + for f in resources: + if '=' in f: + src, dst = f.split('=') + if not dst: + dst = src + else: + src = dst = f + src = os.path.normpath(src) + dst = os.path.normpath(dst) + if os.path.isabs(dst): + die('absolute resource file name: %s' % dst) + if dst.startswith(os.pardir): + die('resource file outside destination directory: %s' % dst) + src = os.path.join(src_dir, src) + dst = os.path.join(dst_dir, dst) + if not os.path.isfile(src): + for d in self.resource_dirs: + d = os.path.join(src_dir, d) + found = find_files(d, os.path.basename(src)) + if found: + src = found[0] + break + else: + if not os.path.isfile(dst): + die('missing resource: %s' % src) + continue + # Arrive here if resource file has been found. + if os.path.normpath(src) != os.path.normpath(dst): + dstdir = os.path.dirname(dst) + shell_makedirs(dstdir) + shell_copy(src, dst) + + def to_backend(self): + ''' + Convert AsciiDoc source file to a backend output file using the global + 'to_' function (loaded from backend plugin a2x-backend.py + file). + Executes the global function in an A2X class instance context. + ''' + eval('to_%s(self)' % self.backend) + + def to_docbook(self): + ''' + Use asciidoc to convert asciidoc_file to DocBook. + args is a string containing additional asciidoc arguments. + ''' + docbook_file = self.dst_path('.xml') + if self.skip_asciidoc: + if not os.path.isfile(docbook_file): + die('missing docbook file: %s' % docbook_file) + return + options = self.asciidoc_opts[:] + options.append(('--backend', 'docbook')) + options.append(('-a', 'a2x-format=%s' % self.format)) + options.append(('--out-file', docbook_file)) + + verbose("executing: asciidoc {}".format(options)) + + asciidoc.cli(flatten(['asciidoc'] + options + [self.asciidoc_file])) + if not self.no_xmllint and XMLLINT: + xmllint_options = ['--nonet', '--noout', '--valid'] + if 'SGML_CATALOG_FILES' in os.environ: + xmllint_options.append('--catalogs') + shell('"%s" %s "%s"' % (XMLLINT, " ".join(xmllint_options), docbook_file)) + + def to_xhtml(self): + self.to_docbook() + docbook_file = self.dst_path('.xml') + xhtml_file = self.dst_path('.html') + opts = '%s --output "%s"' % (self.xsltproc_opts, xhtml_file) + exec_xsltproc(self.xsl_stylesheet(), docbook_file, self.destination_dir, opts) + src_dir = os.path.dirname(self.asciidoc_file) + self.copy_resources(xhtml_file, src_dir, self.destination_dir) + + def to_manpage(self): + self.to_docbook() + docbook_file = self.dst_path('.xml') + opts = self.xsltproc_opts + exec_xsltproc(self.xsl_stylesheet(), docbook_file, self.destination_dir, opts) + + def to_pdf(self): + if self.fop: + self.exec_fop() + else: + self.exec_dblatex() + + def exec_fop(self): + self.to_docbook() + docbook_file = self.dst_path('.xml') + xsl = self.xsl_stylesheet('fo.xsl') + fo = self.dst_path('.fo') + pdf = self.dst_path('.pdf') + opts = '%s --output "%s"' % (self.xsltproc_opts, fo) + exec_xsltproc(xsl, docbook_file, self.destination_dir, opts) + shell('"%s" %s -fo "%s" -pdf "%s"' % (FOP, self.fop_opts, fo, pdf)) + if not self.keep_artifacts: + shell_rm(fo) + + def exec_dblatex(self): + self.to_docbook() + docbook_file = self.dst_path('.xml') + xsl = self.asciidoc_conf_file(os.path.join('dblatex','asciidoc-dblatex.xsl')) + sty = self.asciidoc_conf_file(os.path.join('dblatex','asciidoc-dblatex.sty')) + shell('"%s" -t %s -p "%s" -s "%s" %s "%s"' % + (DBLATEX, self.format, xsl, sty, self.dblatex_opts, docbook_file)) + + def to_dvi(self): + self.exec_dblatex() + + def to_ps(self): + self.exec_dblatex() + + def to_tex(self): + self.exec_dblatex() + + def to_htmlhelp(self): + self.to_chunked() + + def to_chunked(self): + self.to_docbook() + docbook_file = self.dst_path('.xml') + opts = self.xsltproc_opts + xsl_file = self.xsl_stylesheet() + if self.format == 'chunked': + dst_dir = self.dst_path('.chunked') + elif self.format == 'htmlhelp': + dst_dir = self.dst_path('.htmlhelp') + if 'base.dir ' not in opts: + opts += ' --stringparam base.dir "%s/"' % os.path.basename(dst_dir) + # Create content. + shell_rmtree(dst_dir) + shell_makedirs(dst_dir) + exec_xsltproc(xsl_file, docbook_file, self.destination_dir, opts) + html_files = find_files(dst_dir, '*.html') + src_dir = os.path.dirname(self.asciidoc_file) + self.copy_resources(html_files, src_dir, dst_dir) + + def update_epub_manifest(self, opf_file): + ''' + Scan the OEBPS directory for any files that have not been registered in + the OPF manifest then add them to the manifest. + ''' + opf_dir = os.path.dirname(opf_file) + resource_files = [] + for (p, dirs, files) in os.walk(os.path.dirname(opf_file)): + for f in files: + f = os.path.join(p, f) + if os.path.isfile(f): + assert f.startswith(opf_dir) + f = '.' + f[len(opf_dir):] + f = os.path.normpath(f) + if f not in ['content.opf']: + resource_files.append(f) + opf = xml.dom.minidom.parseString(read_file(opf_file)) + manifest_files = [] + manifest = opf.getElementsByTagName('manifest')[0] + for el in manifest.getElementsByTagName('item'): + f = el.getAttribute('href') + f = os.path.normpath(f) + manifest_files.append(f) + count = 0 + for f in resource_files: + if f not in manifest_files: + count += 1 + verbose('adding to manifest: %s' % f) + item = opf.createElement('item') + item.setAttribute('href', f.replace(os.path.sep, '/')) + item.setAttribute('id', 'a2x-%d' % count) + mimetype = mimetypes.guess_type(f)[0] + if mimetype is None: + die('unknown mimetype: %s' % f) + item.setAttribute('media-type', mimetype) + manifest.appendChild(item) + if count > 0: + write_file(opf_file, opf.toxml()) + + def to_epub(self): + self.to_docbook() + xsl_file = self.xsl_stylesheet() + docbook_file = self.dst_path('.xml') + epub_file = self.dst_path('.epub') + build_dir = epub_file + '.d' + shell_rmtree(build_dir) + shell_makedirs(build_dir) + # Create content. + exec_xsltproc(xsl_file, docbook_file, build_dir, self.xsltproc_opts) + # Copy resources referenced in the OPF and resources referenced by the + # generated HTML (in theory DocBook XSL should ensure they are + # identical but this is not always the case). + src_dir = os.path.dirname(self.asciidoc_file) + dst_dir = os.path.join(build_dir, 'OEBPS') + opf_file = os.path.join(dst_dir, 'content.opf') + opf_resources = find_resources(opf_file, 'item', 'href') + html_files = find_files(dst_dir, '*.html') + self.copy_resources(html_files, src_dir, dst_dir, opf_resources) + # Register any unregistered resources. + self.update_epub_manifest(opf_file) + # Build epub archive. + cwd = os.getcwd() + shell_cd(build_dir) + try: + if not self.dry_run: + zip_archive = zipfile.ZipFile(epub_file, 'w') + try: + # Create and add uncompressed mimetype file. + verbose('archiving: mimetype') + write_file('mimetype', 'application/epub+zip') + zip_archive.write('mimetype', compress_type=zipfile.ZIP_STORED) + # Compress all remaining files. + for (p, dirs, files) in os.walk('.'): + for f in files: + f = os.path.normpath(os.path.join(p,f)) + if f != 'mimetype': + verbose('archiving: %s' % f) + zip_archive.write(f, compress_type=zipfile.ZIP_DEFLATED) + finally: + zip_archive.close() + verbose('created archive: %s' % epub_file) + finally: + shell_cd(cwd) + if not self.keep_artifacts: + shell_rmtree(build_dir) + if self.epubcheck and EPUBCHECK: + if not find_executable(EPUBCHECK): + warning('epubcheck skipped: unable to find executable: %s' % EPUBCHECK) + else: + shell('"%s" "%s"' % (EPUBCHECK, epub_file)) + + def to_text(self): + text_file = self.dst_path('.text') + html_file = self.dst_path('.text.html') + if self.lynx: + options = self.asciidoc_opts[:] + options.append(('--conf-file', self.asciidoc_conf_file('text.conf'))) + options.append(('-b', 'html4')) + options.append(('-a', 'a2x-format=%s' % self.format)) + options.append(('-o', html_file)) + asciidoc.cli(flatten(['asciidoc'] + options + [self.asciidoc_file])) + cmd = '"%s" %s "%s" > "%s"' % (LYNX, LYNX_OPTS, html_file, text_file) + shell(cmd) + else: + # Use w3m(1). + self.to_docbook() + docbook_file = self.dst_path('.xml') + opts = '%s --output "%s"' % (self.xsltproc_opts, html_file) + exec_xsltproc(self.xsl_stylesheet(), docbook_file, + self.destination_dir, opts) + cmd = '"%s" %s "%s" > "%s"' % (W3M, W3M_OPTS, html_file, text_file) + shell(cmd) + if not self.keep_artifacts: + shell_rm(html_file) + + +def parse_args(argv): + description = '''A toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats)''' + from optparse import OptionParser + import shlex + parser = OptionParser(usage='usage: %prog [OPTIONS] SOURCE_FILE', + version='%s %s' % (PROG,VERSION), + description=description) + parser.add_option('-a', '--attribute', + action='append', dest='attributes', default=[], metavar='ATTRIBUTE', + help='set asciidoc attribute value') + parser.add_option('--asciidoc-opts', + action='append', dest='asciidoc_opts', default=[], + metavar='ASCIIDOC_OPTS', help='asciidoc options') + #DEPRECATED + parser.add_option('--copy', + action='store_true', dest='copy', default=False, + help='DEPRECATED: does nothing') + parser.add_option('--conf-file', + dest='conf_file', default=None, metavar='CONF_FILE', + help='configuration file') + parser.add_option('-D', '--destination-dir', + action='store', dest='destination_dir', default=None, metavar='PATH', + help='output directory (defaults to SOURCE_FILE directory)') + parser.add_option('-d','--doctype', + action='store', dest='doctype', metavar='DOCTYPE', + choices=('article','manpage','book'), + help='article, manpage, book') + parser.add_option('-b','--backend', + action='store', dest='backend', metavar='BACKEND', + help='name of backend plugin') + parser.add_option('--epubcheck', + action='store_true', dest='epubcheck', default=False, + help='check EPUB output with epubcheck') + parser.add_option('-f','--format', + action='store', dest='format', metavar='FORMAT', default = 'pdf', + choices=('chunked','epub','htmlhelp','manpage','pdf', 'text', + 'xhtml','dvi','ps','tex','docbook'), + help='chunked, epub, htmlhelp, manpage, pdf, text, xhtml, dvi, ps, tex, docbook') + parser.add_option('--icons', + action='store_true', dest='icons', default=False, + help='use admonition, callout and navigation icons') + parser.add_option('--icons-dir', + action='store', dest='icons_dir', + default=None, metavar='PATH', + help='admonition and navigation icon directory') + parser.add_option('-k', '--keep-artifacts', + action='store_true', dest='keep_artifacts', default=False, + help='do not delete temporary build files') + parser.add_option('--lynx', + action='store_true', dest='lynx', default=False, + help='use lynx to generate text files') + parser.add_option('-L', '--no-xmllint', + action='store_true', dest='no_xmllint', default=False, + help='do not check asciidoc output with xmllint') + parser.add_option('-n','--dry-run', + action='store_true', dest='dry_run', default=False, + help='just print the commands that would have been executed') + parser.add_option('-r','--resource', + action='append', dest='resources', default=[], + metavar='PATH', + help='resource file or directory containing resource files') + parser.add_option('-m', '--resource-manifest', + action='store', dest='resource_manifest', default=None, metavar='FILE', + help='read resources from FILE') + #DEPRECATED + parser.add_option('--resource-dir', + action='append', dest='resources', default=[], + metavar='PATH', + help='DEPRECATED: use --resource') + #DEPRECATED + parser.add_option('-s','--skip-asciidoc', + action='store_true', dest='skip_asciidoc', default=False, + help='DEPRECATED: redundant') + parser.add_option('--stylesheet', + action='store', dest='stylesheet', default=None, + metavar='STYLESHEET', + help='HTML CSS stylesheet file name') + #DEPRECATED + parser.add_option('--safe', + action='store_true', dest='safe', default=False, + help='DEPRECATED: does nothing') + parser.add_option('--dblatex-opts', + action='append', dest='dblatex_opts', default=[], + metavar='DBLATEX_OPTS', help='dblatex options') + parser.add_option('--backend-opts', + action='append', dest='backend_opts', default=[], + metavar='BACKEND_OPTS', help='backend plugin options') + parser.add_option('--fop', + action='store_true', dest='fop', default=False, + help='use FOP to generate PDF files') + parser.add_option('--fop-opts', + action='append', dest='fop_opts', default=[], + metavar='FOP_OPTS', help='options for FOP pdf generation') + parser.add_option('--xsltproc-opts', + action='append', dest='xsltproc_opts', default=[], + metavar='XSLTPROC_OPTS', help='xsltproc options for XSL stylesheets') + parser.add_option('--xsl-file', + action='store', dest='xsl_file', metavar='XSL_FILE', + help='custom XSL stylesheet') + parser.add_option('-v', '--verbose', + action='count', dest='verbose', default=0, + help='increase verbosity') + if len(argv) == 1: + parser.parse_args(['--help']) + source_options = get_source_options(argv[-1]) + new_argv = source_options + argv[1:] + opts, args = parser.parse_args(new_argv) + if len(args) != 1: + parser.error('incorrect number of arguments') + opts.asciidoc_opts = shlex.split(' ' .join(opts.asciidoc_opts)) + opts.dblatex_opts = ' '.join(opts.dblatex_opts) + opts.fop_opts = ' '.join(opts.fop_opts) + opts.xsltproc_opts = ' '.join(opts.xsltproc_opts) + opts.backend_opts = ' '.join(opts.backend_opts) + return (new_argv, opts, args) + + +def cli(): + global OPTIONS + argv, opts, args = parse_args(sys.argv) + opts = eval(str(opts)) # Convert optparse.Values to dict. + a2x = A2X(opts) + OPTIONS = a2x # verbose and dry_run used by utility functions. + verbose('args: %r' % argv) + a2x.asciidoc_file = args[0] + try: + a2x.load_conf() + a2x.execute() + except KeyboardInterrupt: + sys.exit(1) + +##################################################################### +# Script main line. +##################################################################### + +if __name__ == "__main__": + asciidoc.set_caller(__name__) + cli() diff -Nru asciidoc-8.6.10/asciidoc/api.py asciidoc-10.1.2/asciidoc/api.py --- asciidoc-8.6.10/asciidoc/api.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/api.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,63 @@ +from . import asciidoc +from .exceptions import AsciiDocError + + +class Options(object): + """ + Stores asciidoc(1) command options. + """ + def __init__(self, values=[]): + self.values = values[:] + + def __call__(self, name, value=None): + """Shortcut for append method.""" + self.append(name, value) + + def append(self, name, value=None): + if type(value) in (int, float): + value = str(value) + self.values.append((name, value)) + + +class AsciiDocAPI(object): + """ + AsciiDoc API class. + """ + def __init__(self, asciidoc_py=None): + """ + Locate and import asciidoc.py. + Initialize instance attributes. + """ + self.options = Options() + self.attributes = {} + self.messages = [] + self.cmd = 'asciidoc' + + def execute(self, infile, outfile=None, backend=None): + """ + Compile infile to outfile using backend format. + infile can outfile can be file path strings or file like objects. + """ + self.messages = [] + opts = Options(self.options.values) + if outfile is not None: + opts('--out-file', outfile) + if backend is not None: + opts('--backend', backend) + for k, v in self.attributes.items(): + if v == '' or k[-1] in '!@': + s = k + elif v is None: # A None value undefines the attribute. + s = k + '!' + else: + s = '%s=%s' % (k, v) + opts('--attribute', s) + args = [infile] + try: + try: + asciidoc.execute(self.cmd, opts.values, args) + finally: + self.messages = asciidoc.messages[:] + except SystemExit as e: + if e.code: + raise AsciiDocError(self.messages[-1]) diff -Nru asciidoc-8.6.10/asciidoc/asciidoc.py asciidoc-10.1.2/asciidoc/asciidoc.py --- asciidoc-8.6.10/asciidoc/asciidoc.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/asciidoc.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,5976 @@ +#!/usr/bin/env python3 + +""" +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +Copyright (C) 2002-2013 Stuart Rackham. +Copyright (C) 2013-2020 AsciiDoc Contributors. + +Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2). +""" + +# Please note, the contents of this module are considered "private" with the +# exception of cli() and execute() and so may change within the 10.0+ releases. +# If you come to depend on a specific method or class, please leave a GitHub +# issue stating as much so as to help prevent breaking changes to your toolchain. + +import ast +import csv +from functools import lru_cache +import getopt +import io +import os +import re +import subprocess +import sys +import tempfile +import time +import typing +import traceback +import unicodedata + +from collections import OrderedDict + +from .blocks.table import parse_table_span_spec, Cell, Column +from .collections import AttrDict, InsensitiveDict +from .exceptions import EAsciiDoc +from .message import Message +from .plugin import Plugin +from . import utils + +CONF_DIR = os.path.join(os.path.dirname(__file__), 'resources') +METADATA = {} +with open(os.path.join(os.path.dirname(__file__), '__metadata__.py')) as f: + exec(f.read(), METADATA) +# See CHANGELOG file for version history. +VERSION = METADATA['__version__'] + +MIN_PYTHON_VERSION = (3, 5) # Require this version of Python or better. + +# --------------------------------------------------------------------------- +# Program constants. +# --------------------------------------------------------------------------- +DEFAULT_BACKEND = 'html' +DEFAULT_DOCTYPE = 'article' +# Allowed substitution options for List, Paragraph and DelimitedBlock +# definition subs entry. +SUBS_OPTIONS = ('specialcharacters', 'quotes', 'specialwords', + 'replacements', 'attributes', 'macros', 'callouts', 'normal', + 'verbatim', 'none', 'replacements2', 'replacements3') +# Default value for unspecified subs and presubs configuration file entries. +SUBS_NORMAL = ('specialcharacters', 'quotes', 'attributes', + 'specialwords', 'replacements', 'macros', 'replacements2') +SUBS_VERBATIM = ('specialcharacters', 'callouts') + +NAME_RE = r'[^\W\d][-\w]*' # Valid section or attribute name. +OR, AND = ',', '+' # Attribute list separators. +DEFAULT_NEWLINE = '\r\n' + +# --------------------------------------------------------------------------- +# Utility functions and classes. +# --------------------------------------------------------------------------- + +class Trace(object): + """ + Used in conjunction with the 'trace' attribute to generate diagnostic + output. There is a single global instance of this class named trace. + """ + SUBS_NAMES = ('specialcharacters', 'quotes', 'specialwords', + 'replacements', 'attributes', 'macros', 'callouts', + 'replacements2', 'replacements3') + + def __init__(self): + self.name_re = '' # Regexp pattern to match trace names. + self.linenos = True + self.offset = 0 + + def __call__(self, name, before, after=None): + """ + Print trace message if tracing is on and the trace 'name' matches the + document 'trace' attribute (treated as a regexp). + 'before' is the source text before substitution; 'after' text is the + source text after substitution. + The 'before' and 'after' messages are only printed if they differ. + """ + name_re = document.attributes.get('trace') + if name_re == 'subs': # Alias for all the inline substitutions. + name_re = '|'.join(self.SUBS_NAMES) + self.name_re = name_re + if self.name_re is not None: + msg = message.format(name, 'TRACE: ', self.linenos, offset=self.offset) + if before != after and re.match(self.name_re, name): + if utils.is_array(before): + before = '\n'.join(before) + if after is None: + msg += '\n%s\n' % before + else: + if utils.is_array(after): + after = '\n'.join(after) + msg += '\n<<<\n%s\n>>>\n%s\n' % (before, after) + message.stderr(msg) + + +def safe(): + return document.safe + + +def is_safe_file(fname, directory=None): + # A safe file must reside in 'directory' (defaults to the source + # file directory). + if directory is None: + if document.infile == '': + return not safe() + directory = os.path.dirname(document.infile) + elif directory == '': + directory = '.' + return ( + not safe() or + utils.file_in(fname, directory) or + utils.file_in(fname, CONF_DIR) + ) + + +def safe_filename(fname, parentdir): + """ + Return file name which must reside in the parent file directory. + Return None if file is not safe. + """ + if not os.path.isabs(fname): + # Include files are relative to parent document + # directory. + fname = os.path.normpath(os.path.join(parentdir, fname)) + if not is_safe_file(fname, parentdir): + message.unsafe('include file: %s' % fname) + return None + return fname + + +def parse_attributes(attrs, dict): + """Update a dictionary with name/value attributes from the attrs string. + The attrs string is a comma separated list of values and keyword name=value + pairs. Values must precede keywords and are named '1','2'... The entire + attributes list is named '0'. If keywords are specified string values must + be quoted. Examples: + + attrs: '' + dict: {} + + attrs: 'hello,world' + dict: {'2': 'world', '0': 'hello,world', '1': 'hello'} + + attrs: '"hello", planet="earth"' + dict: {'planet': 'earth', '0': '"hello",planet="earth"', '1': 'hello'} + """ + def f(*args, **keywords): + # Name and add arguments '1','2'... to keywords. + for i in range(len(args)): + if not str(i + 1) in keywords: + keywords[str(i + 1)] = args[i] + return keywords + + if not attrs: + return + dict['0'] = attrs + # Replace line separators with spaces so line spanning works. + s = re.sub(r'\s', ' ', attrs) + d = {} + try: + d.update(utils.get_args(s)) + d.update(utils.get_kwargs(s)) + for v in list(d.values()): + if not (isinstance(v, str) or isinstance(v, int) or isinstance(v, float) or v is None): + raise Exception + except Exception: + s = s.replace('"', '\\"') + s = s.split(',') + s = ['"' + x.strip() + '"' for x in s] + s = ','.join(s) + try: + d = {} + d.update(utils.get_args(s)) + d.update(utils.get_kwargs(s)) + except Exception: + return # If there's a syntax error leave with {0}=attrs. + for k in list(d.keys()): # Drop any empty positional arguments. + if d[k] == '': + del d[k] + dict.update(d) + assert len(d) > 0 + + +def parse_named_attributes(s, attrs): + """Update a attrs dictionary with name="value" attributes from the s string. + Returns False if invalid syntax. + Example: + attrs: 'star="sun",planet="earth"' + dict: {'planet':'earth', 'star':'sun'} + """ + def f(**keywords): + return keywords + + try: + d = {} + d = utils.get_kwargs(s) + attrs.update(d) + return True + except Exception: + return False + + +def parse_list(s): + """Parse comma separated string of Python literals. Return a tuple of of + parsed values.""" + try: + result = tuple(utils.parse_to_list(s)) + except Exception: + raise EAsciiDoc('malformed list: ' + s) + return result + + +def parse_options(options, allowed, errmsg): + """Parse comma separated string of unquoted option names and return as a + tuple of valid options. 'allowed' is a list of allowed option values. + If allowed=() then all legitimate names are allowed. + 'errmsg' is an error message prefix if an illegal option error is thrown.""" + result = [] + if options: + for s in re.split(r'\s*,\s*', options): + if (allowed and s not in allowed) or not is_name(s): + raise EAsciiDoc('%s: %s' % (errmsg, s)) + result.append(s) + return tuple(result) + + +def symbolize(s): + """Drop non-symbol characters and convert to lowercase.""" + return re.sub(r'[^\w\-_]', '', s).lower() + + +def is_name(s): + """Return True if s is valid attribute, macro or tag name + (starts with alpha containing alphanumeric and dashes only).""" + return re.match(r'^' + NAME_RE + r'$', s) is not None + + +def subs_quotes(text): + """Quoted text is marked up and the resulting text is + returned.""" + keys = list(config.quotes.keys()) + for q in keys: + i = q.find('|') + if i != -1 and q != '|' and q != '||': + lq = q[:i] # Left quote. + rq = q[i + 1:] # Right quote. + else: + lq = rq = q + tag = config.quotes[q] + if not tag: + continue + # Unconstrained quotes prefix the tag name with a hash. + if tag[0] == '#': + tag = tag[1:] + # Unconstrained quotes can appear anywhere. + reo = re.compile(r'(?ms)(^|.)(\[(?P[^[\]]+?)\])?' + + r'(?:' + re.escape(lq) + r')' + + r'(?P.+?)(?:' + re.escape(rq) + r')') + else: + # The text within constrained quotes must be bounded by white space. + # Non-word (\W) characters are allowed at boundaries to accommodate + # enveloping quotes and punctuation e.g. a='x', ('x'), 'x', ['x']. + reo = re.compile(r'(?ms)(^|[^\w;:}])(\[(?P[^[\]]+?)\])?' + + r'(?:' + re.escape(lq) + r')' + + r'(?P\S|\S.*?\S)(?:' + re.escape(rq) + r')(?=\W|$)') + pos = 0 + while True: + mo = reo.search(text, pos) + if not mo: + break + if text[mo.start()] == '\\': + # Delete leading backslash. + text = text[:mo.start()] + text[mo.start() + 1:] + # Skip past start of match. + pos = mo.start() + 1 + else: + attrlist = {} + parse_attributes(mo.group('attrlist'), attrlist) + stag, etag = config.tag(tag, attrlist) + s = mo.group(1) + stag + mo.group('content') + etag + text = text[:mo.start()] + s + text[mo.end():] + pos = mo.start() + len(s) + return text + + +def subs_tag(tag, dict={}): + """Perform attribute substitution and split tag string returning start, end + tag tuple (c.f. Config.tag()).""" + if not tag: + return [None, None] + s = subs_attrs(tag, dict) + if not s: + message.warning('tag \'%s\' dropped: contains undefined attribute' % tag) + return [None, None] + result = s.split('|') + if len(result) == 1: + return result + [None] + elif len(result) == 2: + return result + else: + raise EAsciiDoc('malformed tag: %s' % tag) + + +def parse_entry(entry, dict=None, unquote=False, unique_values=False, + allow_name_only=False, escape_delimiter=True): + """Parse name=value entry to dictionary 'dict'. Return tuple (name,value) + or None if illegal entry. + If name= then value is set to ''. + If name and allow_name_only=True then value is set to ''. + If name! and allow_name_only=True then value is set to None. + Leading and trailing white space is striped from 'name' and 'value'. + 'name' can contain any printable characters. + If the '=' delimiter character is allowed in the 'name' then + it must be escaped with a backslash and escape_delimiter must be True. + If 'unquote' is True leading and trailing double-quotes are stripped from + 'name' and 'value'. + If unique_values' is True then dictionary entries with the same value are + removed before the parsed entry is added.""" + if escape_delimiter: + mo = re.search(r'(?:[^\\](=))', entry) + else: + mo = re.search(r'(=)', entry) + if mo: # name=value entry. + if mo.group(1): + name = entry[:mo.start(1)] + if escape_delimiter: + name = name.replace(r'\=', '=') # Un-escape \= in name. + value = entry[mo.end(1):] + elif allow_name_only and entry: # name or name! entry. + name = entry + if name[-1] == '!': + name = name[:-1] + value = None + else: + value = '' + else: + return None + if unquote: + name = utils.strip_quotes(name) + if value is not None: + value = utils.strip_quotes(value) + else: + name = name.strip() + if value is not None: + value = value.strip() + if not name: + return None + if dict is not None: + if unique_values: + for k, v in list(dict.items()): + if v == value: + del dict[k] + dict[name] = value + return name, value + + +def parse_entries(entries, dict, unquote=False, unique_values=False, + allow_name_only=False, escape_delimiter=True): + """Parse name=value entries from from lines of text in 'entries' into + dictionary 'dict'. Blank lines are skipped.""" + entries = config.expand_templates(entries) + for entry in entries: + if entry and not parse_entry(entry, dict, unquote, unique_values, + allow_name_only, escape_delimiter): + raise EAsciiDoc('malformed section entry: %s' % entry) + + +def dump_section(name, dict, f=sys.stdout): + """Write parameters in 'dict' as in configuration file section format with + section 'name'.""" + f.write('[%s]%s' % (name, writer.newline)) + for k, v in list(dict.items()): + k = str(k) + k = k.replace('=', r'\=') # Escape = in name. + # Quote if necessary. + if len(k) != len(k.strip()): + k = '"' + k + '"' + if v and len(v) != len(v.strip()): + v = '"' + v + '"' + if v is None: + # Don't dump undefined attributes. + continue + else: + s = k + '=' + v + if s[0] == '#': + s = '\\' + s # Escape so not treated as comment lines. + f.write('%s%s' % (s, writer.newline)) + f.write(writer.newline) + + +def update_attrs(attrs, dict): + """Update 'attrs' dictionary with parsed attributes in dictionary 'dict'.""" + for k, v in list(dict.items()): + if not is_name(k): + raise EAsciiDoc('illegal attribute name: %s' % k) + attrs[k] = v + + +def is_attr_defined(attrs, dic): + """ + Check if the sequence of attributes is defined in dictionary 'dic'. + Valid 'attrs' sequence syntax: + Return True if single attribute is defined. + ,,... Return True if one or more attributes are defined. + ++... Return True if all the attributes are defined. + """ + if OR in attrs: + for a in attrs.split(OR): + if dic.get(a.strip()) is not None: + return True + else: + return False + elif AND in attrs: + for a in attrs.split(AND): + if dic.get(a.strip()) is None: + return False + else: + return True + else: + return dic.get(attrs.strip()) is not None + + +def filter_lines(filter_cmd, lines, attrs={}): + """ + Run 'lines' through the 'filter_cmd' shell command and return the result. + The 'attrs' dictionary contains additional filter attributes. + """ + def findfilter(name, dir, filter): + """Find filter file 'fname' with style name 'name' in directory + 'dir'. Return found file path or None if not found.""" + if name: + result = os.path.join(dir, 'filters', name, filter) + if os.path.isfile(result): + return result + result = os.path.join(dir, 'filters', filter) + if os.path.isfile(result): + return result + return None + + # Return input lines if there's not filter. + if not filter_cmd or not filter_cmd.strip(): + return lines + # Perform attributes substitution on the filter command. + s = subs_attrs(filter_cmd, attrs) + if not s: + message.error('undefined filter attribute in command: %s' % filter_cmd) + return [] + filter_cmd = s.strip() + # Parse for quoted and unquoted command and command tail. + # Double quoted. + mo = re.match(r'^"(?P[^"]+)"(?P.*)$', filter_cmd) + if not mo: + # Single quoted. + mo = re.match(r"^'(?P[^']+)'(?P.*)$", filter_cmd) + if not mo: + # Unquoted catch all. + mo = re.match(r'^(?P\S+)(?P.*)$', filter_cmd) + cmd = mo.group('cmd').strip() + found = None + if not os.path.dirname(cmd): + # Filter command has no directory path so search filter directories. + filtername = attrs.get('style') + d = document.attributes.get('docdir') + if d: + found = findfilter(filtername, d, cmd) + if not found: + if USER_DIR: + found = findfilter(filtername, USER_DIR, cmd) + if not found: + found = findfilter(filtername, CONF_DIR, cmd) + else: + if os.path.isfile(cmd): + found = cmd + else: + message.warning('filter not found: %s' % cmd) + if found: + filter_cmd = '"' + found + '"' + mo.group('tail') + if found: + if cmd.endswith('.py'): + filter_cmd = '"%s" %s' % (document.attributes['python'], + filter_cmd) + elif cmd.endswith('.rb'): + filter_cmd = 'ruby ' + filter_cmd + + message.verbose('filtering: ' + filter_cmd) + if os.name == 'nt': + # Remove redundant quoting -- this is not just + # cosmetic, unnecessary quoting appears to cause + # command line truncation. + filter_cmd = re.sub(r'"([^ ]+?)"', r'\1', filter_cmd) + try: + p = subprocess.Popen(filter_cmd, shell=True, + stdin=subprocess.PIPE, stdout=subprocess.PIPE) + output = p.communicate(os.linesep.join(lines).encode("utf-8"))[0].decode('utf-8') + except Exception: + raise EAsciiDoc('filter error: %s: %s' % (filter_cmd, sys.exc_info()[1])) + if output: + result = [s.rstrip() for s in output.split(os.linesep)] + else: + result = [] + filter_status = p.wait() + if filter_status: + message.warning('filter non-zero exit code: %s: returned %d' % (filter_cmd, filter_status)) + if lines and not result: + message.warning('no output from filter: %s' % filter_cmd) + return result + + +def system(name, args, is_macro=False, attrs=None): + """ + Evaluate a system attribute ({name:args}) or system block macro + (name::[args]). + If is_macro is True then we are processing a system block macro otherwise + it's a system attribute. + The attrs dictionary is updated by the counter and set system attributes. + NOTE: The include1 attribute is used internally by the include1::[] macro + and is not for public use. + """ + if is_macro: + syntax = '%s::[%s]' % (name, args) + separator = '\n' + else: + syntax = '{%s:%s}' % (name, args) + separator = writer.newline + if name not in ('eval', 'eval3', 'sys', 'sys2', 'sys3', 'include', + 'include1', 'counter', 'counter2', 'set', 'set2', 'template'): + if is_macro: + msg = 'illegal system macro name: %s' % name + else: + msg = 'illegal system attribute name: %s' % name + message.warning(msg) + return None + if is_macro: + s = subs_attrs(args) + if s is None: + message.warning('skipped %s: undefined attribute in: %s' % (name, args)) + return None + args = s + if name != 'include1': + message.verbose('evaluating: %s' % syntax) + if safe() and name not in ('include', 'include1'): + message.unsafe(syntax) + return None + result = None + if name in ('eval', 'eval3'): + try: + result = eval(args) + if result is True: + result = '' + elif result is False: + result = None + elif result is not None: + result = str(result) + except Exception: + message.warning('%s: evaluation error' % syntax) + elif name in ('sys', 'sys2', 'sys3'): + result = '' + fd, tmp = tempfile.mkstemp() + os.close(fd) + try: + cmd = args + cmd = cmd + (' > "%s"' % tmp) + if name == 'sys2': + cmd = cmd + ' 2>&1' + if os.name == 'nt': + # Remove redundant quoting -- this is not just + # cosmetic, unnecessary quoting appears to cause + # command line truncation. + cmd = re.sub(r'"([^ ]+?)"', r'\1', cmd) + message.verbose('shelling: %s' % cmd) + if os.system(cmd): + message.warning('%s: non-zero exit status' % syntax) + try: + if os.path.isfile(tmp): + with open(tmp, encoding='utf-8') as f: + lines = [s.rstrip() for s in f] + else: + lines = [] + except Exception: + raise EAsciiDoc('%s: temp file read error' % syntax) + result = separator.join(lines) + finally: + if os.path.isfile(tmp): + os.remove(tmp) + elif name in ('counter', 'counter2'): + mo = re.match(r'^(?P[^:]*?)(:(?P.*))?$', args) + attr = mo.group('attr') + seed = mo.group('seed') + if seed and (not re.match(r'^\d+$', seed) and len(seed) > 1): + message.warning('%s: illegal counter seed: %s' % (syntax, seed)) + return None + if not is_name(attr): + message.warning('%s: illegal attribute name' % syntax) + return None + value = document.attributes.get(attr) + if value: + if not re.match(r'^\d+$', value) and len(value) > 1: + message.warning( + '%s: illegal counter value: %s' % (syntax, value) + ) + return None + if re.match(r'^\d+$', value): + expr = value + '+1' + else: + expr = 'chr(ord("%s")+1)' % value + try: + result = str(eval(expr)) + except Exception: + message.warning('%s: evaluation error: %s' % (syntax, expr)) + else: + if seed: + result = seed + else: + result = '1' + document.attributes[attr] = result + if attrs is not None: + attrs[attr] = result + if name == 'counter2': + result = '' + elif name in ('set', 'set2'): + mo = re.match(r'^(?P[^:]*?)(:(?P.*))?$', args) + attr = mo.group('attr') + value = mo.group('value') + if value is None: + value = '' + if attr.endswith('!'): + attr = attr[:-1] + value = None + if not is_name(attr): + message.warning('%s: illegal attribute name' % syntax) + else: + if attrs is not None: + attrs[attr] = value + if name != 'set2': # set2 only updates local attributes. + document.attributes[attr] = value + if value is None: + result = None + else: + result = '' + elif name == 'include': + if not os.path.exists(args): + message.warning('%s: file does not exist' % syntax) + elif not is_safe_file(args): + message.unsafe(syntax) + else: + with open(args, encoding='utf-8') as f: + result = [s.rstrip() for s in f] + if result: + result = subs_attrs(result) + result = separator.join(result) + result = result.expandtabs(reader.tabsize) + else: + result = '' + elif name == 'include1': + result = separator.join(config.include1[args]) + elif name == 'template': + if args not in config.sections: + message.warning('%s: template does not exist' % syntax) + else: + result = [] + for line in config.sections[args]: + line = subs_attrs(line) + if line is not None: + result.append(line) + result = config.newline.join(result) + else: + assert False + if result and name in ('eval3', 'sys3'): + macros.passthroughs.append(result) + result = '\x07' + str(len(macros.passthroughs) - 1) + '\x07' + return result + + +def subs_attrs(lines, dictionary=None): + """Substitute 'lines' of text with attributes from the global + document.attributes dictionary and from 'dictionary' ('dictionary' + entries take precedence). Return a tuple of the substituted lines. 'lines' + containing undefined attributes are deleted. If 'lines' is a string then + return a string. + + - Attribute references are substituted in the following order: simple, + conditional, system. + - Attribute references inside 'dictionary' entry values are substituted. + """ + + def end_brace(text, start): + """Return index following end brace that matches brace at start in + text.""" + assert text[start] == '{' + n = 0 + result = start + for c in text[start:]: + if result == len(text): + break + if c == '{': + n = n + 1 + elif c == '}': + n = n - 1 + result = result + 1 + if n == 0: + break + return result + + if type(lines) == str: + string_result = True + lines = [lines] + else: + string_result = False + if dictionary is None: + attrs = document.attributes + else: + # Remove numbered document attributes so they don't clash with + # attribute list positional attributes. + attrs = {} + for k, v in list(document.attributes.items()): + if not re.match(r'^\d+$', k): + attrs[k] = v + # Substitute attribute references inside dictionary values. + for k, v in list(dictionary.items()): + if v is None: + del dictionary[k] + else: + v = subs_attrs(str(v)) + if v is None: + del dictionary[k] + else: + dictionary[k] = v + attrs.update(dictionary) + # Substitute all attributes in all lines. + result = [] + for line in lines: + # Make it easier for regular expressions. + line = line.replace('\\{', '{\\') + line = line.replace('\\}', '}\\') + # Expand simple attributes ({name}). + # Nested attributes not allowed. + reo = re.compile(r'(?s)\{(?P[^\\\W][-\w]*?)\}(?!\\)') + pos = 0 + while True: + mo = reo.search(line, pos) + if not mo: + break + s = attrs.get(mo.group('name')) + if s is None: + pos = mo.end() + else: + s = str(s) + line = line[:mo.start()] + s + line[mo.end():] + pos = mo.start() + len(s) + # Expand conditional attributes. + # Single name -- higher precedence. + reo1 = re.compile( + r'(?s)\{(?P[^\\\W][-\w]*?)' + r'(?P\=|\?|!|#|%|@|\$)' + r'(?P.*?)\}(?!\\)' + ) + # Multiple names (n1,n2,... or n1+n2+...) -- lower precedence. + reo2 = re.compile( + r'(?s)\{(?P[^\\\W][-\w' + OR + AND + r']*?)' + r'(?P\=|\?|!|#|%|@|\$)' + r'(?P.*?)\}(?!\\)' + ) + for reo in [reo1, reo2]: + pos = 0 + while True: + line = line.replace('\\{', '{\\') + mo = reo.search(line, pos) + if not mo: + break + attr = mo.group() + name = mo.group('name') + if reo == reo2: + if OR in name: + sep = OR + else: + sep = AND + names = [s.strip() for s in name.split(sep) if s.strip()] + for n in names: + if not re.match(r'^[^\\\W][-\w]*$', n): + message.error('illegal attribute syntax: %s' % attr) + if sep == OR: + # Process OR name expression: n1,n2,... + for n in names: + if attrs.get(n) is not None: + lval = '' + break + else: + lval = None + else: + # Process AND name expression: n1+n2+... + for n in names: + if attrs.get(n) is None: + lval = None + break + else: + lval = '' + else: + lval = attrs.get(name) + op = mo.group('op') + # mo.end() not good enough because '{x={y}}' matches '{x={y}'. + end = end_brace(line, mo.start()) + rval = line[mo.start('value'):end - 1] + UNDEFINED = '{zzzzz}' + if lval is None: + if op == '=': + s = rval + elif op == '?': + s = '' + elif op == '!': + s = rval + elif op == '#': + s = UNDEFINED # So the line is dropped. + elif op == '%': + s = rval + elif op in ('@', '$'): + s = UNDEFINED # So the line is dropped. + else: + assert False, 'illegal attribute: %s' % attr + else: + if op == '=': + s = lval + elif op == '?': + s = rval + elif op == '!': + s = '' + elif op == '#': + s = rval + elif op == '%': + s = UNDEFINED # So the line is dropped. + elif op in ('@', '$'): + v = re.split(r'(?@:[:]} + else: + if len(v) == 3: # {@::} + s = v[2] + else: # {@:} + s = '' + else: + if re_mo: + if len(v) == 2: # {$:} + s = v[1] + elif v[1] == '': # {$::} + s = UNDEFINED # So the line is dropped. + else: # {$::} + s = v[1] + else: + if len(v) == 2: # {$:} + s = UNDEFINED # So the line is dropped. + else: # {$::} + s = v[2] + else: + assert False, 'illegal attribute: %s' % attr + s = str(s) + line = line[:mo.start()] + s + line[end:] + line = line.replace('{\\', '\\{') + pos = mo.start() + len(s) + # Drop line if it contains unsubstituted {name} references. + skipped = re.search(r'(?s)\{[^\\\W][-\w]*?\}(?!\\)', line) + if skipped: + trace('dropped line', line) + continue + # Expand system attributes (eval has precedence). + reos = [ + re.compile(r'(?s)\{(?Peval):(?P.*?)\}(?!\\)'), + re.compile(r'(?s)\{(?P[^\\\W][-\w]*?):(?P.*?)\}(?!\\)'), + ] + skipped = False + for reo in reos: + pos = 0 + while True: + mo = reo.search(line, pos) + if not mo: + break + expr = mo.group('expr') + action = mo.group('action') + expr = expr.replace('{\\', '\\{') + expr = expr.replace('}\\', '}') + s = system(action, expr, attrs=dictionary) + if dictionary is not None and action in ('counter', 'counter2', 'set', 'set2'): + # These actions create and update attributes. + attrs.update(dictionary) + if s is None: + # Drop line if the action returns None. + skipped = True + break + line = line[:mo.start()] + s + line[mo.end():] + pos = mo.start() + len(s) + if skipped: + break + if not skipped: + # Put back slash for leftmost curly brace for subsequent parses of + # escaped attributes. We don't need the escaped right curly braces though. + line = line.replace('{\\', '\\{') + line = line.replace('}\\', '}') + result.append(line) + if string_result: + if result: + return '\n'.join(result) + else: + return None + else: + return tuple(result) + + +class Lex: + """Lexical analysis routines. Static methods and attributes only.""" + prev_element = None + prev_cursor = None + + def __init__(self): + raise AssertionError('no class instances allowed') + + def __iter__(self): + return self + + @staticmethod + def reset_class(): + Lex.prev_element = None + Lex.prev_cursor = None + + @staticmethod + def next_element(): + """Returns class of next element on the input (None if EOF). The + reader is assumed to be at the first line following a previous element, + end of file or line one. Exits with the reader pointing to the first + line of the next element or EOF (leading blank lines are skipped).""" + reader.skip_blank_lines() + if reader.eof(): + return None + # Optimization: If we've already checked for an element at this + # position return the element. + if Lex.prev_element and Lex.prev_cursor == reader.cursor: + return Lex.prev_element + if AttributeEntry.isnext(): + result = AttributeEntry + elif AttributeList.isnext(): + result = AttributeList + elif BlockTitle.isnext() and not tables_OLD.isnext(): + result = BlockTitle + elif Title.isnext(): + if AttributeList.style() == 'float': + result = FloatingTitle + else: + result = Title + elif macros.isnext(): + result = macros.current + elif lists.isnext(): + result = lists.current + elif blocks.isnext(): + result = blocks.current + elif tables_OLD.isnext(): + result = tables_OLD.current + elif tables.isnext(): + result = tables.current + else: + if not paragraphs.isnext(): + raise EAsciiDoc('paragraph expected') + result = paragraphs.current + # Optimization: Cache answer. + Lex.prev_cursor = reader.cursor + Lex.prev_element = result + return result + + @staticmethod + def canonical_subs(options): + """Translate composite subs values.""" + if len(options) == 1: + if options[0] == 'none': + options = () + elif options[0] == 'normal': + options = config.subsnormal + elif options[0] == 'verbatim': + options = config.subsverbatim + return options + + @staticmethod + def subs_1(s, options): + """Perform substitution specified in 'options' (in 'options' order).""" + if not s: + return s + if document.attributes.get('plaintext') is not None: + options = ('specialcharacters',) + result = s + options = Lex.canonical_subs(options) + for o in options: + if o == 'specialcharacters': + result = config.subs_specialchars(result) + elif o == 'attributes': + result = subs_attrs(result) + elif o == 'quotes': + result = subs_quotes(result) + elif o == 'specialwords': + result = config.subs_specialwords(result) + elif o in ('replacements', 'replacements2', 'replacements3'): + result = config.subs_replacements(result, o) + elif o == 'macros': + result = macros.subs(result) + elif o == 'callouts': + result = macros.subs(result, callouts=True) + else: + raise EAsciiDoc('illegal substitution option: %s' % o) + trace(o, s, result) + if not result: + break + return result + + @staticmethod + def subs(lines, options): + """Perform inline processing specified by 'options' (in 'options' + order) on sequence of 'lines'.""" + if not lines or not options: + return lines + options = Lex.canonical_subs(options) + # Join lines so quoting can span multiple lines. + para = '\n'.join(lines) + if 'macros' in options: + para = macros.extract_passthroughs(para) + for o in options: + if o == 'attributes': + # If we don't substitute attributes line-by-line then a single + # undefined attribute will drop the entire paragraph. + lines = subs_attrs(para.split('\n')) + para = '\n'.join(lines) + else: + para = Lex.subs_1(para, (o,)) + if 'macros' in options: + para = macros.restore_passthroughs(para) + return para.splitlines() + + @staticmethod + def set_margin(lines, margin=0): + """Utility routine that sets the left margin to 'margin' space in a + block of non-blank lines.""" + # Calculate width of block margin. + lines = list(lines) + width = len(lines[0]) + for s in lines: + i = re.search(r'\S', s).start() + if i < width: + width = i + # Strip margin width from all lines. + for i in range(len(lines)): + lines[i] = ' ' * margin + lines[i][width:] + return lines + + +# --------------------------------------------------------------------------- +# Document element classes parse AsciiDoc reader input and write DocBook writer +# output. +# --------------------------------------------------------------------------- +class Document(object): + # doctype property. + def getdoctype(self): + return self.attributes.get('doctype') + + def setdoctype(self, doctype): + self.attributes['doctype'] = doctype + doctype = property(getdoctype, setdoctype) + + # backend property. + def getbackend(self): + return self.attributes.get('backend') + + def setbackend(self, backend): + if backend: + backend = self.attributes.get('backend-alias-' + backend, backend) + self.attributes['backend'] = backend + backend = property(getbackend, setbackend) + + def __init__(self): + self.infile = None # Source file name. + self.outfile = None # Output file name. + self.attributes = InsensitiveDict() + self.level = 0 # 0 => front matter. 1,2,3 => sect1,2,3. + self.has_errors = False # Set true if processing errors were flagged. + self.has_warnings = False # Set true if warnings were flagged. + self.safe = False # Default safe mode. + + def update_attributes(self, attrs=None): + """ + Set implicit attributes and attributes in 'attrs'. + """ + t = time.time() + self.attributes['localdate'], self.attributes['localtime'] = utils.date_time_str(t) + self.attributes['asciidoc-module'] = 'asciidoc' + self.attributes['asciidoc-version'] = VERSION + self.attributes['asciidoc-confdir'] = CONF_DIR + self.attributes['user-dir'] = USER_DIR + if config.verbose: + self.attributes['verbose'] = '' + # Update with configuration file attributes. + if attrs: + self.attributes.update(attrs) + # Update with command-line attributes. + self.attributes.update(config.cmd_attrs) + # Extract miscellaneous configuration section entries from attributes. + if attrs: + config.load_miscellaneous(attrs) + config.load_miscellaneous(config.cmd_attrs) + self.attributes['newline'] = config.newline + # File name related attributes can't be overridden. + if self.infile is not None: + if self.infile and os.path.exists(self.infile): + t = os.path.getmtime(self.infile) + elif self.infile == '': + t = time.time() + else: + t = None + if t: + self.attributes['docdate'], self.attributes['doctime'] = utils.date_time_str(t) + if self.infile != '': + self.attributes['infile'] = self.infile + self.attributes['indir'] = os.path.dirname(self.infile) + self.attributes['docfile'] = self.infile + self.attributes['docdir'] = os.path.dirname(self.infile) + self.attributes['docname'] = os.path.splitext( + os.path.basename(self.infile))[0] + if self.outfile: + if self.outfile != '': + self.attributes['outfile'] = self.outfile + self.attributes['outdir'] = os.path.dirname(self.outfile) + if self.infile == '': + self.attributes['docname'] = os.path.splitext( + os.path.basename(self.outfile))[0] + ext = os.path.splitext(self.outfile)[1][1:] + elif config.outfilesuffix: + ext = config.outfilesuffix[1:] + else: + ext = '' + if ext: + self.attributes['filetype'] = ext + self.attributes['filetype-' + ext] = '' + + def load_lang(self): + """ + Load language configuration file. + """ + lang = self.attributes.get('lang') + if lang is None: + filename = 'lang-en.conf' # Default language file. + else: + filename = 'lang-' + lang + '.conf' + if config.load_from_dirs(filename): + self.attributes['lang'] = lang # Reinstate new lang attribute. + else: + if lang is None: + # The default language file must exist. + message.error('missing conf file: %s' % filename, halt=True) + else: + message.warning('missing language conf file: %s' % filename) + + def set_deprecated_attribute(self, old, new): + """ + Ensures the 'old' name of an attribute that was renamed to 'new' is + still honored. + """ + if self.attributes.get(new) is None: + if self.attributes.get(old) is not None: + self.attributes[new] = self.attributes[old] + else: + self.attributes[old] = self.attributes[new] + + @staticmethod + def consume_attributes_and_comments(comments_only=False, noblanks=False): + """ + Returns True if one or more attributes or comments were consumed. + If 'noblanks' is True then consummation halts if a blank line is + encountered. + """ + result = False + finished = False + while not finished: + finished = True + if noblanks and not reader.read_next(): + return result + if blocks.isnext() and 'skip' in blocks.current.options: + result = True + finished = False + blocks.current.translate() + if noblanks and not reader.read_next(): + return result + if macros.isnext() and macros.current.name == 'comment': + result = True + finished = False + macros.current.translate() + if not comments_only: + if AttributeEntry.isnext(): + result = True + finished = False + AttributeEntry.translate() + if AttributeList.isnext(): + result = True + finished = False + AttributeList.translate() + return result + + def parse_header(self, doctype, backend): + """ + Parses header, sets corresponding document attributes and finalizes + document doctype and backend properties. + Returns False if the document does not have a header. + 'doctype' and 'backend' are the doctype and backend option values + passed on the command-line, None if no command-line option was not + specified. + """ + assert self.level == 0 + # Skip comments and attribute entries that precede the header. + self.consume_attributes_and_comments() + if doctype is not None: + # Command-line overrides header. + self.doctype = doctype + elif self.doctype is None: + # Was not set on command-line or in document header. + self.doctype = DEFAULT_DOCTYPE + # Process document header. + has_header = (Title.isnext() and Title.level == 0 and AttributeList.style() != 'float') + if self.doctype == 'manpage' and not has_header: + message.error('manpage document title is mandatory', halt=True) + if has_header: + Header.parse() + # Command-line entries override header derived entries. + self.attributes.update(config.cmd_attrs) + # DEPRECATED: revision renamed to revnumber. + self.set_deprecated_attribute('revision', 'revnumber') + # DEPRECATED: date renamed to revdate. + self.set_deprecated_attribute('date', 'revdate') + if doctype is not None: + # Command-line overrides header. + self.doctype = doctype + if backend is not None: + # Command-line overrides header. + self.backend = backend + elif self.backend is None: + # Was not set on command-line or in document header. + self.backend = DEFAULT_BACKEND + else: + # Has been set in document header. + self.backend = self.backend # Translate alias in header. + assert self.doctype in ('article', 'manpage', 'book'), 'illegal document type' + return has_header + + def translate(self, has_header): + if self.doctype == 'manpage': + # Translate mandatory NAME section. + if Lex.next_element() is not Title: + message.error('name section expected') + else: + Title.translate() + if Title.level != 1: + message.error('name section title must be at level 1') + if not isinstance(Lex.next_element(), Paragraph): + message.error('malformed name section body') + lines = reader.read_until(r'^$') + s = ' '.join(lines) + mo = re.match(r'^(?P.*?)\s+-\s+(?P.*)$', s) + if not mo: + message.error('malformed name section body') + self.attributes['manname'] = mo.group('manname').strip() + self.attributes['manpurpose'] = mo.group('manpurpose').strip() + names = [s.strip() for s in self.attributes['manname'].split(',')] + if len(names) > 9: + message.warning('too many manpage names') + for i, name in enumerate(names): + self.attributes['manname%d' % (i + 1)] = name + if has_header: + # Do postponed substitutions (backend confs have been loaded). + self.attributes['doctitle'] = Title.dosubs(self.attributes['doctitle']) + if config.header_footer: + hdr = config.subs_section('header', {}) + writer.write(hdr, trace='header') + if 'title' in self.attributes: + del self.attributes['title'] + self.consume_attributes_and_comments() + if self.doctype in ('article', 'book'): + # Translate 'preamble' (untitled elements between header + # and first section title). + if Lex.next_element() is not Title: + stag, etag = config.section2tags('preamble') + writer.write(stag, trace='preamble open') + Section.translate_body() + writer.write(etag, trace='preamble close') + elif self.doctype == 'manpage' and 'name' in config.sections: + writer.write(config.subs_section('name', {}), trace='name') + else: + self.process_author_names() + if config.header_footer: + hdr = config.subs_section('header', {}) + writer.write(hdr, trace='header') + if Lex.next_element() is not Title: + Section.translate_body() + # Process remaining sections. + while not reader.eof(): + if Lex.next_element() is not Title: + raise EAsciiDoc('section title expected') + Section.translate() + Section.setlevel(0) # Write remaining unwritten section close tags. + # Substitute document parameters and write document footer. + if config.header_footer: + ftr = config.subs_section('footer', {}) + writer.write(ftr, trace='footer') + + def parse_author(self, s): + """ Return False if the author is malformed.""" + attrs = self.attributes # Alias for readability. + s = s.strip() + mo = re.match(r'^(?P[^<>\s]+)' + r'(\s+(?P[^<>\s]+))?' + r'(\s+(?P[^<>\s]+))?' + r'(\s+<(?P\S+)>)?$', s) + if not mo: + # Names that don't match the formal specification. + if s: + attrs['firstname'] = s + return + firstname = mo.group('name1') + if mo.group('name3'): + middlename = mo.group('name2') + lastname = mo.group('name3') + else: + middlename = None + lastname = mo.group('name2') + firstname = firstname.replace('_', ' ') + if middlename: + middlename = middlename.replace('_', ' ') + if lastname: + lastname = lastname.replace('_', ' ') + email = mo.group('email') + if firstname: + attrs['firstname'] = firstname + if middlename: + attrs['middlename'] = middlename + if lastname: + attrs['lastname'] = lastname + if email: + attrs['email'] = email + return + + def process_author_names(self): + """ Calculate any missing author related attributes.""" + attrs = self.attributes # Alias for readability. + firstname = attrs.get('firstname', '') + middlename = attrs.get('middlename', '') + lastname = attrs.get('lastname', '') + author = attrs.get('author') + initials = attrs.get('authorinitials') + if author and not (firstname or middlename or lastname): + self.parse_author(author) + attrs['author'] = author.replace('_', ' ') + self.process_author_names() + return + if not author: + author = '%s %s %s' % (firstname, middlename, lastname) + author = author.strip() + author = re.sub(r'\s+', ' ', author) + if not initials: + initials = (firstname[:1] + middlename[:1] + lastname[:1]) + initials = initials.upper() + names = [firstname, middlename, lastname, author, initials] + for i, v in enumerate(names): + v = config.subs_specialchars(v) + v = subs_attrs(v) + names[i] = v + firstname, middlename, lastname, author, initials = names + if firstname: + attrs['firstname'] = firstname + if middlename: + attrs['middlename'] = middlename + if lastname: + attrs['lastname'] = lastname + if author: + attrs['author'] = author + if initials: + attrs['authorinitials'] = initials + if author: + attrs['authored'] = '' + + +class Header: + """Static methods and attributes only.""" + REV_LINE_RE = r'^(\D*(?P.*?),)?(?P.*?)(:\s*(?P.*))?$' + RCS_ID_RE = r'^\$Id: \S+ (?P\S+) (?P\S+) \S+ (?P\S+) (\S+ )?\$$' + + def __init__(self): + raise AssertionError('no class instances allowed') + + @staticmethod + def parse(): + assert Lex.next_element() is Title and Title.level == 0 + attrs = document.attributes # Alias for readability. + # Postpone title subs until backend conf files have been loaded. + Title.translate(skipsubs=True) + attrs['doctitle'] = Title.attributes['title'] + document.consume_attributes_and_comments(noblanks=True) + s = reader.read_next() + mo = None + if s: + # Process first header line after the title that is not a comment + # or an attribute entry. + s = reader.read() + mo = re.match(Header.RCS_ID_RE, s) + if not mo: + document.parse_author(s) + document.consume_attributes_and_comments(noblanks=True) + if reader.read_next(): + # Process second header line after the title that is not a + # comment or an attribute entry. + s = reader.read() + s = subs_attrs(s) + if s: + mo = re.match(Header.RCS_ID_RE, s) + if not mo: + mo = re.match(Header.REV_LINE_RE, s) + document.consume_attributes_and_comments(noblanks=True) + s = attrs.get('revnumber') + if s: + mo = re.match(Header.RCS_ID_RE, s) + if mo: + revnumber = mo.group('revnumber') + if revnumber: + attrs['revnumber'] = revnumber.strip() + author = mo.groupdict().get('author') + if author and 'firstname' not in attrs: + document.parse_author(author) + revremark = mo.groupdict().get('revremark') + if revremark is not None: + revremark = [revremark] + # Revision remarks can continue on following lines. + while reader.read_next(): + if document.consume_attributes_and_comments(noblanks=True): + break + revremark.append(reader.read()) + revremark = Lex.subs(revremark, ['normal']) + revremark = '\n'.join(revremark).strip() + attrs['revremark'] = revremark + revdate = mo.group('revdate') + if revdate: + attrs['revdate'] = revdate.strip() + elif revnumber or revremark: + # Set revision date to ensure valid DocBook revision. + attrs['revdate'] = attrs['docdate'] + document.process_author_names() + if document.doctype == 'manpage': + # manpage title formatted like mantitle(manvolnum). + mo = re.match(r'^(?P.*)\((?P.*)\)$', + attrs['doctitle']) + if not mo: + message.error('malformed manpage title') + else: + mantitle = mo.group('mantitle').strip() + mantitle = subs_attrs(mantitle) + if mantitle is None: + message.error('undefined attribute in manpage title') + # mantitle is lowered only if in ALL CAPS + if mantitle == mantitle.upper(): + mantitle = mantitle.lower() + attrs['mantitle'] = mantitle + attrs['manvolnum'] = mo.group('manvolnum').strip() + + +class AttributeEntry: + """Static methods and attributes only.""" + pattern = None + subs = None + name = None + name2 = None + value = None + attributes = {} # Accumulates all the parsed attribute entries. + + def __init__(self): + raise AssertionError('no class instances allowed') + + @staticmethod + def reset_class(): + AttributeEntry.pattern = None + AttributeEntry.subs = None + AttributeEntry.name = None + AttributeEntry.name2 = None + AttributeEntry.value = None + AttributeEntry.attributes = {} + + @staticmethod + def isnext(): + result = False # Assume not next. + if not AttributeEntry.pattern: + pat = document.attributes.get('attributeentry-pattern') + if not pat: + message.error("[attributes] missing 'attributeentry-pattern' entry") + AttributeEntry.pattern = pat + line = reader.read_next() + if line: + # Attribute entry formatted like :[.]:[ ] + mo = re.match(AttributeEntry.pattern, line) + if mo: + AttributeEntry.name = mo.group('attrname') + AttributeEntry.name2 = mo.group('attrname2') + AttributeEntry.value = mo.group('attrvalue') or '' + AttributeEntry.value = AttributeEntry.value.strip() + result = True + return result + + @staticmethod + def translate(): + assert Lex.next_element() is AttributeEntry + attr = AttributeEntry # Alias for brevity. + reader.read() # Discard attribute entry from reader. + while attr.value.endswith(' +'): + if not reader.read_next(): + break + attr.value = attr.value[:-1] + reader.read().strip() + if attr.name2 is not None: + # Configuration file attribute. + if attr.name2 != '': + # Section entry attribute. + section = {} + # Some sections can have name! syntax. + if attr.name in ('attributes', 'miscellaneous') and attr.name2[-1] == '!': + section[attr.name] = [attr.name2] + else: + section[attr.name] = ['%s=%s' % (attr.name2, attr.value)] + config.load_sections(section) + config.load_miscellaneous(config.conf_attrs) + else: + # Markup template section attribute. + config.sections[attr.name] = [attr.value] + else: + # Normal attribute. + if attr.name[-1] == '!': + # Names like name! un-define the attribute. + attr.name = attr.name[:-1] + attr.value = None + # Strip white space and illegal name chars. + attr.name = re.sub(r'[^\w\-_]', '', attr.name).lower() + # Don't override most command-line attributes. + if attr.name in config.cmd_attrs \ + and attr.name not in ('trace', 'numbered'): + return + # Update document attributes with attribute value. + if attr.value is not None: + mo = re.match(r'^pass:(?P.*)\[(?P.*)\]$', attr.value) + if mo: + # Inline pass-through syntax. + attr.subs = mo.group('attrs') + attr.value = mo.group('value') # Pass-through. + else: + # Default substitution. + # DEPRECATED: attributeentry-subs + attr.subs = document.attributes.get('attributeentry-subs', + 'specialcharacters,attributes') + attr.subs = parse_options(attr.subs, SUBS_OPTIONS, + 'illegal substitution option') + attr.value = Lex.subs((attr.value,), attr.subs) + attr.value = writer.newline.join(attr.value) + document.attributes[attr.name] = attr.value + elif attr.name in document.attributes: + del document.attributes[attr.name] + attr.attributes[attr.name] = attr.value + + +class AttributeList: + """Static methods and attributes only.""" + pattern = None + match = None + attrs = {} + + def __init__(self): + raise AssertionError('no class instances allowed') + + @staticmethod + def reset_class(): + AttributeList.pattern = None + AttributeList.match = None + AttributeList.attrs = {} + + @staticmethod + def initialize(): + if 'attributelist-pattern' not in document.attributes: + message.error("[attributes] missing 'attributelist-pattern' entry") + AttributeList.pattern = document.attributes['attributelist-pattern'] + + @staticmethod + def isnext(): + result = False # Assume not next. + line = reader.read_next() + if line: + mo = re.match(AttributeList.pattern, line) + if mo: + AttributeList.match = mo + result = True + return result + + @staticmethod + def translate(): + assert Lex.next_element() is AttributeList + reader.read() # Discard attribute list from reader. + attrs = {} + d = AttributeList.match.groupdict() + for k, v in list(d.items()): + if v is not None: + if k == 'attrlist': + v = subs_attrs(v) + if v: + parse_attributes(v, attrs) + else: + AttributeList.attrs[k] = v + AttributeList.subs(attrs) + AttributeList.attrs.update(attrs) + + @staticmethod + def subs(attrs): + """Substitute single quoted attribute values normally.""" + reo = re.compile(r"^'.*'$") + for k, v in list(attrs.items()): + if reo.match(str(v)): + attrs[k] = Lex.subs_1(v[1:-1], config.subsnormal) + + @staticmethod + def style(): + return AttributeList.attrs.get('style') or AttributeList.attrs.get('1') + + @staticmethod + def consume(d={}): + """Add attribute list to the dictionary 'd' and reset the list.""" + if AttributeList.attrs: + d.update(AttributeList.attrs) + AttributeList.attrs = {} + # Generate option attributes. + if 'options' in d: + options = parse_options(d['options'], (), 'illegal option name') + for option in options: + d[option + '-option'] = '' + + +class BlockTitle: + """Static methods and attributes only.""" + title = None + pattern = None + + def __init__(self): + raise AssertionError('no class instances allowed') + + @staticmethod + def reset_class(): + BlockTitle.title = None + BlockTitle.pattern = None + + @staticmethod + def isnext(): + result = False # Assume not next. + line = reader.read_next() + if line: + mo = re.match(BlockTitle.pattern, line) + if mo: + BlockTitle.title = mo.group('title') + result = True + return result + + @staticmethod + def translate(): + assert Lex.next_element() is BlockTitle + reader.read() # Discard title from reader. + # Perform title substitutions. + if not Title.subs: + Title.subs = config.subsnormal + s = Lex.subs((BlockTitle.title,), Title.subs) + s = writer.newline.join(s) + if not s: + message.warning('blank block title') + BlockTitle.title = s + + @staticmethod + def consume(d={}): + """If there is a title add it to dictionary 'd' then reset title.""" + if BlockTitle.title: + d['title'] = BlockTitle.title + BlockTitle.title = None + + +class Title: + """Processes Header and Section titles. Static methods and attributes + only.""" + # Class variables + underlines = ('==', '--', '~~', '^^', '++') # Levels 0,1,2,3,4. + subs = () + pattern = None + level = 0 + attributes = {} + sectname = None + section_numbers = [0] * len(underlines) + dump_dict = {} + linecount = None # Number of lines in title (1 or 2). + + def __init__(self): + raise AssertionError('no class instances allowed') + + @staticmethod + def reset_class(): + Title.subs = () + Title.pattern = None + Title.level = 0 + Title.attributes = {} + Title.sectname = None + Title.section_numbers = [0] * len(Title.underlines) + Title.dump_dict = {} + Title.linecount = None + + @staticmethod + def translate(skipsubs=False): + """Parse the Title.attributes and Title.level from the reader. The + real work has already been done by parse().""" + assert Lex.next_element() in (Title, FloatingTitle) + # Discard title from reader. + for i in range(Title.linecount): + reader.read() + Title.setsectname() + if not skipsubs: + Title.attributes['title'] = Title.dosubs(Title.attributes['title']) + + @staticmethod + def dosubs(title): + """ + Perform title substitutions. + """ + if not Title.subs: + Title.subs = config.subsnormal + title = Lex.subs((title,), Title.subs) + title = writer.newline.join(title) + if not title: + message.warning('blank section title') + return title + + @staticmethod + def isnext(): + lines = reader.read_ahead(2) + return Title.parse(lines) + + @staticmethod + def parse(lines): + """Parse title at start of lines tuple.""" + if len(lines) == 0: + return False + if len(lines[0]) == 0: + return False # Title can't be blank. + # Check for single-line titles. + result = False + for level in range(len(Title.underlines)): + k = 'sect%s' % level + if k in Title.dump_dict: + mo = re.match(Title.dump_dict[k], lines[0]) + if mo: + Title.attributes = mo.groupdict() + Title.level = level + Title.linecount = 1 + result = True + break + if not result: + # Check for double-line titles. + if not Title.pattern: + return False # Single-line titles only. + if len(lines) < 2: + return False + title, ul = lines[:2] + title_len = utils.column_width(title) + ul_len = len(ul) + if ul_len < 2: + return False + # Fast elimination check. + if ul[:2] not in Title.underlines: + return False + # Length of underline must be within +/- 3 of title. Next, test for backward compatibility. + if not ((ul_len-3 < title_len < ul_len+3) or (ul_len-3 < len(title) < ul_len+3)): + return False + # Check for valid repetition of underline character pairs. + s = ul[:2] * ((ul_len + 1) // 2) + if ul != s[:ul_len]: + return False + # Don't be fooled by back-to-back delimited blocks, require at + # least one alphanumeric character in title. + + if not re.search(r'\w', title): + return False + + mo = re.match(Title.pattern, title) + if mo: + Title.attributes = mo.groupdict() + Title.level = list(Title.underlines).index(ul[:2]) + Title.linecount = 2 + result = True + # Check for expected pattern match groups. + if result: + if 'title' not in Title.attributes: + message.warning('[titles] entry has no group') + Title.attributes['title'] = lines[0] + for k, v in list(Title.attributes.items()): + if v is None: + del Title.attributes[k] + try: + Title.level += int(document.attributes.get('leveloffset', '0')) + except: + pass + Title.attributes['level'] = str(Title.level) + return result + + @staticmethod + def load(entries): + """Load and validate [titles] section entries dictionary.""" + if 'underlines' in entries: + errmsg = 'malformed [titles] underlines entry' + try: + underlines = parse_list(entries['underlines']) + except Exception: + raise EAsciiDoc(errmsg) + if len(underlines) != len(Title.underlines): + raise EAsciiDoc(errmsg) + for s in underlines: + if len(s) != 2: + raise EAsciiDoc(errmsg) + Title.underlines = tuple(underlines) + Title.dump_dict['underlines'] = entries['underlines'] + if 'subs' in entries: + Title.subs = parse_options(entries['subs'], SUBS_OPTIONS, + 'illegal [titles] subs entry') + Title.dump_dict['subs'] = entries['subs'] + if 'sectiontitle' in entries: + pat = entries['sectiontitle'] + if not pat or not utils.is_re(pat): + raise EAsciiDoc('malformed [titles] sectiontitle entry') + Title.pattern = pat + Title.dump_dict['sectiontitle'] = pat + if 'blocktitle' in entries: + pat = entries['blocktitle'] + if not pat or not utils.is_re(pat): + raise EAsciiDoc('malformed [titles] blocktitle entry') + BlockTitle.pattern = pat + Title.dump_dict['blocktitle'] = pat + # Load single-line title patterns. + for k in ('sect0', 'sect1', 'sect2', 'sect3', 'sect4'): + if k in entries: + pat = entries[k] + if not pat or not utils.is_re(pat): + raise EAsciiDoc('malformed [titles] %s entry' % k) + Title.dump_dict[k] = pat + # TODO: Check we have either a Title.pattern or at least one + # single-line title pattern -- can this be done here or do we need + # check routine like the other block checkers? + + @staticmethod + def dump(): + dump_section('titles', Title.dump_dict) + + @staticmethod + def setsectname(): + """ + Set Title section name: + If the first positional or 'template' attribute is set use it, + next search for section title in [specialsections], + if not found use default 'sect<level>' name. + """ + sectname = AttributeList.attrs.get('1') + if sectname and sectname != 'float': + Title.sectname = sectname + elif 'template' in AttributeList.attrs: + Title.sectname = AttributeList.attrs['template'] + else: + for pat, sect in list(config.specialsections.items()): + mo = re.match(pat, Title.attributes['title']) + if mo: + title = mo.groupdict().get('title') + if title is not None: + Title.attributes['title'] = title.strip() + else: + Title.attributes['title'] = mo.group().strip() + Title.sectname = sect + break + else: + Title.sectname = 'sect%d' % Title.level + + @staticmethod + def getnumber(level): + """Return next section number at section 'level' formatted like + 1.2.3.4.""" + number = '' + for l in range(len(Title.section_numbers)): + n = Title.section_numbers[l] + if l == 0: + continue + elif l < level: + number = '%s%d.' % (number, n) + elif l == level: + number = '%s%d.' % (number, n + 1) + Title.section_numbers[l] = n + 1 + elif l > level: + # Reset unprocessed section levels. + Title.section_numbers[l] = 0 + return number + + +class FloatingTitle(Title): + """Floated titles are translated differently.""" + + @staticmethod + def isnext(): + return Title.isnext() and AttributeList.style() == 'float' + + @staticmethod + def translate(): + assert Lex.next_element() is FloatingTitle + Title.translate() + Section.set_id() + AttributeList.consume(Title.attributes) + template = 'floatingtitle' + if template in config.sections: + stag, etag = config.section2tags(template, Title.attributes) + writer.write(stag, trace='floating title') + else: + message.warning('missing template section: [%s]' % template) + + +class Section: + """Static methods and attributes only.""" + endtags = [] # Stack of currently open section (level,endtag) tuples. + ids = [] # List of already used ids. + + def __init__(self): + raise AssertionError('no class instances allowed') + + @staticmethod + def reset_class(): + Section.endtags = [] + Section.ids = [] + + @staticmethod + def savetag(level, etag): + """Save section end.""" + Section.endtags.append((level, etag)) + + @staticmethod + def setlevel(level): + """Set document level and write open section close tags up to level.""" + while Section.endtags and Section.endtags[-1][0] >= level: + writer.write(Section.endtags.pop()[1], trace='section close') + document.level = level + + @staticmethod + def gen_id(title): + """ + The normalized value of the id attribute is an NCName according to + the 'Namespaces in XML' Recommendation: + NCName ::= NCNameStartChar NCNameChar* + NCNameChar ::= NameChar - ':' + NCNameStartChar ::= Letter | '_' + NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' + """ + # Replace non-alpha numeric characters in title with underscores and + # convert to lower case. + base_id = re.sub(r'\W+', '_', title).strip('_').lower() + if 'ascii-ids' in document.attributes: + # Replace non-ASCII characters with ASCII equivalents. + try: + from trans import trans # pyright: reportMissingImports=false + base_id = trans(base_id) + except ImportError: + base_id = unicodedata.normalize('NFKD', base_id).encode('ascii', 'ignore').decode('ascii') + # Prefix the ID name with idprefix attribute or underscore if not + # defined. Prefix ensures the ID does not clash with existing IDs. + idprefix = document.attributes.get('idprefix', '_') + base_id = idprefix + base_id + i = 1 + while True: + if i == 1: + id = base_id + else: + id = '%s_%d' % (base_id, i) + if id not in Section.ids: + Section.ids.append(id) + return id + else: + id = base_id + i += 1 + + @staticmethod + def set_id(): + if not document.attributes.get('sectids') is None \ + and 'id' not in AttributeList.attrs: + # Generate ids for sections. + AttributeList.attrs['id'] = Section.gen_id(Title.attributes['title']) + + @staticmethod + def translate(): + assert Lex.next_element() is Title + prev_sectname = Title.sectname + Title.translate() + if Title.level == 0 and document.doctype != 'book': + message.error('only book doctypes can contain level 0 sections') + if Title.level > document.level \ + and 'basebackend-docbook' in document.attributes \ + and prev_sectname in ('colophon', 'abstract', + 'dedication', 'glossary', 'bibliography'): + message.error('%s section cannot contain sub-sections' % prev_sectname) + if Title.level > document.level + 1: + # Sub-sections of multi-part book level zero Preface and Appendices + # are meant to be out of sequence. + if document.doctype == 'book' \ + and document.level == 0 \ + and Title.level == 2 \ + and prev_sectname in ('preface', 'appendix'): + pass + else: + message.warning('section title out of sequence: ' + 'expected level %d, got level %d' + % (document.level + 1, Title.level)) + Section.set_id() + Section.setlevel(Title.level) + if 'numbered' in document.attributes: + Title.attributes['sectnum'] = Title.getnumber(document.level) + else: + Title.attributes['sectnum'] = '' + AttributeList.consume(Title.attributes) + stag, etag = config.section2tags(Title.sectname, Title.attributes) + Section.savetag(Title.level, etag) + writer.write(stag, trace='section open: level %d: %s' % + (Title.level, Title.attributes['title'])) + Section.translate_body() + + @staticmethod + def translate_body(terminator=Title): + isempty = True + next = Lex.next_element() + cnt = 0 + while next and next is not terminator: + if isinstance(terminator, DelimitedBlock) and next is Title: + message.error('section title not permitted in delimited block') + cnt += 1 + next.translate() + next = Lex.next_element() + isempty = False + # The section is not empty if contains a subsection. + if next and isempty and Title.level > document.level: + isempty = False + # Report empty sections if invalid markup will result. + if isempty: + if document.backend == 'docbook' and Title.sectname != 'index': + message.error('empty section is not valid') + + +class AbstractBlock: + blocknames = [] # Global stack of names for push_blockname() and pop_blockname(). + + def __init__(self): + # Configuration parameter names common to all blocks. + self.CONF_ENTRIES = ('delimiter', 'options', 'subs', 'presubs', 'postsubs', + 'posattrs', 'style', '.*-style', 'template', 'filter') + self.start = None # File reader cursor at start delimiter. + self.defname = None # Configuration file block definition section name. + # Configuration parameters. + self.delimiter = None # Regular expression matching block delimiter. + self.delimiter_reo = None # Compiled delimiter. + self.template = None # template section entry. + self.options = () # options entry list. + self.presubs = None # presubs/subs entry list. + self.postsubs = () # postsubs entry list. + self.filter = None # filter entry. + self.posattrs = () # posattrs entry list. + self.style = None # Default style. + self.styles = OrderedDict() # Each entry is a styles dictionary. + # Before a block is processed it's attributes (from it's + # attributes list) are merged with the block configuration parameters + # (by self.merge_attributes()) resulting in the template substitution + # dictionary (self.attributes) and the block's processing parameters + # (self.parameters). + self.attributes = {} + # The names of block parameters. + self.PARAM_NAMES = ('template', 'options', 'presubs', 'postsubs', 'filter') + self.parameters = None + # Leading delimiter match object. + self.mo = None + + @staticmethod + def reset_class(): + AbstractBlock.blocknames = [] + + def short_name(self): + """ Return the text following the first dash in the section name.""" + i = self.defname.find('-') + if i == -1: + return self.defname + else: + return self.defname[i + 1:] + + def error(self, msg, cursor=None, halt=False): + message.error('[%s] %s' % (self.defname, msg), cursor, halt) + + def is_conf_entry(self, param): + """Return True if param matches an allowed configuration file entry + name.""" + for s in self.CONF_ENTRIES: + if re.match('^' + s + '$', param): + return True + return False + + def load(self, defname, entries): + """Update block definition from section 'entries' dictionary.""" + self.defname = defname + self.update_parameters(entries, self, all=True) + + def update_parameters(self, src, dst=None, all=False): + """ + Parse processing parameters from src dictionary to dst object. + dst defaults to self.parameters. + If all is True then copy src entries that aren't parameter names. + """ + dst = dst or self.parameters + msg = '[%s] malformed entry %%s: %%s' % self.defname + + def copy(obj, k, v): + if isinstance(obj, dict): + obj[k] = v + else: + setattr(obj, k, v) + for k, v in list(src.items()): + if not re.match(r'\d+', k) and not is_name(k): + raise EAsciiDoc(msg % (k, v)) + if k == 'template': + if not is_name(v): + raise EAsciiDoc(msg % (k, v)) + copy(dst, k, v) + elif k == 'filter': + copy(dst, k, v) + elif k == 'options': + if isinstance(v, str): + v = parse_options(v, (), msg % (k, v)) + # Merge with existing options. + v = tuple(set(dst.options).union(set(v))) + copy(dst, k, v) + elif k in ('subs', 'presubs', 'postsubs'): + # Subs is an alias for presubs. + if k == 'subs': + k = 'presubs' + if isinstance(v, str): + v = parse_options(v, SUBS_OPTIONS, msg % (k, v)) + copy(dst, k, v) + elif k == 'delimiter': + if v and utils.is_re(v): + copy(dst, k, v) + else: + raise EAsciiDoc(msg % (k, v)) + elif k == 'style': + if is_name(v): + copy(dst, k, v) + else: + raise EAsciiDoc(msg % (k, v)) + elif k == 'posattrs': + v = parse_options(v, (), msg % (k, v)) + copy(dst, k, v) + else: + mo = re.match(r'^(?P<style>.*)-style$', k) + if mo: + if not v: + raise EAsciiDoc(msg % (k, v)) + style = mo.group('style') + if not is_name(style): + raise EAsciiDoc(msg % (k, v)) + d = {} + if not parse_named_attributes(v, d): + raise EAsciiDoc(msg % (k, v)) + if 'subs' in d: + # Subs is an alias for presubs. + d['presubs'] = d['subs'] + del d['subs'] + self.styles[style] = d + elif all or k in self.PARAM_NAMES: + copy(dst, k, v) # Derived class specific entries. + + def get_param(self, name, params=None): + """ + Return named processing parameter from params dictionary. + If the parameter is not in params look in self.parameters. + """ + if params and name in params: + return params[name] + elif name in self.parameters: + return self.parameters[name] + else: + return None + + def get_subs(self, params=None): + """Return (presubs, postsubs) tuple.""" + presubs = self.get_param('presubs', params) + postsubs = self.get_param('postsubs', params) + return (presubs, postsubs) + + def dump(self): + """Write block definition to stdout.""" + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('[' + self.defname + ']') + if self.is_conf_entry('delimiter'): + write('delimiter=' + self.delimiter) + if self.template: + write('template=' + self.template) + if self.options: + write('options=' + ','.join(self.options)) + if self.presubs: + if self.postsubs: + write('presubs=' + ','.join(self.presubs)) + else: + write('subs=' + ','.join(self.presubs)) + if self.postsubs: + write('postsubs=' + ','.join(self.postsubs)) + if self.filter: + write('filter=' + self.filter) + if self.posattrs: + write('posattrs=' + ','.join(self.posattrs)) + if self.style: + write('style=' + self.style) + if self.styles: + for style, d in list(self.styles.items()): + s = '' + for k, v in list(d.items()): + s += '%s=%r,' % (k, v) + write('%s-style=%s' % (style, s[:-1])) + + def validate(self): + """Validate block after the complete configuration has been loaded.""" + if self.is_conf_entry('delimiter') and not self.delimiter: + raise EAsciiDoc('[%s] missing delimiter' % self.defname) + if self.style: + if not is_name(self.style): + raise EAsciiDoc('illegal style name: %s' % self.style) + if self.style not in self.styles: + if not isinstance(self, List): # Lists don't have templates. + message.warning('[%s] \'%s\' style not in %s' % ( + self.defname, self.style, list(self.styles.keys()))) + # Check all styles for missing templates. + all_styles_have_template = True + for k, v in list(self.styles.items()): + t = v.get('template') + if t and t not in config.sections: + # Defer check if template name contains attributes. + if not re.search(r'{.+}', t): + message.warning('missing template section: [%s]' % t) + if not t: + all_styles_have_template = False + # Check we have a valid template entry or alternatively that all the + # styles have templates. + if self.is_conf_entry('template') and 'skip' not in self.options: + if self.template: + if self.template not in config.sections: + # Defer check if template name contains attributes. + if not re.search(r'{.+}', self.template): + message.warning('missing template section: [%s]' + % self.template) + elif not all_styles_have_template: + if not isinstance(self, List): # Lists don't have templates. + message.warning('missing styles templates: [%s]' % self.defname) + + def isnext(self): + """Check if this block is next in document reader.""" + result = False + reader.skip_blank_lines() + if reader.read_next(): + if not self.delimiter_reo: + # Cache compiled delimiter optimization. + self.delimiter_reo = re.compile(self.delimiter) + mo = self.delimiter_reo.match(reader.read_next()) + if mo: + self.mo = mo + result = True + return result + + def translate(self): + """Translate block from document reader.""" + if not self.presubs: + self.presubs = config.subsnormal + if reader.cursor: + self.start = reader.cursor[:] + + def push_blockname(self, blockname=None): + """ + On block entry set the 'blockname' attribute. + Only applies to delimited blocks, lists and tables. + """ + if blockname is None: + blockname = self.attributes.get('style', self.short_name()).lower() + trace('push blockname', blockname) + self.blocknames.append(blockname) + document.attributes['blockname'] = blockname + + def pop_blockname(self): + """ + On block exits restore previous (parent) 'blockname' attribute or + un-define it if we're no longer inside a block. + """ + assert len(self.blocknames) > 0 + blockname = self.blocknames.pop() + trace('pop blockname', blockname) + if len(self.blocknames) == 0: + document.attributes['blockname'] = None + else: + document.attributes['blockname'] = self.blocknames[-1] + + def merge_attributes(self, attrs, params=[]): + """ + Use the current block's attribute list (attrs dictionary) to build a + dictionary of block processing parameters (self.parameters) and tag + substitution attributes (self.attributes). + + 1. Copy the default parameters (self.*) to self.parameters. + self.parameters are used internally to render the current block. + Optional params array of additional parameters. + + 2. Copy attrs to self.attributes. self.attributes are used for template + and tag substitution in the current block. + + 3. If a style attribute was specified update self.parameters with the + corresponding style parameters; if there are any style parameters + remaining add them to self.attributes (existing attribute list entries + take precedence). + + 4. Set named positional attributes in self.attributes if self.posattrs + was specified. + + 5. Finally self.parameters is updated with any corresponding parameters + specified in attrs. + + """ + + def check_array_parameter(param): + # Check the parameter is a sequence type. + if not utils.is_array(self.parameters[param]): + message.error('malformed %s parameter: %s' % (param, self.parameters[param])) + # Revert to default value. + self.parameters[param] = getattr(self, param) + + params = list(self.PARAM_NAMES) + params + self.attributes = {} + if self.style: + # If a default style is defined make it available in the template. + self.attributes['style'] = self.style + self.attributes.update(attrs) + # Calculate dynamic block parameters. + # Start with configuration file defaults. + self.parameters = AttrDict() + for name in params: + self.parameters[name] = getattr(self, name) + # Load the selected style attributes. + posattrs = self.posattrs + if posattrs and posattrs[0] == 'style': + # Positional attribute style has highest precedence. + style = self.attributes.get('1') + else: + style = None + if not style: + # Use explicit style attribute, fall back to default style. + style = self.attributes.get('style', self.style) + if style: + if not is_name(style): + message.error('illegal style name: %s' % style) + style = self.style + # Lists have implicit styles and do their own style checks. + elif style not in self.styles and not isinstance(self, List): + message.warning('missing style: [%s]: %s' % (self.defname, style)) + style = self.style + if style in self.styles: + self.attributes['style'] = style + for k, v in list(self.styles[style].items()): + if k == 'posattrs': + posattrs = v + elif k in params: + self.parameters[k] = v + elif k not in self.attributes: + # Style attributes don't take precedence over explicit. + self.attributes[k] = v + # Set named positional attributes. + for i, v in enumerate(posattrs): + if str(i + 1) in self.attributes: + self.attributes[v] = self.attributes[str(i + 1)] + # Override config and style attributes with attribute list attributes. + self.update_parameters(attrs) + check_array_parameter('options') + check_array_parameter('presubs') + check_array_parameter('postsubs') + + +class AbstractBlocks: + """List of block definitions.""" + PREFIX = '' # Conf file section name prefix set in derived classes. + BLOCK_TYPE = None # Block type set in derived classes. + + def __init__(self): + self.current = None + self.blocks = [] # List of Block objects. + self.default = None # Default Block. + self.delimiters = None # Combined delimiters regular expression. + + def load(self, sections): + """Load block definition from 'sections' dictionary.""" + for k in list(sections.keys()): + if re.match(r'^' + self.PREFIX + r'.+$', k): + d = {} + parse_entries(sections.get(k, ()), d) + for b in self.blocks: + if b.defname == k: + break + else: + b = self.BLOCK_TYPE() + self.blocks.append(b) + try: + b.load(k, d) + except EAsciiDoc as e: + raise EAsciiDoc('[%s] %s' % (k, str(e))) + + def dump(self): + for b in self.blocks: + b.dump() + + def isnext(self): + for b in self.blocks: + if b.isnext(): + self.current = b + return True + return False + + def validate(self): + """Validate the block definitions.""" + # Validate delimiters and build combined lists delimiter pattern. + delimiters = [] + for b in self.blocks: + assert b.__class__ is self.BLOCK_TYPE + b.validate() + if b.delimiter: + delimiters.append(b.delimiter) + self.delimiters = utils.re_join(delimiters) + + +class Paragraph(AbstractBlock): + def __init__(self): + AbstractBlock.__init__(self) + self.text = None # Text in first line of paragraph. + + def load(self, name, entries): + AbstractBlock.load(self, name, entries) + + def dump(self): + AbstractBlock.dump(self) + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('') + + def isnext(self): + result = AbstractBlock.isnext(self) + if result: + self.text = self.mo.groupdict().get('text') + return result + + def translate(self): + AbstractBlock.translate(self) + attrs = self.mo.groupdict().copy() + if 'text' in attrs: + del attrs['text'] + BlockTitle.consume(attrs) + AttributeList.consume(attrs) + self.merge_attributes(attrs) + reader.read() # Discard (already parsed item first line). + body = reader.read_until(paragraphs.terminators) + if 'skip' in self.parameters.options: + return + body = [self.text] + list(body) + presubs = self.parameters.presubs + postsubs = self.parameters.postsubs + if document.attributes.get('plaintext') is None: + body = Lex.set_margin(body) # Move body to left margin. + + body = Lex.subs(body, presubs) + template = self.parameters.template + template = subs_attrs(template, attrs) + stag = config.section2tags(template, self.attributes, skipend=True)[0] + if self.parameters.filter: + body = filter_lines(self.parameters.filter, body, self.attributes) + body = Lex.subs(body, postsubs) + etag = config.section2tags(template, self.attributes, skipstart=True)[1] + # Write start tag, content, end tag. + writer.write(utils.dovetail_tags(stag, body, etag), trace='paragraph') + + +class Paragraphs(AbstractBlocks): + """List of paragraph definitions.""" + BLOCK_TYPE = Paragraph + PREFIX = 'paradef-' + + def __init__(self): + AbstractBlocks.__init__(self) + self.terminators = None # List of compiled re's. + + def initialize(self): + self.terminators = [ + re.compile(r'^\+$|^$'), + re.compile(AttributeList.pattern), + re.compile(blocks.delimiters), + re.compile(tables.delimiters), + re.compile(tables_OLD.delimiters), + ] + + def load(self, sections): + AbstractBlocks.load(self, sections) + + def validate(self): + AbstractBlocks.validate(self) + # Check we have a default paragraph definition, put it last in list. + for b in self.blocks: + if b.defname == 'paradef-default': + self.blocks.append(b) + self.default = b + self.blocks.remove(b) + break + else: + raise EAsciiDoc('missing section: [paradef-default]') + + +class List(AbstractBlock): + NUMBER_STYLES = ('arabic', 'loweralpha', 'upperalpha', 'lowerroman', 'upperroman') + + def __init__(self): + AbstractBlock.__init__(self) + self.CONF_ENTRIES += ('type', 'tags') + self.PARAM_NAMES += ('tags',) + # listdef conf file parameters. + self.type = None + self.tags = None # Name of listtags-<tags> conf section. + # Calculated parameters. + self.tag = None # Current tags AttrDict. + self.label = None # List item label (labeled lists). + self.text = None # Text in first line of list item. + self.index = None # Matched delimiter 'index' group (numbered lists). + self.type = None # List type ('numbered','bulleted','labeled'). + self.ordinal = None # Current list item ordinal number (1..) + self.number_style = None # Current numbered list style ('arabic'..) + + def load(self, name, entries): + AbstractBlock.load(self, name, entries) + + def dump(self): + AbstractBlock.dump(self) + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('type=' + self.type) + write('tags=' + self.tags) + write('') + + def validate(self): + AbstractBlock.validate(self) + tags = [self.tags] + tags += [s['tags'] for s in list(self.styles.values()) if 'tags' in s] + for t in tags: + if t not in lists.tags: + self.error('missing section: [listtags-%s]' % t, halt=True) + + def isnext(self): + result = AbstractBlock.isnext(self) + if result: + self.label = self.mo.groupdict().get('label') + self.text = self.mo.groupdict().get('text') + self.index = self.mo.groupdict().get('index') + return result + + def translate_entry(self): + assert self.type == 'labeled' + entrytag = subs_tag(self.tag.entry, self.attributes) + labeltag = subs_tag(self.tag.label, self.attributes) + writer.write(entrytag[0], trace='list entry open') + writer.write(labeltag[0], trace='list label open') + # Write labels. + while Lex.next_element() is self: + reader.read() # Discard (already parsed item first line). + writer.write_tag(self.tag.term, [self.label], + self.presubs, self.attributes, trace='list term') + if self.text: + break + writer.write(labeltag[1], trace='list label close') + # Write item text. + self.translate_item() + writer.write(entrytag[1], trace='list entry close') + + def translate_item(self): + if self.type == 'callout': + self.attributes['coids'] = calloutmap.calloutids(self.ordinal) + itemtag = subs_tag(self.tag.item, self.attributes) + writer.write(itemtag[0], trace='list item open') + # Write ItemText. + text = reader.read_until(lists.terminators) + if self.text: + text = [self.text] + list(text) + if text: + writer.write_tag(self.tag.text, text, self.presubs, self.attributes, trace='list text') + # Process explicit and implicit list item continuations. + while True: + continuation = reader.read_next() == '+' + if continuation: + reader.read() # Discard continuation line. + while Lex.next_element() in (BlockTitle, AttributeList): + # Consume continued element title and attributes. + Lex.next_element().translate() + if not continuation and BlockTitle.title: + # Titled elements terminate the list. + break + next = Lex.next_element() + if next in lists.open: + break + elif isinstance(next, List): + next.translate() + elif isinstance(next, Paragraph) and 'listelement' in next.options: + next.translate() + elif continuation: + # This is where continued elements are processed. + if next is Title: + message.error('section title not allowed in list item', halt=True) + next.translate() + else: + break + writer.write(itemtag[1], trace='list item close') + + @staticmethod + def calc_style(index): + """Return the numbered list style ('arabic'...) of the list item index. + Return None if unrecognized style.""" + if re.match(r'^\d+[\.>]$', index): + style = 'arabic' + elif re.match(r'^[ivx]+\)$', index): + style = 'lowerroman' + elif re.match(r'^[IVX]+\)$', index): + style = 'upperroman' + elif re.match(r'^[a-z]\.$', index): + style = 'loweralpha' + elif re.match(r'^[A-Z]\.$', index): + style = 'upperalpha' + else: + assert False + return style + + @staticmethod + def calc_index(index, style): + """Return the ordinal number of (1...) of the list item index + for the given list style.""" + def roman_to_int(roman): + roman = roman.lower() + digits = {'i': 1, 'v': 5, 'x': 10} + result = 0 + for i in range(len(roman)): + digit = digits[roman[i]] + # If next digit is larger this digit is negative. + if i + 1 < len(roman) and digits[roman[i + 1]] > digit: + result -= digit + else: + result += digit + return result + index = index[:-1] + if style == 'arabic': + ordinal = int(index) + elif style == 'lowerroman': + ordinal = roman_to_int(index) + elif style == 'upperroman': + ordinal = roman_to_int(index) + elif style == 'loweralpha': + ordinal = ord(index) - ord('a') + 1 + elif style == 'upperalpha': + ordinal = ord(index) - ord('A') + 1 + else: + assert False + return ordinal + + def check_index(self): + """Check calculated self.ordinal (1,2,...) against the item number + in the document (self.index) and check the number style is the same as + the first item (self.number_style).""" + assert self.type in ('numbered', 'callout') + if self.index: + style = self.calc_style(self.index) + if style != self.number_style: + message.warning('list item style: expected %s got %s' % (self.number_style, style), offset=1) + ordinal = self.calc_index(self.index, style) + if ordinal != self.ordinal: + message.warning('list item index: expected %s got %s' % (self.ordinal, ordinal), offset=1) + + def check_tags(self): + """ Check that all necessary tags are present. """ + tags = set(Lists.TAGS) + if self.type != 'labeled': + tags = tags.difference(['entry', 'label', 'term']) + missing = tags.difference(list(self.tag.keys())) + if missing: + self.error('missing tag(s): %s' % ','.join(missing), halt=True) + + def translate(self): + AbstractBlock.translate(self) + if self.short_name() in ('bibliography', 'glossary', 'qanda'): + message.deprecated('old %s list syntax' % self.short_name()) + lists.open.append(self) + attrs = self.mo.groupdict().copy() + for k in ('label', 'text', 'index'): + if k in attrs: + del attrs[k] + if self.index: + # Set the numbering style from first list item. + attrs['style'] = self.calc_style(self.index) + BlockTitle.consume(attrs) + AttributeList.consume(attrs) + self.merge_attributes(attrs, ['tags']) + self.push_blockname() + if self.type in ('numbered', 'callout'): + self.number_style = self.attributes.get('style') + if self.number_style not in self.NUMBER_STYLES: + message.error('illegal numbered list style: %s' % self.number_style) + # Fall back to default style. + self.attributes['style'] = self.number_style = self.style + self.tag = lists.tags[self.parameters.tags] + self.check_tags() + if 'width' in self.attributes: + # Set horizontal list 'labelwidth' and 'itemwidth' attributes. + v = str(self.attributes['width']) + mo = re.match(r'^(\d{1,2})%?$', v) + if mo: + labelwidth = int(mo.group(1)) + self.attributes['labelwidth'] = str(labelwidth) + self.attributes['itemwidth'] = str(100 - labelwidth) + else: + self.error('illegal attribute value: width="%s"' % v) + stag, etag = subs_tag(self.tag.list, self.attributes) + if stag: + writer.write(stag, trace='list open') + self.ordinal = 0 + # Process list till list syntax changes or there is a new title. + while Lex.next_element() is self and not BlockTitle.title: + self.ordinal += 1 + document.attributes['listindex'] = str(self.ordinal) + if self.type in ('numbered', 'callout'): + self.check_index() + if self.type in ('bulleted', 'numbered', 'callout'): + reader.read() # Discard (already parsed item first line). + self.translate_item() + elif self.type == 'labeled': + self.translate_entry() + else: + raise AssertionError('illegal [%s] list type' % self.defname) + if etag: + writer.write(etag, trace='list close') + if self.type == 'callout': + calloutmap.validate(self.ordinal) + calloutmap.listclose() + lists.open.pop() + if len(lists.open): + document.attributes['listindex'] = str(lists.open[-1].ordinal) + self.pop_blockname() + + +class Lists(AbstractBlocks): + """List of List objects.""" + BLOCK_TYPE = List + PREFIX = 'listdef-' + TYPES = ('bulleted', 'numbered', 'labeled', 'callout') + TAGS = ('list', 'entry', 'item', 'text', 'label', 'term') + + def __init__(self): + AbstractBlocks.__init__(self) + self.open = [] # A stack of the current and parent lists. + self.tags = {} # List tags dictionary. Each entry is a tags AttrDict. + self.terminators = None # List of compiled re's. + + def initialize(self): + self.terminators = [ + re.compile(r'^\+$|^$'), + re.compile(AttributeList.pattern), + re.compile(lists.delimiters), + re.compile(blocks.delimiters), + re.compile(tables.delimiters), + re.compile(tables_OLD.delimiters), + ] + + def load(self, sections): + AbstractBlocks.load(self, sections) + self.load_tags(sections) + + def load_tags(self, sections): + """ + Load listtags-* conf file sections to self.tags. + """ + for section in list(sections.keys()): + mo = re.match(r'^listtags-(?P<name>\w+)$', section) + if mo: + name = mo.group('name') + if name in self.tags: + d = self.tags[name] + else: + d = AttrDict() + parse_entries(sections.get(section, ()), d) + for k in list(d.keys()): + if k not in self.TAGS: + message.warning('[%s] contains illegal list tag: %s' % (section, k)) + self.tags[name] = d + + def validate(self): + AbstractBlocks.validate(self) + for b in self.blocks: + # Check list has valid type. + if b.type not in Lists.TYPES: + raise EAsciiDoc('[%s] illegal type' % b.defname) + b.validate() + + def dump(self): + AbstractBlocks.dump(self) + for k, v in list(self.tags.items()): + dump_section('listtags-' + k, v) + + +class DelimitedBlock(AbstractBlock): + def __init__(self): + AbstractBlock.__init__(self) + + def load(self, name, entries): + AbstractBlock.load(self, name, entries) + + def dump(self): + AbstractBlock.dump(self) + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('') + + def isnext(self): + return AbstractBlock.isnext(self) + + def translate(self): + AbstractBlock.translate(self) + reader.read() # Discard delimiter. + self.merge_attributes(AttributeList.attrs) + if 'skip' not in self.parameters.options: + BlockTitle.consume(self.attributes) + AttributeList.consume() + if 'options' in self.attributes: + options = parse_options(self.attributes['options'], (), 'illegal option name') + for option in options: + self.attributes[option + '-option'] = '' + self.push_blockname() + options = self.parameters.options + if 'skip' in options: + reader.read_until(self.delimiter, same_file=True) + elif safe() and self.defname == 'blockdef-backend': + message.unsafe('Backend Block') + reader.read_until(self.delimiter, same_file=True) + else: + template = self.parameters.template + template = subs_attrs(template, self.attributes) + name = self.short_name() + ' block' + if 'sectionbody' in options: + # The body is treated like a section body. + stag, etag = config.section2tags(template, self.attributes) + writer.write(stag, trace=name + ' open') + Section.translate_body(self) + writer.write(etag, trace=name + ' close') + else: + stag = config.section2tags(template, self.attributes, skipend=True)[0] + body = reader.read_until(self.delimiter, same_file=True) + presubs = self.parameters.presubs + postsubs = self.parameters.postsubs + body = Lex.subs(body, presubs) + if self.parameters.filter: + body = filter_lines(self.parameters.filter, body, self.attributes) + body = Lex.subs(body, postsubs) + # Write start tag, content, end tag. + etag = config.section2tags(template, self.attributes, skipstart=True)[1] + writer.write(utils.dovetail_tags(stag, body, etag), trace=name) + trace(self.short_name() + ' block close', etag) + if reader.eof(): + self.error('missing closing delimiter', self.start) + else: + delimiter = reader.read() # Discard delimiter line. + assert re.match(self.delimiter, delimiter) + self.pop_blockname() + + +class DelimitedBlocks(AbstractBlocks): + """List of delimited blocks.""" + BLOCK_TYPE = DelimitedBlock + PREFIX = 'blockdef-' + + def __init__(self): + AbstractBlocks.__init__(self) + + def load(self, sections): + """Update blocks defined in 'sections' dictionary.""" + AbstractBlocks.load(self, sections) + + def validate(self): + AbstractBlocks.validate(self) + + +class Table(AbstractBlock): + FORMATS = ('psv', 'csv', 'dsv') + SEPARATORS = dict( + csv=',', + dsv=r':|\n', + # The count and align group matches are not exact. + psv=r'((?<!\S)((?P<span>[\d.]+)(?P<op>[*+]))?(?P<align>[<\^>.]{,3})?(?P<style>[a-z])?)?\|' + ) + + def __init__(self): + AbstractBlock.__init__(self) + self.CONF_ENTRIES += ('format', 'tags', 'separator') + # tabledef conf file parameters. + self.format = 'psv' + self.separator = None + self.tags = None # Name of tabletags-<tags> conf section. + # Calculated parameters. + self.abswidth = None # 1.. (page units). + self.pcwidth = None # 1..99 (percentage). + self.rows = [] # Parsed rows, each row is a list of Cells. + self.columns = [] # List of Columns. + + def load(self, name, entries): + AbstractBlock.load(self, name, entries) + + def dump(self): + AbstractBlock.dump(self) + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('format=' + self.format) + write('') + + def validate(self): + AbstractBlock.validate(self) + if self.format not in Table.FORMATS: + self.error('illegal format=%s' % self.format, halt=True) + self.tags = self.tags or 'default' + tags = [self.tags] + tags += [s['tags'] for s in list(self.styles.values()) if 'tags' in s] + for t in tags: + if t not in tables.tags: + self.error('missing section: [tabletags-%s]' % t, halt=True) + if self.separator: + # Evaluate escape characters. + self.separator = ast.literal_eval('"' + self.separator + '"') + # TODO: Move to class Tables + # Check global table parameters. + elif config.pagewidth is None: + self.error('missing [miscellaneous] entry: pagewidth') + elif config.pageunits is None: + self.error('missing [miscellaneous] entry: pageunits') + + def validate_attributes(self): + """Validate and parse table attributes.""" + # Set defaults. + format = self.format + tags = self.tags + separator = self.separator + abswidth = float(config.pagewidth) + pcwidth = 100.0 + for k, v in list(self.attributes.items()): + if k == 'format': + if v not in self.FORMATS: + self.error('illegal %s=%s' % (k, v)) + else: + format = v + elif k == 'tags': + if v not in tables.tags: + self.error('illegal %s=%s' % (k, v)) + else: + tags = v + elif k == 'separator': + separator = v + elif k == 'width': + if not re.match(r'^\d{1,3}%$', v) or int(v[:-1]) > 100: + self.error('illegal %s=%s' % (k, v)) + else: + abswidth = float(v[:-1]) / 100 * config.pagewidth + pcwidth = float(v[:-1]) + # Calculate separator if it has not been specified. + if not separator: + separator = Table.SEPARATORS[format] + if format == 'csv': + if len(separator) > 1: + self.error('illegal csv separator=%s' % separator) + separator = ',' + else: + if not utils.is_re(separator): + self.error('illegal regular expression: separator=%s' % separator) + self.parameters.format = format + self.parameters.tags = tags + self.parameters.separator = separator + self.abswidth = abswidth + self.pcwidth = pcwidth + + def get_tags(self, params): + tags = self.get_param('tags', params) + assert(tags and tags in tables.tags) + return tables.tags[tags] + + def get_style(self, prefix): + """ + Return the style dictionary whose name starts with 'prefix'. + """ + if prefix is None: + return None + names = list(self.styles.keys()) + names.sort() + for name in names: + if name.startswith(prefix): + return self.styles[name] + else: + self.error('missing style: %s*' % prefix) + return None + + def parse_cols(self, cols, halign, valign): + """ + Build list of column objects from table 'cols', 'halign' and 'valign' + attributes. + """ + # [<multiplier>*][<align>][<width>][<style>] + COLS_RE1 = r'^((?P<count>\d+)\*)?(?P<align>[<\^>.]{,3})?(?P<width>\d+%?)?(?P<style>[a-z]\w*)?$' + # [<multiplier>*][<width>][<align>][<style>] + COLS_RE2 = r'^((?P<count>\d+)\*)?(?P<width>\d+%?)?(?P<align>[<\^>.]{,3})?(?P<style>[a-z]\w*)?$' + reo1 = re.compile(COLS_RE1) + reo2 = re.compile(COLS_RE2) + cols = str(cols) + if re.match(r'^\d+$', cols): + for i in range(int(cols)): + self.columns.append(Column()) + else: + for col in re.split(r'\s*,\s*', cols): + mo = reo1.match(col) + if not mo: + mo = reo2.match(col) + if mo: + count = int(mo.groupdict().get('count') or 1) + for i in range(count): + self.columns.append( + Column(mo.group('width'), mo.group('align'), + self.get_style(mo.group('style'))) + ) + else: + self.error('illegal column spec: %s' % col, self.start) + # Set column (and indirectly cell) default alignments. + for col in self.columns: + col.halign = col.halign or halign or document.attributes.get('halign') or 'left' + col.valign = col.valign or valign or document.attributes.get('valign') or 'top' + # Validate widths and calculate missing widths. + n = 0 + percents = 0 + props = 0 + for col in self.columns: + if col.width: + if col.width[-1] == '%': + percents += int(col.width[:-1]) + else: + props += int(col.width) + n += 1 + if percents > 0 and props > 0: + self.error('mixed percent and proportional widths: %s' % cols, self.start) + pcunits = percents > 0 + # Fill in missing widths. + if n < len(self.columns) and percents < 100: + if pcunits: + width = float(100 - percents) / float(len(self.columns) - n) + else: + width = 1 + for col in self.columns: + if not col.width: + if pcunits: + col.width = str(int(width)) + '%' + percents += width + else: + col.width = str(width) + props += width + # Calculate column alignment and absolute and percent width values. + percents = 0 + for col in self.columns: + if pcunits: + col.pcwidth = float(col.width[:-1]) + else: + col.pcwidth = (float(col.width) / props) * 100 + col.abswidth = self.abswidth * (col.pcwidth / 100) + if config.pageunits in ('cm', 'mm', 'in', 'em'): + col.abswidth = '%.2f' % utils.py2round(col.abswidth, 2) + else: + col.abswidth = '%d' % utils.py2round(col.abswidth) + percents += col.pcwidth + col.pcwidth = int(col.pcwidth) + if utils.py2round(percents) > 100: + self.error('total width exceeds 100%%: %s' % cols, self.start) + elif utils.py2round(percents) < 100: + self.error('total width less than 100%%: %s' % cols, self.start) + + def build_colspecs(self): + """ + Generate column related substitution attributes. + """ + cols = [] + i = 1 + for col in self.columns: + colspec = self.get_tags(col.style).colspec + if colspec: + self.attributes['halign'] = col.halign + self.attributes['valign'] = col.valign + self.attributes['colabswidth'] = col.abswidth + self.attributes['colpcwidth'] = col.pcwidth + self.attributes['colnumber'] = str(i) + s = subs_attrs(colspec, self.attributes) + if not s: + message.warning('colspec dropped: contains undefined attribute') + else: + cols.append(s) + i += 1 + if cols: + self.attributes['colspecs'] = writer.newline.join(cols) + + def parse_rows(self, text): + """ + Parse the table source text into self.rows (a list of rows, each row + is a list of Cells. + """ + reserved = {} # Reserved cells generated by rowspans. + if self.parameters.format in ('psv', 'dsv'): + colcount = len(self.columns) + parsed_cells = self.parse_psv_dsv(text) + ri = 0 # Current row index 0.. + ci = 0 # Column counter 0..colcount + row = [] + i = 0 + while True: + resv = reserved.get(ri) and reserved[ri].get(ci) + if resv: + # We have a cell generated by a previous row span so + # process it before continuing with the current parsed + # cell. + cell = resv + else: + if i >= len(parsed_cells): + break # No more parsed or reserved cells. + cell = parsed_cells[i] + i += 1 + if cell.vspan > 1: + # Generate ensuing reserved cells spanned vertically by + # the current cell. + for j in range(1, cell.vspan): + if ri + j not in reserved: + reserved[ri + j] = {} + reserved[ri + j][ci] = cell.clone_reserve() + ci += cell.span + if ci <= colcount: + row.append(cell) + if ci >= colcount: + self.rows.append(row) + ri += 1 + row = [] + ci = 0 + elif self.parameters.format == 'csv': + self.rows = self.parse_csv(text) + else: + assert True, 'illegal table format' + # Check for empty rows containing only reserved (spanned) cells. + for ri, row in enumerate(self.rows): + empty = True + for cell in row: + if not cell.reserved: + empty = False + break + if empty: + message.warning('table row %d: empty spanned row' % (ri + 1)) + # Check that all row spans match. + for ri, row in enumerate(self.rows): + row_span = 0 + for cell in row: + row_span += cell.span + if ri == 0: + header_span = row_span + if row_span < header_span: + message.warning('table row %d: does not span all columns' % (ri + 1)) + if row_span > header_span: + message.warning('table row %d: exceeds columns span' % (ri + 1)) + + def subs_rows(self, rows, rowtype='body'): + """ + Return a string of output markup from a list of rows, each row + is a list of raw data text. + """ + tags = tables.tags[self.parameters.tags] + if rowtype == 'header': + rtag = tags.headrow + elif rowtype == 'footer': + rtag = tags.footrow + else: + rtag = tags.bodyrow + result = [] + stag, etag = subs_tag(rtag, self.attributes) + for row in rows: + result.append(stag) + result += self.subs_row(row, rowtype) + result.append(etag) + return writer.newline.join(result) + + def subs_row(self, row, rowtype): + """ + Substitute the list of Cells using the data tag. + Returns a list of marked up table cell elements. + """ + result = [] + i = 0 + for cell in row: + if cell.reserved: + # Skip vertically spanned placeholders. + i += cell.span + continue + if i >= len(self.columns): + break # Skip cells outside the header width. + col = self.columns[i] + self.attributes['halign'] = cell.halign or col.halign + self.attributes['valign'] = cell.valign or col.valign + self.attributes['colabswidth'] = col.abswidth + self.attributes['colpcwidth'] = col.pcwidth + self.attributes['colnumber'] = str(i + 1) + self.attributes['colspan'] = str(cell.span) + self.attributes['colstart'] = self.attributes['colnumber'] + self.attributes['colend'] = str(i + cell.span) + self.attributes['rowspan'] = str(cell.vspan) + self.attributes['morerows'] = str(cell.vspan - 1) + # Fill missing column data with blanks. + if i > len(self.columns) - 1: + data = '' + else: + data = cell.data + if rowtype == 'header': + # Use table style unless overridden by cell style. + colstyle = cell.style + else: + # If the cell style is not defined use the column style. + colstyle = cell.style or col.style + tags = self.get_tags(colstyle) + presubs, postsubs = self.get_subs(colstyle) + data = [data] + data = Lex.subs(data, presubs) + data = filter_lines(self.get_param('filter', colstyle), + data, self.attributes) + data = Lex.subs(data, postsubs) + if rowtype != 'header': + ptag = tags.paragraph + if ptag: + stag, etag = subs_tag(ptag, self.attributes) + text = '\n'.join(data).strip() + data = [] + for para in re.split(r'\n{2,}', text): + data += utils.dovetail_tags([stag], para.split('\n'), [etag]) + if rowtype == 'header': + dtag = tags.headdata + elif rowtype == 'footer': + dtag = tags.footdata + else: + dtag = tags.bodydata + stag, etag = subs_tag(dtag, self.attributes) + result = result + utils.dovetail_tags([stag], data, [etag]) + i += cell.span + return result + + def parse_csv(self, text): + """ + Parse the table source text and return a list of rows, each row + is a list of Cells. + """ + rows = [] + rdr = csv.reader(io.StringIO(DEFAULT_NEWLINE.join(text)), + delimiter=self.parameters.separator, skipinitialspace=True) + try: + for row in rdr: + rows.append([Cell(data) for data in row]) + except Exception: + self.error('csv parse error: %s' % row) + return rows + + def parse_psv_dsv(self, text: str) -> typing.List[Cell]: + """ + Parse list of PSV or DSV table source text lines and return a list of + Cells. + """ + cells = [] + def append_cell(data, span_spec, op, align_spec, style): + op = op or '+' + if op == '*': # Cell multiplier. + span = parse_table_span_spec(span_spec)[0] + for i in range(span): + cells.append(Cell(data, '1', align_spec, style)) + elif op == '+': # Column spanner. + cells.append(Cell(data, span_spec, align_spec, style)) + else: + self.error('illegal table cell operator') + text = '\n'.join(text) + separator = '(?ms)' + self.parameters.separator + format = self.parameters.format + start = 0 + span = None + op = None + align = None + style = None + data = '' + for mo in re.finditer(separator, text): + data += text[start:mo.start()] + if data.endswith('\\'): + data = data[:-1] + mo.group() # Reinstate escaped separators. + else: + append_cell(data, span, op, align, style) + span = mo.groupdict().get('span') + op = mo.groupdict().get('op') + align = mo.groupdict().get('align') + style = mo.groupdict().get('style') + if style: + style = self.get_style(style) + data = '' + start = mo.end() + # Last cell follows final separator. + data += text[start:] + append_cell(data, span, op, align, style) + # We expect a dummy blank item preceding the first PSV cell. + if format == 'psv': + if cells[0].data.strip() != '': + self.error('missing leading separator: %s' % separator, self.start) + else: + cells.pop(0) + return cells + + def translate(self): + AbstractBlock.translate(self) + reader.read() # Discard delimiter. + # Reset instance specific properties. + self.columns = [] + self.rows = [] + attrs = {} + BlockTitle.consume(attrs) + # Mix in document attribute list. + AttributeList.consume(attrs) + self.merge_attributes(attrs) + self.validate_attributes() + # Add global and calculated configuration parameters. + self.attributes['pagewidth'] = config.pagewidth + self.attributes['pageunits'] = config.pageunits + self.attributes['tableabswidth'] = int(self.abswidth) + self.attributes['tablepcwidth'] = int(self.pcwidth) + # Read the entire table. + text = reader.read_until(self.delimiter) + if reader.eof(): + self.error('missing closing delimiter', self.start) + else: + delimiter = reader.read() # Discard closing delimiter. + assert re.match(self.delimiter, delimiter) + if len(text) == 0: + message.warning('[%s] table is empty' % self.defname) + return + self.push_blockname('table') + cols = attrs.get('cols') + if not cols: + # Calculate column count from number of items in first line. + if self.parameters.format == 'csv': + cols = text[0].count(self.parameters.separator) + 1 + else: + cols = 0 + for cell in self.parse_psv_dsv(text[:1]): + cols += cell.span + self.parse_cols(cols, attrs.get('halign'), attrs.get('valign')) + # Set calculated attributes. + self.attributes['colcount'] = len(self.columns) + self.build_colspecs() + self.parse_rows(text) + # The 'rowcount' attribute is used by the experimental LaTeX backend. + self.attributes['rowcount'] = str(len(self.rows)) + # Generate headrows, footrows, bodyrows. + # Headrow, footrow and bodyrow data replaces same named attributes in + # the table markup template. In order to ensure this data does not get + # a second attribute substitution (which would interfere with any + # substituted already inline passthroughs) unique placeholders are used + # (the tab character does not appear elsewhere since it is expanded on + # input) which are replaced after template attribute substitution. + headrows = footrows = bodyrows = None + for option in self.parameters.options: + self.attributes[option + '-option'] = '' + if self.rows and 'header' in self.parameters.options: + headrows = self.subs_rows(self.rows[0:1], 'header') + self.attributes['headrows'] = '\x07headrows\x07' + self.rows = self.rows[1:] + if self.rows and 'footer' in self.parameters.options: + footrows = self.subs_rows(self.rows[-1:], 'footer') + self.attributes['footrows'] = '\x07footrows\x07' + self.rows = self.rows[:-1] + if self.rows: + bodyrows = self.subs_rows(self.rows) + self.attributes['bodyrows'] = '\x07bodyrows\x07' + table = subs_attrs(config.sections[self.parameters.template], + self.attributes) + table = writer.newline.join(table) + # Before we finish replace the table head, foot and body place holders + # with the real data. + if headrows: + table = table.replace('\x07headrows\x07', headrows, 1) + if footrows: + table = table.replace('\x07footrows\x07', footrows, 1) + if bodyrows: + table = table.replace('\x07bodyrows\x07', bodyrows, 1) + writer.write(table, trace='table') + self.pop_blockname() + + +class Tables(AbstractBlocks): + """List of tables.""" + BLOCK_TYPE = Table + PREFIX = 'tabledef-' + TAGS = ('colspec', 'headrow', 'footrow', 'bodyrow', 'headdata', 'footdata', 'bodydata', 'paragraph') + + def __init__(self): + AbstractBlocks.__init__(self) + # Table tags dictionary. Each entry is a tags dictionary. + self.tags = {} + + def load(self, sections): + AbstractBlocks.load(self, sections) + self.load_tags(sections) + + def load_tags(self, sections): + """ + Load tabletags-* conf file sections to self.tags. + """ + for section in list(sections.keys()): + mo = re.match(r'^tabletags-(?P<name>\w+)$', section) + if mo: + name = mo.group('name') + if name in self.tags: + d = self.tags[name] + else: + d = AttrDict() + parse_entries(sections.get(section, ()), d) + for k in list(d.keys()): + if k not in self.TAGS: + message.warning('[%s] contains illegal table tag: %s' % (section, k)) + self.tags[name] = d + + def validate(self): + AbstractBlocks.validate(self) + # Check we have a default table definition, + for i in range(len(self.blocks)): + if self.blocks[i].defname == 'tabledef-default': + default = self.blocks[i] + break + else: + raise EAsciiDoc('missing section: [tabledef-default]') + # Propagate defaults to unspecified table parameters. + for b in self.blocks: + if b is not default: + if b.format is None: + b.format = default.format + if b.template is None: + b.template = default.template + # Check tags and propagate default tags. + if 'default' not in self.tags: + raise EAsciiDoc('missing section: [tabletags-default]') + default = self.tags['default'] + for tag in ('bodyrow', 'bodydata', 'paragraph'): # Mandatory default tags. + if tag not in default: + raise EAsciiDoc('missing [tabletags-default] entry: %s' % tag) + for t in list(self.tags.values()): + if t is not default: + if t.colspec is None: + t.colspec = default.colspec + if t.headrow is None: + t.headrow = default.headrow + if t.footrow is None: + t.footrow = default.footrow + if t.bodyrow is None: + t.bodyrow = default.bodyrow + if t.headdata is None: + t.headdata = default.headdata + if t.footdata is None: + t.footdata = default.footdata + if t.bodydata is None: + t.bodydata = default.bodydata + if t.paragraph is None: + t.paragraph = default.paragraph + # Use body tags if header and footer tags are not specified. + for t in list(self.tags.values()): + if not t.headrow: + t.headrow = t.bodyrow + if not t.footrow: + t.footrow = t.bodyrow + if not t.headdata: + t.headdata = t.bodydata + if not t.footdata: + t.footdata = t.bodydata + # Check table definitions are valid. + for b in self.blocks: + b.validate() + + def dump(self): + AbstractBlocks.dump(self) + for k, v in list(self.tags.items()): + dump_section('tabletags-' + k, v) + + +class Macros: + # Default system macro syntax. + SYS_RE = r'^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>\S*?)' + \ + r'(\[(?P<attrlist>.*?)\])$' + + def __init__(self): + self.macros = [] # List of Macros. + self.current = None # The last matched block macro. + self.passthroughs = [] + # Initialize default system macro. + m = Macro() + m.pattern = self.SYS_RE + m.prefix = '+' + m.reo = re.compile(m.pattern) + self.macros.append(m) + + def load(self, entries): + for entry in entries: + m = Macro() + m.load(entry) + if m.name is None: + # Delete undefined macro. + for i, m2 in enumerate(self.macros): + if m2.pattern == m.pattern: + del self.macros[i] + break + else: + message.warning('unable to delete missing macro: %s' % m.pattern) + else: + # Check for duplicates. + for m2 in self.macros: + if m2.pattern == m.pattern: + message.verbose('macro redefinition: %s%s' % (m.prefix, m.name)) + break + else: + self.macros.append(m) + + def dump(self): + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('[macros]') + # Dump all macros except the first (built-in system) macro. + for m in self.macros[1:]: + # Escape = in pattern. + macro = '%s=%s%s' % (m.pattern.replace('=', r'\='), m.prefix, m.name) + if m.subslist is not None: + macro += '[' + ','.join(m.subslist) + ']' + write(macro) + write('') + + def validate(self): + # Check all named sections exist. + if config.verbose: + for m in self.macros: + if m.name and m.prefix != '+': + m.section_name() + + def subs(self, text, prefix='', callouts=False): + # If callouts is True then only callout macros are processed, if False + # then all non-callout macros are processed. + result = text + for m in self.macros: + if m.prefix == prefix: + if callouts ^ (m.name != 'callout'): + result = m.subs(result) + return result + + def isnext(self): + """Return matching macro if block macro is next on reader.""" + reader.skip_blank_lines() + line = reader.read_next() + if line: + for m in self.macros: + if m.prefix == '#': + if m.reo.match(line): + self.current = m + return m + return False + + @lru_cache(maxsize=2048) + def match(self, prefix, name, text): + """Return re match object matching 'text' with macro type 'prefix', + macro name 'name'.""" + for m in self.macros: + if m.prefix == prefix: + mo = m.reo.match(text) + if mo: + if m.name == name: + return mo + if re.match(name, mo.group('name')): + return mo + return None + + def extract_passthroughs(self, text, prefix=''): + """ Extract the passthrough text and replace with temporary + placeholders.""" + self.passthroughs = [] + for m in self.macros: + if m.has_passthrough() and m.prefix == prefix: + text = m.subs_passthroughs(text, self.passthroughs) + return text + + def restore_passthroughs(self, text): + """ Replace passthough placeholders with the original passthrough text.""" + for i, v in enumerate(self.passthroughs): + text = text.replace('\x07' + str(i) + '\x07', self.passthroughs[i]) + return text + + +class Macro: + def __init__(self): + self.pattern = None # Matching regular expression. + self.name = '' # Conf file macro name (None if implicit). + self.prefix = '' # '' if inline, '+' if system, '#' if block. + self.reo = None # Compiled pattern re object. + self.subslist = [] # Default subs for macros passtext group. + + def has_passthrough(self): + return self.pattern.find(r'(?P<passtext>') >= 0 + + def section_name(self, name=None): + """Return macro markup template section name based on macro name and + prefix. Return None section not found.""" + assert self.prefix != '+' + if not name: + assert self.name + name = self.name + if self.prefix == '#': + suffix = '-blockmacro' + else: + suffix = '-inlinemacro' + if name + suffix in config.sections: + return name + suffix + else: + message.warning('missing macro section: [%s]' % (name + suffix)) + return None + + def load(self, entry): + e = parse_entry(entry) + if e is None: + # Only the macro pattern was specified, mark for deletion. + self.name = None + self.pattern = entry + return + if not utils.is_re(e[0]): + raise EAsciiDoc('illegal macro regular expression: %s' % e[0]) + pattern, name = e + if name and name[0] in ('+', '#'): + prefix, name = name[0], name[1:] + else: + prefix = '' + # Parse passthrough subslist. + mo = re.match(r'^(?P<name>[^[]*)(\[(?P<subslist>.*)\])?$', name) + name = mo.group('name') + if name and not is_name(name): + raise EAsciiDoc('illegal section name in macro entry: %s' % entry) + subslist = mo.group('subslist') + if subslist is not None: + # Parse and validate passthrough subs. + subslist = parse_options(subslist, SUBS_OPTIONS, 'illegal subs in macro entry: %s' % entry) + self.pattern = pattern + self.reo = re.compile(pattern) + self.prefix = prefix + self.name = name + self.subslist = subslist or [] + + def subs(self, text): + def subs_func(mo): + """Function called to perform macro substitution. + Uses matched macro regular expression object and returns string + containing the substituted macro body.""" + # Check if macro reference is escaped. + if mo.group()[0] == '\\': + return mo.group()[1:] # Strip leading backslash. + d = mo.groupdict() + # Delete groups that didn't participate in match. + for k, v in list(d.items()): + if v is None: + del d[k] + if self.name: + name = self.name + else: + if 'name' not in d: + message.warning('missing macro name group: %s' % mo.re.pattern) + return '' + name = d['name'] + section_name = self.section_name(name) + if not section_name: + return '' + # If we're dealing with a block macro get optional block ID and + # block title. + if self.prefix == '#' and self.name != 'comment': + AttributeList.consume(d) + BlockTitle.consume(d) + # Parse macro attributes. + if 'attrlist' in d: + if d['attrlist'] in (None, ''): + del d['attrlist'] + else: + if self.prefix == '': + # Un-escape ] characters in inline macros. + d['attrlist'] = d['attrlist'].replace('\\]', ']') + parse_attributes(d['attrlist'], d) + # Generate option attributes. + if 'options' in d: + options = parse_options(d['options'], (), '%s: illegal option name' % name) + for option in options: + d[option + '-option'] = '' + # Substitute single quoted attribute values in block macros. + if self.prefix == '#': + AttributeList.subs(d) + if name == 'callout': + listindex = int(d['index']) + d['coid'] = calloutmap.add(listindex) + # The alt attribute is the first image macro positional attribute. + if name == 'image' and '1' in d: + d['alt'] = d['1'] + # Un-escape special characters in LaTeX target file names. + if document.backend == 'latex' and 'target' in d and d['target']: + if '0' not in d: + d['0'] = d['target'] + d['target'] = config.subs_specialchars_reverse(d['target']) + # BUG: We've already done attribute substitution on the macro which + # means that any escaped attribute references are now unescaped and + # will be substituted by config.subs_section() below. As a partial + # fix have withheld {0} from substitution but this kludge doesn't + # fix it for other attributes containing unescaped references. + # Passthrough macros don't have this problem. + a0 = d.get('0') + if a0: + d['0'] = chr(0) # Replace temporarily with unused character. + body = config.subs_section(section_name, d) + if len(body) == 0: + result = '' + elif len(body) == 1: + result = body[0] + else: + if self.prefix == '#': + result = writer.newline.join(body) + else: + # Internally processed inline macros use UNIX line + # separator. + result = '\n'.join(body) + if a0: + result = result.replace(chr(0), a0) + return result + + return self.reo.sub(subs_func, text) + + def translate(self): + """ Block macro translation.""" + assert self.prefix == '#' + s = reader.read() + before = s + if self.has_passthrough(): + s = macros.extract_passthroughs(s, '#') + s = subs_attrs(s) + if s: + s = self.subs(s) + if self.has_passthrough(): + s = macros.restore_passthroughs(s) + if s: + trace('macro block', before, s) + writer.write(s) + + def subs_passthroughs(self, text, passthroughs): + """ Replace macro attribute lists in text with placeholders. + Substitute and append the passthrough attribute lists to the + passthroughs list.""" + def subs_func(mo): + """Function called to perform inline macro substitution. + Uses matched macro regular expression object and returns string + containing the substituted macro body.""" + # Don't process escaped macro references. + if mo.group()[0] == '\\': + return mo.group() + d = mo.groupdict() + if 'passtext' not in d: + message.warning('passthrough macro %s: missing passtext group' % d.get('name', '')) + return mo.group() + passtext = d['passtext'] + if re.search('\x07\\d+\x07', passtext): + message.warning('nested inline passthrough') + return mo.group() + if d.get('subslist'): + if d['subslist'].startswith(':'): + message.error('block macro cannot occur here: %s' % mo.group(), halt=True) + subslist = parse_options(d['subslist'], SUBS_OPTIONS, 'illegal passthrough macro subs option') + else: + subslist = self.subslist + passtext = Lex.subs_1(passtext, subslist) + if passtext is None: + passtext = '' + if self.prefix == '': + # Un-escape ] characters in inline macros. + passtext = passtext.replace('\\]', ']') + passthroughs.append(passtext) + # Tabs guarantee the placeholders are unambiguous. + result = ( + text[mo.start():mo.start('passtext')] + + '\x07' + str(len(passthroughs) - 1) + '\x07' + + text[mo.end('passtext'):mo.end()] + ) + return result + + return self.reo.sub(subs_func, text) + + +class CalloutMap: + def __init__(self): + self.comap = {} # key = list index, value = callouts list. + self.calloutindex = 0 # Current callout index number. + self.listnumber = 1 # Current callout list number. + + def listclose(self): + # Called when callout list is closed. + self.listnumber += 1 + self.calloutindex = 0 + self.comap = {} + + def add(self, listindex): + # Add next callout index to listindex map entry. Return the callout id. + self.calloutindex += 1 + # Append the coindex to a list in the comap dictionary. + if listindex not in self.comap: + self.comap[listindex] = [self.calloutindex] + else: + self.comap[listindex].append(self.calloutindex) + return self.calloutid(self.listnumber, self.calloutindex) + + @staticmethod + def calloutid(listnumber, calloutindex): + return 'CO%d-%d' % (listnumber, calloutindex) + + def calloutids(self, listindex): + # Retrieve list of callout indexes that refer to listindex. + if listindex in self.comap: + result = '' + for coindex in self.comap[listindex]: + result += ' ' + self.calloutid(self.listnumber, coindex) + return result.strip() + else: + message.warning('no callouts refer to list item ' + str(listindex)) + return '' + + def validate(self, maxlistindex): + # Check that all list indexes referenced by callouts exist. + for listindex in list(self.comap.keys()): + if listindex > maxlistindex: + message.warning('callout refers to non-existent list item ' + str(listindex)) + +# --------------------------------------------------------------------------- +# Input stream Reader and output stream writer classes. +# --------------------------------------------------------------------------- + + +UTF8_BOM = b'\xef\xbb\xbf'.decode('utf-8') + + +class Reader1: + """Line oriented AsciiDoc input file reader. Processes include and + conditional inclusion system macros. Tabs are expanded and lines are right + trimmed.""" + # This class is not used directly, use Reader class instead. + READ_BUFFER_MIN = 10 # Read buffer low level. + + def __init__(self): + self.f = None # Input file object. + self.fname = None # Input file name. + self.next = [] # Read ahead buffer containing [filename,linenumber,linetext] lists. + self.cursor = None # Last read() [filename,linenumber,linetext]. + self.tabsize = 8 # Tab expansion number of spaces. + self.parent = None # Included reader's parent reader. + self._lineno = 0 # The last line read from file object f. + self.line_ranges = None # line ranges to include + self.current_depth = 0 # Current include depth. + self.max_depth = 10 # Initial maximum allowed include depth. + self.bom = None # Byte order mark (BOM). + self.infile = None # Saved document 'infile' attribute. + self.indir = None # Saved document 'indir' attribute. + + def open(self, fname): + self.fname = fname + message.verbose('reading: ' + fname) + if fname == '<stdin>': + self.f = sys.stdin + self.infile = None + self.indir = None + else: + self.f = open(fname, 'r', encoding='utf-8') + self.infile = fname + self.indir = os.path.dirname(fname) + document.attributes['infile'] = self.infile + document.attributes['indir'] = self.indir + self._lineno = 0 # The last line read from file object f. + self.next = [] + # Pre-fill buffer by reading the first line and then pushing it back. + if self.read(): + if self.cursor[2].startswith(UTF8_BOM): + self.cursor[2] = self.cursor[2][len(UTF8_BOM):] + self.bom = UTF8_BOM + self.unread(self.cursor) + self.cursor = None + + def closefile(self): + """Used by class methods to close nested include files.""" + self.f.close() + self.next = [] + + def close(self): + self.closefile() + self.__init__() + + def readline(self): + while True: + s = self.f.readline() + if s: + self._lineno = self._lineno + 1 + else: + break + + if self.line_ranges is not None: + for line_range in self.line_ranges: + if len(line_range) == 1 and self._lineno == line_range[0]: + break + elif len(line_range) == 2 and line_range[0] <= self._lineno and (line_range[1] == -1 or self._lineno <= line_range[1]): + break + else: + continue + break + else: + break + return s + + def read(self, skip=False): + """Read next line. Return None if EOF. Expand tabs. Strip trailing + white space. Maintain self.next read ahead buffer. If skip=True then + conditional exclusion is active (ifdef and ifndef macros).""" + # Top up buffer. + if len(self.next) <= self.READ_BUFFER_MIN: + s = self.readline() + while s: + if self.tabsize != 0: + s = s.expandtabs(self.tabsize) + s = s.rstrip() + self.next.append([self.fname, self._lineno, s]) + if len(self.next) > self.READ_BUFFER_MIN: + break + s = self.readline() + # Return first (oldest) buffer entry. + if len(self.next) > 0: + self.cursor = self.next[0] + del self.next[0] + result = self.cursor[2] + # Check for include macro. + mo = macros.match('+', r'^include[1]?$', result) + if mo and not skip: + # Parse include macro attributes. + attrs = {} + parse_attributes(mo.group('attrlist'), attrs) + warnings = attrs.get('warnings', True) + # Don't process include macro once the maximum depth is reached. + if self.current_depth >= self.max_depth: + message.warning('maximum include depth exceeded') + return result + # Perform attribute substitution on include macro file name. + fname = subs_attrs(mo.group('target')) + if not fname: + return Reader1.read(self) # Return next input line. + if self.fname != '<stdin>': + fname = os.path.expandvars(os.path.expanduser(fname)) + fname = safe_filename(fname, os.path.dirname(self.fname)) + if not fname: + return Reader1.read(self) # Return next input line. + if not os.path.isfile(fname): + if warnings: + message.warning('include file not found: %s' % fname) + return Reader1.read(self) # Return next input line. + if mo.group('name') == 'include1': + if not config.dumping: + if fname not in config.include1: + message.verbose('include1: ' + fname, linenos=False) + # Store the include file in memory for later + # retrieval by the {include1:} system attribute. + with open(fname, encoding='utf-8') as f: + config.include1[fname] = [s.rstrip() for s in f] + return '{include1:%s}' % fname + else: + # This is a configuration dump, just pass the macro + # call through. + return result + # Clone self and set as parent (self assumes the role of child). + parent = Reader1() + utils.assign(parent, self) + self.parent = parent + # Set attributes in child. + if 'tabsize' in attrs: + try: + val = int(attrs['tabsize']) + if not val >= 0: + raise ValueError('not >= 0') + self.tabsize = val + except ValueError: + raise EAsciiDoc('illegal include macro tabsize argument') + else: + self.tabsize = config.tabsize + if 'depth' in attrs: + try: + val = int(attrs['depth']) + if not val >= 1: + raise ValueError('not >= 1') + self.max_depth = self.current_depth + val + except ValueError: + raise EAsciiDoc("include macro: illegal 'depth' argument") + if 'lines' in attrs: + try: + if ';' in attrs['lines']: + ranges = attrs['lines'].split(';') + else: + ranges = attrs['lines'].split(',') + for idx in range(len(ranges)): + ranges[idx] = [int(x) for x in ranges[idx].split('..')] + self.line_ranges = ranges + except ValueError: + raise EAsciiDoc("include macro: illegal 'lines' argument") + # Process included file. + message.verbose('include: ' + fname, linenos=False) + self.open(fname) + self.current_depth = self.current_depth + 1 + result = Reader1.read(self) + else: + if not Reader1.eof(self): + result = Reader1.read(self) + else: + result = None + return result + + def eof(self): + """Returns True if all lines have been read.""" + if len(self.next) == 0: + # End of current file. + if self.parent: + self.closefile() + utils.assign(self, self.parent) # Restore parent reader. + document.attributes['infile'] = self.infile + document.attributes['indir'] = self.indir + return Reader1.eof(self) + else: + return True + else: + return False + + def read_next(self): + """Like read() but does not advance file pointer.""" + if Reader1.eof(self): + return None + else: + return self.next[0][2] + + def unread(self, cursor): + """Push the line (filename,linenumber,linetext) tuple back into the read + buffer. Note that it's up to the caller to restore the previous + cursor.""" + assert cursor + self.next.insert(0, cursor) + + +class Reader(Reader1): + """ Wraps (well, sought of) Reader1 class and implements conditional text + inclusion.""" + def __init__(self): + Reader1.__init__(self) + self.depth = 0 # if nesting depth. + self.skip = False # true if we're skipping ifdef...endif. + self.skipname = '' # Name of current endif macro target. + self.skipto = -1 # The depth at which skipping is re-enabled. + + def read_super(self): + result = Reader1.read(self, self.skip) + if result is None and self.skip: + raise EAsciiDoc('missing endif::%s[]' % self.skipname) + return result + + def read(self): + result = self.read_super() + if result is None: + return None + while self.skip: + mo = macros.match('+', r'ifdef|ifndef|ifeval|endif', result) + if mo: + name = mo.group('name') + target = mo.group('target') + attrlist = mo.group('attrlist') + if name == 'endif': + self.depth -= 1 + if self.depth < 0: + raise EAsciiDoc('mismatched macro: %s' % result) + if self.depth == self.skipto: + self.skip = False + if target and self.skipname != target: + raise EAsciiDoc('mismatched macro: %s' % result) + else: + if name in ('ifdef', 'ifndef'): + if not target: + raise EAsciiDoc('missing macro target: %s' % result) + if not attrlist: + self.depth += 1 + elif name == 'ifeval': + if not attrlist: + raise EAsciiDoc('missing ifeval condition: %s' % result) + self.depth += 1 + result = self.read_super() + if result is None: + return None + mo = macros.match('+', r'ifdef|ifndef|ifeval|endif', result) + if mo: + name = mo.group('name') + target = mo.group('target') + attrlist = mo.group('attrlist') + if name == 'endif': + self.depth = self.depth - 1 + else: + if not target and name in ('ifdef', 'ifndef'): + raise EAsciiDoc('missing macro target: %s' % result) + defined = is_attr_defined(target, document.attributes) + if name == 'ifdef': + if attrlist: + if defined: + return attrlist + else: + self.skip = not defined + elif name == 'ifndef': + if attrlist: + if not defined: + return attrlist + else: + self.skip = defined + elif name == 'ifeval': + if safe(): + message.unsafe('ifeval invalid') + raise EAsciiDoc('ifeval invalid safe document') + if not attrlist: + raise EAsciiDoc('missing ifeval condition: %s' % result) + cond = False + attrlist = subs_attrs(attrlist) + if attrlist: + try: + cond = eval(attrlist) + except Exception as e: + raise EAsciiDoc('error evaluating ifeval condition: %s: %s' % (result, str(e))) + message.verbose('ifeval: %s: %r' % (attrlist, cond)) + self.skip = not cond + if not attrlist or name == 'ifeval': + if self.skip: + self.skipto = self.depth + self.skipname = target + self.depth = self.depth + 1 + result = self.read() + if result: + # Expand executable block macros. + mo = macros.match('+', r'eval|sys|sys2', result) + if mo: + action = mo.group('name') + cmd = mo.group('attrlist') + result = system(action, cmd, is_macro=True) + self.cursor[2] = result # So we don't re-evaluate. + if result: + # Un=escape escaped system macros. + if macros.match('+', r'\\eval|\\sys|\\sys2|\\ifdef|\\ifndef|\\endif|\\include|\\include1', result): + result = result[1:] + return result + + def eof(self): + return self.read_next() is None + + def read_next(self): + save_cursor = self.cursor + result = self.read() + if result is not None: + self.unread(self.cursor) + self.cursor = save_cursor + return result + + def read_lines(self, count=1): + """Return tuple containing count lines.""" + result = [] + i = 0 + while i < count and not self.eof(): + result.append(self.read()) + return tuple(result) + + def read_ahead(self, count=1): + """Same as read_lines() but does not advance the file pointer.""" + result = [] + putback = [] + save_cursor = self.cursor + try: + i = 0 + while i < count and not self.eof(): + result.append(self.read()) + putback.append(self.cursor) + i = i + 1 + while putback: + self.unread(putback.pop()) + finally: + self.cursor = save_cursor + return tuple(result) + + @staticmethod + def skip_blank_lines(): + reader.read_until(r'\s*\S+') + + def read_until(self, terminators, same_file=False): + """Like read() but reads lines up to (but not including) the first line + that matches the terminator regular expression, regular expression + object or list of regular expression objects. If same_file is True then + the terminating pattern must occur in the file the was being read when + the routine was called.""" + if same_file: + fname = self.cursor[0] + result = [] + if not isinstance(terminators, list): + if isinstance(terminators, str): + terminators = [re.compile(terminators)] + else: + terminators = [terminators] + while not self.eof(): + save_cursor = self.cursor + s = self.read() + if not same_file or fname == self.cursor[0]: + for reo in terminators: + if reo.match(s): + self.unread(self.cursor) + self.cursor = save_cursor + return tuple(result) + result.append(s) + return tuple(result) + + +class Writer: + """Writes lines to output file.""" + def __init__(self): + self.newline = DEFAULT_NEWLINE # End of line terminator. + self.f = None # Output file object. + self.fname = None # Output file name. + self.lines_out = 0 # Number of lines written. + self.skip_blank_lines = False # If True don't output blank lines. + + def open(self, fname, bom=None): + """ + bom is optional byte order mark. + http://en.wikipedia.org/wiki/Byte-order_mark + """ + self.fname = fname + if fname == '<stdout>': + self.f = sys.stdout + else: + self.f = open(fname, 'w+', encoding='utf-8', newline="") + message.verbose('writing: ' + writer.fname, False) + if bom: + self.f.write(bom) + self.lines_out = 0 + + def close(self): + if self.fname != '<stdout>': + self.f.close() + + def write_line(self, line=None): + if not (self.skip_blank_lines and (not line or not line.strip())): + # Replace out any escaped attributes with non-escaped versions + self.f.write((re.sub(r'\\({[a-zA-Z0-9_][a-zA-Z0-9_\-]*)', '\\1', line) or '') + self.newline) + self.lines_out = self.lines_out + 1 + + def write(self, *args, **kwargs): + """Iterates arguments, writes tuple and list arguments one line per + element, else writes argument as single line. If no arguments writes + blank line. If argument is None nothing is written. self.newline is + appended to each line.""" + if 'trace' in kwargs and len(args) > 0: + trace(kwargs['trace'], args[0]) + if len(args) == 0: + self.write_line() + self.lines_out = self.lines_out + 1 + else: + for arg in args: + if utils.is_array(arg): + for s in arg: + self.write_line(s) + elif arg is not None: + self.write_line(arg) + + def write_tag(self, tag, content, subs=None, d=None, **kwargs): + """Write content enveloped by tag. + Substitutions specified in the 'subs' list are perform on the + 'content'.""" + if subs is None: + subs = config.subsnormal + stag, etag = subs_tag(tag, d) + content = Lex.subs(content, subs) + if 'trace' in kwargs: + trace(kwargs['trace'], [stag] + content + [etag]) + if stag: + self.write(stag) + if content: + self.write(content) + if etag: + self.write(etag) + + +# --------------------------------------------------------------------------- +# Configuration file processing. +# --------------------------------------------------------------------------- +def _subs_specialwords(mo): + """Special word substitution function called by + Config.subs_specialwords().""" + word = mo.re.pattern # The special word. + template = config.specialwords[word] # The corresponding markup template. + if template not in config.sections: + raise EAsciiDoc('missing special word template [%s]' % template) + if mo.group()[0] == '\\': + return mo.group()[1:] # Return escaped word. + args = {} + args['words'] = mo.group() # The full match string is argument 'words'. + args.update(mo.groupdict()) # Add other named match groups to the arguments. + # Delete groups that didn't participate in match. + for k, v in list(args.items()): + if v is None: + del args[k] + lines = subs_attrs(config.sections[template], args) + if len(lines) == 0: + result = '' + elif len(lines) == 1: + result = lines[0] + else: + result = writer.newline.join(lines) + return result + + +class Config: + """Methods to process configuration files.""" + # Non-template section name regexp's. + ENTRIES_SECTIONS = ('tags', 'miscellaneous', 'attributes', 'specialcharacters', + 'specialwords', 'macros', 'replacements', 'quotes', 'titles', + r'paradef-.+', r'listdef-.+', r'blockdef-.+', r'tabledef-.+', + r'tabletags-.+', r'listtags-.+', 'replacements[23]', r'old_tabledef-.+') + + def __init__(self): + self.sections = OrderedDict() # Keyed by section name containing lists of section lines. + # Command-line options. + self.verbose = False + self.header_footer = True # -s, --no-header-footer option. + # [miscellaneous] section. + self.tabsize = 8 + self.textwidth = 70 # DEPRECATED: Old tables only. + self.newline = DEFAULT_NEWLINE + self.pagewidth = None + self.pageunits = None + self.outfilesuffix = '' + self.subsnormal = SUBS_NORMAL + self.subsverbatim = SUBS_VERBATIM + + self.tags = {} # Values contain (stag,etag) tuples. + self.specialchars = {} # Values of special character substitutions. + self.specialwords = {} # Name is special word pattern, value is macro. + self.replacements = OrderedDict() # Key is find pattern, value is replace pattern. + self.replacements2 = OrderedDict() + self.replacements3 = OrderedDict() + self.specialsections = {} # Name is special section name pattern, value is corresponding section name. + self.quotes = OrderedDict() # Values contain corresponding tag name. + self.fname = '' # Most recently loaded configuration file name. + self.conf_attrs = {} # Attributes entries from conf files. + self.cmd_attrs = {} # Attributes from command-line -a options. + self.loaded = [] # Loaded conf files. + self.include1 = {} # Holds include1::[] files for {include1:}. + self.dumping = False # True if asciidoc -c option specified. + self.filters = [] # Filter names specified by --filter option. + + @staticmethod + def init(): + """ + Check Python version and locate the executable and configuration files + directory. + cmd is the asciidoc command or asciidoc.py path. + """ + if sys.version_info[:2] < MIN_PYTHON_VERSION: + message.stderr('FAILED: Python %d.%d or better required' % MIN_PYTHON_VERSION) + sys.exit(1) + global USER_DIR + USER_DIR = utils.userdir() + if USER_DIR is not None: + USER_DIR = os.path.join(USER_DIR, '.asciidoc') + if not os.path.isdir(USER_DIR): + USER_DIR = None + + def load_file(self, fname, dir=None, include=[], exclude=[]): + """ + Loads sections dictionary with sections from file fname. + Existing sections are overlaid. + The 'include' list contains the section names to be loaded. + The 'exclude' list contains section names not to be loaded. + Return False if no file was found in any of the locations. + """ + def update_section(section): + """ Update section in sections with contents. """ + if section and contents: + if section in sections and self.entries_section(section): + if ''.join(contents): + # Merge entries. + sections[section] += contents + else: + del sections[section] + else: + if section.startswith('+'): + # Append section. + if section in sections: + sections[section] += contents + else: + sections[section] = contents + else: + # Replace section. + sections[section] = contents + if dir: + fname = os.path.join(dir, fname) + # Silently skip missing configuration file. + if not os.path.isfile(fname): + return False + # Don't load conf files twice (local and application conf files are the + # same if the source file is in the application directory). + if os.path.realpath(fname) in self.loaded: + return True + rdr = Reader() # Reader processes system macros. + message.linenos = False # Disable document line numbers. + rdr.open(fname) + message.linenos = None + self.fname = fname + reo = re.compile(r'^\[(?P<section>\+?[^\W\d][\w-]*)\]\s*$') + sections = OrderedDict() + section, contents = '', [] + while not rdr.eof(): + s = rdr.read() + if s and s[0] == '#': # Skip comment lines. + continue + if s[:2] == '\\#': # Un-escape lines starting with '#'. + s = s[1:] + s = s.rstrip() + found = reo.findall(str(s)) + if found: + update_section(section) # Store previous section. + section = found[0].lower() + contents = [] + else: + contents.append(s) + update_section(section) # Store last section. + rdr.close() + if include: + for s in set(sections) - set(include): + del sections[s] + if exclude: + for s in set(sections) & set(exclude): + del sections[s] + attrs = {} + self.load_sections(sections, attrs) + if not include: + # If all sections are loaded mark this file as loaded. + self.loaded.append(os.path.realpath(fname)) + document.update_attributes(attrs) # So they are available immediately. + return True + + def load_sections(self, sections, attrs=None): + """ + Loads sections dictionary. Each dictionary entry contains a + list of lines. + Updates 'attrs' with parsed [attributes] section entries. + """ + # Delete trailing blank lines from sections. + for k in list(sections.keys()): + for i in range(len(sections[k]) - 1, -1, -1): + if not sections[k][i]: + del sections[k][i] + elif not self.entries_section(k): + break + # Update new sections. + for k, v in list(sections.items()): + if k.startswith('+'): + # Append section. + k = k[1:] + if k in self.sections: + self.sections[k] += v + else: + self.sections[k] = v + else: + # Replace section. + self.sections[k] = v + self.parse_tags() + # Internally [miscellaneous] section entries are just attributes. + d = {} + parse_entries(sections.get('miscellaneous', ()), d, unquote=True, allow_name_only=True) + parse_entries(sections.get('attributes', ()), d, unquote=True, allow_name_only=True) + update_attrs(self.conf_attrs, d) + if attrs is not None: + attrs.update(d) + d = {} + parse_entries(sections.get('titles', ()), d) + Title.load(d) + parse_entries(sections.get('specialcharacters', ()), self.specialchars, escape_delimiter=False) + parse_entries(sections.get('quotes', ()), self.quotes) + self.parse_specialwords() + self.parse_replacements() + self.parse_replacements('replacements2') + self.parse_replacements('replacements3') + self.parse_specialsections() + paragraphs.load(sections) + lists.load(sections) + blocks.load(sections) + tables_OLD.load(sections) + tables.load(sections) + macros.load(sections.get('macros', ())) + + @staticmethod + def get_load_dirs(): + """ + Return list of well known paths with conf files. + """ + result = [] + # Load from global configuration directory. + result.append(CONF_DIR) + # Load configuration files from ~/.asciidoc if it exists. + if USER_DIR is not None: + result.append(USER_DIR) + return result + + def find_in_dirs(self, filename, dirs=None): + """ + Find conf files from dirs list. + Return list of found file paths. + Return empty list if not found in any of the locations. + """ + result = [] + if dirs is None: + dirs = self.get_load_dirs() + for d in dirs: + f = os.path.join(d, filename) + if os.path.isfile(f): + result.append(f) + return result + + def load_from_dirs(self, filename, dirs=None, include=[]): + """ + Load conf file from dirs list. + If dirs not specified try all the well known locations. + Return False if no file was successfully loaded. + """ + count = 0 + for f in self.find_in_dirs(filename, dirs): + if self.load_file(f, include=include): + count += 1 + return count != 0 + + def load_backend(self, dirs=None): + """ + Load the backend configuration files from dirs list. + If dirs not specified try all the well known locations. + If a <backend>.conf file was found return it's full path name, + if not found return None. + """ + result = None + if dirs is None: + dirs = self.get_load_dirs() + conf = document.backend + '.conf' + conf2 = document.backend + '-' + document.doctype + '.conf' + # First search for filter backends. + for d in [os.path.join(d, 'backends', document.backend) for d in dirs]: + if self.load_file(conf, d): + result = os.path.join(d, conf) + self.load_file(conf2, d) + if not result: + # Search in the normal locations. + for d in dirs: + if self.load_file(conf, d): + result = os.path.join(d, conf) + self.load_file(conf2, d) + return result + + def load_filters(self, dirs=None): + """ + Load filter configuration files from 'filters' directory in dirs list. + If dirs not specified try all the well known locations. Suppress + loading if a file named __noautoload__ is in same directory as the conf + file unless the filter has been specified with the --filter + command-line option (in which case it is loaded unconditionally). + """ + if dirs is None: + dirs = self.get_load_dirs() + for d in dirs: + # Load filter .conf files. + filtersdir = os.path.join(d, 'filters') + for dirpath, dirnames, filenames in os.walk(filtersdir): + subdirs = dirpath[len(filtersdir):].split(os.path.sep) + # True if processing a filter specified by a --filter option. + filter_opt = len(subdirs) > 1 and subdirs[1] in self.filters + if '__noautoload__' not in filenames or filter_opt: + for f in filenames: + if re.match(r'^.+\.conf$', f): + self.load_file(f, dirpath) + + def find_config_dir(self, *dirnames): + """ + Return path of configuration directory. + Try all the well known locations. + Return None if directory not found. + """ + for d in [os.path.join(d, *dirnames) for d in self.get_load_dirs()]: + if os.path.isdir(d): + return d + return None + + def set_theme_attributes(self): + theme = document.attributes.get('theme') + if theme and 'themedir' not in document.attributes: + themedir = self.find_config_dir('themes', theme) + if themedir: + document.attributes['themedir'] = themedir + iconsdir = os.path.join(themedir, 'icons') + if 'data-uri' in document.attributes and os.path.isdir(iconsdir): + document.attributes['iconsdir'] = iconsdir + else: + message.warning('missing theme: %s' % theme, linenos=False) + + def load_miscellaneous(self, d): + """Set miscellaneous configuration entries from dictionary 'd'.""" + def set_if_int_ge(name, d, min_value): + if name in d: + try: + val = int(d[name]) + if not val >= min_value: + raise ValueError("not >= " + str(min_value)) + setattr(self, name, val) + except ValueError: + raise EAsciiDoc('illegal [miscellaneous] %s entry' % name) + set_if_int_ge('tabsize', d, 0) + set_if_int_ge('textwidth', d, 1) # DEPRECATED: Old tables only. + + if 'pagewidth' in d: + try: + val = float(d['pagewidth']) + self.pagewidth = val + except ValueError: + raise EAsciiDoc('illegal [miscellaneous] pagewidth entry') + + if 'pageunits' in d: + self.pageunits = d['pageunits'] + if 'outfilesuffix' in d: + self.outfilesuffix = d['outfilesuffix'] + if 'newline' in d: + # Convert escape sequences to their character values. + self.newline = ast.literal_eval('"' + d['newline'] + '"') + if 'subsnormal' in d: + self.subsnormal = parse_options(d['subsnormal'], SUBS_OPTIONS, + 'illegal [%s] %s: %s' % ('miscellaneous', 'subsnormal', d['subsnormal'])) + if 'subsverbatim' in d: + self.subsverbatim = parse_options(d['subsverbatim'], SUBS_OPTIONS, 'illegal [%s] %s: %s' + % ('miscellaneous', 'subsverbatim', d['subsverbatim'])) + + def validate(self): + """Check the configuration for internal consistency. Called after all + configuration files have been loaded.""" + message.linenos = False # Disable document line numbers. + # Heuristic to validate that at least one configuration file was loaded. + if not self.specialchars or not self.tags or not lists: + raise EAsciiDoc('incomplete configuration files') + # Check special characters are only one character long. + for k in list(self.specialchars.keys()): + if len(k) != 1: + raise EAsciiDoc('[specialcharacters] must be a single character: %s' % k) + # Check all special words have a corresponding inline macro body. + for macro in list(self.specialwords.values()): + if not is_name(macro): + raise EAsciiDoc('illegal special word name: %s' % macro) + if macro not in self.sections: + message.warning('missing special word macro: [%s]' % macro) + # Check all text quotes have a corresponding tag. + for q in list(self.quotes.keys())[:]: + tag = self.quotes[q] + if not tag: + del self.quotes[q] # Un-define quote. + else: + if tag[0] == '#': + tag = tag[1:] + if tag not in self.tags: + message.warning('[quotes] %s missing tag definition: %s' % (q, tag)) + # Check all specialsections section names exist. + for k, v in list(self.specialsections.items()): + if not v: + del self.specialsections[k] + elif v not in self.sections: + message.warning('missing specialsections section: [%s]' % v) + paragraphs.validate() + lists.validate() + blocks.validate() + tables_OLD.validate() + tables.validate() + macros.validate() + message.linenos = None + + def entries_section(self, section_name): + """ + Return True if conf file section contains entries, not a markup + template. + """ + for name in self.ENTRIES_SECTIONS: + if re.match(name, section_name): + return True + return False + + def dump(self): + """Dump configuration to stdout.""" + # Header. + hdr = '' + hdr = hdr + '#' + writer.newline + hdr = hdr + '# Generated by AsciiDoc %s for %s %s.%s' % \ + (VERSION, document.backend, document.doctype, writer.newline) + t = time.asctime(time.localtime(time.time())) + hdr = hdr + '# %s%s' % (t, writer.newline) + hdr = hdr + '#' + writer.newline + sys.stdout.write(hdr) + # Dump special sections. + # Dump only the configuration file and command-line attributes. + # [miscellaneous] entries are dumped as part of the [attributes]. + d = {} + d.update(self.conf_attrs) + d.update(self.cmd_attrs) + dump_section('attributes', d) + Title.dump() + dump_section('quotes', self.quotes) + dump_section('specialcharacters', self.specialchars) + d = {} + for k, v in list(self.specialwords.items()): + if v in d: + d[v] = '%s "%s"' % (d[v], k) # Append word list. + else: + d[v] = '"%s"' % k + dump_section('specialwords', d) + dump_section('replacements', self.replacements) + dump_section('replacements2', self.replacements2) + dump_section('replacements3', self.replacements3) + dump_section('specialsections', self.specialsections) + d = {} + for k, v in list(self.tags.items()): + d[k] = '%s|%s' % v + dump_section('tags', d) + paragraphs.dump() + lists.dump() + blocks.dump() + tables_OLD.dump() + tables.dump() + macros.dump() + # Dump remaining sections. + for k in list(self.sections.keys()): + if not self.entries_section(k): + sys.stdout.write('[%s]%s' % (k, writer.newline)) + for line in self.sections[k]: + sys.stdout.write('%s%s' % (line, writer.newline)) + sys.stdout.write(writer.newline) + + def subs_section(self, section, d): + """Section attribute substitution using attributes from + document.attributes and 'd'. Lines containing undefined + attributes are deleted.""" + if section in self.sections: + return subs_attrs(self.sections[section], d) + else: + message.warning('missing section: [%s]' % section) + return () + + def parse_tags(self): + """Parse [tags] section entries into self.tags dictionary.""" + d = {} + parse_entries(self.sections.get('tags', ()), d) + for k, v in list(d.items()): + if v is None: + if k in self.tags: + del self.tags[k] + elif v == '': + self.tags[k] = (None, None) + else: + mo = re.match(r'(?P<stag>.*)\|(?P<etag>.*)', v) + if mo: + self.tags[k] = (mo.group('stag'), mo.group('etag')) + else: + raise EAsciiDoc('[tag] %s value malformed' % k) + + def tag(self, name, d=None): + """Returns (starttag,endtag) tuple named name from configuration file + [tags] section. Raise error if not found. If a dictionary 'd' is + passed then merge with document attributes and perform attribute + substitution on tags.""" + if name not in self.tags: + raise EAsciiDoc('missing tag: %s' % name) + stag, etag = self.tags[name] + if d is not None: + # TODO: Should we warn if substitution drops a tag? + if stag: + stag = subs_attrs(stag, d) + if etag: + etag = subs_attrs(etag, d) + if stag is None: + stag = '' + if etag is None: + etag = '' + return (stag, etag) + + def parse_specialsections(self): + """Parse specialsections section to self.specialsections dictionary.""" + # TODO: This is virtually the same as parse_replacements() and should + # be factored to single routine. + d = {} + parse_entries(self.sections.get('specialsections', ()), d, unquote=True) + for pat, sectname in list(d.items()): + pat = utils.strip_quotes(pat) + if not utils.is_re(pat): + raise EAsciiDoc('[specialsections] entry is not a valid regular expression: %s' % pat) + if sectname is None: + if pat in self.specialsections: + del self.specialsections[pat] + else: + self.specialsections[pat] = sectname + + def parse_replacements(self, sect='replacements'): + """Parse replacements section into self.replacements dictionary.""" + d = OrderedDict() + parse_entries(self.sections.get(sect, ()), d, unquote=True) + for pat, rep in list(d.items()): + if not self.set_replacement(pat, rep, getattr(self, sect)): + raise EAsciiDoc('[%s] entry in %s is not a valid ' + 'regular expression: %s' % (sect, self.fname, pat)) + + @staticmethod + def set_replacement(pat, rep, replacements): + """Add pattern and replacement to replacements dictionary.""" + pat = utils.strip_quotes(pat) + if not utils.is_re(pat): + return False + if rep is None: + if pat in replacements: + del replacements[pat] + else: + replacements[pat] = utils.strip_quotes(rep) + return True + + def subs_replacements(self, s, sect='replacements'): + """Substitute patterns from self.replacements in 's'.""" + result = s + for pat, rep in list(getattr(self, sect).items()): + result = re.sub(pat, rep, result) + return result + + def parse_specialwords(self): + """Parse special words section into self.specialwords dictionary.""" + reo = re.compile(r'(?:\s|^)(".+?"|[^"\s]+)(?=\s|$)') + for line in self.sections.get('specialwords', ()): + e = parse_entry(line) + if not e: + raise EAsciiDoc('[specialwords] entry in %s is malformed: %s' % (self.fname, line)) + name, wordlist = e + if not is_name(name): + raise EAsciiDoc('[specialwords] name in %s is illegal: %s' % (self.fname, name)) + if wordlist is None: + # Un-define all words associated with 'name'. + for k, v in list(self.specialwords.items()): + if v == name: + del self.specialwords[k] + else: + words = reo.findall(wordlist) + for word in words: + word = utils.strip_quotes(word) + if not utils.is_re(word): + raise EAsciiDoc('[specialwords] entry in %s ' + 'is not a valid regular expression: %s' % (self.fname, word)) + self.specialwords[word] = name + + def subs_specialchars(self, s): + """Perform special character substitution on string 's'.""" + """It may seem like a good idea to escape special characters with a '\' + character, the reason we don't is because the escape character itself + then has to be escaped and this makes including code listings + problematic. Use the predefined {amp},{lt},{gt} attributes instead.""" + result = '' + for ch in s: + result = result + self.specialchars.get(ch, ch) + return result + + def subs_specialchars_reverse(self, s): + """Perform reverse special character substitution on string 's'.""" + result = s + for k, v in list(self.specialchars.items()): + result = result.replace(v, k) + return result + + def subs_specialwords(self, s): + """Search for word patterns from self.specialwords in 's' and + substitute using corresponding macro.""" + result = s + for word in list(self.specialwords.keys()): + result = re.sub(word, _subs_specialwords, result) + return result + + def expand_templates(self, entries): + """Expand any template::[] macros in a list of section entries.""" + result = [] + for line in entries: + mo = macros.match('+', r'template', line) + if mo: + s = mo.group('attrlist') + if s in self.sections: + result += self.expand_templates(self.sections[s]) + else: + message.warning('missing section: [%s]' % s) + result.append(line) + else: + result.append(line) + return result + + def expand_all_templates(self): + for k, v in list(self.sections.items()): + self.sections[k] = self.expand_templates(v) + + def section2tags(self, section, d={}, skipstart=False, skipend=False): + """Perform attribute substitution on 'section' using document + attributes plus 'd' attributes. Return tuple (stag,etag) containing + pre and post | placeholder tags. 'skipstart' and 'skipend' are + used to suppress substitution.""" + assert section is not None + if section in self.sections: + body = self.sections[section] + else: + message.warning('missing section: [%s]' % section) + body = () + # Split macro body into start and end tag lists. + stag = [] + etag = [] + in_stag = True + for s in body: + if in_stag: + mo = re.match(r'(?P<stag>.*)\|(?P<etag>.*)', s) + if mo: + if mo.group('stag'): + stag.append(mo.group('stag')) + if mo.group('etag'): + etag.append(mo.group('etag')) + in_stag = False + else: + stag.append(s) + else: + etag.append(s) + # Do attribute substitution last so {brkbar} can be used to escape |. + # But don't do attribute substitution on title -- we've already done it. + title = d.get('title') + if title: + d['title'] = chr(0) # Replace with unused character. + if not skipstart: + stag = subs_attrs(stag, d) + if not skipend: + etag = subs_attrs(etag, d) + # Put the {title} back. + if title: + stag = [x.replace(chr(0), title) for x in stag] + etag = [x.replace(chr(0), title) for x in etag] + d['title'] = title + return (stag, etag) + + +# --------------------------------------------------------------------------- +# Deprecated old table classes follow. +# Naming convention is an _OLD name suffix. +# These will be removed from future versions of AsciiDoc + +def join_lines_OLD(lines): + """Return a list in which lines terminated with the backslash line + continuation character are joined.""" + result = [] + s = '' + continuation = False + for line in lines: + if line and line[-1] == '\\': + s = s + line[:-1] + continuation = True + continue + if continuation: + result.append(s + line) + s = '' + continuation = False + else: + result.append(line) + if continuation: + result.append(s) + return result + + +class Column_OLD: + """Table column.""" + def __init__(self): + self.colalign = None # 'left','right','center' + self.rulerwidth = None + self.colwidth = None # Output width in page units. + + +class Table_OLD(AbstractBlock): + COL_STOP = r"(`|'|\.)" # RE. + ALIGNMENTS = {'`': 'left', "'": 'right', '.': 'center'} + FORMATS = ('fixed', 'csv', 'dsv') + + def __init__(self): + AbstractBlock.__init__(self) + self.CONF_ENTRIES += ('template', 'fillchar', 'format', 'colspec', + 'headrow', 'footrow', 'bodyrow', 'headdata', + 'footdata', 'bodydata') + # Configuration parameters. + self.fillchar = None + self.format = None # 'fixed','csv','dsv' + self.colspec = None + self.headrow = None + self.footrow = None + self.bodyrow = None + self.headdata = None + self.footdata = None + self.bodydata = None + # Calculated parameters. + self.underline = None # RE matching current table underline. + self.isnumeric = False # True if numeric ruler. + self.tablewidth = None # Optional table width scale factor. + self.columns = [] # List of Columns. + # Other. + self.check_msg = '' # Message set by previous self.validate() call. + + def load(self, name, entries): + AbstractBlock.load(self, name, entries) + """Update table definition from section entries in 'entries'.""" + for k, v in list(entries.items()): + if k == 'fillchar': + if v and len(v) == 1: + self.fillchar = v + else: + raise EAsciiDoc('malformed table fillchar: %s' % v) + elif k == 'format': + if v in Table_OLD.FORMATS: + self.format = v + else: + raise EAsciiDoc('illegal table format: %s' % v) + elif k == 'colspec': + self.colspec = v + elif k == 'headrow': + self.headrow = v + elif k == 'footrow': + self.footrow = v + elif k == 'bodyrow': + self.bodyrow = v + elif k == 'headdata': + self.headdata = v + elif k == 'footdata': + self.footdata = v + elif k == 'bodydata': + self.bodydata = v + + def dump(self): + AbstractBlock.dump(self) + write = lambda s: sys.stdout.write('%s%s' % (s, writer.newline)) + write('fillchar=' + self.fillchar) + write('format=' + self.format) + if self.colspec: + write('colspec=' + self.colspec) + if self.headrow: + write('headrow=' + self.headrow) + if self.footrow: + write('footrow=' + self.footrow) + write('bodyrow=' + self.bodyrow) + if self.headdata: + write('headdata=' + self.headdata) + if self.footdata: + write('footdata=' + self.footdata) + write('bodydata=' + self.bodydata) + write('') + + def validate(self): + AbstractBlock.validate(self) + """Check table definition and set self.check_msg if invalid else set + self.check_msg to blank string.""" + # Check global table parameters. + if config.textwidth is None: + self.check_msg = 'missing [miscellaneous] textwidth entry' + elif config.pagewidth is None: + self.check_msg = 'missing [miscellaneous] pagewidth entry' + elif config.pageunits is None: + self.check_msg = 'missing [miscellaneous] pageunits entry' + elif self.headrow is None: + self.check_msg = 'missing headrow entry' + elif self.footrow is None: + self.check_msg = 'missing footrow entry' + elif self.bodyrow is None: + self.check_msg = 'missing bodyrow entry' + elif self.headdata is None: + self.check_msg = 'missing headdata entry' + elif self.footdata is None: + self.check_msg = 'missing footdata entry' + elif self.bodydata is None: + self.check_msg = 'missing bodydata entry' + else: + # No errors. + self.check_msg = '' + + def isnext(self): + return AbstractBlock.isnext(self) + + def parse_ruler(self, ruler): + """Parse ruler calculating underline and ruler column widths.""" + fc = re.escape(self.fillchar) + # Strip and save optional tablewidth from end of ruler. + mo = re.match(r'^(.*' + fc + r'+)([\d\.]+)$', ruler) + if mo: + ruler = mo.group(1) + self.tablewidth = float(mo.group(2)) + self.attributes['tablewidth'] = str(float(self.tablewidth)) + else: + self.tablewidth = None + self.attributes['tablewidth'] = '100.0' + # Guess whether column widths are specified numerically or not. + if ruler[1] != self.fillchar: + # If the first column does not start with a fillchar then numeric. + self.isnumeric = True + elif ruler[1:] == self.fillchar * len(ruler[1:]): + # The case of one column followed by fillchars is numeric. + self.isnumeric = True + else: + self.isnumeric = False + # Underlines must be 3 or more fillchars. + self.underline = r'^' + fc + r'{3,}$' + splits = re.split(self.COL_STOP, ruler)[1:] + # Build self.columns. + for i in range(0, len(splits), 2): + c = Column_OLD() + c.colalign = self.ALIGNMENTS[splits[i]] + s = splits[i + 1] + if self.isnumeric: + # Strip trailing fillchars. + s = re.sub(fc + r'+$', '', s) + if s == '': + c.rulerwidth = None + else: + try: + val = int(s) + if not val > 0: + raise ValueError('not > 0') + c.rulerwidth = val + except ValueError: + raise EAsciiDoc('malformed ruler: bad width') + else: # Calculate column width from inter-fillchar intervals. + if not re.match(r'^' + fc + r'+$', s): + raise EAsciiDoc('malformed ruler: illegal fillchars') + c.rulerwidth = len(s) + 1 + self.columns.append(c) + # Fill in unspecified ruler widths. + if self.isnumeric: + if self.columns[0].rulerwidth is None: + prevwidth = 1 + for c in self.columns: + if c.rulerwidth is None: + c.rulerwidth = prevwidth + prevwidth = c.rulerwidth + + def build_colspecs(self): + """Generate colwidths and colspecs. This can only be done after the + table arguments have been parsed since we use the table format.""" + self.attributes['cols'] = len(self.columns) + # Calculate total ruler width. + totalwidth = 0 + for c in self.columns: + totalwidth = totalwidth + c.rulerwidth + if totalwidth <= 0: + raise EAsciiDoc('zero width table') + # Calculate marked up colwidths from rulerwidths. + for c in self.columns: + # Convert ruler width to output page width. + width = float(c.rulerwidth) + if self.format == 'fixed': + if self.tablewidth is None: + # Size proportional to ruler width. + colfraction = width / config.textwidth + else: + # Size proportional to page width. + colfraction = width / totalwidth + else: + # Size proportional to page width. + colfraction = width / totalwidth + c.colwidth = colfraction * config.pagewidth # To page units. + if self.tablewidth is not None: + c.colwidth = c.colwidth * self.tablewidth # Scale factor. + if self.tablewidth > 1: + c.colwidth = c.colwidth / 100 # tablewidth is in percent. + # Build colspecs. + if self.colspec: + cols = [] + i = 0 + for c in self.columns: + i += 1 + self.attributes['colalign'] = c.colalign + self.attributes['colwidth'] = str(int(c.colwidth)) + self.attributes['colnumber'] = str(i + 1) + s = subs_attrs(self.colspec, self.attributes) + if not s: + message.warning('colspec dropped: contains undefined attribute') + else: + cols.append(s) + self.attributes['colspecs'] = writer.newline.join(cols) + + def split_rows(self, rows): + """Return a two item tuple containing a list of lines up to but not + including the next underline (continued lines are joined ) and the + tuple of all lines after the underline.""" + reo = re.compile(self.underline) + i = 0 + while not reo.match(rows[i]): + i = i + 1 + if i == 0: + raise EAsciiDoc('missing table rows') + if i >= len(rows): + raise EAsciiDoc('closing [%s] underline expected' % self.defname) + return (join_lines_OLD(rows[:i]), rows[i + 1:]) + + def parse_rows(self, rows, rtag, dtag): + """Parse rows list using the row and data tags. Returns a substituted + list of output lines.""" + result = [] + # Source rows are parsed as single block, rather than line by line, to + # allow the CSV reader to handle multi-line rows. + if self.format == 'fixed': + rows = self.parse_fixed(rows) + elif self.format == 'csv': + rows = self.parse_csv(rows) + elif self.format == 'dsv': + rows = self.parse_dsv(rows) + else: + assert True, 'illegal table format' + # Substitute and indent all data in all rows. + stag, etag = subs_tag(rtag, self.attributes) + for row in rows: + result.append(' ' + stag) + for data in self.subs_row(row, dtag): + result.append(' ' + data) + result.append(' ' + etag) + return result + + def subs_row(self, data, dtag): + """Substitute the list of source row data elements using the data tag. + Returns a substituted list of output table data items.""" + result = [] + if len(data) < len(self.columns): + message.warning('fewer row data items then table columns') + if len(data) > len(self.columns): + message.warning('more row data items than table columns') + for i in range(len(self.columns)): + if i > len(data) - 1: + d = '' # Fill missing column data with blanks. + else: + d = data[i] + c = self.columns[i] + self.attributes['colalign'] = c.colalign + self.attributes['colwidth'] = str(int(c.colwidth)) + self.attributes['colnumber'] = str(i + 1) + stag, etag = subs_tag(dtag, self.attributes) + # Insert AsciiDoc line break (' +') where row data has newlines + # ('\n'). This is really only useful when the table format is csv + # and the output markup is HTML. It's also a bit dubious in that it + # assumes the user has not modified the shipped line break pattern. + subs = self.get_subs()[0] + if 'replacements2' in subs: + # Insert line breaks in cell data. + d = re.sub(r'(?m)\n', r' +\n', d) + d = d.split('\n') # So writer.newline is written. + else: + d = [d] + result = result + [stag] + Lex.subs(d, subs) + [etag] + return result + + def parse_fixed(self, rows): + """Parse the list of source table rows. Each row item in the returned + list contains a list of cell data elements.""" + result = [] + for row in rows: + data = [] + start = 0 + for c in self.columns: + end = start + c.rulerwidth + if c is self.columns[-1]: + # Text in last column can continue forever. + # Use the encoded string to slice, but convert back + # to plain string before further processing + data.append(row[start:].strip()) + else: + data.append(row[start:end].strip()) + start = end + result.append(data) + return result + + @staticmethod + def parse_csv(rows): + """Parse the list of source table rows. Each row item in the returned + list contains a list of cell data elements.""" + result = [] + rdr = csv.reader(io.StringIO(DEFAULT_NEWLINE.join(rows)), skipinitialspace=True) + try: + for row in rdr: + result.append(row) + except Exception: + raise EAsciiDoc('csv parse error: %s' % row) + return result + + def parse_dsv(self, rows): + """Parse the list of source table rows. Each row item in the returned + list contains a list of cell data elements.""" + separator = self.attributes.get('separator', ':') + separator = ast.literal_eval('"' + separator + '"') + if len(separator) != 1: + raise EAsciiDoc('malformed dsv separator: %s' % separator) + # TODO: If separator is preceded by an odd number of backslashes then + # it is escaped and should not delimit. + result = [] + for row in rows: + # Skip blank lines + if row == '': + continue + # Un-escape escaped characters. + row = ast.literal_eval('"' + row.replace('"', '\\"') + '"') + data = row.split(separator) + data = [s.strip() for s in data] + result.append(data) + return result + + def translate(self): + message.deprecated('old tables syntax') + AbstractBlock.translate(self) + # Reset instance specific properties. + self.underline = None + self.columns = [] + attrs = {} + BlockTitle.consume(attrs) + # Add relevant globals to table substitutions. + attrs['pagewidth'] = str(config.pagewidth) + attrs['pageunits'] = config.pageunits + # Mix in document attribute list. + AttributeList.consume(attrs) + # Validate overridable attributes. + for k, v in list(attrs.items()): + if k == 'format': + if v not in self.FORMATS: + raise EAsciiDoc('illegal [%s] %s: %s' % (self.defname, k, v)) + self.format = v + elif k == 'tablewidth': + try: + self.tablewidth = float(attrs['tablewidth']) + except Exception: + raise EAsciiDoc('illegal [%s] %s: %s' % (self.defname, k, v)) + self.merge_attributes(attrs) + # Parse table ruler. + ruler = reader.read() + assert re.match(self.delimiter, ruler) + self.parse_ruler(ruler) + # Read the entire table. + table = [] + while True: + line = reader.read_next() + # Table terminated by underline followed by a blank line or EOF. + if len(table) > 0 and re.match(self.underline, table[-1]): + if line in ('', None): + break + if line is None: + raise EAsciiDoc('closing [%s] underline expected' % self.defname) + table.append(reader.read()) + # EXPERIMENTAL: The number of lines in the table, requested by Benjamin Klum. + self.attributes['rows'] = str(len(table)) + if self.check_msg: # Skip if table definition was marked invalid. + message.warning('skipping [%s] table: %s' % (self.defname, self.check_msg)) + return + self.push_blockname('table') + # Generate colwidths and colspecs. + self.build_colspecs() + # Generate headrows, footrows, bodyrows. + # Headrow, footrow and bodyrow data replaces same named attributes in + # the table markup template. In order to ensure this data does not get + # a second attribute substitution (which would interfere with any + # already substituted inline passthroughs) unique placeholders are used + # (the tab character does not appear elsewhere since it is expanded on + # input) which are replaced after template attribute substitution. + headrows = footrows = [] + bodyrows, table = self.split_rows(table) + if table: + headrows = bodyrows + bodyrows, table = self.split_rows(table) + if table: + footrows, table = self.split_rows(table) + if headrows: + headrows = self.parse_rows(headrows, self.headrow, self.headdata) + headrows = writer.newline.join(headrows) + self.attributes['headrows'] = '\x07headrows\x07' + if footrows: + footrows = self.parse_rows(footrows, self.footrow, self.footdata) + footrows = writer.newline.join(footrows) + self.attributes['footrows'] = '\x07footrows\x07' + bodyrows = self.parse_rows(bodyrows, self.bodyrow, self.bodydata) + bodyrows = writer.newline.join(bodyrows) + self.attributes['bodyrows'] = '\x07bodyrows\x07' + table = subs_attrs(config.sections[self.template], self.attributes) + table = writer.newline.join(table) + # Before we finish replace the table head, foot and body place holders + # with the real data. + if headrows: + table = table.replace('\x07headrows\x07', headrows, 1) + if footrows: + table = table.replace('\x07footrows\x07', footrows, 1) + table = table.replace('\x07bodyrows\x07', bodyrows, 1) + writer.write(table, trace='table') + self.pop_blockname() + + +class Tables_OLD(AbstractBlocks): + """List of tables.""" + BLOCK_TYPE = Table_OLD + PREFIX = 'old_tabledef-' + + def __init__(self): + AbstractBlocks.__init__(self) + + def load(self, sections): + AbstractBlocks.load(self, sections) + + def validate(self): + # Does not call AbstractBlocks.validate(). + # Check we have a default table definition, + for i in range(len(self.blocks)): + if self.blocks[i].defname == 'old_tabledef-default': + default = self.blocks[i] + break + else: + raise EAsciiDoc('missing section: [OLD_tabledef-default]') + # Set default table defaults. + if default.format is None: + default.subs = 'fixed' + # Propagate defaults to unspecified table parameters. + for b in self.blocks: + if b is not default: + if b.fillchar is None: + b.fillchar = default.fillchar + if b.format is None: + b.format = default.format + if b.template is None: + b.template = default.template + if b.colspec is None: + b.colspec = default.colspec + if b.headrow is None: + b.headrow = default.headrow + if b.footrow is None: + b.footrow = default.footrow + if b.bodyrow is None: + b.bodyrow = default.bodyrow + if b.headdata is None: + b.headdata = default.headdata + if b.footdata is None: + b.footdata = default.footdata + if b.bodydata is None: + b.bodydata = default.bodydata + # Check all tables have valid fill character. + for b in self.blocks: + if not b.fillchar or len(b.fillchar) != 1: + raise EAsciiDoc('[%s] missing or illegal fillchar' % b.defname) + # Build combined tables delimiter patterns and assign defaults. + delimiters = [] + for b in self.blocks: + # Ruler is: + # (ColStop,(ColWidth,FillChar+)?)+, FillChar+, TableWidth? + b.delimiter = r'^(' + Table_OLD.COL_STOP \ + + r'(\d*|' + re.escape(b.fillchar) + r'*)' \ + + r')+' \ + + re.escape(b.fillchar) + r'+' \ + + r'([\d\.]*)$' + delimiters.append(b.delimiter) + if not b.headrow: + b.headrow = b.bodyrow + if not b.footrow: + b.footrow = b.bodyrow + if not b.headdata: + b.headdata = b.bodydata + if not b.footdata: + b.footdata = b.bodydata + self.delimiters = utils.re_join(delimiters) + # Check table definitions are valid. + for b in self.blocks: + b.validate() + if config.verbose: + if b.check_msg: + message.warning('[%s] table definition: %s' % (b.defname, b.check_msg)) + + +# End of deprecated old table classes. +# --------------------------------------------------------------------------- + +def die(msg: str) -> typing.NoReturn: + message.stderr(msg) + sys.exit(1) + + +# --------------------------------------------------------------------------- +# Application code. +# --------------------------------------------------------------------------- +# Constants +# --------- +USER_DIR = None # ~/.asciidoc +HELP_FILE = 'help.conf' # Default (English) help file. +APPLICATION_CALLER = __name__ + +# Globals +# ------- +document = Document() # The document being processed. +config = Config() # Configuration file reader. +reader = Reader() # Input stream line reader. +writer = Writer() # Output stream line writer. +message = Message(APPLICATION_CALLER, document, config, reader) # Message functions. +paragraphs = Paragraphs() # Paragraph definitions. +lists = Lists() # List definitions. +blocks = DelimitedBlocks() # DelimitedBlock definitions. +tables_OLD = Tables_OLD() # Table_OLD definitions. +tables = Tables() # Table definitions. +macros = Macros() # Macro definitions. +calloutmap = CalloutMap() # Coordinates callouts and callout list. +trace = Trace() # Implements trace attribute processing. + +# Used by asciidocapi.py # +# List of message strings written to stderr. +messages = message.messages + + +def set_caller(name: str) -> None: + global APPLICATION_CALLER + APPLICATION_CALLER = name + message.set_caller(APPLICATION_CALLER) + + +def reset_asciidoc(): + global document, config, reader, writer, message + global paragraphs, lists, blocks, tables_OLD, tables + global macros, calloutmap, trace + + document = Document() + config = Config() + reader = Reader() + writer = Writer() + message = Message(APPLICATION_CALLER, document, config, reader) + paragraphs = Paragraphs() + lists = Lists() + blocks = DelimitedBlocks() + tables_OLD = Tables_OLD() + tables = Tables() + macros = Macros() + calloutmap = CalloutMap() + trace = Trace() + + Lex.reset_class() + AttributeEntry.reset_class() + Title.reset_class() + BlockTitle.reset_class() + Section.reset_class() + AbstractBlock.reset_class() + + +def asciidoc(backend, doctype, confiles, infile, outfile, options): + """Convert AsciiDoc document to DocBook document of type doctype + The AsciiDoc document is read from file object src the translated + DocBook file written to file object dst.""" + def load_conffiles(include=[], exclude=[]): + # Load conf files specified on the command-line and by the conf-files attribute. + files = document.attributes.get('conf-files', '') + files = [f.strip() for f in files.split('|') if f.strip()] + files += confiles + if files: + for f in files: + if os.path.isfile(f): + config.load_file(f, include=include, exclude=exclude) + else: + raise EAsciiDoc('missing configuration file: %s' % f) + try: + document.attributes['python'] = sys.executable + for f in config.filters: + if not config.find_config_dir('filters', f): + raise EAsciiDoc('missing filter: %s' % f) + if doctype not in (None, 'article', 'manpage', 'book'): + raise EAsciiDoc('illegal document type') + # Set processing options. + for o in options: + if o == '-c': + config.dumping = True + if o == '-s': + config.header_footer = False + if o == '-v': + config.verbose = True + document.update_attributes() + if '-e' not in options: + # Load asciidoc.conf files in two passes: the first for attributes + # the second for everything. This is so that locally set attributes + # available are in the global asciidoc.conf + if not config.load_from_dirs('asciidoc.conf', include=['attributes']): + raise EAsciiDoc('configuration file asciidoc.conf missing') + load_conffiles(include=['attributes']) + config.load_from_dirs('asciidoc.conf') + if infile != '<stdin>': + indir = os.path.dirname(infile) + config.load_file('asciidoc.conf', indir, include=['attributes', 'titles', 'specialchars']) + else: + load_conffiles(include=['attributes', 'titles', 'specialchars']) + document.update_attributes() + # Check the infile exists. + if infile != '<stdin>': + if not os.path.isfile(infile): + raise EAsciiDoc('input file %s missing' % infile) + document.infile = infile + AttributeList.initialize() + # Open input file and parse document header. + reader.tabsize = config.tabsize + reader.open(infile) + has_header = document.parse_header(doctype, backend) + # doctype is now finalized. + document.attributes['doctype-' + document.doctype] = '' + config.set_theme_attributes() + # Load backend configuration files. + if '-e' not in options: + f = document.backend + '.conf' + conffile = config.load_backend() + if not conffile: + raise EAsciiDoc('missing backend conf file: %s' % f) + document.attributes['backend-confdir'] = os.path.dirname(conffile) + # backend is now known. + document.attributes['backend-' + document.backend] = '' + document.attributes[document.backend + '-' + document.doctype] = '' + doc_conffiles = [] + if '-e' not in options: + # Load filters and language file. + config.load_filters() + document.load_lang() + if infile != '<stdin>': + # Load local conf files (files in the source file directory). + config.load_file('asciidoc.conf', indir) + config.load_backend([indir]) + config.load_filters([indir]) + # Load document specific configuration files. + f = os.path.splitext(infile)[0] + doc_conffiles = [ + f for f in (f + '.conf', f + '-' + document.backend + '.conf') + if os.path.isfile(f) + ] + for f in doc_conffiles: + config.load_file(f) + load_conffiles() + # Build asciidoc-args attribute. + args = '' + # Add custom conf file arguments. + for f in doc_conffiles + confiles: + args += ' --conf-file "%s"' % f + # Add command-line and header attributes. + attrs = {} + attrs.update(AttributeEntry.attributes) + attrs.update(config.cmd_attrs) + if 'title' in attrs: # Don't pass the header title. + del attrs['title'] + for k, v in list(attrs.items()): + if v: + args += ' --attribute "%s=%s"' % (k, v) + else: + args += ' --attribute "%s"' % k + document.attributes['asciidoc-args'] = args + # Build outfile name. + if outfile is None: + outfile = os.path.splitext(infile)[0] + '.' + document.backend + if config.outfilesuffix: + # Change file extension. + outfile = os.path.splitext(outfile)[0] + config.outfilesuffix + document.outfile = outfile + # Document header attributes override conf file attributes. + document.attributes.update(AttributeEntry.attributes) + document.update_attributes() + # Set the default embedded icons directory. + if 'data-uri' in document.attributes and not os.path.isdir(document.attributes['iconsdir']): + document.attributes['iconsdir'] = os.path.join(document.attributes['asciidoc-confdir'], 'icons') + # Configuration is fully loaded. + config.expand_all_templates() + # Check configuration for consistency. + config.validate() + # Initialize top level block name. + if document.attributes.get('blockname'): + AbstractBlock.blocknames.append(document.attributes['blockname']) + paragraphs.initialize() + lists.initialize() + if config.dumping: + config.dump() + else: + writer.newline = config.newline + try: + writer.open(outfile, reader.bom) + try: + document.translate(has_header) # Generate the output. + finally: + writer.close() + finally: + reader.closefile() + except BaseException as e: + # Cleanup. + if outfile and outfile != '<stdout>' and os.path.isfile(outfile): + os.unlink(outfile) + if not isinstance(e, Exception): + raise + # Build and print error description. + msg = 'FAILED: ' + if reader.cursor: + msg = message.format('', msg) + if isinstance(e, EAsciiDoc): + message.stderr('%s%s' % (msg, str(e))) + else: + if APPLICATION_CALLER == '__main__': + message.stderr(msg + 'unexpected error:') + message.stderr('-' * 60) + traceback.print_exc(file=sys.stderr) + message.stderr('-' * 60) + else: + message.stderr('%sunexpected error: %s' % (msg, str(e))) + sys.exit(1) + + +def usage(msg=''): + if msg: + message.stderr(msg) + show_help('default', sys.stderr) + + +def show_help(topic, f=None): + """Print help topic to file object f.""" + if f is None: + f = sys.stdout + # Select help file. + lang = config.cmd_attrs.get('lang') + if lang and lang != 'en': + help_file = 'help-' + lang + '.conf' + else: + help_file = HELP_FILE + # Print [topic] section from help file. + config.load_from_dirs(help_file) + if len(config.sections) == 0: + # Default to English if specified language help files not found. + help_file = HELP_FILE + config.load_from_dirs(help_file) + if len(config.sections) == 0: + message.stderr('no help topics found') + sys.exit(1) + n = 0 + for k in config.sections: + if re.match(re.escape(topic), k): + n += 1 + lines = config.sections[k] + if n == 0: + if topic != 'topics': + message.stderr('help topic not found: [%s] in %s' % (topic, help_file)) + message.stderr('available help topics: %s' % ', '.join(list(config.sections.keys()))) + sys.exit(1) + elif n > 1: + message.stderr('ambiguous help topic: %s' % topic) + else: + for line in lines: + print(line, file=f) + + +# Used by asciidocapi.py # +def execute(cmd, opts, args): + """ + Execute asciidoc with command-line options and arguments. + cmd is asciidoc command or asciidoc.py path. + opts and args conform to values returned by getopt.getopt(). + Raises SystemExit if an error occurs. + + Doctests: + + 1. Check execution: + + >>> infile = io.StringIO('Hello *{author}*') + >>> outfile = io.StringIO() + >>> opts = [] + >>> opts.append(('--backend','html4')) + >>> opts.append(('--no-header-footer',None)) + >>> opts.append(('--attribute','author=Joe Bloggs')) + >>> opts.append(('--out-file',outfile)) + >>> execute(__file__, opts, [infile]) + >>> print(outfile.getvalue()) + <p>Hello <strong>Joe Bloggs</strong></p> + + >>> + + """ + reset_asciidoc() + config.init() + if len(args) > 1: + usage('Too many arguments') + sys.exit(1) + backend = None + doctype = None + confiles = [] + outfile = None + options = [] + help_option = False + for o, v in opts: + if o in ('--help', '-h'): + help_option = True + # DEPRECATED: --unsafe option. + if o == '--unsafe': + document.safe = False + if o == '--safe': + document.safe = True + if o == '--version': + print(('asciidoc %s' % VERSION)) + sys.exit(0) + if o in ('-b', '--backend'): + backend = v + if o in ('-c', '--dump-conf'): + options.append('-c') + if o in ('-d', '--doctype'): + doctype = v + if o in ('-e', '--no-conf'): + options.append('-e') + if o in ('-f', '--conf-file'): + confiles.append(v) + if o == '--filter': + config.filters.append(v) + if o in ('-n', '--section-numbers'): + o = '-a' + v = 'numbered' + if o == '--theme': + o = '-a' + v = 'theme=' + v + if o in ('-a', '--attribute'): + e = parse_entry(v, allow_name_only=True) + if not e: + usage('Illegal -a option: %s' % v) + sys.exit(1) + k, v = e + # A @ suffix denotes don't override existing document attributes. + if v and v[-1] == '@': + document.attributes[k] = v[:-1] + else: + config.cmd_attrs[k] = v + if o in ('-o', '--out-file'): + outfile = v + if o in ('-s', '--no-header-footer'): + options.append('-s') + if o in ('-v', '--verbose'): + options.append('-v') + if help_option: + if len(args) == 0: + show_help('default') + else: + show_help(args[-1]) + sys.exit(0) + if len(args) == 0 and len(opts) == 0: + usage() + sys.exit(0) + if len(args) == 0: + usage('No source file specified') + sys.exit(1) + stdin, stdout = sys.stdin, sys.stdout + try: + infile = args[0] + if infile == '-': + infile = '<stdin>' + elif isinstance(infile, str): + infile = os.path.abspath(infile) + else: # Input file is file object from API call. + sys.stdin = infile + infile = '<stdin>' + if outfile == '-': + outfile = '<stdout>' + elif isinstance(outfile, str): + outfile = os.path.abspath(outfile) + elif outfile is None: + if infile == '<stdin>': + outfile = '<stdout>' + else: # Output file is file object from API call. + sys.stdout = outfile + outfile = '<stdout>' + # Do the work. + asciidoc(backend, doctype, confiles, infile, outfile, options) + if document.has_errors: + sys.exit(1) + finally: + sys.stdin, sys.stdout = stdin, stdout + + +def cli(argv=None): + if argv is None: + argv = sys.argv + # Process command line options. + try: + # DEPRECATED: --unsafe option. + opts, args = getopt.getopt(argv[1:], 'a:b:cd:ef:hno:svw:', + ['attribute=', 'backend=', 'conf-file=', 'doctype=', 'dump-conf', + 'help', 'no-conf', 'no-header-footer', 'out-file=', + 'section-numbers', 'verbose', 'version', 'safe', 'unsafe', + 'doctest', 'filter=', 'theme=']) + except getopt.GetoptError: + message.stderr('illegal command options') + sys.exit(1) + opt_names = [opt[0] for opt in opts] + if '--doctest' in opt_names: + # Run module doctests. + import doctest + options = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS + failures, tries = doctest.testmod(optionflags=options) + if failures == 0: + message.stderr('All doctests passed') + sys.exit(0) + else: + sys.exit(1) + # Look for plugin management commands. + count = 0 + plugin_type = '' + for o, v in opts: + if o in ('-b', '--backend', '--filter', '--theme'): + if o == '-b': + o = '--backend' + plugin_type = o[2:] + cmd = v + if cmd not in Plugin.CMDS: + continue + count += 1 + if count > 1: + die('--backend, --filter and --theme options are mutually exclusive') + if count == 1: + # Execute plugin management commands. + if not cmd: + die('missing --%s command' % plugin_type) + if cmd not in Plugin.CMDS: + die('illegal --%s command: %s' % (plugin_type, cmd)) + config.init() + config.verbose = bool(set(['-v', '--verbose']) & set(opt_names)) + plugin = Plugin(plugin_type, message, config) + getattr(plugin, cmd)(args) + else: + # Execute asciidoc. + try: + execute(argv[0], opts, args) + except KeyboardInterrupt: + sys.exit(1) + + +if __name__ == "__main__": + cli() diff -Nru asciidoc-8.6.10/asciidoc/blocks/table.py asciidoc-10.1.2/asciidoc/blocks/table.py --- asciidoc-8.6.10/asciidoc/blocks/table.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/blocks/table.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,75 @@ +import copy +import re +from typing import Optional, Tuple + +ALIGN = {'<': 'left', '>': 'right', '^': 'center'} +VALIGN = {'<': 'top', '>': 'bottom', '^': 'middle'} + + +def parse_align_spec(align_spec: Optional[str]) -> Tuple[Optional[str], Optional[str]]: + """ + Parse AsciiDoc cell alignment specifier and return 2-tuple with + horizontal and vertical alignment names. Unspecified alignments + set to None. + """ + result = (None, None) + if align_spec: + mo = re.match(r'^([<\^>])?(\.([<\^>]))?$', align_spec) + if mo: + result = ( + ALIGN.get(mo.group(1)), + VALIGN.get(mo.group(3)), + ) + return result + + +# TODO: remove _table_ from name once Table class has been moved into this file +def parse_table_span_spec(span_spec: Optional[str]) -> Tuple[int, int]: + """ + Parse AsciiDoc cell span specifier and return 2-tuple with horizontal + and vertical span counts. Set default values (1,1) if not + specified. + """ + result = (None, None) + if span_spec: + mo = re.match(r'^(\d+)?(\.(\d+))?$', span_spec) + if mo: + result = ( + mo.group(1) and int(mo.group(1)), + mo.group(3) and int(mo.group(3)), + ) + return (result[0] or 1, result[1] or 1) + + +class Column: + """Table column.""" + def __init__(self, width=None, align_spec=None, style=None): + self.width = width or '1' + self.halign, self.valign = parse_align_spec(align_spec) + self.style = style # Style name or None. + # Calculated attribute values. + self.abswidth = None # 1.. (page units). + self.pcwidth = None # 1..99 (percentage). + + +class Cell: + def __init__(self, data, span_spec=None, align_spec=None, style=None): + self.data = data + self.span, self.vspan = parse_table_span_spec(span_spec) + self.halign, self.valign = parse_align_spec(align_spec) + self.style = style + self.reserved = False + + def __repr__(self): + return '<Cell: %d.%d %s.%s %s "%s">' % ( + self.span, self.vspan, + self.halign, self.valign, + self.style or '', + self.data) + + def clone_reserve(self): + """Return a clone of self to reserve vertically spanned cell.""" + result = copy.copy(self) + result.vspan = 1 + result.reserved = True + return result diff -Nru asciidoc-8.6.10/asciidoc/collections.py asciidoc-10.1.2/asciidoc/collections.py --- asciidoc-8.6.10/asciidoc/collections.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/collections.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,69 @@ +class AttrDict(dict): + """ + Like a dictionary except values can be accessed as attributes i.e. obj.foo + can be used in addition to obj['foo']. + If an item is not present None is returned. + """ + def __getattr__(self, key): + try: + return self[key] + except KeyError: + return None + + def __setattr__(self, key, value): + self[key] = value + + def __delattr__(self, key): + try: + del self[key] + except KeyError as k: + raise AttributeError(k) + + def __repr__(self): + return '<AttrDict ' + dict.__repr__(self) + '>' + + def __getstate__(self): + return dict(self) + + def __setstate__(self, value): + for k, v in value.items(): + self[k] = v + + +class DefaultAttrDict(AttrDict): + def __getattr__(self, key): + try: + return self[key] + except KeyError as k: + if '_default' in self: + return self['_default'] + else: + raise AttributeError from k + + +class InsensitiveDict(dict): + """ + Like a dictionary except key access is case insensitive. + Keys are stored in lower case. + """ + def __getitem__(self, key): + return dict.__getitem__(self, key.lower()) + + def __setitem__(self, key, value): + dict.__setitem__(self, key.lower(), value) + + def __delitem__(self, key): + dict.__delitem__(self, key.lower()) + + def get(self, key, default=None): + return dict.get(self, key.lower(), default) + + def update(self, dict): + for k, v in dict.items(): + self[k] = v + + def setdefault(self, key, default=None): + return dict.setdefault(self, key.lower(), default) + + def __contains__(self, key): + return key.lower() in dict(self) diff -Nru asciidoc-8.6.10/asciidoc/exceptions.py asciidoc-10.1.2/asciidoc/exceptions.py --- asciidoc-8.6.10/asciidoc/exceptions.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/exceptions.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,8 @@ +class EAsciiDoc(Exception): + """Exceptions raised by the main asciidoc process""" + pass + + +class AsciiDocError(Exception): + """Exceptions raised by the asciidoc API""" + pass diff -Nru asciidoc-8.6.10/asciidoc/__init__.py asciidoc-10.1.2/asciidoc/__init__.py --- asciidoc-8.6.10/asciidoc/__init__.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/__init__.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,13 @@ +"""asciidoc module""" + +import sys +from .__metadata__ import VERSION, __version__ + +__all__ = ['VERSION', '__version__'] + +# If running as a script, we avoid these imports to avoid a circular +# RuntimeWarning, which is fine as we don't use them in that case. +if "-m" not in sys.argv: + from .api import AsciiDocAPI + from .asciidoc import execute, cli + __all__ += ['AsciiDocAPI', 'execute', 'cli'] diff -Nru asciidoc-8.6.10/asciidoc/__main__.py asciidoc-10.1.2/asciidoc/__main__.py --- asciidoc-8.6.10/asciidoc/__main__.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/__main__.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,7 @@ +try: + from .asciidoc import cli, set_caller +except ImportError: + raise SystemExit('ERROR: You must execute as a module using the -m flag') + +set_caller(__name__) +cli() diff -Nru asciidoc-8.6.10/asciidoc/message.py asciidoc-10.1.2/asciidoc/message.py --- asciidoc-8.6.10/asciidoc/message.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/message.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,77 @@ +import os +import sys + +from .exceptions import EAsciiDoc + + +class Message: + """ + Message functions. + """ + PROG = 'asciidoc' + + def __init__(self, application_caller, document, config, reader): + # Set to True or False to globally override line numbers method + # argument. Has no effect when set to None. + self.linenos = None + self.messages = [] + self.prev_msg = '' + self.application_caller = application_caller + self.document = document + self.config = config + self.reader = reader + + def set_caller(self, application_caller): + self.application_caller = application_caller + + @staticmethod + def stdout(msg): + print(msg) + + def stderr(self, msg=''): + if msg == self.prev_msg: # Suppress repeated messages. + return + self.messages.append(msg) + if self.application_caller == '__main__': + sys.stderr.write('%s: %s%s' % (Message.PROG, msg, os.linesep)) + self.prev_msg = msg + + def verbose(self, msg, linenos=True): + if self.config.verbose: + msg = self.format(msg, linenos=linenos) + self.stderr(msg) + + def warning(self, msg, linenos=True, offset=0): + msg = self.format(msg, 'WARNING: ', linenos, offset=offset) + self.document.has_warnings = True + self.stderr(msg) + + def deprecated(self, msg, linenos=True): + msg = self.format(msg, 'DEPRECATED: ', linenos) + self.stderr(msg) + + def format(self, msg, prefix='', linenos=True, cursor=None, offset=0): + """Return formatted message string.""" + if self.linenos is not False and \ + ((linenos or self.linenos) and self.reader.cursor): + if cursor is None: + cursor = self.reader.cursor + prefix += '%s: line %d: ' % (os.path.basename(cursor[0]), cursor[1]+offset) + return prefix + msg + + def error(self, msg, cursor=None, halt=False): + """ + Report fatal error. + If halt=True raise EAsciiDoc exception. + If halt=False don't exit application, continue in the hope of reporting + all fatal errors finishing with a non-zero exit code. + """ + if halt: + raise EAsciiDoc(self.format(msg, linenos=False, cursor=cursor)) + else: + msg = self.format(msg, 'ERROR: ', cursor=cursor) + self.stderr(msg) + self.document.has_errors = True + + def unsafe(self, msg): + self.error('unsafe: '+msg) diff -Nru asciidoc-8.6.10/asciidoc/__metadata__.py asciidoc-10.1.2/asciidoc/__metadata__.py --- asciidoc-8.6.10/asciidoc/__metadata__.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/__metadata__.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,5 @@ +"""Module containing metadata about asciidoc.""" + +VERSION = (10, 1, 2) + +__version__ = '.'.join(map(str, VERSION)) diff -Nru asciidoc-8.6.10/asciidoc/plugin.py asciidoc-10.1.2/asciidoc/plugin.py --- asciidoc-8.6.10/asciidoc/plugin.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/plugin.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,215 @@ +import os +import re +import shutil +import sys +from typing import NoReturn +import zipfile + +from .utils import userdir + + +class Plugin: + """ + --filter and --theme option commands. + """ + CMDS = ('install', 'remove', 'list', 'build') + + def __init__(self, type: str, message, config): + self.type = type + self.message = message + self.config = config + + def die(self, msg: str) -> NoReturn: + self.message.stderr(msg) + sys.exit(1) + + def get_dir(self) -> str: + """ + Return plugins path (.asciidoc/filters or .asciidoc/themes) in user's + home directory or None if user home not defined. + """ + result = userdir() + if result: + result = os.path.join(result, '.asciidoc', self.type + 's') + return result + + def install(self, args) -> None: + """ + Install plugin Zip file. + args[0] is plugin zip file path. + args[1] is optional destination plugins directory. + """ + if len(args) not in (1, 2): + self.die( + 'invalid number of arguments: --{} install {}'.format( + self.type, + ' '.join(args) + ) + ) + zip_file = args[0] + if not os.path.isfile(zip_file): + self.die('file not found: %s' % zip_file) + reo = re.match(r'^\w+', os.path.split(zip_file)[1]) + if not reo: + self.die('file name does not start with legal {} name: {}'.format( + self.type, + zip_file + )) + plugin_name = reo.group() + if len(args) == 2: + plugins_dir = args[1] + if not os.path.isdir(plugins_dir): + self.die('directory not found: %s' % plugins_dir) + else: + plugins_dir = Plugin.get_dir() + if not plugins_dir: + self.die('user home directory is not defined') + plugin_dir = os.path.join(plugins_dir, plugin_name) + if os.path.exists(plugin_dir): + self.die('%s is already installed: %s' % (self.type, plugin_dir)) + try: + os.makedirs(plugin_dir) + except Exception as e: + self.die('failed to create %s directory: %s' % (self.type, str(e))) + try: + self.extract_zip(zip_file, plugin_dir) + except Exception as e: + if os.path.isdir(plugin_dir): + shutil.rmtree(plugin_dir) + self.die('failed to extract %s: %s' % (self.type, str(e))) + + def remove(self, args) -> None: + """ + Delete plugin directory. + args[0] is plugin name. + args[1] is optional plugin directory (defaults to ~/.asciidoc/<plugin_name>). + """ + if len(args) not in (1, 2): + self.die('invalid number of arguments: --{} remove {}'.format( + self.type, + ' '.join(args) + )) + plugin_name = args[0] + if not re.match(r'^\w+$', plugin_name): + self.die('illegal %s name: %s' % (self.type, plugin_name)) + if len(args) == 2: + d = args[1] + if not os.path.isdir(d): + self.die('directory not found: %s' % d) + else: + d = Plugin.get_dir() + if not d: + self.die('user directory is not defined') + plugin_dir = os.path.join(d, plugin_name) + if not os.path.isdir(plugin_dir): + self.die('cannot find %s: %s' % (self.type, plugin_dir)) + try: + self.message.verbose('removing: %s' % plugin_dir) + shutil.rmtree(plugin_dir) + except Exception as e: + self.die('failed to delete %s: %s' % (self.type, str(e))) + + def list(self, _) -> None: + """ + List all plugin directories (global and local). + """ + dirs = [os.path.join(d, self.type + 's') for d in self.config.get_load_dirs()] + for d in dirs: + if os.path.isdir(d): + plugin_dirs = [os.path.join(d, o) for o in os.listdir(d)] + for f in sorted(filter(os.path.isdir, plugin_dirs)): + if f.endswith('__pycache__'): + continue + self.message.stdout(f) + + def build(self, args) -> None: + """ + Create plugin Zip file. + args[0] is Zip file name. + args[1] is plugin directory. + """ + if len(args) != 2: + self.die('invalid number of arguments: --{} build {}'.format( + self.type, + ' '.join(args) + )) + zip_file = args[0] + plugin_source = args[1] + if not (os.path.isdir(plugin_source) or os.path.isfile(plugin_source)): + self.die('plugin source not found: %s' % plugin_source) + try: + self.create_zip(zip_file, plugin_source, skip_hidden=True) + except Exception as e: + self.die('failed to create %s: %s' % (zip_file, str(e))) + + def extract_zip(self, zip_file: str, destdir: str) -> None: + """ + Unzip Zip file to destination directory. + Throws exception if error occurs. + """ + zipo = zipfile.ZipFile(zip_file, 'r') + try: + for zi in zipo.infolist(): + outfile = zi.filename + if not outfile.endswith('/'): + d, outfile = os.path.split(outfile) + directory = os.path.normpath(os.path.join(destdir, d)) + if not os.path.isdir(directory): + os.makedirs(directory) + outfile = os.path.join(directory, outfile) + perms = (zi.external_attr >> 16) & 0o777 + self.message.verbose('extracting: %s' % outfile) + flags = os.O_CREAT | os.O_WRONLY + if sys.platform == 'win32': + flags |= os.O_BINARY + if perms == 0: + # Zip files created under Windows do not include permissions. + fh = os.open(outfile, flags) + else: + fh = os.open(outfile, flags, perms) + try: + os.write(fh, zipo.read(zi.filename)) + finally: + os.close(fh) + finally: + zipo.close() + + def create_zip(self, zip_file: str, src: str, skip_hidden: bool = False) -> None: + """ + Create Zip file. If src is a directory archive all contained files and + subdirectories, if src is a file archive the src file. + Files and directories names starting with . are skipped + if skip_hidden is True. + Throws exception if error occurs. + """ + zipo = zipfile.ZipFile(zip_file, 'w') + try: + if os.path.isfile(src): + arcname = os.path.basename(src) + self.message.verbose('archiving: %s' % arcname) + zipo.write(src, arcname, zipfile.ZIP_DEFLATED) + elif os.path.isdir(src): + srcdir = os.path.abspath(src) + if srcdir[-1] != os.path.sep: + srcdir += os.path.sep + for root, dirs, files in os.walk(srcdir): + arcroot = os.path.abspath(root)[len(srcdir):] + if skip_hidden: + for d in dirs[:]: + if d.startswith('.'): + self.message.verbose( + 'skipping: %s' % os.path.join(arcroot, d) + ) + del dirs[dirs.index(d)] + for f in files: + filename = os.path.join(root, f) + arcname = os.path.join(arcroot, f) + if skip_hidden and f.startswith('.'): + self.message.verbose('skipping: %s' % arcname) + continue + self.message.verbose('archiving: %s' % arcname) + zipo.write(filename, arcname, zipfile.ZIP_DEFLATED) + else: + raise ValueError('src must specify directory or file: %s' % src) + finally: + zipo.close() diff -Nru asciidoc-8.6.10/asciidoc/resources/asciidoc.conf asciidoc-10.1.2/asciidoc/resources/asciidoc.conf --- asciidoc-8.6.10/asciidoc/resources/asciidoc.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/asciidoc.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,648 @@ +# +# asciidoc.conf +# +# Asciidoc global configuration file. +# Contains backend independent configuration settings that are applied to all +# AsciiDoc documents. +# + +[miscellaneous] +tabsize=8 +textwidth=70 +newline=\r\n + +[attributes] +backend-alias-html=xhtml11 +backend-alias-docbook=docbook45 +toclevels=2 +toc-placement=auto +sectids= +iconsdir=./images/icons +encoding=UTF-8 +# Uncomment to use xhtml11 quirks mode CSS. +#quirks= +# HTML source code highlighter (source-highlight, pygments or highlight). +source-highlighter=source-highlight +# Uncomment to use deprecated quote attributes. +#deprecated-quotes= +empty= +sp=" " +# Attribute and AttributeList element patterns. +attributeentry-pattern=^:(?P<attrname>\w[^.]*?)(\.(?P<attrname2>.*?))?:(\s+(?P<attrvalue>.*))?$ +attributelist-pattern=(^\[\[(?P<id>[\w_:][\w_:.-]*)(,(?P<reftext>.*?))?\]\]$)|(^\[(?P<attrlist>.*)\]$) +# Substitution attributes for escaping AsciiDoc processing. +amp=& +lt=< +gt=> +brvbar=| +nbsp=  +zwsp=​ +wj=⁠ +deg=° +backslash=\ +two-colons=:: +two-semicolons=;; +plus=+ +# DEPRECATED: underscore attribute names. +two_colons=:: +two_semicolons=;; +# Left and right single and double quote characters. +# See http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks +lsquo=‘ +rsquo=’ +ldquo=“ +rdquo=” + +[titles] +subs=specialcharacters,quotes,replacements,macros,attributes,replacements2 +# Double-line title pattern and underlines. +sectiontitle=^(?P<title>.*?)$ +underlines="==","--","~~","^^","++" +# Single-line title patterns. +sect0=^= +(?P<title>[\S].*?)( +=)?$ +sect1=^== +(?P<title>[\S].*?)( +==)?$ +sect2=^=== +(?P<title>[\S].*?)( +===)?$ +sect3=^==== +(?P<title>[\S].*?)( +====)?$ +sect4=^===== +(?P<title>[\S].*?)( +=====)?$ +blocktitle=^\.(?P<title>([^.\s].*)|(\.[^.\s].*))$ + +[specialcharacters] +&=& +<=< +>=> + +[quotes] +# The order is important, quotes are processed in conf file order. +**=#strong +*=strong +``|''=doublequoted +'=emphasis +`|'=singlequoted +ifdef::no-inline-literal[] +`=monospaced +endif::no-inline-literal[] +# +++ and $$ quoting is applied to the +++ and $$ inline passthrough +# macros to allow quoted attributes to be used. +# This trick only works with inline passthrough macros. ++++=#unquoted +$$=#unquoted +++=#monospaced ++=monospaced +__=#emphasis +_=emphasis +\##=#unquoted +\#=unquoted +^=#superscript +~=#subscript + +[specialwords] +emphasizedwords= +strongwords= +monospacedwords= + +[replacements] +# Replacements performed in order of configuration file entry. The first entry +# of each replacement pair performs the (non-escaped) replacement, the second +# strips the backslash from the escaped replacement. + +# (C) Copyright (entity reference ©) +(?<!\\)\(C\)=© +\\\(C\)=(C) + +# (R) registered trade mark (entity reference ® +(?<!\\)\(R\)=® +\\\(R\)=(R) + +# (TM) Trademark (entity reference ™) +(?<!\\)\(TM\)=™ +\\\(TM\)=(TM) + +# -- Spaced and unspaced em dashes (entity reference —). +# Space on both sides is translated to thin space characters. +(^-- )=—  +(\n-- )|( -- )|( --\n)= —  +(\w)--(\w)=\1—\2 +\\--(?!-)=-- + +# Replace vertical typewriter apostrophe with punctuation apostrophe. +(\w)'(\w)=\1’\2 +(\w)\\'(\w)=\1'\2 + +# ... Ellipsis (entity reference …) +(?<!\\)\.\.\.=… +\\\.\.\.=... + +# Arrows from the Arrows block of Unicode. +# -> right arrow +(?<!\\)->=→ +\\->=-> +# => right double arrow +(?<!\\)\=>=⇒ +\\\=>==> +# <- left arrow +(?<!\\)<-=← +\\<-=<- +# <= left double arrow +(?<!\\)<\==⇐ +\\<\==<= + +# Arbitrary entity references. +(?<!\\)&([:_#a-zA-Z][:_.\-\w]*?;)=&\1 +\\(&[:_#a-zA-Z][:_.\-\w]*?;)=\1 + +#----------- +# Paragraphs +#----------- +[paradef-default] +delimiter=(?s)(?P<text>\S.*) +posattrs=style +style=normal +template::[paragraph-styles] + +[paradef-literal] +delimiter=(?s)(?P<text>\s+.*) +options=listelement +posattrs=style +style=literal +template::[paragraph-styles] + +[paradef-admonition] +delimiter=(?s)^\s*(?P<style>NOTE|TIP|IMPORTANT|WARNING|CAUTION):\s+(?P<text>.+) +template::[paragraph-styles] + +[paragraph-styles] +normal-style=template="paragraph" +comment-style=template="paragraph",options=('skip',) +verse-style=template="verseparagraph",posattrs=("style","attribution","citetitle") +quote-style=template="quoteparagraph",posattrs=("style","attribution","citetitle") +literal-style=template="literalparagraph",subs=("verbatim",) +listing-style=template="listingparagraph",subs=("verbatim",) +example-style=template="exampleparagraph" +sidebar-style=template="sidebarparagraph" +abstract-style=template="abstractparagraph" +partintro-style=template="partintroparagraph" +NOTE-style=template="admonitionparagraph",name="note",caption="{note-caption}" +TIP-style=template="admonitionparagraph",name="tip",caption="{tip-caption}" +IMPORTANT-style=template="admonitionparagraph",name="important",caption="{important-caption}" +WARNING-style=template="admonitionparagraph",name="warning",caption="{warning-caption}" +CAUTION-style=template="admonitionparagraph",name="caution",caption="{caution-caption}" + +[literalparagraph] +template::[literalblock] + +[verseparagraph] +template::[verseblock] + +[quoteparagraph] +template::[quoteblock] + +[listingparagraph] +template::[listingblock] + +[exampleparagraph] +template::[exampleblock] + +[sidebarparagraph] +template::[sidebarblock] + +[abstractparagraph] +template::[abstractblock] + +[partintroparagraph] +template::[partintroblock] + + +[macros] +#-------------- +# Inline macros +#-------------- +# Backslash prefix required for escape processing. +# (?s) re flag for line spanning. + +# Macros using default syntax. +(?s)(?<!\w)[\\]?(?P<name>http|https|ftp|file|irc|mailto|callto|image|link|anchor|xref|indexterm|indexterm2):(?P<target>\S*?)\[(?P<attrlist>.*?)(?<!\\)\]= + +# These URL types don't require any special attribute list formatting. +(?s)(?<!\S)[\\]?(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])= +# Allow a leading parenthesis and square bracket. +(?s)(?<\=[([])[\\]?(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])= +# Allow <> brackets. +(?s)[\\]?<(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])>= + +# Email addresses don't require special attribute list formatting. +# The before ">: and after "< character exclusions stop multiple substitution. +(?s)(?<![">:\w._/-])[\\]?(?P<target>\w[\w._-]*@[\w._-]*\w)(?!["<\w_-])=mailto + +# Allow footnote macros hard up against the preceding word so the footnote mark +# can be placed against the noted text without an intervening space +# (http://groups.google.com/group/asciidoc/browse_frm/thread/e1dcb7ee0efc17b5). +(?s)[\\]?(?P<name>footnote|footnoteref):(?P<target>\S*?)\[(?P<attrlist>.*?)(?<!\\)\]= + +# Anchor: [[[id]]]. Bibliographic anchor. +(?s)[\\]?\[\[\[(?P<attrlist>[\w_:][\w_:.-]*?)\]\]\]=anchor3 +# Anchor: [[id,xreflabel]] +(?s)[\\]?\[\[(?P<attrlist>[\w"_:].*?)\]\]=anchor2 +# Link: <<id,text>> +(?s)[\\]?<<(?P<attrlist>[\w"_:].*?)>>=xref2 + +ifdef::asciidoc7compatible[] +# Index term: ++primary,secondary,tertiary++ +(?s)(?<!\S)[\\]?\+\+(?P<attrlist>[^+].*?)\+\+(?!\+)=indexterm +# Index term: +primary+ +# Follows ++...++ macro otherwise it will match them. +(?<!\S)[\\]?\+(?P<attrlist>[^\s\+][^+].*?)\+(?!\+)=indexterm2 +endif::asciidoc7compatible[] + +ifndef::asciidoc7compatible[] +# Index term: (((primary,secondary,tertiary))) +(?s)(?<!\()[\\]?\(\(\((?P<attrlist>[^(].*?)\)\)\)(?!\))=indexterm +# Index term: ((primary)) +# Follows (((...))) macro otherwise it will match them. +(?<!\()[\\]?\(\((?P<attrlist>[^\s\(].*?)\)\)(?!\))=indexterm2 +endif::asciidoc7compatible[] + +# Callout +[\\]?<(?P<index>\d+)>=callout + +# Passthrough macros. +(?s)[\\]?(?P<name>pass):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[] + +# Triple-plus and double-dollar inline passthroughs. +(?s)[\\]?\+\+\+(?P<passtext>.*?)\+\+\+=pass[] +(?s)[\\]?\$\$(?P<passtext>.*?)\$\$=pass[specialcharacters] + +# Inline literal. +ifndef::no-inline-literal[] +(?s)(?<![`\w])([\\]?`(?P<passtext>[^`\s]|[^`\s].*?\S)`)(?![`\w])=literal[specialcharacters] +endif::no-inline-literal[] + +# Inline comment. +(?m)^[\\]?//(?P<passtext>[^/].*|)$=comment[specialcharacters] + +# Default (catchall) inline macro is not implemented so there is no ambiguity +# with previous definition that could result in double substitution of escaped +# references. +#(?s)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)\[(?P<passtext>.*?)(?<!\\)\]= + +#------------- +# Block macros +#------------- +# Macros using default syntax. +^(?P<name>image|unfloat|toc)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=# + +# Passthrough macros. +^(?P<name>pass)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=# + +^'{3,}$=#ruler +^<{3,}$=#pagebreak +^//(?P<passtext>[^/].*|)$=#comment[specialcharacters] + +# Implemented in HTML backends. +[unfloat-blockmacro] +[toc-blockmacro] + +#----------------- +# Delimited blocks +#----------------- +[blockdef-comment] +delimiter=^/{4,}$ +options=skip +posattrs=style + +[blockdef-sidebar] +delimiter=^\*{4,}$ +template=sidebarblock +options=sectionbody +posattrs=style +# DEPRECATED: Use Openblock instead. +abstract-style=template="abstractblock" + +[blockdef-open] +# A block without opening or closing tags. +delimiter=^--$ +posattrs=style +style=default +default-style=template="openblock",options=("sectionbody",) +comment-style=template="openblock",options=("skip",) +abstract-style=template="abstractblock",options=("sectionbody",) +partintro-style=template="partintroblock",options=("sectionbody",) +example-style=template="exampleblock",options=("sectionbody",) +sidebar-style=template="sidebarblock",options=("sectionbody",) +verse-style=template="verseblock",posattrs=("style","attribution","citetitle") +quote-style=template="quoteblock",posattrs=("style","attribution","citetitle"),options=("sectionbody",) +literal-style=template="literalparagraph",subs=("verbatim",) +listing-style=template="listingparagraph",subs=("verbatim",) +NOTE-style=template="admonitionblock",name="note",caption="{note-caption}",options=("sectionbody",) +TIP-style=template="admonitionblock",name="tip",caption="{tip-caption}",options=("sectionbody",) +IMPORTANT-style=template="admonitionblock",name="important",caption="{important-caption}",options=("sectionbody",) +WARNING-style=template="admonitionblock",name="warning",caption="{warning-caption}",options=("sectionbody",) +CAUTION-style=template="admonitionblock",name="caution",caption="{caution-caption}",options=("sectionbody",) + +[blockdef-pass] +delimiter=^\+{4,}$ +template=passblock +# Default subs chosen for backward compatibility. +subs=attributes,macros +posattrs=style +pass-style=template="passblock",subs=() + +[blockdef-listing] +delimiter=^-{4,}$ +template=listingblock +subs=verbatim +posattrs=style + +[blockdef-literal] +delimiter=^\.{4,}$ +template=literalblock +subs=verbatim +posattrs=style +listing-style=template="listingblock" +# DEPRECATED: Use verse style on quote blocks instead. +verse-style=template="verseblock",subs="normal" + +[blockdef-quote] +delimiter=^_{4,}$ +subs=normal +style=quote +posattrs=style,attribution,citetitle +quote-style=template="quoteblock",options=("sectionbody",) +verse-style=template="verseblock" + +[blockdef-example] +delimiter=^={4,}$ +template=exampleblock +options=sectionbody +posattrs=style +NOTE-style=template="admonitionblock",name="note",caption="{note-caption}" +TIP-style=template="admonitionblock",name="tip",caption="{tip-caption}" +IMPORTANT-style=template="admonitionblock",name="important",caption="{important-caption}" +WARNING-style=template="admonitionblock",name="warning",caption="{warning-caption}" +CAUTION-style=template="admonitionblock",name="caution",caption="{caution-caption}" + +# For use by custom filters. +# DEPRECATED: No longer used, a styled listing block (blockdef-listing) is preferable. +[blockdef-filter] +delimiter=^~{4,}$ +template=listingblock +subs=none +posattrs=style + +#------- +# Lists +#------- +[listdef-bulleted] +# - bullets. +delimiter=^\s*- +(?P<text>.+)$ +posattrs=style +type=bulleted +tags=bulleted +callout-style=tags="callout" +bibliography-style=tags="bibliography" + +[listdef-bulleted1] +# * bullets. +template::[listdef-bulleted] +delimiter=^\s*\* +(?P<text>.+)$ + +[listdef-bulleted2] +# ** bullets. +template::[listdef-bulleted] +delimiter=^\s*\*{2} +(?P<text>.+)$ + +[listdef-bulleted3] +# *** bullets. +template::[listdef-bulleted] +delimiter=^\s*\*{3} +(?P<text>.+)$ + +[listdef-bulleted4] +# **** bullets. +template::[listdef-bulleted] +delimiter=^\s*\*{4} +(?P<text>.+)$ + +[listdef-bulleted5] +# ***** bullets. +template::[listdef-bulleted] +delimiter=^\s*\*{5} +(?P<text>.+)$ + +[listdef-arabic] +# Arabic numbering. +delimiter=^\s*(?P<index>\d+\.) +(?P<text>.+)$ +posattrs=style +type=numbered +tags=numbered +style=arabic + +[listdef-loweralpha] +# Lower alpha numbering. +template::[listdef-arabic] +delimiter=^\s*(?P<index>[a-z]\.) +(?P<text>.+)$ +style=loweralpha + +[listdef-upperalpha] +# Upper alpha numbering. +template::[listdef-arabic] +delimiter=^\s*(?P<index>[A-Z]\.) +(?P<text>.+)$ +style=upperalpha + +[listdef-lowerroman] +# Lower roman numbering. +template::[listdef-arabic] +delimiter=^\s*(?P<index>[ivx]+\)) +(?P<text>.+)$ +style=lowerroman + +[listdef-upperroman] +# Upper roman numbering. +template::[listdef-arabic] +delimiter=^\s*(?P<index>[IVX]+\)) +(?P<text>.+)$ +style=upperroman + +[listdef-numbered1] +# . numbering. +template::[listdef-arabic] +delimiter=^\s*\. +(?P<text>.+)$ + +[listdef-numbered2] +# .. numbering. +template::[listdef-loweralpha] +delimiter=^\s*\.{2} +(?P<text>.+)$ + +[listdef-numbered3] +# ... numbering. +template::[listdef-lowerroman] +delimiter=^\s*\.{3} +(?P<text>.+)$ + +[listdef-numbered4] +# .... numbering. +template::[listdef-upperalpha] +delimiter=^\s*\.{4} +(?P<text>.+)$ + +[listdef-numbered5] +# ..... numbering. +template::[listdef-upperroman] +delimiter=^\s*\.{5} +(?P<text>.+)$ + +[listdef-labeled] +# label:: item. +delimiter=^\s*(?P<label>.*[^:])::(\s+(?P<text>.+))?$ +posattrs=style +type=labeled +tags=labeled +vertical-style=tags="labeled" +horizontal-style=tags="horizontal" +glossary-style=tags="glossary" +qanda-style=tags="qanda" + +[listdef-labeled2] +# label;; item. +template::[listdef-labeled] +delimiter=^\s*(?P<label>.*[^;]);;(\s+(?P<text>.+))?$ + +[listdef-labeled3] +# label::: item. +template::[listdef-labeled] +delimiter=^\s*(?P<label>.*[^:]):{3}(\s+(?P<text>.+))?$ + +[listdef-labeled4] +# label:::: item. +template::[listdef-labeled] +delimiter=^\s*(?P<label>.*[^:]):{4}(\s+(?P<text>.+))?$ + +[listdef-callout] +posattrs=style +delimiter=^<?(?P<index>\d*>) +(?P<text>.+)$ +type=callout +tags=callout +style=arabic + +# DEPRECATED: Old list syntax. +[listdef-qanda] +posattrs=style +delimiter=^\s*(?P<label>.*\S)\?\?$ +type=labeled +tags=qanda + +# DEPRECATED: Old list syntax. +[listdef-bibliography] +posattrs=style +delimiter=^\+ +(?P<text>.+)$ +type=bulleted +tags=bibliography + +# DEPRECATED: Old list syntax. +[listdef-glossary] +delimiter=^(?P<label>.*\S):-$ +posattrs=style +type=labeled +tags=glossary + +#------- +# Tables +#------- +[tabledef-default] +delimiter=^\|={3,}$ +posattrs=style +template=table +default-style=tags="default" +verse-style=tags="verse" +literal-style=tags="literal",subs=("specialcharacters",) +emphasis-style=tags="emphasis" +strong-style=tags="strong" +monospaced-style=tags="monospaced" +header-style=tags="header" +asciidoc-style=tags="asciidoc",subs=(),filter='"{python}" -m "{asciidoc-module}" -b {backend} {asciidoc-args}{lang? -a "lang={lang}@"}{icons? -a icons -a "iconsdir={iconsdir}"}{imagesdir? -a "imagesdir={imagesdir}"}{data-uri? -a data-uri} -a "indir={indir}"{trace? -a "trace={trace}"}{blockname? -a "blockname={blockname}"} -s -' + +[tabledef-nested] +# Same as [tabledef-default] but with different delimiter and separator. +delimiter=^!={3,}$ +separator=((?<!\S)((?P<span>[\d.]+)(?P<op>[*+]))?(?P<align>[<\^>.]{,3})?(?P<style>[a-z])?)?! +posattrs=style +template=table +verse-style=tags="verse" +literal-style=tags="literal",subs=("specialcharacters",) +emphasis-style=tags="emphasis" +strong-style=tags="strong" +monospaced-style=tags="monospaced" +header-style=tags="header" +asciidoc-style=tags="asciidoc",subs=(),filter='"{python}" -m "{asciidoc-module}" -b {backend} {asciidoc-args}{lang? -a "lang={lang}@"}{icons? -a icons -a "iconsdir={iconsdir}"}{imagesdir? -a "imagesdir={imagesdir}"}{data-uri? -a data-uri} -a "indir={indir}"{trace? -a "trace={trace}"}{blockname? -a "blockname={blockname}"} -s -' + +#---------------------------------------- +# Common block and macro markup templates +#---------------------------------------- +[comment-inlinemacro] +# Outputs nothing. + +[comment-blockmacro] +# Outputs nothing. + +[pass-blockmacro] +{passtext} + +[pass-inlinemacro] +template::[pass-blockmacro] + +[passblock] +| + +[filter-image-blockmacro] +# Synthesize missing target attribute for filter generated file names. +# The tag split | ensures missing target file names are auto-generated +# before the filter is executed, the remainder (the [image-blockmacro]) +# is executed after the filter to ensure data URI encoding comes after +# the image is created. +{target%}{counter2:target-number} +{target%}{set2:target:{docname}__{target-number}.png} +| +template::[image-blockmacro] + +[+docinfo] +# Blank section to suppress missing template warning. + +#---------------------------------- +# Default special section templates +#---------------------------------- +[abstract] +template::[sect1] + +[colophon] +template::[sect1] + +[dedication] +template::[sect1] + +[preface] +template::[sect1] + +[appendix] +template::[sect1] + +[glossary] +template::[sect1] + +[bibliography] +template::[sect1] + +[index] +template::[sect1] + +[synopsis] +template::[sect1] + +#-------------------------------------------------------------------- +# Deprecated old table definitions. +# + +[old_tabledef-default] +fillchar=- +format=fixed + +[old_tabledef-csv] +fillchar=~ +format=csv + +[old_tabledef-dsv] +fillchar=_ +format=dsv + +# End of deprecated old table definitions. +#-------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/asciidoc/resources/dblatex/asciidoc-dblatex.sty asciidoc-10.1.2/asciidoc/resources/dblatex/asciidoc-dblatex.sty --- asciidoc-8.6.10/asciidoc/resources/dblatex/asciidoc-dblatex.sty 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/dblatex/asciidoc-dblatex.sty 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,22 @@ +%% +%% This style is derived from the docbook one. +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{asciidoc}[2008/06/05 AsciiDoc DocBook Style] +%% Just use the original package and pass the options. +\RequirePackageWithOptions{docbook} + +% Sidebar is a boxed minipage that can contain verbatim. +% Changed shadow box to double box. +\renewenvironment{sidebar}[1][0.95\textwidth]{ + \hspace{0mm}\newline% + \noindent\begin{Sbox}\begin{minipage}{#1}% + \setlength\parskip{\medskipamount}% +}{ + \end{minipage}\end{Sbox}\doublebox{\TheSbox}% +} + +% For DocBook literallayout elements, see `./dblatex/dblatex-readme.txt`. +\usepackage{alltt} +% To preserve simple quotes in the blocks of code +\usepackage{upquote} diff -Nru asciidoc-8.6.10/asciidoc/resources/dblatex/asciidoc-dblatex.xsl asciidoc-10.1.2/asciidoc/resources/dblatex/asciidoc-dblatex.xsl --- asciidoc-8.6.10/asciidoc/resources/dblatex/asciidoc-dblatex.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/dblatex/asciidoc-dblatex.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- +dblatex(1) XSL user stylesheet for asciidoc(1). +See dblatex(1) -p option. +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <!-- TOC links in the titles, and in blue. --> + <xsl:param name="latex.hyperparam">colorlinks,linkcolor=blue,pdfstartview=FitH</xsl:param> + <xsl:param name="doc.publisher.show">1</xsl:param> + <xsl:param name="doc.lot.show"></xsl:param> + <xsl:param name="term.breakline">1</xsl:param> + <xsl:param name="doc.collab.show">0</xsl:param> + <xsl:param name="doc.section.depth">3</xsl:param> + <xsl:param name="table.in.float">0</xsl:param> + <xsl:param name="monoseq.hyphenation">0</xsl:param> + <xsl:param name="latex.output.revhistory">1</xsl:param> + + <!-- This doesn't work, don't know why, see: + http://dblatex.sourceforge.net/html/manual/apas03.html + ./docbook-xsl/common.xsl + --> + <!-- + <xsl:param name="doc.toc.show"> + <xsl:choose> + <xsl:when test="/processing-instruction('asciidoc-toc')"> +1 + </xsl:when> + <xsl:otherwise> +0 + </xsl:otherwise> + </xsl:choose> + </xsl:param> + <xsl:param name="doc.lot.show"> + <xsl:choose> + <xsl:when test="/book"> +figure,table,equation,example + </xsl:when> + </xsl:choose> + </xsl:param> + --> + <xsl:param name="doc.toc.show">1</xsl:param> + + <!-- + Override default literallayout template. + See `./dblatex/dblatex-readme.txt`. + --> + <xsl:template match="address|literallayout[@class!='monospaced']"> + <xsl:text>\begin{alltt}</xsl:text> + <xsl:text> \normalfont{} </xsl:text> + <xsl:apply-templates/> + <xsl:text> \end{alltt}</xsl:text> + </xsl:template> + + <xsl:template match="processing-instruction('asciidoc-pagebreak')"> + <!-- force hard pagebreak, varies from 0(low) to 4(high) --> + <xsl:text>\pagebreak[4] </xsl:text> + <xsl:apply-templates /> + <xsl:text> </xsl:text> + </xsl:template> + + <xsl:template match="processing-instruction('asciidoc-br')"> + <xsl:text>\newline </xsl:text> + </xsl:template> + + <xsl:template match="processing-instruction('asciidoc-hr')"> + <!-- draw a 444 pt line (centered) --> + <xsl:text>\begin{center} </xsl:text> + <xsl:text>\line(1,0){444} </xsl:text> + <xsl:text>\end{center} </xsl:text> + </xsl:template> + +</xsl:stylesheet> + diff -Nru asciidoc-8.6.10/asciidoc/resources/dblatex/dblatex-readme.txt asciidoc-10.1.2/asciidoc/resources/dblatex/dblatex-readme.txt --- asciidoc-8.6.10/asciidoc/resources/dblatex/dblatex-readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/dblatex/dblatex-readme.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,39 @@ +AsciiDoc dblatex README +======================= + +Customization +------------- +The `./dblatex` directory contains: + +`./dblatex/asciidoc-dblatex.xsl`:: Optional dblatex XSL parameter +customization. + +`./dblatex/asciidoc-dblatex.sty`:: Optional customized LaTeX styles. + +Use these files with dblatex(1) `-p` and `-s` options, for example: + + dblatex -p ../dblatex/asciidoc-dblatex.xsl \ + -s ../dblatex/asciidoc-dblatex.sty article.xml + + +Limitations +----------- +Observed in dblatex 0.2.8. + +- dblatex doesn't seem to process the DocBook 'literallayout' element + correctly: it is rendered in a monospaced font and no inline + elements are processed. By default the normal font should be used + and almost all DocBook inline elements should be processed + (https://tdg.docbook.org/tdg/4.5/literallayout.html). I almost + fixed this by overriding the default dblatex literallayout template + (in `./dblatex/asciidoc-dblatex.xsl`) and using the LaTeX 'alltt' + package, but there are remaining problems: + + * Blank lines are replaced by a single space. + * The 'literallayout' element incorrectly wraps text when rendered + inside a table. + +- Callouts do not work inside DocBook 'literallayout' elements which + means callouts are not displayed inside AsciiDoc literal blocks. A + workaround is to change the AsciiDoc literal block to a listing + block. diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook45.conf asciidoc-10.1.2/asciidoc/resources/docbook45.conf --- asciidoc-8.6.10/asciidoc/resources/docbook45.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook45.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,802 @@ +# +# docbook45.conf +# +# Asciidoc DocBook 4.5 configuration file. +# + +[miscellaneous] +outfilesuffix=.xml +# Printable page width and units. +# Used to calculate DocBook CALS tables absolute column and table widths. +pagewidth=425 +pageunits=* + +[attributes] +basebackend=docbook +basebackend-docbook= +basebackend-docbook45= +# For backward compatibility (docbook backend was renamed to docbook45 at 8.6.2) +backend-docbook= +# toc and numbered are set to maintain original default behavior. +toc= +numbered= + +[replacements2] +# Line break markup. Custom processing instruction in fo.xsl. +(?m)^(.*)\s\+$=\1<?asciidoc-br?> + +[replacements] +ifdef::asciidoc7compatible[] +# Superscripts. +\^(.+?)\^=<superscript>\1</superscript> +# Subscripts. +~(.+?)~=<subscript>\1</subscript> +endif::asciidoc7compatible[] + +[ruler-blockmacro] +# Uses custom processing instructions in fo.xsl and asciidoc-dblatex.xsl. +<simpara><?asciidoc-hr?></simpara> + +[pagebreak-blockmacro] +# Uses custom processing instructions in fo.xsl and asciidoc-dblatex.xsl. +<simpara><?asciidoc-pagebreak?></simpara> + +[blockdef-pass] +latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py" + +[macros] +# math macros. +(?s)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?:\$\s*)?(?P<passtext>.*?)(?:\s*\$)?(?<!\\)\]=[] +^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[] + +[latexmath-inlinemacro] +<inlineequation> +<alt><![CDATA[${passtext}$]]></alt> +<inlinemediaobject><textobject><phrase></phrase></textobject></inlinemediaobject> +</inlineequation> + +[latexmath-blockmacro] +<informalequation> +<alt><![CDATA[{backslash}[{passtext}{backslash}]]]></alt> +<mediaobject><textobject><phrase></phrase></textobject></mediaobject> +</informalequation> + +[latexmathblock] +<equation{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}><title>{title} +{title%} + + +{title#} +{title%} + +[image-inlinemacro] + + + + + {alt={target}} + + +[image-blockmacro] +{title} +{title%}{pgwide-option?} +# DocBook XSL Stylesheets custom processing instructions. + + + + + + + {alt={target}} + +{title#} +{title%} + +[indexterm-inlinemacro] +# Index term. +# Generate separate index entries for primary, secondary and tertiary +# descriptions. +# Primary only. +{2%} +{2%} {1} +{2%} +# Primary and secondary. +{2#}{3%} +{2#}{3%} {1}{2} +{2#}{3%} +{2#}{3%} +{2#}{3%} {2} +{2#}{3%} +# Primary, secondary and tertiary. +{3#} + {1}{2}{3} +{3#} +{3#} + {2}{3} +{3#} +{3#} + {3} +{3#} + +[indexterm2-inlinemacro] +# Index term. +# Single entry index term that is visible in the primary text flow. +{1}{1} + +[footnote-inlinemacro] +# Footnote. +{0} + +[footnoteref-inlinemacro] +# Footnote reference. +{2#}{2} +{2%} + +[callout-inlinemacro] +# Callout. + + +# List tags. +[listtags-bulleted] +list={unbreakable-option? }{title?{title}}| +item=| +text=| + +[listtags-numbered] +list={unbreakable-option? }{title?{title}}{start?}| +item=| +text=| + +[listtags-labeled] +list={title?{title}}| +entry=| +label= +term=| +item=| +text=| + +[listtags-horizontal] +# Horizontal labeled list (implemented with two column table). +# Hardwired column widths to 30%,70% because the current crop of PDF +# generators do not auto calculate column widths. + list=<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{style? tabstyle="{style}"}{pgwide-option? pgwide="1"} frame="none" colsep="0" rowsep="0">{title?{title}}|<{title?/table}{title!/informaltable}> +entry=| +label=| +term=| +item=| +text=| + +[listtags-callout] +list={title?{title}}| +item=| +text=| + +[listtags-qanda] +list={title?{title}}| +entry=| +label=| +term=| +item=| +text=| + +[listtags-bibliography] +list={title?{title}}| +item=| +text=| + +[listtags-glossary] +list= +entry=| +label= +term=| +item=| +text=| + +[tags] +# Quoted text +emphasis={1?}|{1?} +strong={1?}|{1?} +monospaced={1?}|{1?} +singlequoted={lsquo}{1?}|{1?}{rsquo} +doublequoted={ldquo}{1?}|{1?}{rdquo} +unquoted={1?}|{1?} +subscript={1?}|{1?} +superscript={1?}|{1?} + +ifdef::deprecated-quotes[] +# Override with deprecated quote attributes. +emphasis={role?}|{role?} +strong={role?}|{role?} +monospaced={role?}|{role?} +singlequoted={role?}{amp}#8216;|{amp}#8217;{role?} +doublequoted={role?}{amp}#8220;|{amp}#8221;{role?} +unquoted={role?}|{role?} +subscript={role?}|{role?} +superscript={role?}|{role?} +endif::deprecated-quotes[] + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[irc-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +[callto-inlinemacro] +{0={target}} +[link-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0} +{0%} +# <> +[xref2-inlinemacro] +{2} +{2%} +# // comment line +[comment-inlinemacro] +{showcomments#}{passtext} + +[comment-blockmacro] +{showcomments#}{passtext} + +[literal-inlinemacro] +# Inline literal. +{passtext} + +# Special word macros +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +{title} +{title%} +| +{title%} +{title#} +{empty} + +[admonitionparagraph] +<{name}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>| + +# Delimited blocks. +[literalblock] +{title} +{title#} +{title%} +| + +{title#} + +[listingblock] +{title} +{title#} +{title%} +| + +{title#} + +[sidebarblock-open] + +{title} + +[sidebarblock-close] + + +[sidebarblock] +template::[sidebarblock-open] +| +template::[sidebarblock-close] + +[sidebarparagraph] +template::[sidebarblock-open] +| +template::[sidebarblock-close] + +[abstractblock-open] + +{title} + +[abstractblock-close] + + +[abstractblock] +template::[abstractblock-open] +| +template::[abstractblock-close] + +[abstractparagraph] +template::[abstractblock-open] +| +template::[abstractblock-close] + +[openblock] +| + +[partintroblock-open] + +{title} + +[partintroblock-close] + + +[partintroblock] +template::[partintroblock-open] +| +template::[partintroblock-close] + +[partintroparagraph] +template::[partintroblock-open] +| +template::[partintroblock-close] + +[quote-open] +# Common quote and verse element template. + +{title} +# Include attribution only if either {attribution} or {citetitle} is defined. +{attribution#} +{attribution%}{citetitle#} +{attribution} +{citetitle} +{attribution#} +{attribution%}{citetitle#} + +[quote-close] + + +[quoteblock] +template::[quote-open] +| +template::[quote-close] + +[verseblock] +template::[quote-open] +| +template::[quote-close] + +[quoteparagraph] +template::[quote-open] +| +template::[quote-close] + +[exampleblock-open] +<{title?example}{title!informalexample}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}> +# DocBook XSL Stylesheets custom processing instructions. + + +{title} + +[exampleblock-close] + + +[exampleblock] +template::[exampleblock-open] +| +template::[exampleblock-close] + +[exampleparagraph] +template::[exampleblock-open] +| +template::[exampleblock-close] + +[admonitionblock] +<{name}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}> +{title} +| + + +# Tables. +[tabletags-default] +colspec= +bodyrow=| +headdata=| +bodydata=| +paragraph=| + +[tabletags-emphasis] +paragraph=| + +[tabletags-header] +paragraph=| + +[tabletags-strong] +paragraph=| + +[tabletags-monospaced] +paragraph=| + +[tabletags-verse] +bodydata=| +paragraph= + +[tabletags-literal] +bodydata=| +paragraph= + +[tabletags-asciidoc] +paragraph= + +[table] +<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}{floatstyle? floatstyle="{floatstyle}"}"}{pgwide-option? pgwide="1"} +frame="{frame=all}" +{grid%rowsep="1" colsep="1"} +rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" +> +{title} +# DocBook XSL Stylesheets custom processing instructions. + + + + + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + + + + +#-------------------------------------------------------------------- +# Deprecated old table definitions. +# + +[old_tabledef-default] +template=old_table +colspec= +bodyrow=| +bodydata=| + +[old_table] +<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"} pgwide="0" +frame="{frame=topbot}" +{grid%rowsep="0" colsep="0"} +rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" +> +{title} + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + + + + +# End of deprecated old table definitions. +#-------------------------------------------------------------------- + +# Special sections. +[preface] + +{title=} +| + + +[index] + +{title} +| + + +[bibliography] + +{title} +| + + +[glossary] + +{title} +| + + +[appendix] + +{title} +| + + +[floatingtitle] +{title} + + +[header-declarations] + + +{toc#} +{numbered#} + +[+docinfo] +{notitle%} {doctitle} + {revdate} +# To ensure valid articleinfo/bookinfo when there is no AsciiDoc header. + {doctitle%}{revdate%}{docdate} + {authored#} + {firstname} + {middlename} + {lastname} + {email} + {authored#} + {authorinitials} +{revnumber?{revnumber}}{revdate}{authorinitials?{authorinitials}}{revremark?{revremark}} +{docinfo1,docinfo2#}{include:{docdir}/docinfo.xml} +{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.xml} +# DEPRECATED: Use docinfo. +{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} +# DEPRECATED: Use orgname in preference to companyname. +{companyname} +# DEPRECATED: Use orgname in preference to corpname. +{corpname} +{orgname} + +#------------------------- +# article document type +#------------------------- +ifdef::doctype-article[] + +[header] +template::[header-declarations] + +
+ +template::[docinfo] + + +[footer] +
+ +[preamble] +# Untitled elements between header and first section title. +| + +[abstract] + +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +[sect4] + +{title} +| + + +endif::doctype-article[] + +#------------------------- +# manpage document type +#------------------------- +ifdef::doctype-manpage[] + +[replacements] +# The roff format does not substitute special characters so just print them as +# text. +\(C\)=(C) +\(TM\)=(TM) + +[header] +template::[header-declarations] + + +template::[docinfo] + + +{mantitle} +{manvolnum} +# Default source and manual to suppress DocBook XSL warnings. +{mansource= } +{manmanual= } +{manversion={revnumber}} + + + {manname1} + {manname2} + {manname3} + {manname4} + {manname5} + {manname6} + {manname7} + {manname8} + {manname9} + {manpurpose} + + +[footer] + + +# Section macros +[synopsis] + +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +endif::doctype-manpage[] + +#------------------------- +# book document type +#------------------------- +ifdef::doctype-book[] + +[header] +template::[header-declarations] + + + +template::[docinfo] + + +[footer] + + +[preamble] +# Preamble is not allowed in DocBook book so wrap it in a preface. + +{title=} +| + + +[dedication] + +{title} +| + + +[colophon] + +{title} +| + + +[sect0] + +{title} +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +[sect4] + +{title} +| + + +endif::doctype-book[] + +ifdef::sgml[] +# +# Optional DocBook SGML. +# +# Most of the differences between DocBook XML and DocBook SGML boils +# down to the empty element syntax: SGML does not like the XML empty +# element <.../> syntax, use <...> instead. +# +[miscellaneous] +outfilesuffix=.sgml + +[header-declarations] + + +[tabledef-default] +colspec= + +[image-inlinemacro] + + + + + {alt={target}} + + +[image-blockmacro] +
{title} +{title%} + + + + + {alt={target}} + +{title#}
+{title%} + +# Inline macros +[xref-inlinemacro] +{0} +{2%} +[xref2-inlinemacro] +# <> +{2} +{2%} +[anchor-inlinemacro] + +[anchor2-inlinemacro] +# [[id,text]] + + +endif::sgml[] diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook5.conf asciidoc-10.1.2/asciidoc/resources/docbook5.conf --- asciidoc-8.6.10/asciidoc/resources/docbook5.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook5.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,747 @@ +# +# docbook5.conf +# +# Asciidoc DocBook 5.0 configuration file. +# + +[miscellaneous] +outfilesuffix=.xml +# Printable page width and units. +# Used to calculate DocBook CALS tables absolute column and table widths. +pagewidth=425 +pageunits=* + +[attributes] +basebackend=docbook +basebackend-docbook= +basebackend-docbook5= +# toc and numbered are set to maintain original default behavior. +toc= +numbered= + +[replacements2] +# Line break markup. Custom processing instruction in fo.xsl. +(?m)^(.*)\s\+$=\1 + +[replacements] +ifdef::asciidoc7compatible[] +# Superscripts. +\^(.+?)\^=\1 +# Subscripts. +~(.+?)~=\1 +endif::asciidoc7compatible[] + +[ruler-blockmacro] +# Uses custom processing instructions in fo.xsl and asciidoc-dblatex.xsl. + + +[pagebreak-blockmacro] +# Uses custom processing instructions in fo.xsl and asciidoc-dblatex.xsl. + + +[blockdef-pass] +latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py" + +[macros] +# math macros. +(?s)[\\]?(?Platexmath):(?P\S*?)\[(?:\$\s*)?(?P.*?)(?:\s*\$)?(?latexmath)::(?P\S*?)(\[(?:\\\[\s*)?(?P.*?)(?:\s*\\\])?\])$=#[] + +[latexmath-inlinemacro] + + + + + +[latexmath-blockmacro] + + + + + +[latexmathblock] +{title} +{title%} + + +{title#} +{title%} + +[image-inlinemacro] + + + + + {alt={target}} + + +[image-blockmacro] +{title} +{title%}{pgwide-option?} +# DocBook XSL Stylesheets custom processing instructions. + + + + + + + {alt={target}} + +{title#} +{title%} + +[indexterm-inlinemacro] +# Index term. +# Generate separate index entries for primary, secondary and tertiary +# descriptions. +# Primary only. +{2%} +{2%} {1} +{2%} +# Primary and secondary. +{2#}{3%} +{2#}{3%} {1}{2} +{2#}{3%} +{2#}{3%} +{2#}{3%} {2} +{2#}{3%} +# Primary, secondary and tertiary. +{3#} + {1}{2}{3} +{3#} +{3#} + {2}{3} +{3#} +{3#} + {3} +{3#} + +[indexterm2-inlinemacro] +# Index term. +# Single entry index term that is visible in the primary text flow. +{1}{1} + +[footnote-inlinemacro] +# Footnote. +{0} + +[footnoteref-inlinemacro] +# Footnote reference. +{2#}{2} +{2%} + +[callout-inlinemacro] +# Callout. + + +# List tags. +[listtags-bulleted] +list={unbreakable-option? }{title?{title}}| +item=| +text=| + +[listtags-numbered] +list={unbreakable-option? }{title?{title}}{start?}| +item=| +text=| + +[listtags-labeled] +list={title?{title}}| +entry=| +label= +term=| +item=| +text=| + +[listtags-horizontal] +# Horizontal labeled list (implemented with two column table). +# Hardwired column widths to 30%,70% because the current crop of PDF +# generators do not auto calculate column widths. + list=<{title?table}{title!informaltable}{id? xml:id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{style? tabstyle="{style}"}{pgwide-option? pgwide="1"} frame="none" colsep="0" rowsep="0">{title?{title}}|<{title?/table}{title!/informaltable}> +entry=| +label=| +term=| +item=| +text=| + +[listtags-callout] +list={title?{title}}| +item=| +text=| + +[listtags-qanda] +list={title?{title}}| +entry=| +label=| +term=| +item=| +text=| + +[listtags-bibliography] +list={title?{title}}| +item=| +text=| + +[listtags-glossary] +list= +entry=| +label= +term=| +item=| +text=| + +[tags] +# Quoted text +emphasis={1?}|{1?} +strong={1?}|{1?} +monospaced={1?}|{1?} +singlequoted={lsquo}{1?}|{1?}{rsquo} +doublequoted={ldquo}{1?}|{1?}{rdquo} +unquoted={1?}|{1?} +subscript={1?}|{1?} +superscript={1?}|{1?} + +ifdef::deprecated-quotes[] +# Override with deprecated quote attributes. +emphasis={role?}|{role?} +strong={role?}|{role?} +monospaced={role?}|{role?} +singlequoted={role?}{amp}#8216;|{amp}#8217;{role?} +doublequoted={role?}{amp}#8220;|{amp}#8221;{role?} +unquoted={role?}|{role?} +subscript={role?}|{role?} +superscript={role?}|{role?} +endif::deprecated-quotes[] + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[irc-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +[callto-inlinemacro] +{0={target}} +[link-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0} +{0%} +# <> +[xref2-inlinemacro] +{2} +{2%} +# // comment line +[comment-inlinemacro] +{showcomments#}{passtext} + +[comment-blockmacro] +{showcomments#}{passtext} + +[literal-inlinemacro] +# Inline literal. +{passtext} + +# Special word macros +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +{title} +{title%} +| +{title%} +{title#} +{empty} + +[admonitionparagraph] +<{name}{id? xml:id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>| + +# Delimited blocks. +[literalblock] +{title} +{title#} +{title%} +| + +{title#} + +[listingblock] +{title} +{title#} +{title%} +| + +{title#} + +[sidebarblock-open] + +{title} + +[sidebarblock-close] + + +[sidebarblock] +template::[sidebarblock-open] +| +template::[sidebarblock-close] + +[sidebarparagraph] +template::[sidebarblock-open] +| +template::[sidebarblock-close] + +[abstractblock-open] + +{title} + +[abstractblock-close] + + +[abstractblock] +template::[abstractblock-open] +| +template::[abstractblock-close] + +[abstractparagraph] +template::[abstractblock-open] +| +template::[abstractblock-close] + +[openblock] +| + +[partintroblock-open] + +{title} + +[partintroblock-close] + + +[partintroblock] +template::[partintroblock-open] +| +template::[partintroblock-close] + +[partintroparagraph] +template::[partintroblock-open] +| +template::[partintroblock-close] + +[quote-open] +# Common quote and verse element template. + +{title} +# Include attribution only if either {attribution} or {citetitle} is defined. +{attribution#} +{attribution%}{citetitle#} +{attribution} +{citetitle} +{attribution#} +{attribution%}{citetitle#} + +[quote-close] + + +[quoteblock] +template::[quote-open] +| +template::[quote-close] + +[verseblock] +template::[quote-open] +| +template::[quote-close] + +[quoteparagraph] +template::[quote-open] +| +template::[quote-close] + +[exampleblock-open] +<{title?example}{title!informalexample}{id? xml:id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}> +# DocBook XSL Stylesheets custom processing instructions. + + +{title} + +[exampleblock-close] + + +[exampleblock] +template::[exampleblock-open] +| +template::[exampleblock-close] + +[exampleparagraph] +template::[exampleblock-open] +| +template::[exampleblock-close] + +[admonitionblock] +<{name}{id? xml:id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}> +{title} +| + + +# Tables. +[tabletags-default] +colspec= +bodyrow=| +headdata=| +bodydata=| +paragraph=| + +[tabletags-emphasis] +paragraph=| + +[tabletags-header] +paragraph=| + +[tabletags-strong] +paragraph=| + +[tabletags-monospaced] +paragraph=| + +[tabletags-verse] +bodydata=| +paragraph= + +[tabletags-literal] +bodydata=| +paragraph= + +[tabletags-asciidoc] +paragraph= + +[table] +<{title?table}{title!informaltable}{id? xml:id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}{pgwide-option? pgwide="1"} +frame="{frame=all}" +{grid%rowsep="1" colsep="1"} +rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" +> +{title} +# DocBook XSL Stylesheets custom processing instructions. + + + + + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + + + + +#-------------------------------------------------------------------- +# Deprecated old table definitions. +# + +[old_tabledef-default] +template=old_table +colspec= +bodyrow=| +bodydata=| + +[old_table] +<{title?table}{title!informaltable}{id? xml:id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"} pgwide="0" +frame="{frame=topbot}" +{grid%rowsep="0" colsep="0"} +rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" +> +{title} + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + + + + +# End of deprecated old table definitions. +#-------------------------------------------------------------------- + +# Special sections. +[preface] + +{title=} +| + + +[index] + +{title} +| + + +[bibliography] + +{title} +| + + +[glossary] + +{title} +| + + +[appendix] + +{title} +| + + +[floatingtitle] +{title} + + +[header-declarations] + +{toc#} +{numbered#} +[+docinfo] +{notitle%} {doctitle} + {revdate} +# To ensure valid articleinfo/bookinfo when there is no AsciiDoc header. + {doctitle%}{revdate%}{docdate} + {authored#} + {authored#} + {firstname} + {middlename} + {lastname} + {authored#} + {email} + {authored#} + {authorinitials} + {revnumber?{revnumber}}{revdate}{authorinitials?{authorinitials}}{revremark?{revremark}} +{docinfo1,docinfo2#}{include:{docdir}/docinfo.xml} +{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.xml} +# DEPRECATED: Use docinfo. +{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} +# DEPRECATED: Use orgname in preference to companyname. +{companyname} +# DEPRECATED: Use orgname in preference to corpname. +{corpname} +{orgname} + +#------------------------- +# article document type +#------------------------- +ifdef::doctype-article[] + +[header] +template::[header-declarations] + +
+ +template::[docinfo] + + +[footer] +
+ +[preamble] +# Untitled elements between header and first section title. +| + +[abstract] + +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +[sect4] + +{title} +| + + +endif::doctype-article[] + +#------------------------- +# manpage document type +#------------------------- +ifdef::doctype-manpage[] + +[replacements] +# The roff format does not substitute special characters so just print them as +# text. +\(C\)=(C) +\(TM\)=(TM) + +[header] +template::[header-declarations] + + +template::[docinfo] + + +{mantitle} +{manvolnum} +# Default source and manual to suppress DocBook XSL warnings. +{mansource= } +{manmanual= } +{manversion={revnumber}} + + + {manname1} + {manname2} + {manname3} + {manname4} + {manname5} + {manname6} + {manname7} + {manname8} + {manname9} + {manpurpose} + + +[footer] + + +# Section macros +[synopsis] + +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +endif::doctype-manpage[] + +#------------------------- +# book document type +#------------------------- +ifdef::doctype-book[] + +[header] +template::[header-declarations] + + + +template::[docinfo] + + +[footer] + + +[preamble] +# Preamble is not allowed in DocBook book so wrap it in a preface. + +{title=} +| + + +[dedication] + +{title} +| + + +[colophon] + +{title} +| + + +[sect0] + +{title} +| + + +[sect1] + +{title} +| + + +[sect2] + +{title} +| + + +[sect3] + +{title} +| + + +[sect4] + +{title} +| + + +endif::doctype-book[] diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/asciidoc-docbook-xsl.txt asciidoc-10.1.2/asciidoc/resources/docbook-xsl/asciidoc-docbook-xsl.txt --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/asciidoc-docbook-xsl.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/asciidoc-docbook-xsl.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,65 @@ +AsciiDoc DocBook XSL Stylesheets Notes +====================================== + +Output file customisation is achieved by tweaking the DocBook XSL +stylesheets. I've tried to keep customization to a minimum and +confine it to the separate XSL driver files in the distribution +`./docbook-xsl/` directory (see the User Guide for details). + +To polish some rough edges I've written some patches for the DocBook +XSL stylesheets -- you don't need them but they're documented below +and included in the distribution `./docbook-xsl/` directory. + + +Manually upgrading Debian to the latest DocBook XSL stylesheets +--------------------------------------------------------------- +The DocBook XSL Stylesheets distribution is just a directory full of +text files and you can switch between releases by changing the +directory name in the system XML catalog. + +To upgrade to the latest docbook-xsl stylesheets without having to +wait for the Debian `docbook-xsl` package: + +- Download the latest docbook-xsl tarball from + https://github.com/docbook/xslt10-stylesheets. Bleeding edge snapshots + can be found at https://github.com/docbook/xslt10-stylesheets/releases. + +- Unzip the tarball to `/usr/share/xml/docbook/stylesheet/`: + + $ cd /usr/share/xml/docbook/stylesheet + $ sudo tar -xzf /tmp/docbook-xsl-1.72.0.tar.gz + +- Edit `/etc/xml/docbook-xsl.xml` catalog and replace occurrences of + the current stylesheets directory with the new one (in our example + it would be `/usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0`. + + $ cd /etc/xml/ + $ sudo cp -p docbook-xsl.xml docbook-xsl.xml.ORIG + $ sudo vi docbook-xsl.xml + + +Customizing Generated Text +-------------------------- +An example +http://www.sagehill.net/docbookxsl/CustomGentext.html#CustomGenText[DocBook +XSL Stylesheets customization file] for formatting chapter titles +without chapter numbering. + +.custom-chapter.xml +--------------------------------------------------------------------- + + + + + + + + +--------------------------------------------------------------------- + +Executed with this 'xsltproc' parameter: + + --param local.l10n.xml document\(\'custom-chapter.xml\'\) + +NOTE: This example is hypothetical -- use the 'xsltproc' +`--stringparam chapter.autolabel 0` option to do the same job. diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/chunked.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/chunked.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/chunked.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/chunked.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,17 @@ + + + + +images/icons/ +images/icons/ + + diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/common.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/common.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/common.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/common.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ + + + + + + + + + + 1 + 0 + + + + + + +images/icons/ +0 + + + + 0 + #E0E0E0 + + + +images/icons/ + + + margin-left: 0; margin-right: 10%; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +article toc,title +book toc,title,figure,table,example,equation + + +chapter toc,title +part toc,title +preface toc,title +qandadiv toc +qandaset toc +reference toc,title +sect1 toc +sect2 toc +sect3 toc +sect4 toc +sect5 toc +section toc +set toc,title + + + +article nop +book nop + + + + + diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/epub.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/epub.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/epub.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/epub.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,35 @@ + + + + + + + + + + + + +/article nop + + +/book nop + + + + + diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/fo.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/fo.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/fo.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/fo.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,152 @@ + + + + + + + + + + +false + +left + + +12 + + pt + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0pt + 0pt + 1pc + + + + + -1pc + 0pt + 0pt + + + + + + 0.75in + 0.75in + + + + + 0.5in + 0.5in + + + + + + + + + + + + + + + + + + 10pt + + + + 14pt + bold + false + always + + + + solid + 1pt + silver + #ffffee + 12pt + 12pt + 6pt + 6pt + 0pt + 12pt + 6pt + 6pt + + + + + + + + + + #E0E0E0 + inherit + + + + + + + auto + + + diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/htmlhelp.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/htmlhelp.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/htmlhelp.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/htmlhelp.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + + + + +
+
+ + + +
+
+ +
diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/manpage.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/manpage.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/manpage.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/manpage.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/text.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/text.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/text.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/text.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,55 @@ + + + + + + + + + + + + appendix title + article/appendix nop + article toc,title + book toc,title,figure,table,example,equation + chapter title + part toc,title + preface toc,title + qandadiv toc + qandaset toc + reference toc,title + section toc + set toc,title + + + +
+ +
+
+ + +

+ +
+
+ + +
+ +
+
+ + +
diff -Nru asciidoc-8.6.10/asciidoc/resources/docbook-xsl/xhtml.xsl asciidoc-10.1.2/asciidoc/resources/docbook-xsl/xhtml.xsl --- asciidoc-8.6.10/asciidoc/resources/docbook-xsl/xhtml.xsl 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/docbook-xsl/xhtml.xsl 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,14 @@ + + + + + diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter.conf asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter.conf --- asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,8 @@ +# +# AsciiDoc code filter configuration file. +# +# Documented in code-filter-readme.txt +# + +[blockdef-listing] +code-style=template="listingblock",presubs=(),postsubs=("callouts",),posattrs=("style","language"),filter="code-filter.py -b {basebackend} -l {language}" diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter.py asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter.py --- asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,265 @@ +#!/usr/bin/env python3 +''' +NAME + code-filter - AsciiDoc filter to highlight language keywords + +SYNOPSIS + code-filter -b backend -l language [ -t tabsize ] + [ --help | -h ] [ --version | -v ] + +DESCRIPTION + This filter reads source code from the standard input, highlights language + keywords and comments and writes to the standard output. + + The purpose of this program is to demonstrate how to write an AsciiDoc + filter -- it's much to simplistic to be passed off as a code syntax + highlighter. Use the 'source-highlight-filter' instead. + + +OPTIONS + --help, -h + Print this documentation. + + -b + Backend output file format: 'docbook', 'linuxdoc', 'html', 'css'. + + -l + The name of the source code language: 'python', 'ruby', 'c++', 'c'. + + -t tabsize + Expand source tabs to tabsize spaces. + + --version, -v + Print program version number. + +BUGS + - Code on the same line as a block comment is treated as comment. + Keywords inside literal strings are highlighted. + - There doesn't appear to be an easy way to accommodate linuxdoc so + just pass it through without markup. + +AUTHOR + Written by Stuart Rackham, + +URLS + https://github.com/asciidoc/asciidoc-py3 + https://asciidoc.org/ + +COPYING + Copyright (C) 2002-2013 Stuart Rackham. + Copyright (C) 2013-2020 AsciiDoc Contributors. + + Free use of this software is granted under the terms of the GNU General + Public License version 2 (GPLv2). +''' + +import os +import sys +import re + +VERSION = '1.1.2' + +# Globals. +language = None +backend = None +tabsize = 8 +keywordtags = { + 'html': + ('', ''), + 'css': + ('', ''), + 'docbook': + ('', ''), + 'linuxdoc': + ('', '') +} +commenttags = { + 'html': + ('', ''), + 'css': + ('', ''), + 'docbook': + ('', ''), + 'linuxdoc': + ('', '') +} +keywords = { + 'python': + ( + 'and', 'del', 'for', 'is', 'raise', 'assert', 'elif', 'from', + 'lambda', 'return', 'break', 'else', 'global', 'not', 'try', 'class', + 'except', 'if', 'or', 'while', 'continue', 'exec', 'import', 'pass', + 'yield', 'def', 'finally', 'in', 'print' + ), + 'ruby': + ( + '__FILE__', 'and', 'def', 'end', 'in', 'or', 'self', 'unless', + '__LINE__', 'begin', 'defined?' 'ensure', 'module', 'redo', 'super', + 'until', 'BEGIN', 'break', 'do', 'false', 'next', 'rescue', 'then', + 'when', 'END', 'case', 'else', 'for', 'nil', 'retry', 'true', 'while', + 'alias', 'class', 'elsif', 'if', 'not', 'return', 'undef', 'yield' + ), + 'c++': + ( + 'asm', 'auto', 'bool', 'break', 'case', 'catch', 'char', 'class', + 'const', 'const_cast', 'continue', 'default', 'delete', 'do', 'double', + 'dynamic_cast', 'else', 'enum', 'explicit', 'export', 'extern', + 'false', 'float', 'for', 'friend', 'goto', 'if', 'inline', 'int', + 'long', 'mutable', 'namespace', 'new', 'operator', 'private', + 'protected', 'public', 'register', 'reinterpret_cast', 'return', + 'short', 'signed', 'sizeof', 'static', 'static_cast', 'struct', + 'switch', 'template', 'this', 'throw', 'true', 'try', 'typedef', + 'typeid', 'typename', 'union', 'unsigned', 'using', 'virtual', 'void', + 'volatile', 'wchar_t', 'while' + ) +} +block_comments = { + 'python': ("'''", "'''"), + 'ruby': None, + 'c++': ('/*', '*/') +} +inline_comments = { + 'python': '#', + 'ruby': '#', + 'c++': '//' +} + + +def print_stderr(line): + sys.stderr.write(line+os.linesep) + + +def sub_keyword(mo): + '''re.subs() argument to tag keywords.''' + word = mo.group('word') + if word in keywords[language]: + stag, etag = keywordtags[backend] + return stag+word+etag + else: + return word + + +def code_filter(): + '''This function does all the work.''' + global language, backend + inline_comment = inline_comments[language] + blk_comment = block_comments[language] + if blk_comment: + blk_comment = ( + re.escape(block_comments[language][0]), + re.escape(block_comments[language][1]) + ) + stag, etag = commenttags[backend] + in_comment = 0 # True if we're inside a multi-line block comment. + tag_comment = 0 # True if we should tag the current line as a comment. + line = sys.stdin.readline() + while line: + line = line.rstrip() + line = line.expandtabs(tabsize) + # Escape special characters. + line = line.replace('&', '&') + line = line.replace('<', '<') + line = line.replace('>', '>') + # Process block comment. + if blk_comment: + if in_comment: + if re.match(r'.*'+blk_comment[1]+r'$', line): + in_comment = 0 + else: + if re.match(r'^\s*'+blk_comment[0]+r'.*'+blk_comment[1], line): + # Single line block comment. + tag_comment = 1 + elif re.match(r'^\s*'+blk_comment[0], line): + # Start of multi-line block comment. + tag_comment = 1 + in_comment = 1 + else: + tag_comment = 0 + if tag_comment: + if line: + line = stag+line+etag + else: + if inline_comment: + pos = line.find(inline_comment) + else: + pos = -1 + if pos >= 0: + # Process inline comment. + line = re.sub(r'\b(?P\w+)\b', sub_keyword, line[:pos]) \ + + stag + line[pos:] + etag + else: + line = re.sub(r'\b(?P\w+)\b', sub_keyword, line) + sys.stdout.write(line + os.linesep) + line = sys.stdin.readline() + + +def usage(msg=''): + if msg: + print_stderr(msg) + print_stderr('Usage: code-filter -b backend -l language [ -t tabsize ]') + print_stderr(' [ --help | -h ] [ --version | -v ]') + + +def main(): + global language, backend, tabsize + # Process command line options. + import getopt + opts, args = getopt.getopt( + sys.argv[1:], + 'b:l:ht:v', + ['help', 'version'] + ) + if len(args) > 0: + usage() + sys.exit(1) + for o, v in opts: + if o in ('--help', '-h'): + print(__doc__) + sys.exit(0) + if o in ('--version', '-v'): + print('code-filter version %s' % (VERSION,)) + sys.exit(0) + if o == '-b': + backend = v + if o == '-l': + v = v.lower() + if v == 'c': + v = 'c++' + language = v + if o == '-t': + try: + tabsize = int(v) + except BaseException: + usage('illegal tabsize') + sys.exit(1) + if tabsize <= 0: + usage('illegal tabsize') + sys.exit(1) + if backend is None: + usage('backend option is mandatory') + sys.exit(1) + if backend not in keywordtags: + usage('illegal backend option') + sys.exit(1) + if language is None: + usage('language option is mandatory') + sys.exit(1) + if language not in keywords: + usage('illegal language option') + sys.exit(1) + # Do the work. + code_filter() + + +if __name__ == "__main__": + try: + main() + except (KeyboardInterrupt, SystemExit): + pass + except BaseException: + print_stderr( + "%s: unexpected exit status: %s" % + (os.path.basename(sys.argv[0]), sys.exc_info()[1]) + ) + # Exit with previous sys.exit() status or zero if no sys.exit(). + sys.exit(sys.exc_info()[1]) diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter-readme.txt asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter-readme.txt --- asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter-readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter-readme.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,37 @@ +AsciiDoc Code Filter +==================== + +This simple minded filter highlights source code keywords and +comments. + +NOTE: The filter is to demonstrate how to write a filter -- it's much +to simplistic to be passed off as a code syntax highlighter. If you +want a full featured highlighter use the 'source highlighter filter. + + +Files +----- +code-filter.py:: + The filter Python script. +code-filter.conf:: + The AsciiDoc filter configuration file. +code-filter-test.txt:: + Short AsciiDoc document to test the filter. + + +Installation +------------ +The code filter is installed in the distribution `filters` directory +as part of the standard AsciiDoc install. + +Test it on the `code-filter-test.txt` file: + + $ asciidoc -v code-filter-test.txt + $ firefox code-filter-test.txt & + + +Help +---- +Execute the filter with the help option: + + $ ./code-filter.py --help diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter-test.txt asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter-test.txt --- asciidoc-8.6.10/asciidoc/resources/filters/code/code-filter-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/code/code-filter-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,15 @@ +Code Filter Test +================ + +[python] +code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +code~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/graphviz/asciidoc-graphviz-sample.txt asciidoc-10.1.2/asciidoc/resources/filters/graphviz/asciidoc-graphviz-sample.txt --- asciidoc-8.6.10/asciidoc/resources/filters/graphviz/asciidoc-graphviz-sample.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/graphviz/asciidoc-graphviz-sample.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,170 @@ += Graphviz filter for AsciiDoc = + +Author: Gouichi Iisaka + +Version: 1.1.3 + +== Introduction == + +The Graphviz(link:http://www.graphviz.org[]) is a way of representing structural information +as diagrams of abstract graphs and networks. + + +Automatic graph drawing has many important applications +in software engineering, database and web design, networking, +and in visual interfaces for many other domains. + +Graphviz take descriptions of graphs in a simple text language, +And has many useful features for concrete diagrams, +such as options for colors, fonts, tabular node layouts, +line styles, hyperlinks, and custom shapes. + +AsciiDoc can external shell commands used to process Paragraph and +DelimitedBlock content by Filter. + +So now, AsciiDoc can draw graphs via graphviz filter. + +== Examples == + +=== Simple === +..................................................................... +[graphviz] +--------------------------------------------------------------------- +digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} +--------------------------------------------------------------------- +..................................................................... + +[graphviz] +--------------------------------------------------------------------- +digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} +--------------------------------------------------------------------- + +=== Using options === +..................................................................... +["graphviz", "sample2.png"] +--------------------------------------------------------------------- +digraph automata_0 { + size ="8.5, 11"; + node [shape = circle]; + 0 [ style = filled, color=lightgrey ]; + 2 [ shape = doublecircle ]; + 0 -> 2 [ label = "a " ]; + 0 -> 1 [ label = "other " ]; + 1 -> 2 [ label = "a " ]; + 1 -> 1 [ label = "other " ]; + 2 -> 2 [ label = "a " ]; + 2 -> 1 [ label = "other " ]; + "Machine: a" [ shape = plaintext ]; +} +--------------------------------------------------------------------- +..................................................................... + +["graphviz", "sample2.png"] +--------------------------------------------------------------------- +digraph automata_0 { + size ="8.5, 11"; + node [shape = circle]; + 0 [ style = filled, color=lightgrey ]; + 2 [ shape = doublecircle ]; + 0 -> 2 [ label = "a " ]; + 0 -> 1 [ label = "other " ]; + 1 -> 2 [ label = "a " ]; + 1 -> 1 [ label = "other " ]; + 2 -> 2 [ label = "a " ]; + 2 -> 1 [ label = "other " ]; + "Machine: a" [ shape = plaintext ]; +} +--------------------------------------------------------------------- + +=== Using Layout === + +..................................................................... +["graphviz", "sample3.png", "dot"] +--------------------------------------------------------------------- +digraph finite_state_machine { + rankdir=LR; + size="8,5" + node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; + node [shape = circle]; + LR_0 -> LR_2 [ label = "SS(B)" ]; + LR_0 -> LR_1 [ label = "SS(S)" ]; + LR_1 -> LR_3 [ label = "S($end)" ]; + LR_2 -> LR_6 [ label = "SS(b)" ]; + LR_2 -> LR_5 [ label = "SS(a)" ]; + LR_2 -> LR_4 [ label = "S(A)" ]; + LR_5 -> LR_7 [ label = "S(b)" ]; + LR_5 -> LR_5 [ label = "S(a)" ]; + LR_6 -> LR_6 [ label = "S(b)" ]; + LR_6 -> LR_5 [ label = "S(a)" ]; + LR_7 -> LR_8 [ label = "S(b)" ]; + LR_7 -> LR_5 [ label = "S(a)" ]; + LR_8 -> LR_6 [ label = "S(b)" ]; + LR_8 -> LR_5 [ label = "S(a)" ]; +} +--------------------------------------------------------------------- +..................................................................... + +["graphviz", "sample3.png", "dot"] +--------------------------------------------------------------------- +digraph finite_state_machine { + rankdir=LR; + size="8,5" + node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; + node [shape = circle]; + LR_0 -> LR_2 [ label = "SS(B)" ]; + LR_0 -> LR_1 [ label = "SS(S)" ]; + LR_1 -> LR_3 [ label = "S($end)" ]; + LR_2 -> LR_6 [ label = "SS(b)" ]; + LR_2 -> LR_5 [ label = "SS(a)" ]; + LR_2 -> LR_4 [ label = "S(A)" ]; + LR_5 -> LR_7 [ label = "S(b)" ]; + LR_5 -> LR_5 [ label = "S(a)" ]; + LR_6 -> LR_6 [ label = "S(b)" ]; + LR_6 -> LR_5 [ label = "S(a)" ]; + LR_7 -> LR_8 [ label = "S(b)" ]; + LR_7 -> LR_5 [ label = "S(a)" ]; + LR_8 -> LR_6 [ label = "S(b)" ]; + LR_8 -> LR_5 [ label = "S(a)" ]; + } +--------------------------------------------------------------------- + + +== Layout == + +Layout for graphviz as follows. The default is `dot'. + + *dot;; + 'dot' draws directed graphs. + It works well on DAGs and other graphs that can be drawn as hierarchies. + It reads attributed graph files and writes drawings. + + *neato;; + 'neato' draws undirected graphs using ‘‘spring'' models (see Kamada and + Kawai, Information Processing Letters 31:1, April 1989). + Input files must be formatted in the dot attributed graph language. + + *twopi;; + 'twopi' draws graphs using a radial layout (see G. Wills, Symposium on + Graph Drawing GD'97, September, 1997). + Basically, one node is chosen as the center and put at the origin. + The remaining nodes are placed on a sequence of concentric circles + centered about the origin, each a fixed radial distance from + the previous circle. + + *circro;; + 'circo' draws graphs using a circular layout (see Six and Tollis, GD '99 + and ALENEX '99, and Kaufmann and Wiese, GD '02.) + The tool identifies biconnected components and draws the nodes + of the component on a circle. + The blockâ€cutpoint tree is then laid out using a recursive radial + algorithm. + Edge crossings within a circle are minimized by placing as + many edges on the circle's perimeter as possible. + In particular, if the component is outerplanar, + the component will have a planar layout. + + *fdp;; + 'fdp' draws undirected graphs using a ‘‘spring'' model. + It relies on a forceâ€directed approach in the spirit of Fruchterman + and Reingold + (cf. Softwareâ€Practice & Experience 21(11), 1991, pp. 1129â€1164). diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/graphviz/graphviz2png.py asciidoc-10.1.2/asciidoc/resources/filters/graphviz/graphviz2png.py --- asciidoc-8.6.10/asciidoc/resources/filters/graphviz/graphviz2png.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/graphviz/graphviz2png.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,177 @@ +#!/usr/bin/env python3 + +''' +NAME + graphviz2png - Converts textual graphviz notation to PNG file + +SYNOPSIS + graphviz2png [options] INFILE + +DESCRIPTION + This filter reads Graphviz notation text from the input file + INFILE (or stdin if INFILE is -), converts it to a PNG image file. + + +OPTIONS + -o OUTFILE, --outfile=OUTFILE + The file name of the output file. If not specified the output file is + named like INFILE but with a .png file name extension. + + -L LAYOUT, --layout=LAYOUT + Graphviz layout: dot, neato, twopi, circo, fdp + Default is 'dot'. + + -F FORMAT, --format=FORMAT + Graphviz output format: png, svg, or any other format Graphviz + supports. Run dot -T? to get the full list. + Default is 'png'. + + -v, --verbose + Verbosely print processing information to stderr. + + -h, --help + Print this documentation. + + -V, --version + Print program version number. + +SEE ALSO + graphviz(1) + +AUTHOR + Written by Gouichi Iisaka, + Format support added by Elmo Todurov, + +THANKS + Stuart Rackham, + This script was inspired by his music2png.py and AsciiDoc + +LICENSE + Copyright (C) 2008-2009 Gouichi Iisaka. + Free use of this software is granted under the terms of + the GNU General Public License (GPL). +''' + +import os +import sys +import subprocess +import argparse + +__AUTHOR__ = "Gouichi Iisaka " +__VERSION__ = '1.1.5' + + +class EApp(Exception): + '''Application specific exception.''' + pass + + +class Application(): + def __init__(self, argv=None): + # Run dot, get the list of supported formats. It's prefixed by some junk. + format_output = subprocess.Popen( + ["dot", "-T?"], + stderr=subprocess.PIPE, + stdout=subprocess.PIPE + ).communicate()[1].decode('utf-8') + # The junk contains : and ends with :. So we split it, then strip the + # final endline, then split the list for future usage. + supported_formats = format_output.split(": ")[2][:-1].split(" ") + + if not argv: + argv = sys.argv + + self.usage = '%(prog)s [options] infile' + self.version = 'Version: %s\n' % __VERSION__ + self.version += 'Copyright(c) 2008-2009: %s\n' % __AUTHOR__ + + self.parser = argparse.ArgumentParser(usage=self.usage) + self.parser.add_argument( + "-o", "--outfile", action="store", dest="outfile", help="Output file" + ) + self.parser.add_argument( + "-L", "--layout", action="store", dest="layout", default="dot", + choices=['dot', 'neato', 'twopi', 'circo', 'fdp'], help="Layout type" + ) + self.parser.add_argument( + "-F", "--format", action="store", dest="format", default="png", + choices=supported_formats, help="Format type" + ) + self.parser.add_argument( + "--debug", action="store_true", dest="do_debug", help=argparse.SUPPRESS + ) + self.parser.add_argument( + "-v", "--verbose", + action="store_true", dest="do_verbose", default=False, + help="verbose output" + ) + self.parser.add_argument("infile", action="store", help="Input file") + self.parser.add_argument('--version', action='version', version=self.version) + self.options = self.parser.parse_args() + + def systemcmd(self, cmd): + if self.options.do_verbose: + msg = 'Execute: %s' % cmd + sys.stderr.write(msg + os.linesep) + else: + cmd += ' 2>%s' % os.devnull + if os.system(cmd): + raise EApp('failed command: %s' % cmd) + + def graphviz2png(self, infile, outfile): + '''Convert Graphviz notation in file infile to + PNG file named outfile.''' + + outfile = os.path.abspath(outfile) + outdir = os.path.dirname(outfile) + + if not os.path.isdir(outdir): + raise EApp('directory does not exist: %s' % outdir) + + saved_cwd = os.getcwd() + os.chdir(outdir) + try: + cmd = '%s -T%s "%s" > "%s"' % ( + self.options.layout, + self.options.format, + infile, + outfile + ) + self.systemcmd(cmd) + finally: + os.chdir(saved_cwd) + + if not self.options.do_debug: + os.unlink(infile) + + def run(self): + if self.options.format == '': + self.options.format = 'png' + + infile = self.options.infile + if self.options.infile == '-': + if self.options.outfile is None: + sys.stderr.write('OUTFILE must be specified') + sys.exit(1) + infile = os.path.splitext(self.options.outfile)[0] + '.txt' + lines = sys.stdin.readlines() + open(infile, 'w').writelines(lines) + + if not os.path.isfile(infile): + raise EApp('input file does not exist: %s' % infile) + + if self.options.outfile is None: + outfile = os.path.splitext(infile)[0] + '.png' + else: + outfile = self.options.outfile + + self.graphviz2png(infile, outfile) + + # To suppress asciidoc 'no output from filter' warnings. + if self.options.infile == '-': + sys.stdout.write(' ') + + +if __name__ == "__main__": + app = Application() + app.run() diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/graphviz/graphviz-filter.conf asciidoc-10.1.2/asciidoc/resources/filters/graphviz/graphviz-filter.conf --- asciidoc-8.6.10/asciidoc/resources/filters/graphviz/graphviz-filter.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/graphviz/graphviz-filter.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,53 @@ +# +# AsciiDoc Graphviz filter configuration file. +# +# Version: 1.0 +# Gouici Iisaka + +[graphviz-filter-style] +# When the filter output image is data-uri encoded write it to the indir +# (instead of the outdir) so that encoder can find it. +ifndef::data-uri[] +graphviz-style=template="graphviz{format?-{format}}-block",subs=(),posattrs=("style","target","layout","format"),filter='graphviz2png.py {verbose?-v} -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -L {layout=dot} -F {format=png} -' +endif::data-uri[] +ifdef::data-uri[] +graphviz-style=template="graphviz{format?-{format}}-block",subs=(),posattrs=("style","target","layout","format"),filter='graphviz2png.py {verbose?-v} -o "{indir={outdir}}/{imagesdir=}{imagesdir?/}{target}" -L {layout=dot} -F {format=png} -' +endif::data-uri[] + +[blockdef-open] +template::[graphviz-filter-style] + +[blockdef-listing] +template::[graphviz-filter-style] + +[paradef-default] +template::[graphviz-filter-style] + +[graphviz-block] +template::[filter-image-blockmacro] + +# EXPERIMENTAL: xhtml11 backend SVG image block. +ifdef::basebackend-xhtml11[] +[graphviz-svg-block] +
+
+ + +{link#} + +
{caption={figure-caption} {counter:figure-number}. }{title}
+ +endif::basebackend-xhtml11[] + +# +# DEPRECATED: Pre 8.2.7 filter definition. +# +[blockdef-graphviz] +delimiter=^graphviz~{4,}$ +template=graphviz-block +presubs=none +filter=graphviz2png.py {verbose?-v} -o "{outdir={indir}}/{target}" -L {layout=dot} - +posattrs=target,format +# +# DEPRECATED: End +# diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/latex/latex2img.py asciidoc-10.1.2/asciidoc/resources/filters/latex/latex2img.py --- asciidoc-8.6.10/asciidoc/resources/filters/latex/latex2img.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/latex/latex2img.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,268 @@ +#!/usr/bin/env python3 +''' +NAME + latex2img - Converts LaTeX source to PNG or SVG file + +SYNOPSIS + latex2img [options] INFILE + +DESCRIPTION + This filter reads LaTeX source text from the input file + INFILE (or stdin if INFILE is -) and renders it to PNG image file. + Typically used to render math equations. + + Requires latex(1), dvipng(1) and/or dvisvgm(1) commands and LaTeX math + packages. + +OPTIONS + -D DPI + Set the output resolution for PNG images to DPI dots per inch. Use + this option to scale the output PNG image size. + + -o OUTFILE + The file name of the output file. If not specified the output file is + named like INFILE but with an extension matching the chosen output + image format, .png for PNG images and .svg for SVG images. + + -m + Skip if the output image file is newer than the INFILE. + Compares timestamps on INFILE and OUTFILE. If + INFILE is - (stdin) then compares MD5 checksum stored in file + named like OUTFILE but with a .md5 file name extension. + The .md5 file is created if the -m option is used and the + INFILE is - (stdin). + + -v + Verbosely print processing information to stderr. + + --help, -h + Print this documentation. + + --version + Print program version number. + +SEE ALSO + latex(1), dvipng(1), dvisvgm(1) + +AUTHOR + Written by Stuart Rackham, + The code was inspired by Kjell Magne Fauske's code: + http://fauskes.net/nb/htmleqII/ + + See also: + http://www.amk.ca/python/code/mt-math + http://code.google.com/p/latexmath2png/ + +COPYING + Copyright (C) 2002-2013 Stuart Rackham. + Copyright (C) 2013-2020 AsciiDoc Contributors. + + Free use of this software is granted under the terms of the GNU General + Public License version 2 (GPLv2). +''' + +import os +import sys +import tempfile +from hashlib import md5 + +VERSION = '0.2.0' + +# Include LaTeX packages and commands here. +TEX_HEADER = r'''\documentclass{article} +\usepackage{amsmath} +\usepackage{amsthm} +\usepackage{amssymb} +\usepackage{bm} +\newcommand{\mx}[1]{\mathbf{\bm{#1}}} % Matrix command +\newcommand{\vc}[1]{\mathbf{\bm{#1}}} % Vector command +\newcommand{\T}{\text{T}} % Transpose +\pagestyle{empty} +\begin{document}''' + +TEX_FOOTER = r'''\end{document}''' + +# Globals. +verbose = False + + +class EApp(Exception): + pass # Application specific exception. + + +def print_stderr(line): + sys.stderr.write(line + os.linesep) + + +def print_verbose(line): + if verbose: + print_stderr(line) + + +def write_file(filename, data, mode='w', encoding='utf-8'): + if 'b' in mode: + encoding = None + with open(filename, mode, encoding=encoding) as f: + f.write(data) + + +def read_file(filename, mode='r', encoding='utf-8'): + if 'b' in mode: + encoding = None + with open(filename, mode, encoding=encoding) as f: + return f.read() + + +def run(cmd): + global verbose + if verbose: + cmd += ' 1>&2' + else: + cmd += ' 2>%s 1>&2' % os.devnull + print_verbose('executing: %s' % cmd) + if os.system(cmd): + raise EApp('failed command: %s' % cmd) + + +def latex2img(infile, outfile, imgfmt, dpi, modified): + ''' + Convert LaTeX input file infile to image file named outfile. + ''' + outfile = os.path.abspath(outfile) + outdir = os.path.dirname(outfile) + if not os.path.isdir(outdir): + raise EApp('directory does not exist: %s' % outdir) + texfile = tempfile.mktemp(suffix='.tex', dir=os.path.dirname(outfile)) + basefile = os.path.splitext(texfile)[0] + dvifile = basefile + '.dvi' + temps = [basefile + ext for ext in ('.tex', '.dvi', '.aux', '.log')] + skip = False + if infile == '-': + tex = sys.stdin.read() + if modified: + checksum = md5((tex + imgfmt + str(dpi)).encode('utf-8')).digest() + md5_file = os.path.splitext(outfile)[0] + '.md5' + if os.path.isfile(md5_file) and os.path.isfile(outfile) and \ + checksum == read_file(md5_file, 'rb'): + skip = True + else: + if not os.path.isfile(infile): + raise EApp('input file does not exist: %s' % infile) + tex = read_file(infile) + if modified and os.path.isfile(outfile) and \ + os.path.getmtime(infile) <= os.path.getmtime(outfile): + skip = True + if skip: + print_verbose('skipped: no change: %s' % outfile) + return + tex = '%s\n%s\n%s\n' % (TEX_HEADER, tex.strip(), TEX_FOOTER) + print_verbose('tex:\n%s' % tex) + write_file(texfile, tex) + saved_pwd = os.getcwd() + os.chdir(outdir) + try: + # Compile LaTeX document to DVI file. + run('latex %s' % texfile) + if imgfmt == 'svg': + # Convert DVI file to SVG. + cmd = 'dvisvgm' + cmd += ' --no-fonts' + cmd += ' --scale=1.4' + cmd += ' --exact' + cmd += ' -o "%s" "%s"' % (outfile, dvifile) + else: + # Convert DVI file to PNG. + cmd = 'dvipng' + if dpi: + cmd += ' -D %s' % dpi + cmd += ' -T tight -x 1000 -z 9 -bg Transparent --truecolor' + cmd += ' -o "%s" "%s" ' % (outfile, dvifile) + run(cmd) + finally: + os.chdir(saved_pwd) + for f in temps: + if os.path.isfile(f): + print_verbose('deleting: %s' % f) + os.remove(f) + if 'md5_file' in locals(): + print_verbose('writing: %s' % md5_file) + write_file(md5_file, checksum, 'wb') + + +def usage(msg=''): + if msg: + print_stderr(msg) + print_stderr( + '\n' + 'usage:\n' + ' latex2img [options] INFILE\n' + '\n' + 'options:\n' + ' -D DPI\n' + ' -o OUTFILE\n' + ' -f FORMAT\n' + ' -m\n' + ' -v\n' + ' --help\n' + ' --version' + ) + + +def main(): + # Process command line options. + global verbose + dpi = None + outfile = None + imgfmt = 'png' + modified = False + import getopt + opts, args = getopt.getopt(sys.argv[1:], 'D:o:mhvf:', ['help', 'version']) + for o, v in opts: + if o in ('--help', '-h'): + print(__doc__) + sys.exit(0) + if o == '--version': + print(('latex2img version %s' % (VERSION,))) + sys.exit(0) + if o == '-D': + dpi = v + if o == '-o': + outfile = v + if o == '-m': + modified = True + if o == '-v': + verbose = True + if o == '-f': + imgfmt = v + if len(args) != 1: + usage() + sys.exit(1) + infile = args[0] + if dpi and not dpi.isdigit(): + usage('invalid DPI') + sys.exit(1) + if imgfmt not in {'png', 'svg'}: + usage('Invalid image format. Valid values are "png" or "svg".') + sys.exit(1) + if outfile is None: + if infile == '-': + usage('OUTFILE must be specified') + sys.exit(1) + outfile = os.path.splitext(infile)[0] + '.' + imgfmt + # Do the work. + latex2img(infile, outfile, imgfmt, dpi, modified) + # Print something to suppress asciidoc 'no output from filter' warnings. + if infile == '-': + sys.stdout.write(' ') + + +if __name__ == "__main__": + try: + main() + except SystemExit: + raise + except KeyboardInterrupt: + sys.exit(1) + except Exception as e: + print_stderr("%s: %s" % (os.path.basename(sys.argv[0]), str(e))) + sys.exit(1) diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/latex/latex-filter.conf asciidoc-10.1.2/asciidoc/resources/filters/latex/latex-filter.conf --- asciidoc-8.6.10/asciidoc/resources/filters/latex/latex-filter.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/latex/latex-filter.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,42 @@ +# +# AsciiDoc latex filter configuration file. +# +# Documented in latex-filter.txt in AsciiDoc distribution +# ./examples/website/ directory. +# + +[latex-filter-style] +# When the filter output image is data-uri encoded write it to the indir +# (instead of the outdir) so that encoder can find it. +ifndef::data-uri[] +latex-style=template="latex-block",subs=(),posattrs=("style","target","dpi"),filter='latex2img.py -m{verbose? -v}{dpi? -D {dpi}}{imgfmt? -f {imgfmt}} -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -' +endif::data-uri[] +ifdef::data-uri[] +latex-style=template="latex-block",subs=(),posattrs=("style","target","dpi"),filter='latex2img.py -m{verbose? -v}{dpi? -D {dpi}}{imgfmt? -f {imgfmt}} -o "{indir={outdir}}/{imagesdir=}{imagesdir?/}{target}" -' +endif::data-uri[] + +[blockdef-open] +template::[latex-filter-style] + +[blockdef-listing] +template::[latex-filter-style] + +[paradef-default] +template::[latex-filter-style] + +[latex-block] +template::[latex-filter-image-blockmacro] + +[latex-filter-image-blockmacro] +# Synthesize missing target attribute for filter generated file names. +# The tag split | ensures missing target file names are auto-generated +# before the filter is executed, the remainder (the [image-blockmacro]) +# is executed after the filter to ensure data URI encoding comes after +# the image is created. +# This template replaces the filter-image-blockmacro template so that +# we can generate SVG images from LaTeX code. +{target%}{counter2:target-number} +{imgfmt%}{set2:imgfmt:{latex-imgfmt=png}} +{target%}{set2:target:{docname}__{target-number}.{imgfmt}} +| +template::[image-blockmacro] diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/music/music2png.py asciidoc-10.1.2/asciidoc/resources/filters/music/music2png.py --- asciidoc-8.6.10/asciidoc/resources/filters/music/music2png.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/music/music2png.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,236 @@ +#!/usr/bin/env python3 +''' +NAME + music2png - Converts textual music notation to classically notated PNG file + +SYNOPSIS + music2png [options] INFILE + +DESCRIPTION + This filter reads LilyPond or ABC music notation text from the input file + INFILE (or stdin if INFILE is -), converts it to classical music notation + and writes it to a trimmed PNG image file. + + This script is a wrapper for LilyPond and ImageMagick commands. + +OPTIONS + -f FORMAT + The INFILE music format. 'abc' for ABC notation, 'ly' for LilyPond + notation. Defaults to 'abc' unless source starts with backslash. + + -o OUTFILE + The file name of the output file. If not specified the output file is + named like INFILE but with a .png file name extension. + + -m + Skip if the PNG output file is newer that than the INFILE. + Compares timestamps on INFILE and OUTFILE. If + INFILE is - (stdin) then compares MD5 checksum stored in file + named like OUTFILE but with a .md5 file name extension. + The .md5 file is created if the -m option is used and the + INFILE is - (stdin). + + -v + Verbosely print processing information to stderr. + + --help, -h + Print this documentation. + + --version + Print program version number. + +SEE ALSO + lilypond(1), abc2ly(1), convert(1) + +AUTHOR + Written by Stuart Rackham, + +COPYING + Copyright (C) 2002-2013 Stuart Rackham. + Copyright (C) 2013-2020 AsciiDoc Contributors. + + Free use of this software is granted under the terms of the GNU General + Public License version 2 (GPLv2). +''' + +import os +import sys +import tempfile +from hashlib import md5 + +VERSION = '0.1.2' + +# Globals. +verbose = False + + +class EApp(Exception): + pass # Application specific exception. + + +def print_stderr(line): + sys.stderr.write(line + os.linesep) + + +def print_verbose(line): + if verbose: + print_stderr(line) + + +def write_file(filename, data, mode='w', encoding='utf-8'): + if 'b' in mode: + encoding = None + with open(filename, mode, encoding=encoding) as f: + f.write(data) + + +def read_file(filename, mode='r', encoding='utf-8'): + if 'b' in mode: + encoding = None + with open(filename, mode, encoding=encoding) as f: + return f.read() + + +def run(cmd): + global verbose + if not verbose: + cmd += ' 2>%s' % os.devnull + print_verbose('executing: %s' % cmd) + if os.system(cmd): + raise EApp('failed command: %s' % cmd) + + +def music2png(format, infile, outfile, modified): + '''Convert ABC notation in file infile to cropped PNG file named outfile.''' + outfile = os.path.abspath(outfile) + outdir = os.path.dirname(outfile) + if not os.path.isdir(outdir): + raise EApp('directory does not exist: %s' % outdir) + basefile = tempfile.mktemp(dir=os.path.dirname(outfile)) + temps = [basefile + ext for ext in ('.abc', '.ly', '.ps', '.midi')] + skip = False + if infile == '-': + source = sys.stdin.read() + checksum = md5(source.encode('utf-8')).digest() + filename = os.path.splitext(outfile)[0] + '.md5' + if modified: + if os.path.isfile(filename) and os.path.isfile(outfile) and \ + checksum == read_file(filename, 'rb'): + skip = True + else: + write_file(filename, checksum, 'wb') + else: + if not os.path.isfile(infile): + raise EApp('input file does not exist: %s' % infile) + if modified and os.path.isfile(outfile) and \ + os.path.getmtime(infile) <= os.path.getmtime(outfile): + skip = True + source = read_file(infile) + if skip: + print_verbose('skipped: no change: %s' % outfile) + return + if format is None: + if source and source.startswith('\\'): # Guess input format. + format = 'ly' + else: + format = 'abc' + # Write temporary source file. + write_file('%s.%s' % (basefile, format), source) + abc = basefile + '.abc' + ly = basefile + '.ly' + png = basefile + '.png' + saved_pwd = os.getcwd() + os.chdir(outdir) + try: + if format == 'abc': + run('abc2ly -o "%s" "%s"' % (ly, abc)) + run('lilypond --png -o "%s" "%s"' % (basefile, ly)) + os.rename(png, outfile) + finally: + os.chdir(saved_pwd) + # Chop the bottom 75 pixels off to get rid of the page footer then crop the + # music image. The -strip option necessary because FOP does not like the + # custom PNG color profile used by Lilypond. + # We reset the +gravity before running -trim to avoid a bug in GraphicsMagick. + run( + 'convert "%s" -strip -gravity South -chop 0x75 +gravity -trim "%s"' % ( + outfile, + outfile + ) + ) + for f in temps: + if os.path.isfile(f): + print_verbose('deleting: %s' % f) + os.remove(f) + + +def usage(msg=''): + if msg: + print_stderr(msg) + print_stderr( + '\n' + 'usage:\n' + ' music2png [options] INFILE\n' + '\n' + 'options:\n' + ' -f FORMAT\n' + ' -o OUTFILE\n' + ' -m\n' + ' -v\n' + ' --help\n' + ' --version' + ) + + +def main(): + # Process command line options. + global verbose + format = None + outfile = None + modified = False + import getopt + opts, args = getopt.getopt(sys.argv[1:], 'f:o:mhv', ['help', 'version']) + for o, v in opts: + if o in ('--help', '-h'): + print(__doc__) + sys.exit(0) + if o == '--version': + print(('music2png version %s' % (VERSION,))) + sys.exit(0) + if o == '-f': + format = v + if o == '-o': + outfile = v + if o == '-m': + modified = True + if o == '-v': + verbose = True + if len(args) != 1: + usage() + sys.exit(1) + infile = args[0] + if format not in (None, 'abc', 'ly'): + usage('invalid FORMAT') + sys.exit(1) + if outfile is None: + if infile == '-': + usage('OUTFILE must be specified') + sys.exit(1) + outfile = os.path.splitext(infile)[0] + '.png' + # Do the work. + music2png(format, infile, outfile, modified) + # Print something to suppress asciidoc 'no output from filter' warnings. + if infile == '-': + sys.stdout.write(' ') + + +if __name__ == "__main__": + try: + main() + except SystemExit: + raise + except KeyboardInterrupt: + sys.exit(1) + except Exception as e: + print_stderr("%s: %s" % (os.path.basename(sys.argv[0]), str(e))) + sys.exit(1) diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/music/music-filter.conf asciidoc-10.1.2/asciidoc/resources/filters/music/music-filter.conf --- asciidoc-8.6.10/asciidoc/resources/filters/music/music-filter.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/music/music-filter.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,42 @@ +# +# AsciiDoc music filter configuration file. +# +# Documented in music-filter.txt in AsciiDoc distribution +# ./examples/website/ directory. +# + +[music-filter-style] + +# When the filter output image is data-uri encoded write it to the indir +# (instead of the outdir) so that encoder can find it. +ifndef::data-uri[] +music-style=template="music-block",subs=(),posattrs=("style","target","format"),filter='music2png.py -m{verbose? -v}{format? -f {format}} -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -' +endif::data-uri[] +ifdef::data-uri[] +music-style=template="music-block",subs=(),posattrs=("style","target","format"),filter='music2png.py -m{verbose? -v}{format? -f {format}} -o "{indir={outdir}}/{imagesdir=}{imagesdir?/}{target}" -' +endif::data-uri[] + +[blockdef-open] +template::[music-filter-style] + +[blockdef-listing] +template::[music-filter-style] + +[paradef-default] +template::[music-filter-style] + +[music-block] +template::[filter-image-blockmacro] + +# +# DEPRECATED: Pre 8.2.7 filter definition. +# +[blockdef-music] +delimiter=^music~{4,}$ +template=music-block +presubs=none +filter=music2png.py{verbose? -v} -f {format=abc} -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" - +posattrs=target,format +# +# DEPRECATED: End +# diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/music/music-filter-test.txt asciidoc-10.1.2/asciidoc/resources/filters/music/music-filter-test.txt --- asciidoc-8.6.10/asciidoc/resources/filters/music/music-filter-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/music/music-filter-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,40 @@ +Music Filter Test +================= + +Details of the filter can be found in `./doc/music-filter.txt`. + + +A tune generated from ABC notation +---------------------------------- + +[music,music1.png] +--------------------------------------------------------------------- +T:The Butterfly +R:slip jig +C:Tommy Potts +H:Fiddle player Tommy Potts made this tune from two older slip jigs, +H:one of which is called "Skin the Peelers" in Roche's collection. +D:Bothy Band: 1975. +M:9/8 +K:Em +vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:| +|:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):| +|:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):| +--------------------------------------------------------------------- + + +A fragment generated from LilyPond source +------------------------------------------ + +["music", "music2.png", "ly", link="music2.ly"] +--------------------------------------------------------------------- +\version "2.10.0" +\paper { + ragged-right = ##t +} +{ + \time 3/4 + \clef bass + c2 e4 g2. f4 e d c2 r4 +} +--------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/source/source-highlight-filter.conf asciidoc-10.1.2/asciidoc/resources/filters/source/source-highlight-filter.conf --- asciidoc-8.6.10/asciidoc/resources/filters/source/source-highlight-filter.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/source/source-highlight-filter.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,140 @@ +# +# AsciiDoc source code highlight filter configuration file. +# +# Documented in source-hightlight-filter.txt in AsciiDoc distribution +# ./examples/website/ directory. +# +# HTML outputs require GNU source-highlight (xhtml11, html4 outputs) +# https://www.gnu.org/software/src-highlite/source-highlight.html +# +# or Pygments (xhtml11 outputs): +# https://pygments.org/ +# +# GNU source-hightlight is default, define the 'pygments' attribute to use +# Pygments. +# + +######################## +# Source block templates +######################## +[source-highlight-block] +template::[listingblock] + +ifdef::basebackend-html[] +[source-highlight-block] + +

{title}

+ +{source-highlighter$highlight:}

+|
+{source-highlighter$highlight:}
+ +endif::basebackend-html[] + +ifdef::basebackend-xhtml11,basebackend-html5[] +[source-highlight-block] +
+ +
{caption=}{title}
+
+{source-highlighter$highlight:}

+|
+{source-highlighter$highlight:}
+
+endif::basebackend-xhtml11,basebackend-html5[] + +# Use DocBook programlisting element. +ifdef::basebackend-docbook[] +[source-highlight-block] +{title} +{title#} +{title%} +| + +{title#} +endif::basebackend-docbook[] + +# Source styles template. +ifdef::basebackend-html[] +[source-filter-style] +ifeval::["{source-highlighter}"=="source-highlight"] +source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight --gen-version -f xhtml -s {language} {src_numbered?--line-number=' '} {src_tab?--tab={src_tab}} {args=}" +endif::[] +ifeval::["{source-highlighter}"=="highlight"] +source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="highlight --no-doc --inline-css --out-format=xhtml --syntax={language@python:py:{language}} {src_numbered?--line-number} {src_tab?--tab={src_tab}} --encoding={encoding} {args=}" +endif::[] +ifeval::["{source-highlighter}"=="pygments"] +source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered"),filter="pygmentize -f html -l {language} {src_numbered?-O linenos=table} {encoding?-O encoding={encoding}} {args=}" +endif::[] +# DEPRECATED: 'pygments' attribute. +ifdef::pygments[] +source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered"),filter="pygmentize -f html -l {language} {src_numbered?-O linenos=table} {encoding?-O encoding={encoding}} {args=}" +endif::[] +endif::basebackend-html[] + +ifdef::basebackend-html4[] +[source-filter-style] +# html4 does not use pygments. +ifeval::["{source-highlighter}"=="source-highlight"] +source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="source-highlight --gen-version -f html -s {language} {src_numbered?--line-number=' '} {src_tab?--tab={src_tab}} {args=}" +endif::[] +ifeval::["{source-highlighter}"=="highlight"] +source-style=template="source-highlight-block",presubs=(),postsubs=("callouts",),posattrs=("style","language","src_numbered","src_tab"),filter="highlight --no-doc --inline-css --out-format=html --syntax={language@python:py:{language}} {src_numbered?--line-number} {src_tab?--tab={src_tab}} {args=}" +endif::[] +endif::basebackend-html4[] + +ifdef::basebackend-docbook[] +[source-filter-style] +source-style=template="source-highlight-block",presubs=(),postsubs=("specialcharacters","callouts"),posattrs=("style","language","src_numbered","src_tab") +endif::basebackend-docbook[] + +######################### +# Source paragraph styles +######################### +[paradef-default] +template::[source-filter-style] + +[paradef-literal] +template::[source-filter-style] + +######################### +# Source block styles +######################### +[blockdef-open] +template::[source-filter-style] + +[blockdef-listing] +template::[source-filter-style] + + +# +# DEPRECATED: Pre 8.2.7 filter definition. +# + +######################### +# Source block definition +######################### +[blockdef-source-highlight] +# The old ^ delimiter is for backward compatibility, may be removed from +# in future versions. +delimiter=(^source~{4,}$)|(^\^{4,}$) +template=source-highlight-block +presubs=none +posattrs=language,src_numbered,src_tab + +ifndef::basebackend-docbook[] +postsubs=callouts +# GNU Source Highlight filter. +filter=source-highlight -f {basebackend-xhtml11?xhtml}{basebackend-html4?html} -s {language} {src_numbered?--line-number} {src_tab?--tab={src_tab}} +endif::basebackend-docbook[] + +ifdef::basebackend-docbook[] +postsubs=specialcharacters,callouts +# In the case of DocBook just pass the listing through and let the DocBook +# toolchain handle it. +filter= +endif::basebackend-docbook[] + +# +# DEPRECATED: End +# diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/source/source-highlight-filter-test.txt asciidoc-10.1.2/asciidoc/resources/filters/source/source-highlight-filter-test.txt --- asciidoc-8.6.10/asciidoc/resources/filters/source/source-highlight-filter-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/source/source-highlight-filter-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,19 @@ +Source Highlight Filter Test +============================= + +Details of the filter can be found in +`./doc/source-highlight-filter.txt`. + +[source,python] +--------------------------------------------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +--------------------------------------------------------------------- + diff -Nru asciidoc-8.6.10/asciidoc/resources/filters/unwraplatex.py asciidoc-10.1.2/asciidoc/resources/filters/unwraplatex.py --- asciidoc-8.6.10/asciidoc/resources/filters/unwraplatex.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/filters/unwraplatex.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,24 @@ +#!/usr/bin/env python3 +""" +NAME + unwraplatex - Removes delimiters from LaTeX source text + +SYNOPSIS + latex2img STDIN + +DESCRIPTION + This filter reads LaTeX source text from STDIN and removes the + surrounding \\[ and \\] delimiters. +""" + +import re +import sys + +sys.stdout.write( + re.sub( + r"(?s)\A(?:\\\[\s*)?(.*?)(?:\\\])?\Z", "\\1", + sys.stdin.read().rstrip() + ) +) +# NOTE append endline in result to prevent 'no output from filter' warning +sys.stdout.write("\n") diff -Nru asciidoc-8.6.10/asciidoc/resources/help.conf asciidoc-10.1.2/asciidoc/resources/help.conf --- asciidoc-8.6.10/asciidoc/resources/help.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/help.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,397 @@ +# AsciiDoc help file. +# +# INI section format, each section contains a topic. +# Displayed with 'asciidoc --help sectionname' command. +# + +# +# Default help topic. +# +[default] + +Man page: asciidoc --help manpage +Syntax: asciidoc --help syntax + +[manpage] + +NAME + + asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SYNOPSIS + + asciidoc [OPTIONS] FILE + +DESCRIPTION + + The asciidoc(1) command translates the AsciiDoc text file FILE to + DocBook or HTML. If FILE is - then the standard input is used. + +OPTIONS + + -a, --attribute=ATTRIBUTE + Define or delete document attribute. ATTRIBUTE is formatted like + NAME=VALUE. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are NAME (the VALUE defaults to an empty string); NAME! + (delete the NAME attribute); NAME=VALUE@ (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This + option may be specified more than once. A special attribute + named trace controls the output of diagnostic information. + + -b, --backend=BACKEND + Backend output file format: docbook45, xhtml11, html4, html5, + slidy, wordpress or latex (the latex backend is experimental). + You can also use the backend alias names html (aliased to + xhtml11) or docbook (aliased to docbook45). Defaults to + html. The --backend option is also used to manage backend + plugins (see [1]PLUGIN COMMANDS). + + -f, --conf-file=CONF_FILE + Use configuration file CONF_FILE.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. + + --doctest + Run Python doctests in asciidoc module. + + -d, --doctype=DOCTYPE + Document type: article, manpage or book. The book document type + is only supported by the docbook backend. Default document type + is article. + + -c, --dump-conf + Dump configuration to stdout. + + --filter=FILTER + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more + than once. The --filter option is also used to manage filter + plugins (see [2]PLUGIN COMMANDS). + + -h, --help [TOPIC] + Print help TOPIC. --help topics will print a list of help + topics, --help syntax summarizes AsciiDoc syntax, --help manpage + prints the AsciiDoc manpage. + + -e, --no-conf + Exclude implicitly loaded configuration files except for those + named like the input file (infile.conf and infile-backend.conf). + + -s, --no-header-footer + Suppress document header and footer output. + + -o, --out-file=OUT_FILE + Write output to file OUT_FILE. Defaults to the base name of + input file with backend extension. If the input is stdin then + the outfile defaults to stdout. If OUT_FILE is - then the + standard output is used. + + -n, --section-numbers + Auto-number HTML article section titles. Synonym for --attribute + numbered. + + --safe + Enable safe mode. Safe mode is disabled by default. AsciiDoc + safe mode skips potentially dangerous scripted sections in + AsciiDoc source files. + + --theme=THEME + Specify a theme name. Synonym for --attribute theme=THEME. The + --theme option is also used to manage theme plugins (see + [3]PLUGIN COMMANDS). + + -v, --verbose + Verbosely print processing information and configuration file + checks to stderr. + + --version + Print program version number. + +PLUGIN COMMANDS + + The asciidoc(1) --filter, --backend and --theme options are used to + install, remove and list AsciiDoc filter, backend and theme plugins. + Syntax: + + asciidoc OPTION install ZIP_FILE [PLUGINS_DIR] + asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR] + asciidoc OPTION list + asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE + + Where: + + OPTION + asciidoc(1) --filter, --backend or --theme option specifying the + type of plugin. + + PLUGIN_NAME + A unique plugin name containing only alphanumeric or underscore + characters. + + ZIP_FILE + A Zip file containing plugin resources, the name must start with + the plugin name e.g. my_filter-1.0.zip packages filter + my_filter. + + PLUGINS_DIR + The directory containing installed plugins. Each plugin is + contained in its own separate subdirectory which has the same + name as the plugin. PLUGINS_DIR defaults to the + $HOME/.asciidoc/filters (for filter plugins) or + $HOME/.asciidoc/backends (for backend plugins) or + $HOME/.asciidoc/themes (for theme plugins). + + PLUGIN_SOURCE + The name of a directory containing the plugin source files or + the name of a single source file. + + The plugin commands perform as follows: + + install + Create a subdirectory in PLUGINS_DIR with the same name as the + plugin then extract the ZIP_FILE into it. + + remove + Delete the PLUGIN_NAME plugin subdirectory and all its contents + from the PLUGINS_DIR. + + list + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). + + build + Create a plugin file named ZIP_FILE containing the files and + subdirectories specified by PLUGIN_SOURCE. File and directory + names starting with a period are skipped. + +EXIT STATUS + + 0 + Success + + 1 + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). + +BUGS + + See the AsciiDoc distribution BUGS file. + +AUTHOR + + AsciiDoc was originally written by Stuart Rackham. Many people have + contributed to it. + +RESOURCES + + GitHub: [4]https://github.com/asciidoc/asciidoc-py3 + + Main web site: [5]https://asciidoc.org/ + +COPYING + + Copyright (C) 2002-2013 Stuart Rackham. + Copyright (C) 2013-2020 AsciiDoc Contributors. + + Free use of this software is granted under the terms of the GNU General + Public License version 2 (GPLv2). + + +[syntax] + +AsciiDoc Markup Syntax Summary +============================== + +A summary of the most commonly used markup. +For a complete reference see the 'AsciiDoc User Guide'. + +Text formatting +--------------- + *bold text* (boldface font) + _emphasized text_ (normally italics) + 'emphasized text' + +monospaced text+ (proportional font) + `monospaced text` (inline literal passthrough) + +Document links +-------------- + [[id]] (define link target) + <> (link to target id) + link:filename#id[caption] (link to external HTML file) + +URLs +---- + Use normal URL and email address syntax or: + + http:address[caption] (link to web page) + mailto:address[caption] (link to mail recipient) + +Images +------ + image:filename[caption] (inline image) + image::filename[caption] (block image) + +Document header +--------------- + + The Document Title + ================== + author + revision, date + +author, email, revision and date are optional. + +Section title underlines +------------------------ + Underlined: + + Level 0 (document title) + ======= + Level 1 + ------- + Level 2 + ~~~~~~~ + Level 3 + ^^^^^^^ + Level 4 (bottom level) + +++++++ + + Single line: + + = Level 0 = (document title) + == Level 1 == + === Level 2 === + ==== Level 3 ==== + ===== Level 4 ===== (bottom level) + +Paragraphs +---------- +A normal paragraph. (styles: literal,verse,quote,listing, + NOTE,TIP,WARNING,IMPORTANT,CAUTION) + An indented literal + paragraph. + +Delimited blocks +---------------- +Delimiters must begin at left margin. + + ------------------- (styles: source,music,graphviz) + listing block + ------------------- + + ................... (styles: listing,verse) + literal block + ................... + + ******************* + sidebar block + ******************* + + [style, author, cite] + ___________________ (styles: quote,verse) + quote block + ___________________ + + =================== (styles: NOTE,TIP,WARNING, + example block IMPORTANT,CAUTION) + =================== + + /////////////////// + comment block + /////////////////// + + +++++++++++++++++++ (styles: pass,asciimath,latexmath) + passthrough block + +++++++++++++++++++ + + [style] (styles: abstract,partintro) + -- + open block + -- + +More block elements +------------------- + [attributes list] + .Block title + // Comment line + include::filename[] + +Tables +------ + .An example table + [width="40%",cols="^,2m",frame="topbot",options="header,footer"] + |====================== + |Column 1 |Column 2 + |1 |Item 1 + |2 |Item 2 + |3 |Item 3 + |6 |Three items + |====================== + + Common attributes: + + grid: none,cols,rows,all + frame: topbot,none,sides,all + options: header,footer + format: psv,csv,dsv + valign: top,bottom,middle + width: 1%..100% + cols: colspec[,colspec,...] + + colspec: [multiplier*][align][width][style] + multiplier: 1... + width: 1... or 1%...100% + align: [horiz][.vert] + horiz: < (left), ^ (center), > (right) + vert: < (top), ^ (middle), > (bottom) + style: d[efault], e[mphasis], m[onospaced], a[sciidoc], + s[trong], l[iteral], v[erse], h[eader] + cell: [cellspec]|data + cellspec: [span*|+][align][style] + span: [colspan][.rowspan] + colspan: 1... + rowspan: 1... + +Bulleted lists +-------------- + - item text + * item text + ** item text + *** item text + **** item text + ***** item text + + (styles: callout,bibliography) + +Numbered lists +-------------- + 1. arabic (decimal) numbering + a. loweralpha numbering + F. upperalpha numbering + iii) lowerroman numbering + IX) upperroman numbering + + . arabic (decimal) numbering + .. loweralpha numbering + ... lowerroman numbering + .... upperalpha numbering + ..... upperroman numbering + + (styles: arabic,loweralpha,upperalpha,lowerroman,upperroman) + +Labeled lists +------------- + label:: item text + label;; item text + label::: item text + label:::: item text + + (styles: horizontal,vertical,glossary,qanda,bibliograpy) + +More inline elements +-------------------- + footnote:[footnote text] (document footnote) + diff -Nru asciidoc-8.6.10/asciidoc/resources/html4.conf asciidoc-10.1.2/asciidoc/resources/html4.conf --- asciidoc-8.6.10/asciidoc/resources/html4.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/html4.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,530 @@ +# +# html4.conf +# +# Asciidoc HTML 4.01 configuration file. +# + +[miscellaneous] +outfilesuffix=.html + +[attributes] +basebackend=html +basebackend-html= +basebackend-html4= +hr=
+ +[replacements2] +# Line break. +(?m)^(.*)\s\+$=\1
+ +[replacements] +ifdef::asciidoc7compatible[] +# Superscripts. +\^(.+?)\^=\1 +# Subscripts. +~(.+?)~=\1 +endif::asciidoc7compatible[] + +[ruler-blockmacro] +
+ +[pagebreak-blockmacro] +
+ +[pi-blockmacro] + + +[pi-inlinemacro] +template::[pi-blockmacro] + +[image-inlinemacro] + +# src attribute must be first attribute for blogpost compatibility. +{data-uri%}{alt={target}} +{data-uri#}{alt={target}} +{link#} + +[image-blockmacro] + + + +{data-uri%}{alt={target}} +{data-uri#}{alt={target}} +{link#} +

{caption={figure-caption} {counter:figure-number}. }{title}

+ + +[unfloat-blockmacro] +
+ +[indexterm-inlinemacro] +# Index term. +{empty} + +[indexterm2-inlinemacro] +# Index term. +# Single entry index term that is visible in the primary text flow. +{1} + +[footnote-inlinemacro] +# footnote:[]. +
[{0}]
+ +[footnoteref-inlinemacro] +# footnoteref:[], create reference to footnote. +{2%}
[{1}]
+# footnoteref:[,], create footnote with ID. +{2#}
[{2}]
+ +[callout-inlinemacro] +# Callout. +<{index}> + +# Comment line macros. +[comment-inlinemacro] +{showcomments#}
{passtext}
+ +[comment-blockmacro] +{showcomments#}

{passtext}

+ +[literal-inlinemacro] +# Inline literal. +{passtext} + +# List tags. +[listtags-bulleted] +list={id?}{title?

{title}

}| +item=
  • |
  • +text=

    |

    + +[listtags-numbered] +list={id?}{title?

    {title}

    }
      |
    +item=
  • |
  • +text=

    |

    + +[listtags-labeled] +list={id?}{title?

    {title}

    }| +entry= +label= +term=
    {strong-option?}|{strong-option?}
    +item=
    |
    +text=

    |

    + +[listtags-horizontal] +list={id?}{title?

    {title}

    }|
    +entry=| +label={strong-option?}|{strong-option?} +term=|
    +item=| +text=

    |

    + +[listtags-callout] +list={id?}{title?

    {title}

    }| +item=
  • |
  • +text=

    |

    + +[listtags-qanda] +list={id?}{title?

    {title}

    }| +entry=
  • |
  • +label= +term=

    |

    +item= +text=

    |

    + +[listtags-glossary] +list={id?}{title?

    {title}

    }| +entry= +label= +term=
    |
    +item=
    |
    +text=

    |

    + +[listtags-bibliography] +list={id?}{title?

    {title}

    }| +item=
  • |
  • +text=

    |

    + +[tags] +# Quoted text. +emphasis={1?}|{1?} +strong={1?}|{1?} +monospaced={1?}|{1?} +singlequoted={lsquo}{1?}|{1?}{rsquo} +doublequoted={ldquo}{1?}|{1?}{rdquo} +unquoted={1?}|{1?} +superscript={1?}|{1?} +subscript={1?}|{1?} + +ifdef::deprecated-quotes[] +# Override with deprecated quote attributes. +emphasis={role?}|{role?} +strong={role?}|{role?} +monospaced={role?}|{role?} +singlequoted={role?}{1,2,3?}{amp}#8216;|{amp}#8217;{1,2,3?}{role?} +doublequoted={role?}{1,2,3?}{amp}#8220;|{amp}#8221;{1,2,3?}{role?} +unquoted={role?}{1,2,3?}|{1,2,3?}{role?} +superscript={role?}|{role?} +subscript={role?}|{role?} +endif::deprecated-quotes[] + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[irc-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +[callto-inlinemacro] +{0={target}} +[link-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0=[{target}]} +# <> +[xref2-inlinemacro] +{2=[{1}]} + +# Special word substitution. +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +{id?}{title?{title}
    } +| +

    + +[admonitionparagraph] +template::[admonitionblock] + +# Delimited blocks. +[passthroughblock] +| + +[listingblock] + +

    {title}

    +
    +
    
    +|
    +
    +
    + +[literalblock] + +

    {title}

    + +| + + +[sidebarblock] + + +
    +

    {title}

    +| +
    + +[openblock] + +

    {title}

    +| + + +[partintroblock] +template::[openblock] + +[abstractblock] +template::[quoteblock] + +[quoteblock] + + +

    {title}

    +| +

    +{citetitle}{attribution?
    } +— {attribution} +

    + + +[verseblock] + + +

    {title}

    +# Font inheritance broken in IE6. +
    +|
    +
    +

    +{citetitle}{attribution?
    } +— {attribution} +

    + + +[exampleblock] + + +
    +| +
    +

    {caption={example-caption} {counter:example-number}. }{title}

    + +[admonitionblock] + + + + +
    +{data-uri%}{icons#}{caption} +{data-uri#}{icons#}{caption} +{icons%}

    {caption}

    +
    +

    {title}

    +| +
    + +[mathblock] +# Here to suppress missing block warning (html4 does not include math +# JavaScripts). + +

    {title}

    + +| + + +# Tables. +[tabletags-default] +bodyrow=| +headdata=| +footdata=| +bodydata=| +paragraph=

    |

    + +[tabletags-header] +paragraph=

    |

    + +[tabletags-emphasis] +paragraph=

    |

    + +[tabletags-strong] +paragraph=

    |

    + +[tabletags-monospaced] +paragraph=

    |

    + +[tabletags-verse] +bodydata=
    |
    +paragraph= + +[tabletags-literal] +bodydata=
    |
    +paragraph= + +[tabletags-asciidoc] +bodydata=
    |
    +paragraph= + +[table] + + + +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    +

    {caption={table-caption} {counter:table-number}. }{title}

    + + +#-------------------------------------------------------------------- +# Deprecated old table definitions. +# + +[miscellaneous] +# Screen width in pixels. +pagewidth=800 +pageunits= + +[old_tabledef-default] +template=old_table +bodyrow=| +headdata=| +footdata=| +bodydata=| + +[old_table] +

    {caption={table-caption}}{title}

    + + +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    + +# End of deprecated old table definitions. +#-------------------------------------------------------------------- + +[floatingtitle] +{id?}{title} + +[preamble] +# Untitled elements between header and first section title. + +| + +[sect0] +{doctype-manpage%}{hr} +

    {id?}{title}

    +| + +[sect1] +{doctype-manpage%}{hr} +{id?}{numbered?{sectnum} }{title} +| + +[sect2] +{id?}{numbered?{sectnum} }{title} +| + +[sect3] +{id?}{numbered?{sectnum} }{title} +| + +[sect4] +{id?}{title} +| + +[appendix] +{hr} +{id?}{numbered?{sectnum} }{appendix-caption} {counter:appendix-number:A}: {title} +| + +[footer] +# Removing footer date and version if footer-style set to none +ifeval::["{footer-style=default}"!="none"] +

    +

    +

    +template::[footer-text] +

    +endif::[] + + + +[header-declarations] + + + + + + + +{title} +{title%}{doctitle=} +{docinfo1,docinfo2#}{include:{docdir}/docinfo.html} +{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} +template::[docinfo] + + +[footer-date] +# Default footer date is document modification time +ifeval::["{footer-style=default}"!="revdate"] + {docdate} {doctime} +endif::[] +# If set to "revdate", it'll be set to the revision date +ifeval::["{footer-style=default}"=="revdate"] + {revdate} +endif::[] + +#-------------------------------- +# article and book document types +#-------------------------------- +ifndef::doctype-manpage[] + +[header] +template::[header-declarations] + +{notitle%}

    {doctitle}

    +{doctitle#}

    +{doctitle#}{author}
    +{doctitle#}<{email}>
    +{doctitle#}version {revnumber}{revdate?,} +{doctitle#}{revdate} +{doctitle#}
    {revremark} +{doctitle#}

    + +endif::doctype-manpage[] + +#------------------------- +# manpage document type +#------------------------- +ifdef::doctype-manpage[] + +[tags] +# This is more inline with man page convention. +emphasis=| +vlistterm=
    |
    + +[header] +template::[header-declarations] + +{hr} +

    + {doctitle} Manual Page +

    +{hr} + +[name] +

    {manname-title}

    +

    {manname} - + {manpurpose} +

    + +[synopsis] +template::[sect1] + +endif::doctype-manpage[] diff -Nru asciidoc-8.6.10/asciidoc/resources/html5.conf asciidoc-10.1.2/asciidoc/resources/html5.conf --- asciidoc-8.6.10/asciidoc/resources/html5.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/html5.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,725 @@ +# +# html5.conf +# +# Asciidoc configuration file. +# html5 backend. +# + +[miscellaneous] +outfilesuffix=.html + +[attributes] +basebackend=html +basebackend-html= +basebackend-html5= + +[replacements2] +# Line break. +(?m)^(.*)\s\+$=\1
    + +[replacements] +ifdef::asciidoc7compatible[] +# Superscripts. +\^(.+?)\^=\1 +# Subscripts. +~(.+?)~=\1 +endif::asciidoc7compatible[] + +[ruler-blockmacro] +
    + +[pagebreak-blockmacro] +
    + +[blockdef-pass] +asciimath-style=template="asciimathblock",subs=() +latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py" + +[macros] +^(?Paudio|video)::(?P\S*?)(\[(?P.*?)\])$=# +# math macros. +# Special characters are escaped in HTML math markup. +(?s)[\\]?(?Pasciimath):(?P\S*?)\[(?P.*?)(?asciimath)::(?P\S*?)(\[(?P.*?)\])$=#[specialcharacters] +(?s)[\\]?(?Platexmath):(?P\S*?)\[(?:\$\s*)?(?P.*?)(?:\s*\$)?(?latexmath)::(?P\S*?)(\[(?:\\\[\s*)?(?P.*?)(?:\s*\\\])?\])$=#[specialcharacters] + +[asciimath-inlinemacro] +`{passtext}` + +[asciimath-blockmacro] +
    +
    +
    {title}
    +`{passtext}` +
    + +[asciimathblock] +
    +
    +
    {title}
    +`|` +
    + +[latexmath-inlinemacro] +${passtext}$ + +[latexmath-blockmacro] +
    +
    +
    {title}
    +{backslash}[{passtext}{backslash}] +
    + +[latexmathblock] +
    +
    +
    {title}
    +\[|\] +
    + +[image-inlinemacro] + + +{data-uri%}{alt={target}} +{data-uri#}{alt={target}} +{link#} + + +[image-blockmacro] +
    + +
    {caption={figure-caption} {counter:figure-number}. }{title}
    +
    + +[audio-blockmacro] +
    +
    {caption=}{title}
    +
    + +
    + +[video-blockmacro] +
    +
    {caption=}{title}
    +
    + +
    + +[unfloat-blockmacro] +
    + +[toc-blockmacro] +template::[toc] + +[indexterm-inlinemacro] +# Index term. +{empty} + +[indexterm2-inlinemacro] +# Index term. +# Single entry index term that is visible in the primary text flow. +{1} + +[footnote-inlinemacro] +# footnote:[]. +
    [{0}]
    + +[footnoteref-inlinemacro] +# footnoteref:[], create reference to footnote. +{2%}
    [{1}]
    +# footnoteref:[,], create footnote with ID. +{2#}
    [{2}]
    + +[callout-inlinemacro] +ifndef::icons[] +<{index}> +endif::icons[] +ifdef::icons[] +ifndef::data-uri[] +{index} +endif::data-uri[] +ifdef::data-uri[] +{index} +endif::data-uri[] +endif::icons[] + +# Comment line macros. +[comment-inlinemacro] +{showcomments#}
    {passtext}
    + +[comment-blockmacro] +{showcomments#}

    {passtext}

    + +[literal-inlinemacro] +# Inline literal. +{passtext} + +# List tags. +[listtags-bulleted] +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    + +[listtags-numbered] +# The start attribute is not valid XHTML 1.1 but all browsers support it. +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    + +[listtags-labeled] +list=
    {title?
    {title}
    }
    |
    +entry= +label= +term=
    |
    +item=
    |
    +text=

    |

    + +[listtags-horizontal] +list=
    {title?
    {title}
    }{labelwidth?}{itemwidth?}|
    +label=| +term=|
    +entry=| +item=| +text=

    |

    + +[listtags-qanda] +list=
    {title?
    {title}
    }
      |
    +entry=
  • |
  • +label= +term=

    |

    +item= +text=

    |

    + +[listtags-callout] +ifndef::icons[] +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    +endif::icons[] +ifdef::icons[] +list=
    {title?
    {title}
    }|
    +ifndef::data-uri[] +item={listindex}| +endif::data-uri[] +ifdef::data-uri[] +item={listindex}| +endif::data-uri[] +text=| +endif::icons[] + +[listtags-glossary] +list=
    {title?
    {title}
    }
    |
    +label= +entry= +term=
    |
    +item=
    |
    +text=

    |

    + +[listtags-bibliography] +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    + +[tags] +# Quoted text. +emphasis={1?}|{1?} +strong={1?}|{1?} +monospaced=| +singlequoted={lsquo}{1?}|{1?}{rsquo} +doublequoted={ldquo}{1?}|{1?}{rdquo} +unquoted={1?}|{1?} +superscript={1?}|{1?} +subscript={1?}|{1?} + +ifdef::deprecated-quotes[] +# Override with deprecated quote attributes. +emphasis={role?}|{role?} +strong={role?}|{role?} +monospaced=| +singlequoted={role?}{1,2,3?}{amp}#8216;|{amp}#8217;{1,2,3?}{role?} +doublequoted={role?}{1,2,3?}{amp}#8220;|{amp}#8221;{1,2,3?}{role?} +unquoted={role?}{1,2,3?}|{1,2,3?}{role?} +superscript={role?}|{role?} +subscript={role?}|{role?} +endif::deprecated-quotes[] + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[irc-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +[link-inlinemacro] +{0={target}} +[callto-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0=[{target}]} +# <> +[xref2-inlinemacro] +{2=[{1}]} + +# Special word substitution. +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +
    {title?
    {title}
    }

    +| +

    + +[admonitionparagraph] +template::[admonitionblock] + +# Delimited blocks. +[listingblock] +
    +
    {caption=}{title}
    +
    +
    +|
    +
    +
    + +[literalblock] +
    +
    {title}
    +
    +
    +|
    +
    +
    + +[sidebarblock] +
    +
    +
    {title}
    +| +
    + +[openblock] +
    +
    {title}
    +
    +| +
    + +[partintroblock] +template::[openblock] + +[abstractblock] +template::[quoteblock] + +[quoteblock] +
    +
    {title}
    +
    +| +
    +
    +{citetitle}{attribution?
    } +— {attribution} +
    + +[verseblock] +
    +
    {title}
    +
    +|
    +
    +
    +{citetitle}{attribution?
    } +— {attribution} +
    + +[exampleblock] +
    +
    {caption={example-caption} {counter:example-number}. }{title}
    +
    +| +
    + +[admonitionblock] +
    + + + +
    +{data-uri%}{icons#}{caption} +{data-uri#}{icons#}{caption} +{icons%}
    {caption}
    +
    +
    {title}
    +| +
    +
    + +# Tables. +[tabletags-default] +colspec= +bodyrow=| +headdata=| +bodydata=| +paragraph=

    |

    + +[tabletags-header] +paragraph=

    |

    + +[tabletags-emphasis] +paragraph=

    |

    + +[tabletags-strong] +paragraph=

    |

    + +[tabletags-monospaced] +paragraph=

    |

    + +[tabletags-verse] +bodydata=
    |
    +paragraph= + +[tabletags-literal] +bodydata=
    |
    +paragraph= + +[tabletags-asciidoc] +bodydata=
    |
    +paragraph= + +[table] + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    {caption={table-caption} {counter:table-number}. }{title}
    + +#-------------------------------------------------------------------- +# Deprecated old table definitions. +# + +[miscellaneous] +# Screen width in pixels. +pagewidth=800 +pageunits=px + +[old_tabledef-default] +template=old_table +colspec= +bodyrow=| +headdata=| +footdata=| +bodydata=| + +[old_table] + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    {caption={table-caption}}{title}
    + +# End of deprecated old table definitions. +#-------------------------------------------------------------------- + +[floatingtitle] +{title} + +[preamble] +# Untitled elements between header and first section title. +
    +
    +| +
    +
    + +# Document sections. +[sect0] +{title} +| + +[sect1] +
    +{numbered?{sectnum} }{title} +
    +| +
    +
    + +[sect2] +
    +{numbered?{sectnum} }{title} +| +
    + +[sect3] +
    +{numbered?{sectnum} }{title} +| +
    + +[sect4] +
    +{title} +| +
    + +[appendix] +
    +{numbered?{sectnum} }{appendix-caption} {counter:appendix-number:A}: {title} +
    +| +
    +
    + +[toc] +
    +
    {toc-title}
    + +
    + +[header] + + + + + + + +{title} +{title%}{doctitle=} +ifdef::linkcss[] + +ifeval::["{source-highlighter}"=="pygments"] + +endif::[] + +# DEPRECATED: 'pygments' attribute. +ifdef::pygments[] + +ifdef::toc2[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +ifndef::disable-javascript[] +ifdef::linkcss[] + + + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::disable-javascript[] +ifdef::asciimath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::asciimath[] +ifdef::latexmath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::latexmath[] +ifdef::mathjax[] + + +endif::mathjax[] +{docinfo1,docinfo2#}{include:{docdir}/docinfo.html} +{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} +template::[docinfo] + + +# Article, book header. +ifndef::doctype-manpage[] + +endif::doctype-manpage[] +# Man page header. +ifdef::doctype-manpage[] + +endif::doctype-manpage[] +
    + +[footer] +
    +{disable-javascript%

    } + + + + +[footer-date] +# Default footer date is document modification time +ifeval::["{footer-style=default}"!="revdate"] + {docdate} {doctime} +endif::[] +# If set to "revdate", it'll be set to the revision date +ifeval::["{footer-style=default}"=="revdate"] + {revdate} +endif::[] + +ifdef::doctype-manpage[] +[synopsis] +template::[sect1] +endif::doctype-manpage[] + Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/10.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/10.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/11.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/11.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/12.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/12.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/13.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/13.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/14.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/14.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/15.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/15.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/1.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/1.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/2.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/2.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/3.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/3.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/4.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/4.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/5.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/5.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/6.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/6.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/7.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/7.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/8.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/8.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/callouts/9.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/callouts/9.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/caution.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/caution.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/example.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/example.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/home.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/home.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/important.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/important.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/next.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/next.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/note.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/note.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/prev.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/prev.png differ diff -Nru asciidoc-8.6.10/asciidoc/resources/icons/README asciidoc-10.1.2/asciidoc/resources/icons/README --- asciidoc-8.6.10/asciidoc/resources/icons/README 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/icons/README 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,5 @@ +Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook +icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency +from the Jimmac icons to get round MS IE and FOP PNG incompatibilities. + +Stuart Rackham Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/tip.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/tip.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/up.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/up.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/asciidoc/resources/icons/warning.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/asciidoc/resources/icons/warning.png differ diff -Nru asciidoc-8.6.10/asciidoc/resources/javascripts/asciidoc.js asciidoc-10.1.2/asciidoc/resources/javascripts/asciidoc.js --- asciidoc-8.6.10/asciidoc/resources/javascripts/asciidoc.js 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/javascripts/asciidoc.js 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,189 @@ +var asciidoc = { // Namespace. + +///////////////////////////////////////////////////////////////////// +// Table Of Contents generator +///////////////////////////////////////////////////////////////////// + +/* Author: Mihai Bazon, September 2002 + * http://students.infoiasi.ro/~mishoo + * + * Table Of Content generator + * Version: 0.4 + * + * Feel free to use this script under the terms of the GNU General Public + * License, as long as you do not remove or alter this notice. + */ + + /* modified by Troy D. Hanson, September 2006. License: GPL */ + /* modified by Stuart Rackham, 2006, 2009. License: GPL */ + +// toclevels = 1..4. +toc: function (toclevels) { + + function getText(el) { + var text = ""; + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. + text += i.data; + else if (i.firstChild != null) + text += getText(i); + } + return text; + } + + function TocEntry(el, text, toclevel) { + this.element = el; + this.text = text; + this.toclevel = toclevel; + } + + function tocEntries(el, toclevels) { + var result = new Array; + var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); + // Function that scans the DOM tree for header elements (the DOM2 + // nodeIterator API would be a better technique but not supported by all + // browsers). + var iterate = function (el) { + for (var i = el.firstChild; i != null; i = i.nextSibling) { + if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { + var mo = re.exec(i.tagName); + if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { + result[result.length] = new TocEntry(i, getText(i), mo[1]-1); + } + iterate(i); + } + } + } + iterate(el); + return result; + } + + var toc = document.getElementById("toc"); + if (!toc) { + return; + } + + // Delete existing TOC entries in case we're reloading the TOC. + var tocEntriesToRemove = []; + var i; + for (i = 0; i < toc.childNodes.length; i++) { + var entry = toc.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' + && entry.getAttribute("class") + && entry.getAttribute("class").match(/^toclevel/)) + tocEntriesToRemove.push(entry); + } + for (i = 0; i < tocEntriesToRemove.length; i++) { + toc.removeChild(tocEntriesToRemove[i]); + } + + // Rebuild TOC entries. + var entries = tocEntries(document.getElementById("content"), toclevels); + for (var i = 0; i < entries.length; ++i) { + var entry = entries[i]; + if (entry.element.id == "") + entry.element.id = "_toc_" + i; + var a = document.createElement("a"); + a.href = "#" + entry.element.id; + a.appendChild(document.createTextNode(entry.text)); + var div = document.createElement("div"); + div.appendChild(a); + div.className = "toclevel" + entry.toclevel; + toc.appendChild(div); + } + if (entries.length == 0) + toc.parentNode.removeChild(toc); +}, + + +///////////////////////////////////////////////////////////////////// +// Footnotes generator +///////////////////////////////////////////////////////////////////// + +/* Based on footnote generation code from: + * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html + */ + +footnotes: function () { + // Delete existing footnote entries in case we're reloading the footnodes. + var i; + var noteholder = document.getElementById("footnotes"); + if (!noteholder) { + return; + } + var entriesToRemove = []; + for (i = 0; i < noteholder.childNodes.length; i++) { + var entry = noteholder.childNodes[i]; + if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") + entriesToRemove.push(entry); + } + for (i = 0; i < entriesToRemove.length; i++) { + noteholder.removeChild(entriesToRemove[i]); + } + + // Rebuild footnote entries. + var cont = document.getElementById("content"); + var spans = cont.getElementsByTagName("span"); + var refs = {}; + var n = 0; + for (i=0; i" + n + "]"; + spans[i].setAttribute("data-note", note); + } + noteholder.innerHTML += + "
    " + + "" + + n + ". " + note + "
    "; + var id =spans[i].getAttribute("id"); + if (id != null) refs["#"+id] = n; + } + } + if (n == 0) + noteholder.parentNode.removeChild(noteholder); + else { + // Process footnoterefs. + for (i=0; i" + n + "]"; + } + } + } +}, + +install: function(toclevels) { + var timerId; + + function reinstall() { + asciidoc.footnotes(); + if (toclevels) { + asciidoc.toc(toclevels); + } + } + + function reinstallAndRemoveTimer() { + clearInterval(timerId); + reinstall(); + } + + timerId = setInterval(reinstall, 500); + if (document.addEventListener) + document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); + else + window.onload = reinstallAndRemoveTimer; +} + +} diff -Nru asciidoc-8.6.10/asciidoc/resources/javascripts/ASCIIMathML.js asciidoc-10.1.2/asciidoc/resources/javascripts/ASCIIMathML.js --- asciidoc-8.6.10/asciidoc/resources/javascripts/ASCIIMathML.js 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/javascripts/ASCIIMathML.js 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,938 @@ +/* +ASCIIMathML.js +============== +This file contains JavaScript functions to convert ASCII math notation +to Presentation MathML. The conversion is done while the (X)HTML page +loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet +Explorer 6+MathPlayer (http://www.dessci.com/en/products/mathplayer/). +Just add the next line to your (X)HTML page with this file in the same folder: +This is a convenient and inexpensive solution for authoring MathML. + +Version 1.4.7 Dec 15, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen +Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js +For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt +If you use it on a webpage, please send the URL to jipsen@chapman.edu + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License (at http://www.gnu.org/copyleft/gpl.html) +for more details. +*/ + +var checkForMathML = true; // check if browser can display MathML +var notifyIfNoMathML = true; // display note if no MathML capability +var alertIfNoMathML = false; // show alert box if no MathML capability +var mathcolor = ""; // change it to "" (to inherit) or any other color +var mathfontfamily = "serif"; // change to "" to inherit (works in IE) + // or another family (e.g. "arial") +var displaystyle = true; // puts limits above and below large operators +var showasciiformulaonhover = true; // helps students learn ASCIIMath +var decimalsign = "."; // change to "," if you like, beware of `(1,2)`! +var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters +var AMdelimiter2 = "$", AMescape2 = "\\\\\\$", AMdelimiter2regexp = "\\$"; +var doubleblankmathdelimiter = false; // if true, x+1 is equal to `x+1` + // for IE this works only in +//var separatetokens;// has been removed (email me if this is a problem) +var isIE = document.createElementNS==null; + +if (document.getElementById==null) + alert("This webpage requires a recent browser such as\ +\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer") + +// all further global variables start with "AM" + +function AMcreateElementXHTML(t) { + if (isIE) return document.createElement(t); + else return document.createElementNS("http://www.w3.org/1999/xhtml",t); +} + +function AMnoMathMLNote() { + var nd = AMcreateElementXHTML("h3"); + nd.setAttribute("align","center") + nd.appendChild(AMcreateElementXHTML("p")); + nd.appendChild(document.createTextNode("To view the ")); + var an = AMcreateElementXHTML("a"); + an.appendChild(document.createTextNode("ASCIIMathML")); + an.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html"); + nd.appendChild(an); + nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); + an = AMcreateElementXHTML("a"); + an.appendChild(document.createTextNode("MathPlayer")); + an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); + nd.appendChild(an); + nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox")); + nd.appendChild(AMcreateElementXHTML("p")); + return nd; +} + +function AMisMathMLavailable() { + if (navigator.appName.slice(0,8)=="Netscape") + if (navigator.appVersion.slice(0,1)>="5") return null; + else return AMnoMathMLNote(); + else if (navigator.appName.slice(0,9)=="Microsoft") + try { + var ActiveX = new ActiveXObject("MathPlayer.Factory.1"); + return null; + } catch (e) { + return AMnoMathMLNote(); + } + else return AMnoMathMLNote(); +} + +// character lists for Mozilla/Netscape fonts +var AMcal = [0xEF35,0x212C,0xEF36,0xEF37,0x2130,0x2131,0xEF38,0x210B,0x2110,0xEF39,0xEF3A,0x2112,0x2133,0xEF3B,0xEF3C,0xEF3D,0xEF3E,0x211B,0xEF3F,0xEF40,0xEF41,0xEF42,0xEF43,0xEF44,0xEF45,0xEF46]; +var AMfrk = [0xEF5D,0xEF5E,0x212D,0xEF5F,0xEF60,0xEF61,0xEF62,0x210C,0x2111,0xEF63,0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0x211C,0xEF6B,0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0x2128]; +var AMbbb = [0xEF8C,0xEF8D,0x2102,0xEF8E,0xEF8F,0xEF90,0xEF91,0x210D,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0x2115,0xEF97,0x2119,0x211A,0x211D,0xEF98,0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0x2124]; + +var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, + RIGHTBRACKET = 5, SPACE = 6, UNDEROVER = 7, DEFINITION = 8, + LEFTRIGHT = 9, TEXT = 10; // token types + +var AMsqrt = {input:"sqrt", tag:"msqrt", output:"sqrt", tex:null, ttype:UNARY}, + AMroot = {input:"root", tag:"mroot", output:"root", tex:null, ttype:BINARY}, + AMfrac = {input:"frac", tag:"mfrac", output:"/", tex:null, ttype:BINARY}, + AMdiv = {input:"/", tag:"mfrac", output:"/", tex:null, ttype:INFIX}, + AMover = {input:"stackrel", tag:"mover", output:"stackrel", tex:null, ttype:BINARY}, + AMsub = {input:"_", tag:"msub", output:"_", tex:null, ttype:INFIX}, + AMsup = {input:"^", tag:"msup", output:"^", tex:null, ttype:INFIX}, + AMtext = {input:"text", tag:"mtext", output:"text", tex:null, ttype:TEXT}, + AMmbox = {input:"mbox", tag:"mtext", output:"mbox", tex:null, ttype:TEXT}, + AMquote = {input:"\"", tag:"mtext", output:"mbox", tex:null, ttype:TEXT}; + +var AMsymbols = [ +//some greek symbols +{input:"alpha", tag:"mi", output:"\u03B1", tex:null, ttype:CONST}, +{input:"beta", tag:"mi", output:"\u03B2", tex:null, ttype:CONST}, +{input:"chi", tag:"mi", output:"\u03C7", tex:null, ttype:CONST}, +{input:"delta", tag:"mi", output:"\u03B4", tex:null, ttype:CONST}, +{input:"Delta", tag:"mo", output:"\u0394", tex:null, ttype:CONST}, +{input:"epsi", tag:"mi", output:"\u03B5", tex:"epsilon", ttype:CONST}, +{input:"varepsilon", tag:"mi", output:"\u025B", tex:null, ttype:CONST}, +{input:"eta", tag:"mi", output:"\u03B7", tex:null, ttype:CONST}, +{input:"gamma", tag:"mi", output:"\u03B3", tex:null, ttype:CONST}, +{input:"Gamma", tag:"mo", output:"\u0393", tex:null, ttype:CONST}, +{input:"iota", tag:"mi", output:"\u03B9", tex:null, ttype:CONST}, +{input:"kappa", tag:"mi", output:"\u03BA", tex:null, ttype:CONST}, +{input:"lambda", tag:"mi", output:"\u03BB", tex:null, ttype:CONST}, +{input:"Lambda", tag:"mo", output:"\u039B", tex:null, ttype:CONST}, +{input:"mu", tag:"mi", output:"\u03BC", tex:null, ttype:CONST}, +{input:"nu", tag:"mi", output:"\u03BD", tex:null, ttype:CONST}, +{input:"omega", tag:"mi", output:"\u03C9", tex:null, ttype:CONST}, +{input:"Omega", tag:"mo", output:"\u03A9", tex:null, ttype:CONST}, +{input:"phi", tag:"mi", output:"\u03C6", tex:null, ttype:CONST}, +{input:"varphi", tag:"mi", output:"\u03D5", tex:null, ttype:CONST}, +{input:"Phi", tag:"mo", output:"\u03A6", tex:null, ttype:CONST}, +{input:"pi", tag:"mi", output:"\u03C0", tex:null, ttype:CONST}, +{input:"Pi", tag:"mo", output:"\u03A0", tex:null, ttype:CONST}, +{input:"psi", tag:"mi", output:"\u03C8", tex:null, ttype:CONST}, +{input:"Psi", tag:"mi", output:"\u03A8", tex:null, ttype:CONST}, +{input:"rho", tag:"mi", output:"\u03C1", tex:null, ttype:CONST}, +{input:"sigma", tag:"mi", output:"\u03C3", tex:null, ttype:CONST}, +{input:"Sigma", tag:"mo", output:"\u03A3", tex:null, ttype:CONST}, +{input:"tau", tag:"mi", output:"\u03C4", tex:null, ttype:CONST}, +{input:"theta", tag:"mi", output:"\u03B8", tex:null, ttype:CONST}, +{input:"vartheta", tag:"mi", output:"\u03D1", tex:null, ttype:CONST}, +{input:"Theta", tag:"mo", output:"\u0398", tex:null, ttype:CONST}, +{input:"upsilon", tag:"mi", output:"\u03C5", tex:null, ttype:CONST}, +{input:"xi", tag:"mi", output:"\u03BE", tex:null, ttype:CONST}, +{input:"Xi", tag:"mo", output:"\u039E", tex:null, ttype:CONST}, +{input:"zeta", tag:"mi", output:"\u03B6", tex:null, ttype:CONST}, + +//binary operation symbols +{input:"*", tag:"mo", output:"\u22C5", tex:"cdot", ttype:CONST}, +{input:"**", tag:"mo", output:"\u22C6", tex:"star", ttype:CONST}, +{input:"//", tag:"mo", output:"/", tex:null, ttype:CONST}, +{input:"\\\\", tag:"mo", output:"\\", tex:"backslash", ttype:CONST}, +{input:"setminus", tag:"mo", output:"\\", tex:null, ttype:CONST}, +{input:"xx", tag:"mo", output:"\u00D7", tex:"times", ttype:CONST}, +{input:"-:", tag:"mo", output:"\u00F7", tex:"divide", ttype:CONST}, +{input:"@", tag:"mo", output:"\u2218", tex:"circ", ttype:CONST}, +{input:"o+", tag:"mo", output:"\u2295", tex:"oplus", ttype:CONST}, +{input:"ox", tag:"mo", output:"\u2297", tex:"otimes", ttype:CONST}, +{input:"o.", tag:"mo", output:"\u2299", tex:"odot", ttype:CONST}, +{input:"sum", tag:"mo", output:"\u2211", tex:null, ttype:UNDEROVER}, +{input:"prod", tag:"mo", output:"\u220F", tex:null, ttype:UNDEROVER}, +{input:"^^", tag:"mo", output:"\u2227", tex:"wedge", ttype:CONST}, +{input:"^^^", tag:"mo", output:"\u22C0", tex:"bigwedge", ttype:UNDEROVER}, +{input:"vv", tag:"mo", output:"\u2228", tex:"vee", ttype:CONST}, +{input:"vvv", tag:"mo", output:"\u22C1", tex:"bigvee", ttype:UNDEROVER}, +{input:"nn", tag:"mo", output:"\u2229", tex:"cap", ttype:CONST}, +{input:"nnn", tag:"mo", output:"\u22C2", tex:"bigcap", ttype:UNDEROVER}, +{input:"uu", tag:"mo", output:"\u222A", tex:"cup", ttype:CONST}, +{input:"uuu", tag:"mo", output:"\u22C3", tex:"bigcup", ttype:UNDEROVER}, + +//binary relation symbols +{input:"!=", tag:"mo", output:"\u2260", tex:"ne", ttype:CONST}, +{input:":=", tag:"mo", output:":=", tex:null, ttype:CONST}, +{input:"lt", tag:"mo", output:"<", tex:null, ttype:CONST}, +{input:"<=", tag:"mo", output:"\u2264", tex:"le", ttype:CONST}, +{input:"lt=", tag:"mo", output:"\u2264", tex:"leq", ttype:CONST}, +{input:">=", tag:"mo", output:"\u2265", tex:"ge", ttype:CONST}, +{input:"geq", tag:"mo", output:"\u2265", tex:null, ttype:CONST}, +{input:"-<", tag:"mo", output:"\u227A", tex:"prec", ttype:CONST}, +{input:"-lt", tag:"mo", output:"\u227A", tex:null, ttype:CONST}, +{input:">-", tag:"mo", output:"\u227B", tex:"succ", ttype:CONST}, +{input:"-<=", tag:"mo", output:"\u2AAF", tex:"preceq", ttype:CONST}, +{input:">-=", tag:"mo", output:"\u2AB0", tex:"succeq", ttype:CONST}, +{input:"in", tag:"mo", output:"\u2208", tex:null, ttype:CONST}, +{input:"!in", tag:"mo", output:"\u2209", tex:"notin", ttype:CONST}, +{input:"sub", tag:"mo", output:"\u2282", tex:"subset", ttype:CONST}, +{input:"sup", tag:"mo", output:"\u2283", tex:"supset", ttype:CONST}, +{input:"sube", tag:"mo", output:"\u2286", tex:"subseteq", ttype:CONST}, +{input:"supe", tag:"mo", output:"\u2287", tex:"supseteq", ttype:CONST}, +{input:"-=", tag:"mo", output:"\u2261", tex:"equiv", ttype:CONST}, +{input:"~=", tag:"mo", output:"\u2245", tex:"cong", ttype:CONST}, +{input:"~~", tag:"mo", output:"\u2248", tex:"approx", ttype:CONST}, +{input:"prop", tag:"mo", output:"\u221D", tex:"propto", ttype:CONST}, + +//logical symbols +{input:"and", tag:"mtext", output:"and", tex:null, ttype:SPACE}, +{input:"or", tag:"mtext", output:"or", tex:null, ttype:SPACE}, +{input:"not", tag:"mo", output:"\u00AC", tex:"neg", ttype:CONST}, +{input:"=>", tag:"mo", output:"\u21D2", tex:"implies", ttype:CONST}, +{input:"if", tag:"mo", output:"if", tex:null, ttype:SPACE}, +{input:"<=>", tag:"mo", output:"\u21D4", tex:"iff", ttype:CONST}, +{input:"AA", tag:"mo", output:"\u2200", tex:"forall", ttype:CONST}, +{input:"EE", tag:"mo", output:"\u2203", tex:"exists", ttype:CONST}, +{input:"_|_", tag:"mo", output:"\u22A5", tex:"bot", ttype:CONST}, +{input:"TT", tag:"mo", output:"\u22A4", tex:"top", ttype:CONST}, +{input:"|--", tag:"mo", output:"\u22A2", tex:"vdash", ttype:CONST}, +{input:"|==", tag:"mo", output:"\u22A8", tex:"models", ttype:CONST}, + +//grouping brackets +{input:"(", tag:"mo", output:"(", tex:null, ttype:LEFTBRACKET}, +{input:")", tag:"mo", output:")", tex:null, ttype:RIGHTBRACKET}, +{input:"[", tag:"mo", output:"[", tex:null, ttype:LEFTBRACKET}, +{input:"]", tag:"mo", output:"]", tex:null, ttype:RIGHTBRACKET}, +{input:"{", tag:"mo", output:"{", tex:null, ttype:LEFTBRACKET}, +{input:"}", tag:"mo", output:"}", tex:null, ttype:RIGHTBRACKET}, +{input:"|", tag:"mo", output:"|", tex:null, ttype:LEFTRIGHT}, +//{input:"||", tag:"mo", output:"||", tex:null, ttype:LEFTRIGHT}, +{input:"(:", tag:"mo", output:"\u2329", tex:"langle", ttype:LEFTBRACKET}, +{input:":)", tag:"mo", output:"\u232A", tex:"rangle", ttype:RIGHTBRACKET}, +{input:"<<", tag:"mo", output:"\u2329", tex:null, ttype:LEFTBRACKET}, +{input:">>", tag:"mo", output:"\u232A", tex:null, ttype:RIGHTBRACKET}, +{input:"{:", tag:"mo", output:"{:", tex:null, ttype:LEFTBRACKET, invisible:true}, +{input:":}", tag:"mo", output:":}", tex:null, ttype:RIGHTBRACKET, invisible:true}, + +//miscellaneous symbols +{input:"int", tag:"mo", output:"\u222B", tex:null, ttype:CONST}, +{input:"dx", tag:"mi", output:"{:d x:}", tex:null, ttype:DEFINITION}, +{input:"dy", tag:"mi", output:"{:d y:}", tex:null, ttype:DEFINITION}, +{input:"dz", tag:"mi", output:"{:d z:}", tex:null, ttype:DEFINITION}, +{input:"dt", tag:"mi", output:"{:d t:}", tex:null, ttype:DEFINITION}, +{input:"oint", tag:"mo", output:"\u222E", tex:null, ttype:CONST}, +{input:"del", tag:"mo", output:"\u2202", tex:"partial", ttype:CONST}, +{input:"grad", tag:"mo", output:"\u2207", tex:"nabla", ttype:CONST}, +{input:"+-", tag:"mo", output:"\u00B1", tex:"pm", ttype:CONST}, +{input:"O/", tag:"mo", output:"\u2205", tex:"emptyset", ttype:CONST}, +{input:"oo", tag:"mo", output:"\u221E", tex:"infty", ttype:CONST}, +{input:"aleph", tag:"mo", output:"\u2135", tex:null, ttype:CONST}, +{input:"...", tag:"mo", output:"...", tex:"ldots", ttype:CONST}, +{input:":.", tag:"mo", output:"\u2234", tex:"therefore", ttype:CONST}, +{input:"/_", tag:"mo", output:"\u2220", tex:"angle", ttype:CONST}, +{input:"\\ ", tag:"mo", output:"\u00A0", tex:null, ttype:CONST}, +{input:"quad", tag:"mo", output:"\u00A0\u00A0", tex:null, ttype:CONST}, +{input:"qquad", tag:"mo", output:"\u00A0\u00A0\u00A0\u00A0", tex:null, ttype:CONST}, +{input:"cdots", tag:"mo", output:"\u22EF", tex:null, ttype:CONST}, +{input:"vdots", tag:"mo", output:"\u22EE", tex:null, ttype:CONST}, +{input:"ddots", tag:"mo", output:"\u22F1", tex:null, ttype:CONST}, +{input:"diamond", tag:"mo", output:"\u22C4", tex:null, ttype:CONST}, +{input:"square", tag:"mo", output:"\u25A1", tex:null, ttype:CONST}, +{input:"|__", tag:"mo", output:"\u230A", tex:"lfloor", ttype:CONST}, +{input:"__|", tag:"mo", output:"\u230B", tex:"rfloor", ttype:CONST}, +{input:"|~", tag:"mo", output:"\u2308", tex:"lceiling", ttype:CONST}, +{input:"~|", tag:"mo", output:"\u2309", tex:"rceiling", ttype:CONST}, +{input:"CC", tag:"mo", output:"\u2102", tex:null, ttype:CONST}, +{input:"NN", tag:"mo", output:"\u2115", tex:null, ttype:CONST}, +{input:"QQ", tag:"mo", output:"\u211A", tex:null, ttype:CONST}, +{input:"RR", tag:"mo", output:"\u211D", tex:null, ttype:CONST}, +{input:"ZZ", tag:"mo", output:"\u2124", tex:null, ttype:CONST}, +{input:"f", tag:"mi", output:"f", tex:null, ttype:UNARY, func:true}, +{input:"g", tag:"mi", output:"g", tex:null, ttype:UNARY, func:true}, + +//standard functions +{input:"lim", tag:"mo", output:"lim", tex:null, ttype:UNDEROVER}, +{input:"Lim", tag:"mo", output:"Lim", tex:null, ttype:UNDEROVER}, +{input:"sin", tag:"mo", output:"sin", tex:null, ttype:UNARY, func:true}, +{input:"cos", tag:"mo", output:"cos", tex:null, ttype:UNARY, func:true}, +{input:"tan", tag:"mo", output:"tan", tex:null, ttype:UNARY, func:true}, +{input:"sinh", tag:"mo", output:"sinh", tex:null, ttype:UNARY, func:true}, +{input:"cosh", tag:"mo", output:"cosh", tex:null, ttype:UNARY, func:true}, +{input:"tanh", tag:"mo", output:"tanh", tex:null, ttype:UNARY, func:true}, +{input:"cot", tag:"mo", output:"cot", tex:null, ttype:UNARY, func:true}, +{input:"sec", tag:"mo", output:"sec", tex:null, ttype:UNARY, func:true}, +{input:"csc", tag:"mo", output:"csc", tex:null, ttype:UNARY, func:true}, +{input:"log", tag:"mo", output:"log", tex:null, ttype:UNARY, func:true}, +{input:"ln", tag:"mo", output:"ln", tex:null, ttype:UNARY, func:true}, +{input:"det", tag:"mo", output:"det", tex:null, ttype:UNARY, func:true}, +{input:"dim", tag:"mo", output:"dim", tex:null, ttype:CONST}, +{input:"mod", tag:"mo", output:"mod", tex:null, ttype:CONST}, +{input:"gcd", tag:"mo", output:"gcd", tex:null, ttype:UNARY, func:true}, +{input:"lcm", tag:"mo", output:"lcm", tex:null, ttype:UNARY, func:true}, +{input:"lub", tag:"mo", output:"lub", tex:null, ttype:CONST}, +{input:"glb", tag:"mo", output:"glb", tex:null, ttype:CONST}, +{input:"min", tag:"mo", output:"min", tex:null, ttype:UNDEROVER}, +{input:"max", tag:"mo", output:"max", tex:null, ttype:UNDEROVER}, + +//arrows +{input:"uarr", tag:"mo", output:"\u2191", tex:"uparrow", ttype:CONST}, +{input:"darr", tag:"mo", output:"\u2193", tex:"downarrow", ttype:CONST}, +{input:"rarr", tag:"mo", output:"\u2192", tex:"rightarrow", ttype:CONST}, +{input:"->", tag:"mo", output:"\u2192", tex:"to", ttype:CONST}, +{input:"|->", tag:"mo", output:"\u21A6", tex:"mapsto", ttype:CONST}, +{input:"larr", tag:"mo", output:"\u2190", tex:"leftarrow", ttype:CONST}, +{input:"harr", tag:"mo", output:"\u2194", tex:"leftrightarrow", ttype:CONST}, +{input:"rArr", tag:"mo", output:"\u21D2", tex:"Rightarrow", ttype:CONST}, +{input:"lArr", tag:"mo", output:"\u21D0", tex:"Leftarrow", ttype:CONST}, +{input:"hArr", tag:"mo", output:"\u21D4", tex:"Leftrightarrow", ttype:CONST}, + +//commands with argument +AMsqrt, AMroot, AMfrac, AMdiv, AMover, AMsub, AMsup, +{input:"hat", tag:"mover", output:"\u005E", tex:null, ttype:UNARY, acc:true}, +{input:"bar", tag:"mover", output:"\u00AF", tex:"overline", ttype:UNARY, acc:true}, +{input:"vec", tag:"mover", output:"\u2192", tex:null, ttype:UNARY, acc:true}, +{input:"dot", tag:"mover", output:".", tex:null, ttype:UNARY, acc:true}, +{input:"ddot", tag:"mover", output:"..", tex:null, ttype:UNARY, acc:true}, +{input:"ul", tag:"munder", output:"\u0332", tex:"underline", ttype:UNARY, acc:true}, +AMtext, AMmbox, AMquote, +{input:"bb", tag:"mstyle", atname:"fontweight", atval:"bold", output:"bb", tex:null, ttype:UNARY}, +{input:"mathbf", tag:"mstyle", atname:"fontweight", atval:"bold", output:"mathbf", tex:null, ttype:UNARY}, +{input:"sf", tag:"mstyle", atname:"fontfamily", atval:"sans-serif", output:"sf", tex:null, ttype:UNARY}, +{input:"mathsf", tag:"mstyle", atname:"fontfamily", atval:"sans-serif", output:"mathsf", tex:null, ttype:UNARY}, +{input:"bbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"bbb", tex:null, ttype:UNARY, codes:AMbbb}, +{input:"mathbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"mathbb", tex:null, ttype:UNARY, codes:AMbbb}, +{input:"cc", tag:"mstyle", atname:"mathvariant", atval:"script", output:"cc", tex:null, ttype:UNARY, codes:AMcal}, +{input:"mathcal", tag:"mstyle", atname:"mathvariant", atval:"script", output:"mathcal", tex:null, ttype:UNARY, codes:AMcal}, +{input:"tt", tag:"mstyle", atname:"fontfamily", atval:"monospace", output:"tt", tex:null, ttype:UNARY}, +{input:"mathtt", tag:"mstyle", atname:"fontfamily", atval:"monospace", output:"mathtt", tex:null, ttype:UNARY}, +{input:"fr", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"fr", tex:null, ttype:UNARY, codes:AMfrk}, +{input:"mathfrak", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"mathfrak", tex:null, ttype:UNARY, codes:AMfrk} +]; + +function compareNames(s1,s2) { + if (s1.input > s2.input) return 1 + else return -1; +} + +var AMnames = []; //list of input symbols + +function AMinitSymbols() { + var texsymbols = [], i; + for (i=0; i=n where str appears or would be inserted +// assumes arr is sorted + if (n==0) { + var h,m; + n = -1; + h = arr.length; + while (n+1> 1; + if (arr[m]=str +} + +function AMgetSymbol(str) { +//return maximal initial substring of str that appears in names +//return null if there is none + var k = 0; //new pos + var j = 0; //old pos + var mk; //match pos + var st; + var tagst; + var match = ""; + var more = true; + for (var i=1; i<=str.length && more; i++) { + st = str.slice(0,i); //initial substring of length i + j = k; + k = AMposition(AMnames, st, j); + if (k=AMnames[k]; + } + AMpreviousSymbol=AMcurrentSymbol; + if (match!=""){ + AMcurrentSymbol=AMsymbols[mk].ttype; + return AMsymbols[mk]; + } +// if str[0] is a digit or - return maxsubstring of digits.digits + AMcurrentSymbol=CONST; + k = 1; + st = str.slice(0,1); + var integ = true; + while ("0"<=st && st<="9" && k<=str.length) { + st = str.slice(k,k+1); + k++; + } + if (st == decimalsign) { + st = str.slice(k,k+1); + if ("0"<=st && st<="9") { + integ = false; + k++; + while ("0"<=st && st<="9" && k<=str.length) { + st = str.slice(k,k+1); + k++; + } + } + } + if ((integ && k>1) || k>2) { + st = str.slice(0,k-1); + tagst = "mn"; + } else { + k = 2; + st = str.slice(0,1); //take 1 character + tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi"); + } + if (st=="-" && AMpreviousSymbol==INFIX) { + AMcurrentSymbol = INFIX; //trick "/" into recognizing "-" on second parse + return {input:st, tag:tagst, output:st, ttype:UNARY, func:true}; + } + return {input:st, tag:tagst, output:st, ttype:CONST}; +} + +function AMremoveBrackets(node) { + var st; + if (node.nodeName=="mrow") { + st = node.firstChild.firstChild.nodeValue; + if (st=="(" || st=="[" || st=="{") node.removeChild(node.firstChild); + } + if (node.nodeName=="mrow") { + st = node.lastChild.firstChild.nodeValue; + if (st==")" || st=="]" || st=="}") node.removeChild(node.lastChild); + } +} + +/*Parsing ASCII math expressions with the following grammar +v ::= [A-Za-z] | greek letters | numbers | other constant symbols +u ::= sqrt | text | bb | other unary symbols for font commands +b ::= frac | root | stackrel binary symbols +l ::= ( | [ | { | (: | {: left brackets +r ::= ) | ] | } | :) | :} right brackets +S ::= v | lEr | uS | bSS Simple expression +I ::= S_S | S^S | S_S^S | S Intermediate expression +E ::= IE | I/I Expression +Each terminal symbol is translated into a corresponding mathml node.*/ + +var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol; + +function AMparseSexpr(str) { //parses str and returns [node,tailstr] + var symbol, node, result, i, st,// rightvert = false, + newFrag = document.createDocumentFragment(); + str = AMremoveCharsAndBlanks(str,0); + symbol = AMgetSymbol(str); //either a token or a bracket or empty + if (symbol == null || symbol.ttype == RIGHTBRACKET && AMnestingDepth > 0) { + return [null,str]; + } + if (symbol.ttype == DEFINITION) { + str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); + symbol = AMgetSymbol(str); + } + switch (symbol.ttype) { + case UNDEROVER: + case CONST: + str = AMremoveCharsAndBlanks(str,symbol.input.length); + return [AMcreateMmlNode(symbol.tag, //its a constant + document.createTextNode(symbol.output)),str]; + case LEFTBRACKET: //read (expr+) + AMnestingDepth++; + str = AMremoveCharsAndBlanks(str,symbol.input.length); + result = AMparseExpr(str,true); + AMnestingDepth--; + if (typeof symbol.invisible == "boolean" && symbol.invisible) + node = AMcreateMmlNode("mrow",result[0]); + else { + node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); + node = AMcreateMmlNode("mrow",node); + node.appendChild(result[0]); + } + return [node,result[1]]; + case TEXT: + if (symbol!=AMquote) str = AMremoveCharsAndBlanks(str,symbol.input.length); + if (str.charAt(0)=="{") i=str.indexOf("}"); + else if (str.charAt(0)=="(") i=str.indexOf(")"); + else if (str.charAt(0)=="[") i=str.indexOf("]"); + else if (symbol==AMquote) i=str.slice(1).indexOf("\"")+1; + else i = 0; + if (i==-1) i = str.length; + st = str.slice(1,i); + if (st.charAt(0) == " ") { + node = AMcreateElementMathML("mspace"); + node.setAttribute("width","1ex"); + newFrag.appendChild(node); + } + newFrag.appendChild( + AMcreateMmlNode(symbol.tag,document.createTextNode(st))); + if (st.charAt(st.length-1) == " ") { + node = AMcreateElementMathML("mspace"); + node.setAttribute("width","1ex"); + newFrag.appendChild(node); + } + str = AMremoveCharsAndBlanks(str,i+1); + return [AMcreateMmlNode("mrow",newFrag),str]; + case UNARY: + str = AMremoveCharsAndBlanks(str,symbol.input.length); + result = AMparseSexpr(str); + if (result[0]==null) return [AMcreateMmlNode(symbol.tag, + document.createTextNode(symbol.output)),str]; + if (typeof symbol.func == "boolean" && symbol.func) { // functions hack + st = str.charAt(0); + if (st=="^" || st=="_" || st=="/" || st=="|" || st==",") { + return [AMcreateMmlNode(symbol.tag, + document.createTextNode(symbol.output)),str]; + } else { + node = AMcreateMmlNode("mrow", + AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); + node.appendChild(result[0]); + return [node,result[1]]; + } + } + AMremoveBrackets(result[0]); + if (symbol.input == "sqrt") { // sqrt + return [AMcreateMmlNode(symbol.tag,result[0]),result[1]]; + } else if (typeof symbol.acc == "boolean" && symbol.acc) { // accent + node = AMcreateMmlNode(symbol.tag,result[0]); + node.appendChild(AMcreateMmlNode("mo",document.createTextNode(symbol.output))); + return [node,result[1]]; + } else { // font change command + if (!isIE && typeof symbol.codes != "undefined") { + for (i=0; i64 && st.charCodeAt(j)<91) newst = newst + + String.fromCharCode(symbol.codes[st.charCodeAt(j)-65]); + else newst = newst + st.charAt(j); + if (result[0].nodeName=="mi") + result[0]=AMcreateElementMathML("mo"). + appendChild(document.createTextNode(newst)); + else result[0].replaceChild(AMcreateElementMathML("mo"). + appendChild(document.createTextNode(newst)),result[0].childNodes[i]); + } + } + node = AMcreateMmlNode(symbol.tag,result[0]); + node.setAttribute(symbol.atname,symbol.atval); + return [node,result[1]]; + } + case BINARY: + str = AMremoveCharsAndBlanks(str,symbol.input.length); + result = AMparseSexpr(str); + if (result[0]==null) return [AMcreateMmlNode("mo", + document.createTextNode(symbol.input)),str]; + AMremoveBrackets(result[0]); + var result2 = AMparseSexpr(result[1]); + if (result2[0]==null) return [AMcreateMmlNode("mo", + document.createTextNode(symbol.input)),str]; + AMremoveBrackets(result2[0]); + if (symbol.input=="root" || symbol.input=="stackrel") + newFrag.appendChild(result2[0]); + newFrag.appendChild(result[0]); + if (symbol.input=="frac") newFrag.appendChild(result2[0]); + return [AMcreateMmlNode(symbol.tag,newFrag),result2[1]]; + case INFIX: + str = AMremoveCharsAndBlanks(str,symbol.input.length); + return [AMcreateMmlNode("mo",document.createTextNode(symbol.output)),str]; + case SPACE: + str = AMremoveCharsAndBlanks(str,symbol.input.length); + node = AMcreateElementMathML("mspace"); + node.setAttribute("width","1ex"); + newFrag.appendChild(node); + newFrag.appendChild( + AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); + node = AMcreateElementMathML("mspace"); + node.setAttribute("width","1ex"); + newFrag.appendChild(node); + return [AMcreateMmlNode("mrow",newFrag),str]; + case LEFTRIGHT: +// if (rightvert) return [null,str]; else rightvert = true; + AMnestingDepth++; + str = AMremoveCharsAndBlanks(str,symbol.input.length); + result = AMparseExpr(str,false); + AMnestingDepth--; + var st = ""; + if (result[0].lastChild!=null) + st = result[0].lastChild.firstChild.nodeValue; + if (st == "|") { // its an absolute value subterm + node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); + node = AMcreateMmlNode("mrow",node); + node.appendChild(result[0]); + return [node,result[1]]; + } else { // the "|" is a \mid + node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); + node = AMcreateMmlNode("mrow",node); + return [node,str]; + } + default: +//alert("default"); + str = AMremoveCharsAndBlanks(str,symbol.input.length); + return [AMcreateMmlNode(symbol.tag, //its a constant + document.createTextNode(symbol.output)),str]; + } +} + +function AMparseIexpr(str) { + var symbol, sym1, sym2, node, result, underover; + str = AMremoveCharsAndBlanks(str,0); + sym1 = AMgetSymbol(str); + result = AMparseSexpr(str); + node = result[0]; + str = result[1]; + symbol = AMgetSymbol(str); + if (symbol.ttype == INFIX && symbol.input != "/") { + str = AMremoveCharsAndBlanks(str,symbol.input.length); +// if (symbol.input == "/") result = AMparseIexpr(str); else ... + result = AMparseSexpr(str); + if (result[0] == null) // show box in place of missing argument + result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); + else AMremoveBrackets(result[0]); + str = result[1]; +// if (symbol.input == "/") AMremoveBrackets(node); + if (symbol.input == "_") { + sym2 = AMgetSymbol(str); + underover = (sym1.ttype == UNDEROVER); + if (sym2.input == "^") { + str = AMremoveCharsAndBlanks(str,sym2.input.length); + var res2 = AMparseSexpr(str); + AMremoveBrackets(res2[0]); + str = res2[1]; + node = AMcreateMmlNode((underover?"munderover":"msubsup"),node); + node.appendChild(result[0]); + node.appendChild(res2[0]); + node = AMcreateMmlNode("mrow",node); // so sum does not stretch + } else { + node = AMcreateMmlNode((underover?"munder":"msub"),node); + node.appendChild(result[0]); + } + } else { + node = AMcreateMmlNode(symbol.tag,node); + node.appendChild(result[0]); + } + } + return [node,str]; +} + +function AMparseExpr(str,rightbracket) { + var symbol, node, result, i, nodeList = [], + newFrag = document.createDocumentFragment(); + do { + str = AMremoveCharsAndBlanks(str,0); + result = AMparseIexpr(str); + node = result[0]; + str = result[1]; + symbol = AMgetSymbol(str); + if (symbol.ttype == INFIX && symbol.input == "/") { + str = AMremoveCharsAndBlanks(str,symbol.input.length); + result = AMparseIexpr(str); + if (result[0] == null) // show box in place of missing argument + result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); + else AMremoveBrackets(result[0]); + str = result[1]; + AMremoveBrackets(node); + node = AMcreateMmlNode(symbol.tag,node); + node.appendChild(result[0]); + newFrag.appendChild(node); + symbol = AMgetSymbol(str); + } + else if (node!=undefined) newFrag.appendChild(node); + } while ((symbol.ttype != RIGHTBRACKET && + (symbol.ttype != LEFTRIGHT || rightbracket) + || AMnestingDepth == 0) && symbol!=null && symbol.output!=""); + if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) { +// if (AMnestingDepth > 0) AMnestingDepth--; + var len = newFrag.childNodes.length; + if (len>0 && newFrag.childNodes[len-1].nodeName == "mrow" && len>1 && + newFrag.childNodes[len-2].nodeName == "mo" && + newFrag.childNodes[len-2].firstChild.nodeValue == ",") { //matrix + var right = newFrag.childNodes[len-1].lastChild.firstChild.nodeValue; + if (right==")" || right=="]") { + var left = newFrag.childNodes[len-1].firstChild.firstChild.nodeValue; + if (left=="(" && right==")" && symbol.output != "}" || + left=="[" && right=="]") { + var pos = []; // positions of commas + var matrix = true; + var m = newFrag.childNodes.length; + for (i=0; matrix && i1) matrix = pos[i].length == pos[i-2].length; + } + if (matrix) { + var row, frag, n, k, table = document.createDocumentFragment(); + for (i=0; i(-,-,...,-,-) + n = node.childNodes.length; + k = 0; + node.removeChild(node.firstChild); //remove ( + for (j=1; j2) { + newFrag.removeChild(newFrag.firstChild); //remove ) + newFrag.removeChild(newFrag.firstChild); //remove , + } + table.appendChild(AMcreateMmlNode("mtr",row)); + } + node = AMcreateMmlNode("mtable",table); + if (typeof symbol.invisible == "boolean" && symbol.invisible) node.setAttribute("columnalign","left"); + newFrag.replaceChild(node,newFrag.firstChild); + } + } + } + } + str = AMremoveCharsAndBlanks(str,symbol.input.length); + if (typeof symbol.invisible != "boolean" || !symbol.invisible) { + node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); + newFrag.appendChild(node); + } + } + return [newFrag,str]; +} + +function AMparseMath(str) { + var result, node = AMcreateElementMathML("mstyle"); + if (mathcolor != "") node.setAttribute("mathcolor",mathcolor); + if (displaystyle) node.setAttribute("displaystyle","true"); + if (mathfontfamily != "") node.setAttribute("fontfamily",mathfontfamily); + AMnestingDepth = 0; + node.appendChild(AMparseExpr(str.replace(/^\s+/g,""),false)[0]); + node = AMcreateMmlNode("math",node); + if (showasciiformulaonhover) //fixed by djhsu so newline + node.setAttribute("title",str.replace(/\s+/g," "));//does not show in Gecko + if (mathfontfamily != "" && (isIE || mathfontfamily != "serif")) { + var fnode = AMcreateElementXHTML("font"); + fnode.setAttribute("face",mathfontfamily); + fnode.appendChild(node); + return fnode; + } + return node; +} + +function AMstrarr2docFrag(arr, linebreaks) { + var newFrag=document.createDocumentFragment(); + var expr = false; + for (var i=0; i1 || mtch) { + if (checkForMathML) { + checkForMathML = false; + var nd = AMisMathMLavailable(); + AMnoMathML = nd != null; + if (AMnoMathML && notifyIfNoMathML) + if (alertIfNoMathML) + alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n\ + or Firefox/Mozilla/Netscape"); + else AMbody.insertBefore(nd,AMbody.childNodes[0]); + } + if (!AMnoMathML) { + frg = AMstrarr2docFrag(arr,n.nodeType==8); + var len = frg.childNodes.length; + n.parentNode.replaceChild(frg,n); + return len-1; + } else return 0; + } + } + } else return 0; + } else if (n.nodeName!="math") { + for (i=0; i
    "); + document.write(""); +} + +// GO1.1 Generic onload by Brothercake +// http://www.brothercake.com/ +//onload function (replaces the onload="translate()" in the tag) +function generic() +{ + translate(); +}; +//setup onload function +if(typeof window.addEventListener != 'undefined') +{ + //.. gecko, safari, konqueror and standard + window.addEventListener('load', generic, false); +} +else if(typeof document.addEventListener != 'undefined') +{ + //.. opera 7 + document.addEventListener('load', generic, false); +} +else if(typeof window.attachEvent != 'undefined') +{ + //.. win/ie + window.attachEvent('onload', generic); +} +//** remove this condition to degrade older browsers +else +{ + //.. mac/ie5 and anything else that gets this far + //if there's an existing onload function + if(typeof window.onload == 'function') + { + //store it + var existing = onload; + //add new onload handler + window.onload = function() + { + //call existing onload function + existing(); + //call generic onload function + generic(); + }; + } + else + { + //setup onload function + window.onload = generic; + } +} diff -Nru asciidoc-8.6.10/asciidoc/resources/javascripts/LaTeXMathML.js asciidoc-10.1.2/asciidoc/resources/javascripts/LaTeXMathML.js --- asciidoc-8.6.10/asciidoc/resources/javascripts/LaTeXMathML.js 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/javascripts/LaTeXMathML.js 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1223 @@ +/* +LaTeXMathML.js +============== + +This file, in this form, is due to Douglas Woodall, June 2006. +It contains JavaScript functions to convert (most simple) LaTeX +math notation to Presentation MathML. It was obtained by +downloading the file ASCIIMathML.js from + http://www1.chapman.edu/~jipsen/mathml/asciimathdownload/ +and modifying it so that it carries out ONLY those conversions +that would be carried out in LaTeX. A description of the original +file, with examples, can be found at + www1.chapman.edu/~jipsen/mathml/asciimath.html + ASCIIMathML: Math on the web for everyone + +Here is the header notice from the original file: + +ASCIIMathML.js +============== +This file contains JavaScript functions to convert ASCII math notation +to Presentation MathML. The conversion is done while the (X)HTML page +loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet +Explorer 6+MathPlayer (http://www.dessci.com/en/products/mathplayer/). +Just add the next line to your (X)HTML page with this file in the same folder: +This is a convenient and inexpensive solution for authoring MathML. + +Version 1.4.7 Dec 15, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen +Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js +For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt +If you use it on a webpage, please send the URL to jipsen@chapman.edu + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License (at http://www.gnu.org/copyleft/gpl.html) +for more details. + +LaTeXMathML.js (ctd) +============== + +The instructions for use are the same as for the original +ASCIIMathML.js, except that of course the line you add to your +file should be +Or use absolute path names if the file is not in the same folder +as your (X)HTML page. +*/ + +var checkForMathML = true; // check if browser can display MathML +var notifyIfNoMathML = true; // display note if no MathML capability +var alertIfNoMathML = false; // show alert box if no MathML capability +// was "red": +var mathcolor = ""; // change it to "" (to inherit) or any other color +// was "serif": +var mathfontfamily = ""; // change to "" to inherit (works in IE) + // or another family (e.g. "arial") +var showasciiformulaonhover = true; // helps students learn ASCIIMath +/* +// Commented out by DRW -- not now used -- see DELIMITERS (twice) near the end +var displaystyle = false; // puts limits above and below large operators +var decimalsign = "."; // change to "," if you like, beware of `(1,2)`! +var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters +var AMdelimiter2 = "$", AMescape2 = "\\\\\\$", AMdelimiter2regexp = "\\$"; +var doubleblankmathdelimiter = false; // if true, x+1 is equal to `x+1` + // for IE this works only in +//var separatetokens;// has been removed (email me if this is a problem) +*/ +var isIE = document.createElementNS==null; + +if (document.getElementById==null) + alert("This webpage requires a recent browser such as\ +\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer") + +// all further global variables start with "AM" + +function AMcreateElementXHTML(t) { + if (isIE) return document.createElement(t); + else return document.createElementNS("http://www.w3.org/1999/xhtml",t); +} + +function AMnoMathMLNote() { + var nd = AMcreateElementXHTML("h3"); + nd.setAttribute("align","center") + nd.appendChild(AMcreateElementXHTML("p")); + nd.appendChild(document.createTextNode("To view the ")); + var an = AMcreateElementXHTML("a"); + an.appendChild(document.createTextNode("LaTeXMathML")); + an.setAttribute("href","http://www.maths.nott.ac.uk/personal/drw/lm.html"); + nd.appendChild(an); + nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); + an = AMcreateElementXHTML("a"); + an.appendChild(document.createTextNode("MathPlayer")); + an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); + nd.appendChild(an); + nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox")); + nd.appendChild(AMcreateElementXHTML("p")); + return nd; +} + +function AMisMathMLavailable() { + if (navigator.appName.slice(0,8)=="Netscape") + if (navigator.appVersion.slice(0,1)>="5") return null; + else return AMnoMathMLNote(); + else if (navigator.appName.slice(0,9)=="Microsoft") + try { + var ActiveX = new ActiveXObject("MathPlayer.Factory.1"); + return null; + } catch (e) { + return AMnoMathMLNote(); + } + else return AMnoMathMLNote(); +} + +// character lists for Mozilla/Netscape fonts +var AMcal = [0xEF35,0x212C,0xEF36,0xEF37,0x2130,0x2131,0xEF38,0x210B,0x2110,0xEF39,0xEF3A,0x2112,0x2133,0xEF3B,0xEF3C,0xEF3D,0xEF3E,0x211B,0xEF3F,0xEF40,0xEF41,0xEF42,0xEF43,0xEF44,0xEF45,0xEF46]; +var AMfrk = [0xEF5D,0xEF5E,0x212D,0xEF5F,0xEF60,0xEF61,0xEF62,0x210C,0x2111,0xEF63,0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0x211C,0xEF6B,0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0x2128]; +var AMbbb = [0xEF8C,0xEF8D,0x2102,0xEF8E,0xEF8F,0xEF90,0xEF91,0x210D,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0x2115,0xEF97,0x2119,0x211A,0x211D,0xEF98,0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0x2124]; + +var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, + RIGHTBRACKET = 5, SPACE = 6, UNDEROVER = 7, DEFINITION = 8, + TEXT = 9, BIG = 10, LONG = 11, STRETCHY = 12, MATRIX = 13; // token types + +var AMsqrt = {input:"\\sqrt", tag:"msqrt", output:"sqrt", ttype:UNARY}, + AMroot = {input:"\\root", tag:"mroot", output:"root", ttype:BINARY}, + AMfrac = {input:"\\frac", tag:"mfrac", output:"/", ttype:BINARY}, + AMover = {input:"\\stackrel", tag:"mover", output:"stackrel", ttype:BINARY}, + AMatop = {input:"\\atop", tag:"mfrac", output:"", ttype:INFIX}, + AMchoose = {input:"\\choose", tag:"mfrac", output:"", ttype:INFIX}, + AMsub = {input:"_", tag:"msub", output:"_", ttype:INFIX}, + AMsup = {input:"^", tag:"msup", output:"^", ttype:INFIX}, + AMtext = {input:"\\mathrm", tag:"mtext", output:"text", ttype:TEXT}, + AMmbox = {input:"\\mbox", tag:"mtext", output:"mbox", ttype:TEXT}; + +// Commented out by DRW to prevent 1/2 turning into a 2-line fraction +// AMdiv = {input:"/", tag:"mfrac", output:"/", ttype:INFIX}, +// Commented out by DRW so that " prints literally in equations +// AMquote = {input:"\"", tag:"mtext", output:"mbox", ttype:TEXT}; + +var AMsymbols = [ +//Greek letters +{input:"\\alpha", tag:"mi", output:"\u03B1", ttype:CONST}, +{input:"\\beta", tag:"mi", output:"\u03B2", ttype:CONST}, +{input:"\\gamma", tag:"mi", output:"\u03B3", ttype:CONST}, +{input:"\\delta", tag:"mi", output:"\u03B4", ttype:CONST}, +{input:"\\epsilon", tag:"mi", output:"\u03B5", ttype:CONST}, +{input:"\\varepsilon", tag:"mi", output:"\u025B", ttype:CONST}, +{input:"\\zeta", tag:"mi", output:"\u03B6", ttype:CONST}, +{input:"\\eta", tag:"mi", output:"\u03B7", ttype:CONST}, +{input:"\\theta", tag:"mi", output:"\u03B8", ttype:CONST}, +{input:"\\vartheta", tag:"mi", output:"\u03D1", ttype:CONST}, +{input:"\\iota", tag:"mi", output:"\u03B9", ttype:CONST}, +{input:"\\kappa", tag:"mi", output:"\u03BA", ttype:CONST}, +{input:"\\lambda", tag:"mi", output:"\u03BB", ttype:CONST}, +{input:"\\mu", tag:"mi", output:"\u03BC", ttype:CONST}, +{input:"\\nu", tag:"mi", output:"\u03BD", ttype:CONST}, +{input:"\\xi", tag:"mi", output:"\u03BE", ttype:CONST}, +{input:"\\pi", tag:"mi", output:"\u03C0", ttype:CONST}, +{input:"\\varpi", tag:"mi", output:"\u03D6", ttype:CONST}, +{input:"\\rho", tag:"mi", output:"\u03C1", ttype:CONST}, +{input:"\\varrho", tag:"mi", output:"\u03F1", ttype:CONST}, +{input:"\\varsigma", tag:"mi", output:"\u03C2", ttype:CONST}, +{input:"\\sigma", tag:"mi", output:"\u03C3", ttype:CONST}, +{input:"\\tau", tag:"mi", output:"\u03C4", ttype:CONST}, +{input:"\\upsilon", tag:"mi", output:"\u03C5", ttype:CONST}, +{input:"\\phi", tag:"mi", output:"\u03C6", ttype:CONST}, +{input:"\\varphi", tag:"mi", output:"\u03D5", ttype:CONST}, +{input:"\\chi", tag:"mi", output:"\u03C7", ttype:CONST}, +{input:"\\psi", tag:"mi", output:"\u03C8", ttype:CONST}, +{input:"\\omega", tag:"mi", output:"\u03C9", ttype:CONST}, +{input:"\\Gamma", tag:"mo", output:"\u0393", ttype:CONST}, +{input:"\\Delta", tag:"mo", output:"\u0394", ttype:CONST}, +{input:"\\Theta", tag:"mo", output:"\u0398", ttype:CONST}, +{input:"\\Lambda", tag:"mo", output:"\u039B", ttype:CONST}, +{input:"\\Xi", tag:"mo", output:"\u039E", ttype:CONST}, +{input:"\\Pi", tag:"mo", output:"\u03A0", ttype:CONST}, +{input:"\\Sigma", tag:"mo", output:"\u03A3", ttype:CONST}, +{input:"\\Upsilon", tag:"mo", output:"\u03A5", ttype:CONST}, +{input:"\\Phi", tag:"mo", output:"\u03A6", ttype:CONST}, +{input:"\\Psi", tag:"mo", output:"\u03A8", ttype:CONST}, +{input:"\\Omega", tag:"mo", output:"\u03A9", ttype:CONST}, + +//fractions +{input:"\\frac12", tag:"mo", output:"\u00BD", ttype:CONST}, +{input:"\\frac14", tag:"mo", output:"\u00BC", ttype:CONST}, +{input:"\\frac34", tag:"mo", output:"\u00BE", ttype:CONST}, +{input:"\\frac13", tag:"mo", output:"\u2153", ttype:CONST}, +{input:"\\frac23", tag:"mo", output:"\u2154", ttype:CONST}, +{input:"\\frac15", tag:"mo", output:"\u2155", ttype:CONST}, +{input:"\\frac25", tag:"mo", output:"\u2156", ttype:CONST}, +{input:"\\frac35", tag:"mo", output:"\u2157", ttype:CONST}, +{input:"\\frac45", tag:"mo", output:"\u2158", ttype:CONST}, +{input:"\\frac16", tag:"mo", output:"\u2159", ttype:CONST}, +{input:"\\frac56", tag:"mo", output:"\u215A", ttype:CONST}, +{input:"\\frac18", tag:"mo", output:"\u215B", ttype:CONST}, +{input:"\\frac38", tag:"mo", output:"\u215C", ttype:CONST}, +{input:"\\frac58", tag:"mo", output:"\u215D", ttype:CONST}, +{input:"\\frac78", tag:"mo", output:"\u215E", ttype:CONST}, + +//binary operation symbols +{input:"\\pm", tag:"mo", output:"\u00B1", ttype:CONST}, +{input:"\\mp", tag:"mo", output:"\u2213", ttype:CONST}, +{input:"\\triangleleft",tag:"mo", output:"\u22B2", ttype:CONST}, +{input:"\\triangleright",tag:"mo",output:"\u22B3", ttype:CONST}, +{input:"\\cdot", tag:"mo", output:"\u22C5", ttype:CONST}, +{input:"\\star", tag:"mo", output:"\u22C6", ttype:CONST}, +{input:"\\ast", tag:"mo", output:"\u002A", ttype:CONST}, +{input:"\\times", tag:"mo", output:"\u00D7", ttype:CONST}, +{input:"\\div", tag:"mo", output:"\u00F7", ttype:CONST}, +{input:"\\circ", tag:"mo", output:"\u2218", ttype:CONST}, +//{input:"\\bullet", tag:"mo", output:"\u2219", ttype:CONST}, +{input:"\\bullet", tag:"mo", output:"\u2022", ttype:CONST}, +{input:"\\oplus", tag:"mo", output:"\u2295", ttype:CONST}, +{input:"\\ominus", tag:"mo", output:"\u2296", ttype:CONST}, +{input:"\\otimes", tag:"mo", output:"\u2297", ttype:CONST}, +{input:"\\bigcirc", tag:"mo", output:"\u25CB", ttype:CONST}, +{input:"\\oslash", tag:"mo", output:"\u2298", ttype:CONST}, +{input:"\\odot", tag:"mo", output:"\u2299", ttype:CONST}, +{input:"\\land", tag:"mo", output:"\u2227", ttype:CONST}, +{input:"\\wedge", tag:"mo", output:"\u2227", ttype:CONST}, +{input:"\\lor", tag:"mo", output:"\u2228", ttype:CONST}, +{input:"\\vee", tag:"mo", output:"\u2228", ttype:CONST}, +{input:"\\cap", tag:"mo", output:"\u2229", ttype:CONST}, +{input:"\\cup", tag:"mo", output:"\u222A", ttype:CONST}, +{input:"\\sqcap", tag:"mo", output:"\u2293", ttype:CONST}, +{input:"\\sqcup", tag:"mo", output:"\u2294", ttype:CONST}, +{input:"\\uplus", tag:"mo", output:"\u228E", ttype:CONST}, +{input:"\\amalg", tag:"mo", output:"\u2210", ttype:CONST}, +{input:"\\bigtriangleup",tag:"mo",output:"\u25B3", ttype:CONST}, +{input:"\\bigtriangledown",tag:"mo",output:"\u25BD", ttype:CONST}, +{input:"\\dag", tag:"mo", output:"\u2020", ttype:CONST}, +{input:"\\dagger", tag:"mo", output:"\u2020", ttype:CONST}, +{input:"\\ddag", tag:"mo", output:"\u2021", ttype:CONST}, +{input:"\\ddagger", tag:"mo", output:"\u2021", ttype:CONST}, +{input:"\\lhd", tag:"mo", output:"\u22B2", ttype:CONST}, +{input:"\\rhd", tag:"mo", output:"\u22B3", ttype:CONST}, +{input:"\\unlhd", tag:"mo", output:"\u22B4", ttype:CONST}, +{input:"\\unrhd", tag:"mo", output:"\u22B5", ttype:CONST}, + + +//BIG Operators +{input:"\\sum", tag:"mo", output:"\u2211", ttype:UNDEROVER}, +{input:"\\prod", tag:"mo", output:"\u220F", ttype:UNDEROVER}, +{input:"\\bigcap", tag:"mo", output:"\u22C2", ttype:UNDEROVER}, +{input:"\\bigcup", tag:"mo", output:"\u22C3", ttype:UNDEROVER}, +{input:"\\bigwedge", tag:"mo", output:"\u22C0", ttype:UNDEROVER}, +{input:"\\bigvee", tag:"mo", output:"\u22C1", ttype:UNDEROVER}, +{input:"\\bigsqcap", tag:"mo", output:"\u2A05", ttype:UNDEROVER}, +{input:"\\bigsqcup", tag:"mo", output:"\u2A06", ttype:UNDEROVER}, +{input:"\\coprod", tag:"mo", output:"\u2210", ttype:UNDEROVER}, +{input:"\\bigoplus", tag:"mo", output:"\u2A01", ttype:UNDEROVER}, +{input:"\\bigotimes", tag:"mo", output:"\u2A02", ttype:UNDEROVER}, +{input:"\\bigodot", tag:"mo", output:"\u2A00", ttype:UNDEROVER}, +{input:"\\biguplus", tag:"mo", output:"\u2A04", ttype:UNDEROVER}, +{input:"\\int", tag:"mo", output:"\u222B", ttype:CONST}, +{input:"\\oint", tag:"mo", output:"\u222E", ttype:CONST}, + +//binary relation symbols +{input:":=", tag:"mo", output:":=", ttype:CONST}, +{input:"\\lt", tag:"mo", output:"<", ttype:CONST}, +{input:"\\gt", tag:"mo", output:">", ttype:CONST}, +{input:"\\ne", tag:"mo", output:"\u2260", ttype:CONST}, +{input:"\\neq", tag:"mo", output:"\u2260", ttype:CONST}, +{input:"\\le", tag:"mo", output:"\u2264", ttype:CONST}, +{input:"\\leq", tag:"mo", output:"\u2264", ttype:CONST}, +{input:"\\leqslant", tag:"mo", output:"\u2264", ttype:CONST}, +{input:"\\ge", tag:"mo", output:"\u2265", ttype:CONST}, +{input:"\\geq", tag:"mo", output:"\u2265", ttype:CONST}, +{input:"\\geqslant", tag:"mo", output:"\u2265", ttype:CONST}, +{input:"\\equiv", tag:"mo", output:"\u2261", ttype:CONST}, +{input:"\\ll", tag:"mo", output:"\u226A", ttype:CONST}, +{input:"\\gg", tag:"mo", output:"\u226B", ttype:CONST}, +{input:"\\doteq", tag:"mo", output:"\u2250", ttype:CONST}, +{input:"\\prec", tag:"mo", output:"\u227A", ttype:CONST}, +{input:"\\succ", tag:"mo", output:"\u227B", ttype:CONST}, +{input:"\\preceq", tag:"mo", output:"\u227C", ttype:CONST}, +{input:"\\succeq", tag:"mo", output:"\u227D", ttype:CONST}, +{input:"\\subset", tag:"mo", output:"\u2282", ttype:CONST}, +{input:"\\supset", tag:"mo", output:"\u2283", ttype:CONST}, +{input:"\\subseteq", tag:"mo", output:"\u2286", ttype:CONST}, +{input:"\\supseteq", tag:"mo", output:"\u2287", ttype:CONST}, +{input:"\\sqsubset", tag:"mo", output:"\u228F", ttype:CONST}, +{input:"\\sqsupset", tag:"mo", output:"\u2290", ttype:CONST}, +{input:"\\sqsubseteq", tag:"mo", output:"\u2291", ttype:CONST}, +{input:"\\sqsupseteq", tag:"mo", output:"\u2292", ttype:CONST}, +{input:"\\sim", tag:"mo", output:"\u223C", ttype:CONST}, +{input:"\\simeq", tag:"mo", output:"\u2243", ttype:CONST}, +{input:"\\approx", tag:"mo", output:"\u2248", ttype:CONST}, +{input:"\\cong", tag:"mo", output:"\u2245", ttype:CONST}, +{input:"\\Join", tag:"mo", output:"\u22C8", ttype:CONST}, +{input:"\\bowtie", tag:"mo", output:"\u22C8", ttype:CONST}, +{input:"\\in", tag:"mo", output:"\u2208", ttype:CONST}, +{input:"\\ni", tag:"mo", output:"\u220B", ttype:CONST}, +{input:"\\owns", tag:"mo", output:"\u220B", ttype:CONST}, +{input:"\\propto", tag:"mo", output:"\u221D", ttype:CONST}, +{input:"\\vdash", tag:"mo", output:"\u22A2", ttype:CONST}, +{input:"\\dashv", tag:"mo", output:"\u22A3", ttype:CONST}, +{input:"\\models", tag:"mo", output:"\u22A8", ttype:CONST}, +{input:"\\perp", tag:"mo", output:"\u22A5", ttype:CONST}, +{input:"\\smile", tag:"mo", output:"\u2323", ttype:CONST}, +{input:"\\frown", tag:"mo", output:"\u2322", ttype:CONST}, +{input:"\\asymp", tag:"mo", output:"\u224D", ttype:CONST}, +{input:"\\notin", tag:"mo", output:"\u2209", ttype:CONST}, + +//matrices +{input:"\\begin{eqnarray}", output:"X", ttype:MATRIX, invisible:true}, +{input:"\\begin{array}", output:"X", ttype:MATRIX, invisible:true}, +{input:"\\\\", output:"}&{", ttype:DEFINITION}, +{input:"\\end{eqnarray}", output:"}}", ttype:DEFINITION}, +{input:"\\end{array}", output:"}}", ttype:DEFINITION}, + +//grouping and literal brackets -- ieval is for IE +{input:"\\big", tag:"mo", output:"X", atval:"1.2", ieval:"2.2", ttype:BIG}, +{input:"\\Big", tag:"mo", output:"X", atval:"1.6", ieval:"2.6", ttype:BIG}, +{input:"\\bigg", tag:"mo", output:"X", atval:"2.2", ieval:"3.2", ttype:BIG}, +{input:"\\Bigg", tag:"mo", output:"X", atval:"2.9", ieval:"3.9", ttype:BIG}, +{input:"\\left", tag:"mo", output:"X", ttype:LEFTBRACKET}, +{input:"\\right", tag:"mo", output:"X", ttype:RIGHTBRACKET}, +{input:"{", output:"{", ttype:LEFTBRACKET, invisible:true}, +{input:"}", output:"}", ttype:RIGHTBRACKET, invisible:true}, + +{input:"(", tag:"mo", output:"(", atval:"1", ttype:STRETCHY}, +{input:"[", tag:"mo", output:"[", atval:"1", ttype:STRETCHY}, +{input:"\\lbrack", tag:"mo", output:"[", atval:"1", ttype:STRETCHY}, +{input:"\\{", tag:"mo", output:"{", atval:"1", ttype:STRETCHY}, +{input:"\\lbrace", tag:"mo", output:"{", atval:"1", ttype:STRETCHY}, +{input:"\\langle", tag:"mo", output:"\u2329", atval:"1", ttype:STRETCHY}, +{input:"\\lfloor", tag:"mo", output:"\u230A", atval:"1", ttype:STRETCHY}, +{input:"\\lceil", tag:"mo", output:"\u2308", atval:"1", ttype:STRETCHY}, + +// rtag:"mi" causes space to be inserted before a following sin, cos, etc. +// (see function AMparseExpr() ) +{input:")", tag:"mo",output:")", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"]", tag:"mo",output:"]", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"\\rbrack",tag:"mo",output:"]", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"\\}", tag:"mo",output:"}", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"\\rbrace",tag:"mo",output:"}", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"\\rangle",tag:"mo",output:"\u232A", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"\\rfloor",tag:"mo",output:"\u230B", rtag:"mi",atval:"1",ttype:STRETCHY}, +{input:"\\rceil", tag:"mo",output:"\u2309", rtag:"mi",atval:"1",ttype:STRETCHY}, + +// "|", "\\|", "\\vert" and "\\Vert" modified later: lspace = rspace = 0em +{input:"|", tag:"mo", output:"\u2223", atval:"1", ttype:STRETCHY}, +{input:"\\|", tag:"mo", output:"\u2225", atval:"1", ttype:STRETCHY}, +{input:"\\vert", tag:"mo", output:"\u2223", atval:"1", ttype:STRETCHY}, +{input:"\\Vert", tag:"mo", output:"\u2225", atval:"1", ttype:STRETCHY}, +{input:"\\mid", tag:"mo", output:"\u2223", atval:"1", ttype:STRETCHY}, +{input:"\\parallel", tag:"mo", output:"\u2225", atval:"1", ttype:STRETCHY}, +{input:"/", tag:"mo", output:"/", atval:"1.01", ttype:STRETCHY}, +{input:"\\backslash", tag:"mo", output:"\u2216", atval:"1", ttype:STRETCHY}, +{input:"\\setminus", tag:"mo", output:"\\", ttype:CONST}, + +//miscellaneous symbols +{input:"\\!", tag:"mspace", atname:"width", atval:"-0.167em", ttype:SPACE}, +{input:"\\,", tag:"mspace", atname:"width", atval:"0.167em", ttype:SPACE}, +{input:"\\>", tag:"mspace", atname:"width", atval:"0.222em", ttype:SPACE}, +{input:"\\:", tag:"mspace", atname:"width", atval:"0.222em", ttype:SPACE}, +{input:"\\;", tag:"mspace", atname:"width", atval:"0.278em", ttype:SPACE}, +{input:"~", tag:"mspace", atname:"width", atval:"0.333em", ttype:SPACE}, +{input:"\\quad", tag:"mspace", atname:"width", atval:"1em", ttype:SPACE}, +{input:"\\qquad", tag:"mspace", atname:"width", atval:"2em", ttype:SPACE}, +//{input:"{}", tag:"mo", output:"\u200B", ttype:CONST}, // zero-width +{input:"\\prime", tag:"mo", output:"\u2032", ttype:CONST}, +{input:"'", tag:"mo", output:"\u02B9", ttype:CONST}, +{input:"''", tag:"mo", output:"\u02BA", ttype:CONST}, +{input:"'''", tag:"mo", output:"\u2034", ttype:CONST}, +{input:"''''", tag:"mo", output:"\u2057", ttype:CONST}, +{input:"\\ldots", tag:"mo", output:"\u2026", ttype:CONST}, +{input:"\\cdots", tag:"mo", output:"\u22EF", ttype:CONST}, +{input:"\\vdots", tag:"mo", output:"\u22EE", ttype:CONST}, +{input:"\\ddots", tag:"mo", output:"\u22F1", ttype:CONST}, +{input:"\\forall", tag:"mo", output:"\u2200", ttype:CONST}, +{input:"\\exists", tag:"mo", output:"\u2203", ttype:CONST}, +{input:"\\Re", tag:"mo", output:"\u211C", ttype:CONST}, +{input:"\\Im", tag:"mo", output:"\u2111", ttype:CONST}, +{input:"\\aleph", tag:"mo", output:"\u2135", ttype:CONST}, +{input:"\\hbar", tag:"mo", output:"\u210F", ttype:CONST}, +{input:"\\ell", tag:"mo", output:"\u2113", ttype:CONST}, +{input:"\\wp", tag:"mo", output:"\u2118", ttype:CONST}, +{input:"\\emptyset", tag:"mo", output:"\u2205", ttype:CONST}, +{input:"\\infty", tag:"mo", output:"\u221E", ttype:CONST}, +{input:"\\surd", tag:"mo", output:"\\sqrt{}", ttype:DEFINITION}, +{input:"\\partial", tag:"mo", output:"\u2202", ttype:CONST}, +{input:"\\nabla", tag:"mo", output:"\u2207", ttype:CONST}, +{input:"\\triangle", tag:"mo", output:"\u25B3", ttype:CONST}, +{input:"\\therefore", tag:"mo", output:"\u2234", ttype:CONST}, +{input:"\\angle", tag:"mo", output:"\u2220", ttype:CONST}, +//{input:"\\\\ ", tag:"mo", output:"\u00A0", ttype:CONST}, +{input:"\\diamond", tag:"mo", output:"\u22C4", ttype:CONST}, +//{input:"\\Diamond", tag:"mo", output:"\u25CA", ttype:CONST}, +{input:"\\Diamond", tag:"mo", output:"\u25C7", ttype:CONST}, +{input:"\\neg", tag:"mo", output:"\u00AC", ttype:CONST}, +{input:"\\lnot", tag:"mo", output:"\u00AC", ttype:CONST}, +{input:"\\bot", tag:"mo", output:"\u22A5", ttype:CONST}, +{input:"\\top", tag:"mo", output:"\u22A4", ttype:CONST}, +{input:"\\square", tag:"mo", output:"\u25AB", ttype:CONST}, +{input:"\\Box", tag:"mo", output:"\u25A1", ttype:CONST}, +{input:"\\wr", tag:"mo", output:"\u2240", ttype:CONST}, + +//standard functions +//Note UNDEROVER *must* have tag:"mo" to work properly +{input:"\\arccos", tag:"mi", output:"arccos", ttype:UNARY, func:true}, +{input:"\\arcsin", tag:"mi", output:"arcsin", ttype:UNARY, func:true}, +{input:"\\arctan", tag:"mi", output:"arctan", ttype:UNARY, func:true}, +{input:"\\arg", tag:"mi", output:"arg", ttype:UNARY, func:true}, +{input:"\\cos", tag:"mi", output:"cos", ttype:UNARY, func:true}, +{input:"\\cosh", tag:"mi", output:"cosh", ttype:UNARY, func:true}, +{input:"\\cot", tag:"mi", output:"cot", ttype:UNARY, func:true}, +{input:"\\coth", tag:"mi", output:"coth", ttype:UNARY, func:true}, +{input:"\\csc", tag:"mi", output:"csc", ttype:UNARY, func:true}, +{input:"\\deg", tag:"mi", output:"deg", ttype:UNARY, func:true}, +{input:"\\det", tag:"mi", output:"det", ttype:UNARY, func:true}, +{input:"\\dim", tag:"mi", output:"dim", ttype:UNARY, func:true}, //CONST? +{input:"\\exp", tag:"mi", output:"exp", ttype:UNARY, func:true}, +{input:"\\gcd", tag:"mi", output:"gcd", ttype:UNARY, func:true}, //CONST? +{input:"\\hom", tag:"mi", output:"hom", ttype:UNARY, func:true}, +{input:"\\inf", tag:"mo", output:"inf", ttype:UNDEROVER}, +{input:"\\ker", tag:"mi", output:"ker", ttype:UNARY, func:true}, +{input:"\\lg", tag:"mi", output:"lg", ttype:UNARY, func:true}, +{input:"\\lim", tag:"mo", output:"lim", ttype:UNDEROVER}, +{input:"\\liminf", tag:"mo", output:"liminf", ttype:UNDEROVER}, +{input:"\\limsup", tag:"mo", output:"limsup", ttype:UNDEROVER}, +{input:"\\ln", tag:"mi", output:"ln", ttype:UNARY, func:true}, +{input:"\\log", tag:"mi", output:"log", ttype:UNARY, func:true}, +{input:"\\max", tag:"mo", output:"max", ttype:UNDEROVER}, +{input:"\\min", tag:"mo", output:"min", ttype:UNDEROVER}, +{input:"\\Pr", tag:"mi", output:"Pr", ttype:UNARY, func:true}, +{input:"\\sec", tag:"mi", output:"sec", ttype:UNARY, func:true}, +{input:"\\sin", tag:"mi", output:"sin", ttype:UNARY, func:true}, +{input:"\\sinh", tag:"mi", output:"sinh", ttype:UNARY, func:true}, +{input:"\\sup", tag:"mo", output:"sup", ttype:UNDEROVER}, +{input:"\\tan", tag:"mi", output:"tan", ttype:UNARY, func:true}, +{input:"\\tanh", tag:"mi", output:"tanh", ttype:UNARY, func:true}, + +//arrows +{input:"\\gets", tag:"mo", output:"\u2190", ttype:CONST}, +{input:"\\leftarrow", tag:"mo", output:"\u2190", ttype:CONST}, +{input:"\\to", tag:"mo", output:"\u2192", ttype:CONST}, +{input:"\\rightarrow", tag:"mo", output:"\u2192", ttype:CONST}, +{input:"\\leftrightarrow", tag:"mo", output:"\u2194", ttype:CONST}, +{input:"\\uparrow", tag:"mo", output:"\u2191", ttype:CONST}, +{input:"\\downarrow", tag:"mo", output:"\u2193", ttype:CONST}, +{input:"\\updownarrow", tag:"mo", output:"\u2195", ttype:CONST}, +{input:"\\Leftarrow", tag:"mo", output:"\u21D0", ttype:CONST}, +{input:"\\Rightarrow", tag:"mo", output:"\u21D2", ttype:CONST}, +{input:"\\Leftrightarrow", tag:"mo", output:"\u21D4", ttype:CONST}, +{input:"\\iff", tag:"mo", output:"~\\Longleftrightarrow~", ttype:DEFINITION}, +{input:"\\Uparrow", tag:"mo", output:"\u21D1", ttype:CONST}, +{input:"\\Downarrow", tag:"mo", output:"\u21D3", ttype:CONST}, +{input:"\\Updownarrow", tag:"mo", output:"\u21D5", ttype:CONST}, +{input:"\\mapsto", tag:"mo", output:"\u21A6", ttype:CONST}, +{input:"\\longleftarrow", tag:"mo", output:"\u2190", ttype:LONG}, +{input:"\\longrightarrow", tag:"mo", output:"\u2192", ttype:LONG}, +{input:"\\longleftrightarrow", tag:"mo", output:"\u2194", ttype:LONG}, +{input:"\\Longleftarrow", tag:"mo", output:"\u21D0", ttype:LONG}, +{input:"\\Longrightarrow", tag:"mo", output:"\u21D2", ttype:LONG}, +{input:"\\Longleftrightarrow", tag:"mo", output:"\u21D4", ttype:LONG}, +{input:"\\longmapsto", tag:"mo", output:"\u21A6", ttype:CONST}, + // disaster if LONG + +//commands with argument +AMsqrt, AMroot, AMfrac, AMover, AMsub, AMsup, AMtext, AMmbox, AMatop, AMchoose, +//AMdiv, AMquote, + +//diacritical marks +{input:"\\acute", tag:"mover", output:"\u00B4", ttype:UNARY, acc:true}, +//{input:"\\acute", tag:"mover", output:"\u0317", ttype:UNARY, acc:true}, +//{input:"\\acute", tag:"mover", output:"\u0301", ttype:UNARY, acc:true}, +//{input:"\\grave", tag:"mover", output:"\u0300", ttype:UNARY, acc:true}, +//{input:"\\grave", tag:"mover", output:"\u0316", ttype:UNARY, acc:true}, +{input:"\\grave", tag:"mover", output:"\u0060", ttype:UNARY, acc:true}, +{input:"\\breve", tag:"mover", output:"\u02D8", ttype:UNARY, acc:true}, +{input:"\\check", tag:"mover", output:"\u02C7", ttype:UNARY, acc:true}, +{input:"\\dot", tag:"mover", output:".", ttype:UNARY, acc:true}, +{input:"\\ddot", tag:"mover", output:"..", ttype:UNARY, acc:true}, +//{input:"\\ddot", tag:"mover", output:"\u00A8", ttype:UNARY, acc:true}, +{input:"\\mathring", tag:"mover", output:"\u00B0", ttype:UNARY, acc:true}, +{input:"\\vec", tag:"mover", output:"\u20D7", ttype:UNARY, acc:true}, +{input:"\\overrightarrow",tag:"mover",output:"\u20D7", ttype:UNARY, acc:true}, +{input:"\\overleftarrow",tag:"mover", output:"\u20D6", ttype:UNARY, acc:true}, +{input:"\\hat", tag:"mover", output:"\u005E", ttype:UNARY, acc:true}, +{input:"\\widehat", tag:"mover", output:"\u0302", ttype:UNARY, acc:true}, +{input:"\\tilde", tag:"mover", output:"~", ttype:UNARY, acc:true}, +//{input:"\\tilde", tag:"mover", output:"\u0303", ttype:UNARY, acc:true}, +{input:"\\widetilde", tag:"mover", output:"\u02DC", ttype:UNARY, acc:true}, +{input:"\\bar", tag:"mover", output:"\u203E", ttype:UNARY, acc:true}, +{input:"\\overbrace", tag:"mover", output:"\u23B4", ttype:UNARY, acc:true}, +{input:"\\overline", tag:"mover", output:"\u00AF", ttype:UNARY, acc:true}, +{input:"\\underbrace", tag:"munder", output:"\u23B5", ttype:UNARY, acc:true}, +{input:"\\underline", tag:"munder", output:"\u00AF", ttype:UNARY, acc:true}, +//{input:"underline", tag:"munder", output:"\u0332", ttype:UNARY, acc:true}, + +//typestyles and fonts +{input:"\\displaystyle",tag:"mstyle",atname:"displaystyle",atval:"true", ttype:UNARY}, +{input:"\\textstyle",tag:"mstyle",atname:"displaystyle",atval:"false", ttype:UNARY}, +{input:"\\scriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"1", ttype:UNARY}, +{input:"\\scriptscriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"2", ttype:UNARY}, +{input:"\\textrm", tag:"mstyle", output:"\\mathrm", ttype: DEFINITION}, +{input:"\\mathbf", tag:"mstyle", atname:"mathvariant", atval:"bold", ttype:UNARY}, +{input:"\\textbf", tag:"mstyle", atname:"mathvariant", atval:"bold", ttype:UNARY}, +{input:"\\mathit", tag:"mstyle", atname:"mathvariant", atval:"italic", ttype:UNARY}, +{input:"\\textit", tag:"mstyle", atname:"mathvariant", atval:"italic", ttype:UNARY}, +{input:"\\mathtt", tag:"mstyle", atname:"mathvariant", atval:"monospace", ttype:UNARY}, +{input:"\\texttt", tag:"mstyle", atname:"mathvariant", atval:"monospace", ttype:UNARY}, +{input:"\\mathsf", tag:"mstyle", atname:"mathvariant", atval:"sans-serif", ttype:UNARY}, +{input:"\\mathbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", ttype:UNARY, codes:AMbbb}, +{input:"\\mathcal",tag:"mstyle", atname:"mathvariant", atval:"script", ttype:UNARY, codes:AMcal}, +{input:"\\mathfrak",tag:"mstyle",atname:"mathvariant", atval:"fraktur",ttype:UNARY, codes:AMfrk} +]; + +function compareNames(s1,s2) { + if (s1.input > s2.input) return 1 + else return -1; +} + +var AMnames = []; //list of input symbols + +function AMinitSymbols() { + AMsymbols.sort(compareNames); + for (i=0; i=n where str appears or would be inserted +// assumes arr is sorted + if (n==0) { + var h,m; + n = -1; + h = arr.length; + while (n+1> 1; + if (arr[m]=str +} + +function AMgetSymbol(str) { +//return maximal initial substring of str that appears in names +//return null if there is none + var k = 0; //new pos + var j = 0; //old pos + var mk; //match pos + var st; + var tagst; + var match = ""; + var more = true; + for (var i=1; i<=str.length && more; i++) { + st = str.slice(0,i); //initial substring of length i + j = k; + k = AMposition(AMnames, st, j); + if (k=AMnames[k]; + } + AMpreviousSymbol=AMcurrentSymbol; + if (match!=""){ + AMcurrentSymbol=AMsymbols[mk].ttype; + return AMsymbols[mk]; + } + AMcurrentSymbol=CONST; + k = 1; + st = str.slice(0,1); //take 1 character + if ("0"<=st && st<="9") tagst = "mn"; + else tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi"); +/* +// Commented out by DRW (not fully understood, but probably to do with +// use of "/" as an INFIX version of "\\frac", which we don't want): +//} +//if (st=="-" && AMpreviousSymbol==INFIX) { +// AMcurrentSymbol = INFIX; //trick "/" into recognizing "-" on second parse +// return {input:st, tag:tagst, output:st, ttype:UNARY, func:true}; +//} +*/ + return {input:st, tag:tagst, output:st, ttype:CONST}; +} + + +/*Parsing ASCII math expressions with the following grammar +v ::= [A-Za-z] | greek letters | numbers | other constant symbols +u ::= sqrt | text | bb | other unary symbols for font commands +b ::= frac | root | stackrel binary symbols +l ::= { | \left left brackets +r ::= } | \right right brackets +S ::= v | lEr | uS | bSS Simple expression +I ::= S_S | S^S | S_S^S | S Intermediate expression +E ::= IE | I/I Expression +Each terminal symbol is translated into a corresponding mathml node.*/ + +var AMpreviousSymbol,AMcurrentSymbol; + +function AMparseSexpr(str) { //parses str and returns [node,tailstr,(node)tag] + var symbol, node, result, result2, i, st,// rightvert = false, + newFrag = document.createDocumentFragment(); + str = AMremoveCharsAndBlanks(str,0); + symbol = AMgetSymbol(str); //either a token or a bracket or empty + if (symbol == null || symbol.ttype == RIGHTBRACKET) + return [null,str,null]; + if (symbol.ttype == DEFINITION) { + str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); + symbol = AMgetSymbol(str); + if (symbol == null || symbol.ttype == RIGHTBRACKET) + return [null,str,null]; + } + str = AMremoveCharsAndBlanks(str,symbol.input.length); + switch (symbol.ttype) { + case SPACE: + node = AMcreateElementMathML(symbol.tag); + node.setAttribute(symbol.atname,symbol.atval); + return [node,str,symbol.tag]; + case UNDEROVER: + if (isIE) { + if (symbol.input.substr(0,4) == "\\big") { // botch for missing symbols + str = "\\"+symbol.input.substr(4)+str; // make \bigcup = \cup etc. + symbol = AMgetSymbol(str); + symbol.ttype = UNDEROVER; + str = AMremoveCharsAndBlanks(str,symbol.input.length); + } + } + return [AMcreateMmlNode(symbol.tag, + document.createTextNode(symbol.output)),str,symbol.tag]; + case CONST: + var output = symbol.output; + if (isIE) { + if (symbol.input == "'") + output = "\u2032"; + else if (symbol.input == "''") + output = "\u2033"; + else if (symbol.input == "'''") + output = "\u2033\u2032"; + else if (symbol.input == "''''") + output = "\u2033\u2033"; + else if (symbol.input == "\\square") + output = "\u25A1"; // same as \Box + else if (symbol.input.substr(0,5) == "\\frac") { + // botch for missing fractions + var denom = symbol.input.substr(6,1); + if (denom == "5" || denom == "6") { + str = symbol.input.replace(/\\frac/,"\\frac ")+str; + return [node,str,symbol.tag]; + } + } + } + node = AMcreateMmlNode(symbol.tag,document.createTextNode(output)); + return [node,str,symbol.tag]; + case LONG: // added by DRW + node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)); + node.setAttribute("minsize","1.5"); + node.setAttribute("maxsize","1.5"); + node = AMcreateMmlNode("mover",node); + node.appendChild(AMcreateElementMathML("mspace")); + return [node,str,symbol.tag]; + case STRETCHY: // added by DRW + if (isIE && symbol.input == "\\backslash") + symbol.output = "\\"; // doesn't expand, but then nor does "\u2216" + node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)); + if (symbol.input == "|" || symbol.input == "\\vert" || + symbol.input == "\\|" || symbol.input == "\\Vert") { + node.setAttribute("lspace","0em"); + node.setAttribute("rspace","0em"); + } + node.setAttribute("maxsize",symbol.atval); // don't allow to stretch here + if (symbol.rtag != null) + return [node,str,symbol.rtag]; + else + return [node,str,symbol.tag]; + case BIG: // added by DRW + var atval = symbol.atval; + if (isIE) + atval = symbol.ieval; + symbol = AMgetSymbol(str); + if (symbol == null) + return [null,str,null]; + str = AMremoveCharsAndBlanks(str,symbol.input.length); + node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)); + if (isIE) { // to get brackets to expand + var space = AMcreateElementMathML("mspace"); + space.setAttribute("height",atval+"ex"); + node = AMcreateMmlNode("mrow",node); + node.appendChild(space); + } else { // ignored in IE + node.setAttribute("minsize",atval); + node.setAttribute("maxsize",atval); + } + return [node,str,symbol.tag]; + case LEFTBRACKET: //read (expr+) + if (symbol.input == "\\left") { // left what? + symbol = AMgetSymbol(str); + if (symbol != null) { + if (symbol.input == ".") + symbol.invisible = true; + str = AMremoveCharsAndBlanks(str,symbol.input.length); + } + } + result = AMparseExpr(str,true,false); + if (symbol==null || + (typeof symbol.invisible == "boolean" && symbol.invisible)) + node = AMcreateMmlNode("mrow",result[0]); + else { + node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); + node = AMcreateMmlNode("mrow",node); + node.appendChild(result[0]); + } + return [node,result[1],result[2]]; + case MATRIX: //read (expr+) + if (symbol.input == "\\begin{array}") { + var mask = ""; + symbol = AMgetSymbol(str); + str = AMremoveCharsAndBlanks(str,0); + if (symbol == null) + mask = "l"; + else { + str = AMremoveCharsAndBlanks(str,symbol.input.length); + if (symbol.input != "{") + mask = "l"; + else do { + symbol = AMgetSymbol(str); + if (symbol != null) { + str = AMremoveCharsAndBlanks(str,symbol.input.length); + if (symbol.input != "}") + mask = mask+symbol.input; + } + } while (symbol != null && symbol.input != "" && symbol.input != "}"); + } + result = AMparseExpr("{"+str,true,true); +// if (result[0]==null) return [AMcreateMmlNode("mo", +// document.createTextNode(symbol.input)),str]; + node = AMcreateMmlNode("mtable",result[0]); + mask = mask.replace(/l/g,"left "); + mask = mask.replace(/r/g,"right "); + mask = mask.replace(/c/g,"center "); + node.setAttribute("columnalign",mask); + node.setAttribute("displaystyle","false"); + if (isIE) + return [node,result[1],null]; +// trying to get a *little* bit of space around the array +// (IE already includes it) + var lspace = AMcreateElementMathML("mspace"); + lspace.setAttribute("width","0.167em"); + var rspace = AMcreateElementMathML("mspace"); + rspace.setAttribute("width","0.167em"); + var node1 = AMcreateMmlNode("mrow",lspace); + node1.appendChild(node); + node1.appendChild(rspace); + return [node1,result[1],null]; + } else { // eqnarray + result = AMparseExpr("{"+str,true,true); + node = AMcreateMmlNode("mtable",result[0]); + if (isIE) + node.setAttribute("columnspacing","0.25em"); // best in practice? + else + node.setAttribute("columnspacing","0.167em"); // correct (but ignored?) + node.setAttribute("columnalign","right center left"); + node.setAttribute("displaystyle","true"); + node = AMcreateMmlNode("mrow",node); + return [node,result[1],null]; + } + case TEXT: + if (str.charAt(0)=="{") i=str.indexOf("}"); + else i = 0; + if (i==-1) + i = str.length; + st = str.slice(1,i); + if (st.charAt(0) == " ") { + node = AMcreateElementMathML("mspace"); + node.setAttribute("width","0.33em"); // was 1ex + newFrag.appendChild(node); + } + newFrag.appendChild( + AMcreateMmlNode(symbol.tag,document.createTextNode(st))); + if (st.charAt(st.length-1) == " ") { + node = AMcreateElementMathML("mspace"); + node.setAttribute("width","0.33em"); // was 1ex + newFrag.appendChild(node); + } + str = AMremoveCharsAndBlanks(str,i+1); + return [AMcreateMmlNode("mrow",newFrag),str,null]; + case UNARY: + result = AMparseSexpr(str); + if (result[0]==null) return [AMcreateMmlNode(symbol.tag, + document.createTextNode(symbol.output)),str]; + if (typeof symbol.func == "boolean" && symbol.func) { // functions hack + st = str.charAt(0); +// if (st=="^" || st=="_" || st=="/" || st=="|" || st==",") { + if (st=="^" || st=="_" || st==",") { + return [AMcreateMmlNode(symbol.tag, + document.createTextNode(symbol.output)),str,symbol.tag]; + } else { + node = AMcreateMmlNode("mrow", + AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); + if (isIE) { + var space = AMcreateElementMathML("mspace"); + space.setAttribute("width","0.167em"); + node.appendChild(space); + } + node.appendChild(result[0]); + return [node,result[1],symbol.tag]; + } + } + if (symbol.input == "\\sqrt") { // sqrt + if (isIE) { // set minsize, for \surd + var space = AMcreateElementMathML("mspace"); + space.setAttribute("height","1.2ex"); + space.setAttribute("width","0em"); // probably no effect + node = AMcreateMmlNode(symbol.tag,result[0]) +// node.setAttribute("minsize","1"); // ignored +// node = AMcreateMmlNode("mrow",node); // hopefully unnecessary + node.appendChild(space); + return [node,result[1],symbol.tag]; + } else + return [AMcreateMmlNode(symbol.tag,result[0]),result[1],symbol.tag]; + } else if (typeof symbol.acc == "boolean" && symbol.acc) { // accent + node = AMcreateMmlNode(symbol.tag,result[0]); + var output = symbol.output; + if (isIE) { + if (symbol.input == "\\hat") + output = "\u0302"; + else if (symbol.input == "\\widehat") + output = "\u005E"; + else if (symbol.input == "\\bar") + output = "\u00AF"; + else if (symbol.input == "\\grave") + output = "\u0300"; + else if (symbol.input == "\\tilde") + output = "\u0303"; + } + var node1 = AMcreateMmlNode("mo",document.createTextNode(output)); + if (symbol.input == "\\vec" || symbol.input == "\\check") + // don't allow to stretch + node1.setAttribute("maxsize","1.2"); + // why doesn't "1" work? \vec nearly disappears in firefox + if (isIE && symbol.input == "\\bar") + node1.setAttribute("maxsize","0.5"); + if (symbol.input == "\\underbrace" || symbol.input == "\\underline") + node1.setAttribute("accentunder","true"); + else + node1.setAttribute("accent","true"); + node.appendChild(node1); + if (symbol.input == "\\overbrace" || symbol.input == "\\underbrace") + node.ttype = UNDEROVER; + return [node,result[1],symbol.tag]; + } else { // font change or displaystyle command + if (!isIE && typeof symbol.codes != "undefined") { + for (i=0; i64 && st.charCodeAt(j)<91) newst = newst + + String.fromCharCode(symbol.codes[st.charCodeAt(j)-65]); + else newst = newst + st.charAt(j); + if (result[0].nodeName=="mi") + result[0]=AMcreateElementMathML("mo"). + appendChild(document.createTextNode(newst)); + else result[0].replaceChild(AMcreateElementMathML("mo"). + appendChild(document.createTextNode(newst)),result[0].childNodes[i]); + } + } + node = AMcreateMmlNode(symbol.tag,result[0]); + node.setAttribute(symbol.atname,symbol.atval); + if (symbol.input == "\\scriptstyle" || + symbol.input == "\\scriptscriptstyle") + node.setAttribute("displaystyle","false"); + return [node,result[1],symbol.tag]; + } + case BINARY: + result = AMparseSexpr(str); + if (result[0]==null) return [AMcreateMmlNode("mo", + document.createTextNode(symbol.input)),str,null]; + result2 = AMparseSexpr(result[1]); + if (result2[0]==null) return [AMcreateMmlNode("mo", + document.createTextNode(symbol.input)),str,null]; + if (symbol.input=="\\root" || symbol.input=="\\stackrel") + newFrag.appendChild(result2[0]); + newFrag.appendChild(result[0]); + if (symbol.input=="\\frac") newFrag.appendChild(result2[0]); + return [AMcreateMmlNode(symbol.tag,newFrag),result2[1],symbol.tag]; + case INFIX: + str = AMremoveCharsAndBlanks(str,symbol.input.length); + return [AMcreateMmlNode("mo",document.createTextNode(symbol.output)), + str,symbol.tag]; + default: + return [AMcreateMmlNode(symbol.tag, //its a constant + document.createTextNode(symbol.output)),str,symbol.tag]; + } +} + +function AMparseIexpr(str) { + var symbol, sym1, sym2, node, result, tag, underover; + str = AMremoveCharsAndBlanks(str,0); + sym1 = AMgetSymbol(str); + result = AMparseSexpr(str); + node = result[0]; + str = result[1]; + tag = result[2]; + symbol = AMgetSymbol(str); + if (symbol.ttype == INFIX) { + str = AMremoveCharsAndBlanks(str,symbol.input.length); + result = AMparseSexpr(str); + if (result[0] == null) // show box in place of missing argument + result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); + str = result[1]; + tag = result[2]; + if (symbol.input == "_" || symbol.input == "^") { + sym2 = AMgetSymbol(str); + tag = null; // no space between x^2 and a following sin, cos, etc. +// This is for \underbrace and \overbrace + underover = ((sym1.ttype == UNDEROVER) || (node.ttype == UNDEROVER)); +// underover = (sym1.ttype == UNDEROVER); + if (symbol.input == "_" && sym2.input == "^") { + str = AMremoveCharsAndBlanks(str,sym2.input.length); + var res2 = AMparseSexpr(str); + str = res2[1]; + tag = res2[2]; // leave space between x_1^2 and a following sin etc. + node = AMcreateMmlNode((underover?"munderover":"msubsup"),node); + node.appendChild(result[0]); + node.appendChild(res2[0]); + } else if (symbol.input == "_") { + node = AMcreateMmlNode((underover?"munder":"msub"),node); + node.appendChild(result[0]); + } else { + node = AMcreateMmlNode((underover?"mover":"msup"),node); + node.appendChild(result[0]); + } + node = AMcreateMmlNode("mrow",node); // so sum does not stretch + } else { + node = AMcreateMmlNode(symbol.tag,node); + if (symbol.input == "\\atop" || symbol.input == "\\choose") + node.setAttribute("linethickness","0ex"); + node.appendChild(result[0]); + if (symbol.input == "\\choose") + node = AMcreateMmlNode("mfenced",node); + } + } + return [node,str,tag]; +} + +function AMparseExpr(str,rightbracket,matrix) { + var symbol, node, result, i, tag, + newFrag = document.createDocumentFragment(); + do { + str = AMremoveCharsAndBlanks(str,0); + result = AMparseIexpr(str); + node = result[0]; + str = result[1]; + tag = result[2]; + symbol = AMgetSymbol(str); + if (node!=undefined) { + if ((tag == "mn" || tag == "mi") && symbol!=null && + typeof symbol.func == "boolean" && symbol.func) { + // Add space before \sin in 2\sin x or x\sin x + var space = AMcreateElementMathML("mspace"); + space.setAttribute("width","0.167em"); + node = AMcreateMmlNode("mrow",node); + node.appendChild(space); + } + newFrag.appendChild(node); + } + } while ((symbol.ttype != RIGHTBRACKET) + && symbol!=null && symbol.output!=""); + tag = null; + if (symbol.ttype == RIGHTBRACKET) { + if (symbol.input == "\\right") { // right what? + str = AMremoveCharsAndBlanks(str,symbol.input.length); + symbol = AMgetSymbol(str); + if (symbol != null && symbol.input == ".") + symbol.invisible = true; + if (symbol != null) + tag = symbol.rtag; + } + if (symbol!=null) + str = AMremoveCharsAndBlanks(str,symbol.input.length); // ready to return + var len = newFrag.childNodes.length; + if (matrix && + len>0 && newFrag.childNodes[len-1].nodeName == "mrow" && len>1 && + newFrag.childNodes[len-2].nodeName == "mo" && + newFrag.childNodes[len-2].firstChild.nodeValue == "&") { //matrix + var pos = []; // positions of ampersands + var m = newFrag.childNodes.length; + for (i=0; matrix && i -&-&...&-&- + n = node.childNodes.length; + k = 0; + for (j=0; j2) { + newFrag.removeChild(newFrag.firstChild); //remove + newFrag.removeChild(newFrag.firstChild); //remove & + } + table.appendChild(AMcreateMmlNode("mtr",row)); + } + return [table,str]; + } + if (typeof symbol.invisible != "boolean" || !symbol.invisible) { + node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); + newFrag.appendChild(node); + } + } + return [newFrag,str,tag]; +} + +function AMparseMath(str) { + var result, node = AMcreateElementMathML("mstyle"); + if (mathcolor != "") node.setAttribute("mathcolor",mathcolor); + if (mathfontfamily != "") node.setAttribute("fontfamily",mathfontfamily); + node.appendChild(AMparseExpr(str.replace(/^\s+/g,""),false,false)[0]); + node = AMcreateMmlNode("math",node); + if (showasciiformulaonhover) //fixed by djhsu so newline + node.setAttribute("title",str.replace(/\s+/g," "));//does not show in Gecko + if (mathfontfamily != "" && (isIE || mathfontfamily != "serif")) { + var fnode = AMcreateElementXHTML("font"); + fnode.setAttribute("face",mathfontfamily); + fnode.appendChild(node); + return fnode; + } + return node; +} + +function AMstrarr2docFrag(arr, linebreaks) { + var newFrag=document.createDocumentFragment(); + var expr = false; + for (var i=0; i1 || mtch) { + if (checkForMathML) { + checkForMathML = false; + var nd = AMisMathMLavailable(); + AMnoMathML = nd != null; + if (AMnoMathML && notifyIfNoMathML) + if (alertIfNoMathML) + alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n\ + or Firefox/Mozilla/Netscape"); + else AMbody.insertBefore(nd,AMbody.childNodes[0]); + } + if (!AMnoMathML) { + frg = AMstrarr2docFrag(arr,n.nodeType==8); + var len = frg.childNodes.length; + n.parentNode.replaceChild(frg,n); + return len-1; + } else return 0; + } + } + } else return 0; + } else if (n.nodeName!="math") { + for (i=0; i"); + document.write(""); +} + +// GO1.1 Generic onload by Brothercake +// http://www.brothercake.com/ +//onload function (replaces the onload="translate()" in the tag) +function generic() +{ + translate(); +}; +//setup onload function +if(typeof window.addEventListener != 'undefined') +{ + //.. gecko, safari, konqueror and standard + window.addEventListener('load', generic, false); +} +else if(typeof document.addEventListener != 'undefined') +{ + //.. opera 7 + document.addEventListener('load', generic, false); +} +else if(typeof window.attachEvent != 'undefined') +{ + //.. win/ie + window.attachEvent('onload', generic); +} +//** remove this condition to degrade older browsers +else +{ + //.. mac/ie5 and anything else that gets this far + //if there's an existing onload function + if(typeof window.onload == 'function') + { + //store it + var existing = onload; + //add new onload handler + window.onload = function() + { + //call existing onload function + existing(); + //call generic onload function + generic(); + }; + } + else + { + //setup onload function + window.onload = generic; + } +} diff -Nru asciidoc-8.6.10/asciidoc/resources/javascripts/slidy.js asciidoc-10.1.2/asciidoc/resources/javascripts/slidy.js --- asciidoc-8.6.10/asciidoc/resources/javascripts/slidy.js 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/javascripts/slidy.js 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,2845 @@ +/* slidy.js + + Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved. + W3C liability, trademark, document use and software licensing + rules apply, see: + + http://www.w3.org/Consortium/Legal/copyright-documents + http://www.w3.org/Consortium/Legal/copyright-software +*/ + +// the slidy object implementation +var w3c_slidy = { + // classify which kind of browser we're running under + ns_pos: (typeof window.pageYOffset!='undefined'), + khtml: ((navigator.userAgent).indexOf("KHTML") >= 0 ? true : false), + opera: ((navigator.userAgent).indexOf("Opera") >= 0 ? true : false), + ipad: ((navigator.userAgent).indexOf("iPad") >= 0 ? true : false), + iphone: ((navigator.userAgent).indexOf("iPhone") >= 0 ? true : false), + ie: (typeof document.all != "undefined" && !this.opera), + ie6: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 6") != -1), + ie7: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 7") != -1), + ie8: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 8") != -1), + ie9: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 9") != -1), + keyboardless: (this.ipad || this.iphone), + + // are we running as XHTML? (doesn't work on Opera) + is_xhtml: /xml/.test(document.contentType), + + slide_number: 0, // integer slide count: 0, 1, 2, ... + slide_number_element: null, // element containing slide number + slides: [], // set to array of slide div's + notes: [], // set to array of handout div's + backgrounds: [], // set to array of background div's + toolbar: null, // element containing toolbar + title: null, // document title + last_shown: null, // last incrementally shown item + eos: null, // span element for end of slide indicator + toc: null, // table of contents + outline: null, // outline element with the focus + selected_text_len: 0, // length of drag selection on document + view_all: 0, // 1 to view all slides + handouts + want_toolbar: true, // user preference to show/hide toolbar + mouse_click_enabled: true, // enables left click for next slide + scroll_hack: 0, // IE work around for position: fixed + disable_slide_click: false, // used by clicked anchors + + lang: "en", // updated to language specified by html file + + help_anchor: null, // used for keyboard focus hack in showToolbar() + help_page: "http://www.w3.org/Talks/Tools/Slidy2/help/help.html", + help_text: "Navigate with mouse click, space bar, Cursor Left/Right, " + + "or Pg Up and Pg Dn. Use S and B to change font size.", + + size_index: 0, + size_adjustment: 0, + sizes: new Array("10pt", "12pt", "14pt", "16pt", "18pt", "20pt", + "22pt", "24pt", "26pt", "28pt", "30pt", "32pt"), + + // needed for efficient resizing + last_width: 0, + last_height: 0, + + + // Needed for cross browser support for relative width/height on + // object elements. The work around is to save width/height attributes + // and then to recompute absolute width/height dimensions on resizing + objects: [], + + // attach initialiation event handlers + set_up: function () { + var init = function() { w3c_slidy.init(); }; + if (typeof window.addEventListener != "undefined") + window.addEventListener("load", init, false); + else + window.attachEvent("onload", init); + }, + + hide_slides: function () { + if (document.body && !w3c_slidy.initialized) + document.body.style.visibility = "hidden"; + else + setTimeout(w3c_slidy.hide_slides, 50); + }, + + // hack to persuade IE to compute correct document height + // as needed for simulating fixed positioning of toolbar + ie_hack: function () { + window.resizeBy(0,-1); + window.resizeBy(0, 1); + }, + + init: function () { + //alert("slidy starting test 10"); + document.body.style.visibility = "visible"; + w3c_slidy_i18n.init(); + this.add_toolbar(); + this.wrap_implicit_slides(); + this.collect_slides(); + this.collect_notes(); + this.collect_backgrounds(); + this.objects = document.body.getElementsByTagName("object"); + this.patch_anchors(); + this.slide_number = this.find_slide_number(location.href); + window.offscreenbuffering = true; + this.size_adjustment = this.find_size_adjust(); + this.time_left = this.find_duration(); + this.hide_image_toolbar(); // suppress IE image toolbar popup + this.init_outliner(); // activate fold/unfold support + this.title = document.title; + + // work around for opera bug + this.is_xhtml = (document.body.tagName == "BODY" ? false : true); + + if (this.slides.length > 0) + { + var slide = this.slides[this.slide_number]; + + if (this.slide_number > 0) + { + this.set_visibility_all_incremental("visible"); + this.last_shown = this.previous_incremental_item(null); + this.set_eos_status(true); + } + else + { + this.last_shown = null; + this.set_visibility_all_incremental("hidden"); + this.set_eos_status(!this.next_incremental_item(this.last_shown)); + } + + this.set_location(); + this.add_class(this.slides[0], "first-slide"); + w3c_slidy.show_slide(slide); + } + + this.toc = this.table_of_contents(); + + this.add_initial_prompt(); + + // bind event handlers without interfering with custom page scripts + // Tap events behave too weirdly to support clicks reliably on + // iPhone and iPad, so exclude these from click handler + + if (!this.keyboardless) + this.add_listener(document.body, "click", this.mouse_button_click); + + this.add_listener(document, "keydown", this.key_down); + this.add_listener(document, "keypress", this.key_press); + this.add_listener(window, "resize", this.resized); + this.add_listener(window, "scroll", this.scrolled); + this.add_listener(window, "unload", this.unloaded); + + if (!document.body.onclick) + document.body.onclick = function () { }; + + this.single_slide_view(); + + //this.set_location(); + + this.resized(); + + if (this.ie7) + setTimeout(w3c_slidy.ie_hack, 100); + + this.show_toolbar(); + + // for back button detection + setInterval(function () { w3c_slidy.check_location(); }, 200); + w3c_slidy.initialized = true; + }, + + // create div element with links to each slide + table_of_contents: function () { + var toc = this.create_element("div"); + this.add_class(toc, "slidy_toc hidden"); + //toc.setAttribute("tabindex", "0"); + + var heading = this.create_element("div"); + this.add_class(heading, "toc-heading"); + heading.innerHTML = "Table of Contents".localize(); + + toc.appendChild(heading); + var previous = null; + + for (var i = 0; i < this.slides.length; ++i) + { + var title = this.has_class(this.slides[i], "title"); + var num = document.createTextNode((i + 1) + ". "); + + toc.appendChild(num); + + var a = this.create_element("a"); + a.setAttribute("href", "#(" + (i+1) + ")"); + + if (title) + this.add_class(a, "titleslide"); + + var name = document.createTextNode(this.slide_name(i)); + a.appendChild(name); + a.onclick = w3c_slidy.toc_click; + a.onkeydown = w3c_slidy.toc_keydown; + a.previous = previous; + + if (previous) + previous.next = a; + + toc.appendChild(a); + + if (i == 0) + toc.first = a; + + if (i < this.slides.length - 1) + { + var br = this.create_element("br"); + toc.appendChild(br); + } + + previous = a; + } + + toc.focus = function () { + if (this.first) + this.first.focus(); + } + + toc.onmouseup = w3c_slidy.mouse_button_up; + + toc.onclick = function (e) { + e||(e=window.event); + + if (w3c_slidy.selected_text_len <= 0) + w3c_slidy.hide_table_of_contents(); + + w3c_slidy.stop_propagation(e); + + if (e.cancel != undefined) + e.cancel = true; + + if (e.returnValue != undefined) + e.returnValue = false; + + return false; + }; + + document.body.insertBefore(toc, document.body.firstChild); + return toc; + }, + + is_shown_toc: function () { + return !w3c_slidy.has_class(w3c_slidy.toc, "hidden"); + }, + + show_table_of_contents: function () { + w3c_slidy.remove_class(w3c_slidy.toc, "hidden"); + var toc = w3c_slidy.toc; + toc.focus(); + + if (w3c_slidy.ie7 && w3c_slidy.slide_number == 0) + setTimeout(w3c_slidy.ie_hack, 100); + }, + + hide_table_of_contents: function () { + w3c_slidy.add_class(w3c_slidy.toc, "hidden"); + + if (!w3c_slidy.opera) + w3c_slidy.help_anchor.focus(); + }, + + toggle_table_of_contents: function () { + if (w3c_slidy.is_shown_toc()) + w3c_slidy.hide_table_of_contents(); + else + w3c_slidy.show_table_of_contents(); + }, + + // called on clicking toc entry + toc_click: function (e) { + if (!e) + e = window.event; + + var target = w3c_slidy.get_target(e); + + if (target && target.nodeType == 1) + { + var uri = target.getAttribute("href"); + + if (uri) + { + //alert("going to " + uri); + var slide = w3c_slidy.slides[w3c_slidy.slide_number]; + w3c_slidy.hide_slide(slide); + w3c_slidy.slide_number = w3c_slidy.find_slide_number(uri); + slide = w3c_slidy.slides[w3c_slidy.slide_number]; + w3c_slidy.last_shown = null; + w3c_slidy.set_location(); + w3c_slidy.set_visibility_all_incremental("hidden"); + w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown)); + w3c_slidy.show_slide(slide); + //target.focus(); + + try + { + if (!w3c_slidy.opera) + w3c_slidy.help_anchor.focus(); + } + catch (e) + { + } + } + } + + w3c_slidy.hide_table_of_contents(e); + if (w3c_slidy.ie7) w3c_slidy.ie_hack(); + w3c_slidy.stop_propagation(e); + return w3c_slidy.cancel(e); + }, + + // called onkeydown for toc entry + toc_keydown: function (event) { + var key; + + if (!event) + var event = window.event; + + // kludge around NS/IE differences + if (window.event) + key = window.event.keyCode; + else if (event.which) + key = event.which; + else + return true; // Yikes! unknown browser + + // ignore event if key value is zero + // as for alt on Opera and Konqueror + if (!key) + return true; + + // check for concurrent control/command/alt key + // but are these only present on mouse events? + + if (event.ctrlKey || event.altKey) + return true; + + if (key == 13) + { + var uri = this.getAttribute("href"); + + if (uri) + { + //alert("going to " + uri); + var slide = w3c_slidy.slides[w3c_slidy.slide_number]; + w3c_slidy.hide_slide(slide); + w3c_slidy.slide_number = w3c_slidy.find_slide_number(uri); + slide = w3c_slidy.slides[w3c_slidy.slide_number]; + w3c_slidy.last_shown = null; + w3c_slidy.set_location(); + w3c_slidy.set_visibility_all_incremental("hidden"); + w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown)); + w3c_slidy.show_slide(slide); + //target.focus(); + + try + { + if (!w3c_slidy.opera) + w3c_slidy.help_anchor.focus(); + } + catch (e) + { + } + } + + w3c_slidy.hide_table_of_contents(); + + if (self.ie7) + w3c_slidy.ie_hack(); + + return w3c_slidy.cancel(event); + } + + if (key == 40 && this.next) + { + this.next.focus(); + return w3c_slidy.cancel(event); + } + + if (key == 38 && this.previous) + { + this.previous.focus(); + return w3c_slidy.cancel(event); + } + + return true; + }, + + + // ### OBSOLETE ### + before_print: function () { + this.show_all_slides(); + this.hide_toolbar(); + alert("before print"); + }, + + // ### OBSOLETE ### + after_print: function () { + if (!this.view_all) + { + this.single_slide_view(); + this.show_toolbar(); + } + alert("after print"); + }, + + // ### OBSOLETE ### + print_slides: function () { + this.before_print(); + window.print(); + this.after_print(); + }, + + // ### OBSOLETE ?? ### + toggle_view: function () { + if (this.view_all) + { + this.single_slide_view(); + this.show_toolbar(); + this.view_all = 0; + } + else + { + this.show_all_slides(); + this.hide_toolbar(); + this.view_all = 1; + } + }, + + // prepare for printing ### OBSOLETE ### + show_all_slides: function () { + this.remove_class(document.body, "single_slide"); + this.set_visibility_all_incremental("visible"); + }, + + // restore after printing ### OBSOLETE ### + single_slide_view: function () { + this.add_class(document.body, "single_slide"); + this.set_visibility_all_incremental("visible"); + this.last_shown = this.previous_incremental_item(null); + }, + + // suppress IE's image toolbar pop up + hide_image_toolbar: function () { + if (!this.ns_pos) + { + var images = document.getElementsByTagName("IMG"); + + for (var i = 0; i < images.length; ++i) + images[i].setAttribute("galleryimg", "no"); + } + }, + + unloaded: function (e) { + //alert("unloaded"); + }, + + // Safari and Konqueror don't yet support getComputedStyle() + // and they always reload page when location.href is updated + is_KHTML: function () { + var agent = navigator.userAgent; + return (agent.indexOf("KHTML") >= 0 ? true : false); + }, + + // find slide name from first h1 element + // default to document title + slide number + slide_name: function (index) { + var name = null; + var slide = this.slides[index]; + + var heading = this.find_heading(slide); + + if (heading) + name = this.extract_text(heading); + + if (!name) + name = this.title + "(" + (index + 1) + ")"; + + name.replace(/\&/g, "&"); + name.replace(/\/g, ">"); + + return name; + }, + + // find first h1 element in DOM tree + find_heading: function (node) { + if (!node || node.nodeType != 1) + return null; + + if (node.nodeName == "H1" || node.nodeName == "h1") + return node; + + var child = node.firstChild; + + while (child) + { + node = this.find_heading(child); + + if (node) + return node; + + child = child.nextSibling; + } + + return null; + }, + + // recursively extract text from DOM tree + extract_text: function (node) { + if (!node) + return ""; + + // text nodes + if (node.nodeType == 3) + return node.nodeValue; + + // elements + if (node.nodeType == 1) + { + node = node.firstChild; + var text = ""; + + while (node) + { + text = text + this.extract_text(node); + node = node.nextSibling; + } + + return text; + } + + return ""; + }, + + // find copyright text from meta element + find_copyright: function () { + var name, content; + var meta = document.getElementsByTagName("meta"); + + for (var i = 0; i < meta.length; ++i) + { + name = meta[i].getAttribute("name"); + content = meta[i].getAttribute("content"); + + if (name == "copyright") + return content; + } + + return null; + }, + + find_size_adjust: function () { + var name, content, offset; + var meta = document.getElementsByTagName("meta"); + + for (var i = 0; i < meta.length; ++i) + { + name = meta[i].getAttribute("name"); + content = meta[i].getAttribute("content"); + + if (name == "font-size-adjustment") + return 1 * content; + } + + return 1; + }, + + // for 20 minutes + find_duration: function () { + var name, content, offset; + var meta = document.getElementsByTagName("meta"); + + for (var i = 0; i < meta.length; ++i) + { + name = meta[i].getAttribute("name"); + content = meta[i].getAttribute("content"); + + if (name == "duration") + return 60000 * content; + } + + return null; + }, + + replace_by_non_breaking_space: function (str) { + for (var i = 0; i < str.length; ++i) + str[i] = 160; + }, + + // ### CHECK ME ### is use of "li" okay for text/html? + // for XHTML do we also need to specify namespace? + init_outliner: function () { + var items = document.getElementsByTagName("li"); + + for (var i = 0; i < items.length; ++i) + { + var target = items[i]; + + if (!this.has_class(target.parentNode, "outline")) + continue; + + target.onclick = this.outline_click; +/* ### more work needed for IE6 + if (!this.ns_pos) + { + target.onmouseover = this.hover_outline; + target.onmouseout = this.unhover_outline; + } +*/ + if (this.foldable(target)) + { + target.foldable = true; + target.onfocus = function () {w3c_slidy.outline = this;}; + target.onblur = function () {w3c_slidy.outline = null;}; + + if (!target.getAttribute("tabindex")) + target.setAttribute("tabindex", "0"); + + if (this.has_class(target, "expand")) + this.unfold(target); + else + this.fold(target); + } + else + { + this.add_class(target, "nofold"); + target.visible = true; + target.foldable = false; + } + } + }, + + foldable: function (item) { + if (!item || item.nodeType != 1) + return false; + + var node = item.firstChild; + + while (node) + { + if (node.nodeType == 1 && this.is_block(node)) + return true; + + node = node.nextSibling; + } + + return false; + }, + + // ### CHECK ME ### switch to add/remove "hidden" class + fold: function (item) { + if (item) + { + this.remove_class(item, "unfolded"); + this.add_class(item, "folded"); + } + + var node = item ? item.firstChild : null; + + while (node) + { + if (node.nodeType == 1 && this.is_block(node)) // element + { + w3c_slidy.add_class(node, "hidden"); + } + + node = node.nextSibling; + } + + item.visible = false; + }, + + // ### CHECK ME ### switch to add/remove "hidden" class + unfold: function (item) { + if (item) + { + this.add_class(item, "unfolded"); + this.remove_class(item, "folded"); + } + + var node = item ? item.firstChild : null; + + while (node) + { + if (node.nodeType == 1 && this.is_block(node)) // element + { + w3c_slidy.remove_class(node, "hidden"); + } + + node = node.nextSibling; + } + + item.visible = true; + }, + + outline_click: function (e) { + if (!e) + e = window.event; + + var rightclick = false; + var target = w3c_slidy.get_target(e); + + while (target && target.visible == undefined) + target = target.parentNode; + + if (!target) + return true; + + if (e.which) + rightclick = (e.which == 3); + else if (e.button) + rightclick = (e.button == 2); + + if (!rightclick && target.visible != undefined) + { + if (target.foldable) + { + if (target.visible) + w3c_slidy.fold(target); + else + w3c_slidy.unfold(target); + } + + w3c_slidy.stop_propagation(e); + e.cancel = true; + e.returnValue = false; + } + + return false; + }, + + add_initial_prompt: function () { + var prompt = this.create_element("div"); + prompt.setAttribute("class", "initial_prompt"); + + var p1 = this.create_element("p"); + prompt.appendChild(p1); + p1.setAttribute("class", "help"); + + if (this.keyboardless) + p1.innerHTML = "Tap footer to move to next slide"; + else + p1.innerHTML = "Space or Right Arrow to move to next " + + "slide, click help below for more details"; + + this.add_listener(prompt, "click", function (e) { + document.body.removeChild(prompt); + w3c_slidy.stop_propagation(e); + + if (e.cancel != undefined) + e.cancel = true; + + if (e.returnValue != undefined) + e.returnValue = false; + + return false; + }); + + document.body.appendChild(prompt); + this.initial_prompt = prompt; + setTimeout(function() {document.body.removeChild(prompt);}, 5000); + }, + + add_toolbar: function () { + var counter, page; + + this.toolbar = this.create_element("div"); + this.toolbar.setAttribute("class", "toolbar"); + + // a reasonably behaved browser + if (this.ns_pos || !this.ie6) + { + var right = this.create_element("div"); + right.setAttribute("style", "float: right; text-align: right"); + + counter = this.create_element("span") + counter.innerHTML = "slide".localize() + " n/m"; + right.appendChild(counter); + this.toolbar.appendChild(right); + + var left = this.create_element("div"); + left.setAttribute("style", "text-align: left"); + + // global end of slide indicator + this.eos = this.create_element("span"); + this.eos.innerHTML = "* "; + left.appendChild(this.eos); + + var help = this.create_element("a"); + help.setAttribute("href", this.help_page); + help.setAttribute("title", this.help_text.localize()); + help.innerHTML = "help?".localize(); + left.appendChild(help); + this.help_anchor = help; // save for focus hack + + var gap1 = document.createTextNode(" "); + left.appendChild(gap1); + + var contents = this.create_element("a"); + contents.setAttribute("href", "javascript:w3c_slidy.toggle_table_of_contents()"); + contents.setAttribute("title", "table of contents".localize()); + contents.innerHTML = "contents?".localize(); + left.appendChild(contents); + + var gap2 = document.createTextNode(" "); + left.appendChild(gap2); + + var copyright = this.find_copyright(); + + if (copyright) + { + var span = this.create_element("span"); + span.className = "copyright"; + span.innerHTML = copyright; + left.appendChild(span); + } + + this.toolbar.setAttribute("tabindex", "0"); + this.toolbar.appendChild(left); + } + else // IE6 so need to work around its poor CSS support + { + this.toolbar.style.position = (this.ie7 ? "fixed" : "absolute"); + this.toolbar.style.zIndex = "200"; + this.toolbar.style.width = "99.9%"; + this.toolbar.style.height = "1.2em"; + this.toolbar.style.top = "auto"; + this.toolbar.style.bottom = "0"; + this.toolbar.style.left = "0"; + this.toolbar.style.right = "0"; + this.toolbar.style.textAlign = "left"; + this.toolbar.style.fontSize = "60%"; + this.toolbar.style.color = "red"; + this.toolbar.borderWidth = 0; + this.toolbar.className = "toolbar"; + this.toolbar.style.background = "rgb(240,240,240)"; + + // would like to have help text left aligned + // and page counter right aligned, floating + // div's don't work, so instead use nested + // absolutely positioned div's. + + var sp = this.create_element("span"); + sp.innerHTML = "  * "; + this.toolbar.appendChild(sp); + this.eos = sp; // end of slide indicator + + var help = this.create_element("a"); + help.setAttribute("href", this.help_page); + help.setAttribute("title", this.help_text.localize()); + help.innerHTML = "help?".localize(); + this.toolbar.appendChild(help); + this.help_anchor = help; // save for focus hack + + var gap1 = document.createTextNode(" "); + this.toolbar.appendChild(gap1); + + var contents = this.create_element("a"); + contents.setAttribute("href", "javascript:toggleTableOfContents()"); + contents.setAttribute("title", "table of contents".localize()); + contents.innerHTML = "contents?".localize(); + this.toolbar.appendChild(contents); + + var gap2 = document.createTextNode(" "); + this.toolbar.appendChild(gap2); + + var copyright = this.find_copyright(); + + if (copyright) + { + var span = this.create_element("span"); + span.innerHTML = copyright; + span.style.color = "black"; + span.style.marginLeft = "0.5em"; + this.toolbar.appendChild(span); + } + + counter = this.create_element("div") + counter.style.position = "absolute"; + counter.style.width = "auto"; //"20%"; + counter.style.height = "1.2em"; + counter.style.top = "auto"; + counter.style.bottom = 0; + counter.style.right = "0"; + counter.style.textAlign = "right"; + counter.style.color = "red"; + counter.style.background = "rgb(240,240,240)"; + + counter.innerHTML = "slide".localize() + " n/m"; + this.toolbar.appendChild(counter); + } + + // ensure that click isn't passed through to the page + this.toolbar.onclick = + function (e) { + if (!e) + e = window.event; + + var target = e.target; + + if (!target && e.srcElement) + target = e.srcElement; + + // work around Safari bug + if (target && target.nodeType == 3) + target = target.parentNode; + + w3c_slidy.stop_propagation(e); + + if (target && target.nodeName.toLowerCase() != "a") + w3c_slidy.mouse_button_click(e); + }; + + this.slide_number_element = counter; + this.set_eos_status(false); + document.body.appendChild(this.toolbar); + }, + + // wysiwyg editors make it hard to use div elements + // e.g. amaya loses the div when you copy and paste + // this function wraps div elements around implicit + // slides which start with an h1 element and continue + // up to the next heading or div element + wrap_implicit_slides: function () { + var i, heading, node, next, div; + var headings = document.getElementsByTagName("h1"); + + if (!headings) + return; + + for (i = 0; i < headings.length; ++i) + { + heading = headings[i]; + + if (heading.parentNode != document.body) + continue; + + node = heading.nextSibling; + + div = document.createElement("div"); + this.add_class(div, "slide"); + document.body.replaceChild(div, heading); + div.appendChild(heading); + + while (node) + { + if (node.nodeType == 1 && // an element + (node.nodeName == "H1" || + node.nodeName == "h1" || + node.nodeName == "DIV" || + node.nodeName == "div")) + break; + + next = node.nextSibling; + node = document.body.removeChild(node); + div.appendChild(node); + node = next; + } + } + }, + +// return new array of all slides + collect_slides: function () { + var slides = new Array(); + var divs = document.body.getElementsByTagName("div"); + + for (var i = 0; i < divs.length; ++i) + { + div = divs.item(i); + + if (this.has_class(div, "slide")) + { + // add slide to collection + slides[slides.length] = div; + + // hide each slide as it is found + this.add_class(div, "hidden"); + + // add dummy
    at end for scrolling hack + var node1 = document.createElement("br"); + div.appendChild(node1); + var node2 = document.createElement("br"); + div.appendChild(node2); + } + else if (this.has_class(div, "background")) + { // work around for Firefox SVG reload bug + // which otherwise replaces 1st SVG graphic with 2nd + div.style.display = "block"; + } + } + + this.slides = slides; + }, + + // return new array of all
    + collect_notes: function () { + var notes = new Array(); + var divs = document.body.getElementsByTagName("div"); + + for (var i = 0; i < divs.length; ++i) + { + div = divs.item(i); + + if (this.has_class(div, "handout")) + { + // add note to collection + notes[notes.length] = div; + + // and hide it + this.add_class(div, "hidden"); + } + } + + this.notes = notes; + }, + + // return new array of all
    + // including named backgrounds e.g. class="background titlepage" + collect_backgrounds: function () { + var backgrounds = new Array(); + var divs = document.body.getElementsByTagName("div"); + + for (var i = 0; i < divs.length; ++i) + { + div = divs.item(i); + + if (this.has_class(div, "background")) + { + // add background to collection + backgrounds[backgrounds.length] = div; + + // and hide it + this.add_class(div, "hidden"); + } + } + + this.backgrounds = backgrounds; + }, + + // set click handlers on all anchors + patch_anchors: function () { + var self = w3c_slidy; + var handler = function (event) { + // compare this.href with location.href + // for link to another slide in this doc + + if (self.page_address(this.href) == self.page_address(location.href)) + { + // yes, so find new slide number + var newslidenum = self.find_slide_number(this.href); + + if (newslidenum != self.slide_number) + { + var slide = self.slides[self.slide_number]; + self.hide_slide(slide); + self.slide_number = newslidenum; + slide = self.slides[self.slide_number]; + self.show_slide(slide); + self.set_location(); + } + } + else if (this.target == null) + location.href = this.href; + + this.blur(); + self.disable_slide_click = true; + }; + + var anchors = document.body.getElementsByTagName("a"); + + for (var i = 0; i < anchors.length; ++i) + { + if (window.addEventListener) + anchors[i].addEventListener("click", handler, false); + else + anchors[i].attachEvent("onclick", handler); + } + }, + + // ### CHECK ME ### see which functions are invoked via setTimeout + // either directly or indirectly for use of w3c_slidy vs this + show_slide_number: function () { + var timer = w3c_slidy.get_timer(); + w3c_slidy.slide_number_element.innerHTML = timer + "slide".localize() + " " + + (w3c_slidy.slide_number + 1) + "/" + w3c_slidy.slides.length; + }, + + // every 200mS check if the location has been changed as a + // result of the user activating the Back button/menu item + // doesn't work for Opera < 9.5 + check_location: function () { + var hash = location.hash; + + if (w3c_slidy.slide_number > 0 && (hash == "" || hash == "#")) + w3c_slidy.goto_slide(0); + else if (hash.length > 2 && hash != "#("+(w3c_slidy.slide_number+1)+")") + { + var num = parseInt(location.hash.substr(2)); + + if (!isNaN(num)) + w3c_slidy.goto_slide(num-1); + } + + if (w3c_slidy.time_left && w3c_slidy.slide_number > 0) + { + w3c_slidy.show_slide_number(); + + if (w3c_slidy.time_left > 0) + w3c_slidy.time_left -= 200; + } + }, + + get_timer: function () { + var timer = ""; + if (w3c_slidy.time_left) + { + var mins, secs; + secs = Math.floor(w3c_slidy.time_left/1000); + mins = Math.floor(secs / 60); + secs = secs % 60; + timer = (mins ? mins+"m" : "") + secs + "s "; + } + + return timer; + }, + + // this doesn't push location onto history stack for IE + // for which a hidden iframe hack is needed: load page into + // the iframe with script that set's parent's location.hash + // but that won't work for standalone use unless we can + // create the page dynamically via a javascript: URL + set_location: function () { + var uri = w3c_slidy.page_address(location.href); + var hash = "#(" + (w3c_slidy.slide_number+1) + ")"; + + if (w3c_slidy.slide_number >= 0) + uri = uri + hash; + + if (w3c_slidy.ie && !w3c_slidy.ie8) + w3c_slidy.push_hash(hash); + + if (uri != location.href) // && !khtml + location.href = uri; + + if (this.khtml) + hash = "(" + (w3c_slidy.slide_number+1) + ")"; + + if (!this.ie && location.hash != hash && location.hash != "") + location.hash = hash; + + document.title = w3c_slidy.title + " (" + (w3c_slidy.slide_number+1) + ")"; + w3c_slidy.show_slide_number(); + }, + + page_address: function (uri) { + var i = uri.indexOf("#"); + + if (i < 0) + i = uri.indexOf("%23"); + + // check if anchor is entire page + + if (i < 0) + return uri; // yes + + return uri.substr(0, i); + }, + + // only used for IE6 and IE7 + on_frame_loaded: function (hash) { + location.hash = hash; + var uri = w3c_slidy.page_address(location.href); + location.href = uri + hash; + }, + + // history hack with thanks to Bertrand Le Roy + push_hash: function (hash) { + if (hash == "") hash = "#(1)"; + window.location.hash = hash; + + var doc = document.getElementById("historyFrame").contentWindow.document; + doc.open("javascript:''"); + // PWL modified this string literal to break the close script tag + // which otherwise gets parsed when incorporated + doc.write(" +endif::linkcss[] +ifndef::linkcss[] + + +endif::linkcss[] +ifdef::asciimath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::asciimath[] +ifdef::latexmath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::latexmath[] + + + + +[footer] + + diff -Nru asciidoc-8.6.10/asciidoc/resources/stylesheets/asciidoc.css asciidoc-10.1.2/asciidoc/resources/stylesheets/asciidoc.css --- asciidoc-8.6.10/asciidoc/resources/stylesheets/asciidoc.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/stylesheets/asciidoc.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,527 @@ +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} +h5 { + font-size: 1.0em; +} + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} +ul > li { color: #aaa; } +ul > li > * { color: black; } + +.monospaced, code, pre { + font-family: "Courier New", Courier, monospace; + font-size: inherit; + color: navy; + padding: 0; + margin: 0; +} +pre { + white-space: pre-wrap; +} + +#author { + color: #527bbd; + font-weight: bold; + font-size: 1.1em; +} +#email { +} +#revnumber, #revdate, #revremark { +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +#footer-text { + float: left; + padding-bottom: 0.5em; +} +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.0em; + margin-bottom: 2.0em; + margin-right: 10%; + color: #606060; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; + padding: 0.5em; +} + +div.quoteblock, div.verseblock { + padding-left: 1.0em; + margin-left: 1.0em; + margin-right: 10%; + border-left: 5px solid #f0f0f0; + color: #888; +} + +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 3px solid #dddddd; +} + +div.exampleblock > div.content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; vertical-align: text-bottom; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +.footnote, .footnoteref { + font-size: 0.8em; +} + +span.footnote, span.footnoteref { + vertical-align: super; +} + +#footnotes { + margin: 20px 0 20px 0; + padding: 7px 0 0 0; +} + +#footnotes div.footnote { + margin: 0 0 5px 0; +} + +#footnotes hr { + border: none; + border-top: 1px solid silver; + height: 1px; + text-align: left; + margin-left: 0; + width: 20%; + min-width: 100px; +} + +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; +} + +@media print { + #footer-badges { display: none; } +} + +#toc { + margin-bottom: 2.5em; +} + +#toctitle { + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + +div.unbreakable { page-break-inside: avoid; } + + +/* + * xhtml11 specific + * + * */ + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overridden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +body.manpage h2 { + border-style: none; +} +body.manpage div.sectionbody { + margin-left: 3em; +} + +@media print { + body.manpage div#toc { display: none; } +} diff -Nru asciidoc-8.6.10/asciidoc/resources/stylesheets/docbook-xsl.css asciidoc-10.1.2/asciidoc/resources/stylesheets/docbook-xsl.css --- asciidoc-8.6.10/asciidoc/resources/stylesheets/docbook-xsl.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/stylesheets/docbook-xsl.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,329 @@ +/* + CSS stylesheet for XHTML produced by DocBook XSL stylesheets. +*/ + +body { + font-family: Georgia,serif; +} + +code, pre { + font-family: "Courier New", Courier, monospace; +} + +span.strong { + font-weight: bold; +} + +body blockquote { + margin-top: .75em; + line-height: 1.5; + margin-bottom: .75em; +} + +html body { + margin: 1em 5% 1em 5%; + line-height: 1.2; +} + +body div { + margin: 0; +} + +h1, h2, h3, h4, h5, h6 +{ + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; +} + +div.toc p:first-child, +div.list-of-figures p:first-child, +div.list-of-tables p:first-child, +div.list-of-examples p:first-child, +div.example p.title, +div.sidebar p.title +{ + font-weight: bold; + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; + margin-bottom: 0.2em; +} + +body h1 { + margin: .0em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h2 { + margin: 0.5em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h3 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h4 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h5 { + margin: .8em 0 0 -2%; + line-height: 1.3; +} + +body h6 { + margin: .8em 0 0 -1%; + line-height: 1.3; +} + +body hr { + border: none; /* Broken on IE6 */ +} +div.footnotes hr { + border: 1px solid silver; +} + +div.navheader th, div.navheader td, div.navfooter td { + font-family: Arial,Helvetica,sans-serif; + font-size: 0.9em; + font-weight: bold; + color: #527bbd; +} +div.navheader img, div.navfooter img { + border-style: none; +} +div.navheader a, div.navfooter a { + font-weight: normal; +} +div.navfooter hr { + border: 1px solid silver; +} + +body td { + line-height: 1.2 +} + +body th { + line-height: 1.2; +} + +ol { + line-height: 1.2; +} + +ul, body dir, body menu { + line-height: 1.2; +} + +html { + margin: 0; + padding: 0; +} + +body h1, body h2, body h3, body h4, body h5, body h6 { + margin-left: 0 +} + +body pre { + margin: 0.5em 10% 0.5em 1em; + line-height: 1.0; + color: navy; +} + +tt.literal, code.literal { + color: navy; +} + +.programlisting, .screen { + border: 1px solid silver; + background: #f4f4f4; + margin: 0.5em 10% 0.5em 0; + padding: 0.5em 1em; +} + +div.sidebar { + background: #ffffee; + margin: 1.0em 10% 0.5em 0; + padding: 0.5em 1em; + border: 1px solid silver; +} +div.sidebar * { padding: 0; } +div.sidebar div { margin: 0; } +div.sidebar p.title { + margin-top: 0.5em; + margin-bottom: 0.2em; +} + +div.bibliomixed { + margin: 0.5em 5% 0.5em 1em; +} + +div.glossary dt { + font-weight: bold; +} +div.glossary dd p { + margin-top: 0.2em; +} + +dl { + margin: .8em 0; + line-height: 1.2; +} + +dt { + margin-top: 0.5em; +} + +dt span.term { + font-style: normal; + color: navy; +} + +div.variablelist dd p { + margin-top: 0; +} + +div.itemizedlist li, div.orderedlist li { + margin-left: -0.8em; + margin-top: 0.5em; +} + +ul, ol { + list-style-position: outside; +} + +div.sidebar ul, div.sidebar ol { + margin-left: 2.8em; +} + +div.itemizedlist p.title, +div.orderedlist p.title, +div.variablelist p.title +{ + margin-bottom: -0.8em; +} + +div.revhistory table { + border-collapse: collapse; + border: none; +} +div.revhistory th { + border: none; + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; +} +div.revhistory td { + border: 1px solid silver; +} + +/* Keep TOC and index lines close together. */ +div.toc dl, div.toc dt, +div.list-of-figures dl, div.list-of-figures dt, +div.list-of-tables dl, div.list-of-tables dt, +div.indexdiv dl, div.indexdiv dt +{ + line-height: normal; + margin-top: 0; + margin-bottom: 0; +} + +/* + Table styling does not work because of overriding attributes in + generated HTML. +*/ +div.table table, +div.informaltable table +{ + margin-left: 0; + margin-right: 5%; + margin-bottom: 0.8em; +} +div.informaltable table +{ + margin-top: 0.4em +} +div.table thead, +div.table tfoot, +div.table tbody, +div.informaltable thead, +div.informaltable tfoot, +div.informaltable tbody +{ + /* No effect in IE6. */ + border-top: 3px solid #527bbd; + border-bottom: 3px solid #527bbd; +} +div.table thead, div.table tfoot, +div.informaltable thead, div.informaltable tfoot +{ + font-weight: bold; +} + +div.mediaobject img { + margin-bottom: 0.8em; +} +div.figure p.title, +div.table p.title +{ + margin-top: 1em; + margin-bottom: 0.4em; +} + +div.calloutlist p +{ + margin-top: 0em; + margin-bottom: 0.4em; +} + +a img { + border-style: none; +} + +@media print { + div.navheader, div.navfooter { display: none; } +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } diff -Nru asciidoc-8.6.10/asciidoc/resources/stylesheets/pygments.css asciidoc-10.1.2/asciidoc/resources/stylesheets/pygments.css --- asciidoc-8.6.10/asciidoc/resources/stylesheets/pygments.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/stylesheets/pygments.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,62 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #408080; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #008000; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ +.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #808080 } /* Generic.Output */ +.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0040D0 } /* Generic.Traceback */ +.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #008000 } /* Keyword.Pseudo */ +.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #B00040 } /* Keyword.Type */ +.highlight .m { color: #666666 } /* Literal.Number */ +.highlight .s { color: #BA2121 } /* Literal.String */ +.highlight .na { color: #7D9029 } /* Name.Attribute */ +.highlight .nb { color: #008000 } /* Name.Builtin */ +.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ +.highlight .no { color: #880000 } /* Name.Constant */ +.highlight .nd { color: #AA22FF } /* Name.Decorator */ +.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #0000FF } /* Name.Function */ +.highlight .nl { color: #A0A000 } /* Name.Label */ +.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #19177C } /* Name.Variable */ +.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #666666 } /* Literal.Number.Float */ +.highlight .mh { color: #666666 } /* Literal.Number.Hex */ +.highlight .mi { color: #666666 } /* Literal.Number.Integer */ +.highlight .mo { color: #666666 } /* Literal.Number.Oct */ +.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ +.highlight .sc { color: #BA2121 } /* Literal.String.Char */ +.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ +.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ +.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.highlight .sx { color: #008000 } /* Literal.String.Other */ +.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ +.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ +.highlight .ss { color: #19177C } /* Literal.String.Symbol */ +.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #19177C } /* Name.Variable.Class */ +.highlight .vg { color: #19177C } /* Name.Variable.Global */ +.highlight .vi { color: #19177C } /* Name.Variable.Instance */ +.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ diff -Nru asciidoc-8.6.10/asciidoc/resources/stylesheets/slidy.css asciidoc-10.1.2/asciidoc/resources/stylesheets/slidy.css --- asciidoc-8.6.10/asciidoc/resources/stylesheets/slidy.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/stylesheets/slidy.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,445 @@ +/* slidy.css + + Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved. + W3C liability, trademark, document use and software licensing + rules apply, see: + + http://www.w3.org/Consortium/Legal/copyright-documents + http://www.w3.org/Consortium/Legal/copyright-software +*/ + +/* + SJR: 2010-09-29: Modified for AsciiDoc slidy backend. + Mostly just commented out stuff that is handled by AsciiDoc's CSS files. +*/ + +body +{ + margin: 0 0 0 0; + padding: 0 0 0 0; + width: 100%; + height: 100%; + color: black; + background-color: white; +/* + font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif; +*/ + font-size: 14pt; +} + +div.toolbar { + position: fixed; z-index: 200; + top: auto; bottom: 0; left: 0; right: 0; + height: 1.2em; text-align: right; + padding-left: 1em; + padding-right: 1em; + font-size: 60%; + color: red; + background-color: rgb(240,240,240); + border-top: solid 1px rgb(180,180,180); +} + +div.toolbar span.copyright { + color: black; + margin-left: 0.5em; +} + +div.initial_prompt { + position: absolute; + z-index: 1000; + bottom: 1.2em; + width: 90%; + background-color: rgb(200,200,200); + opacity: 0.35; + background-color: rgb(200,200,200, 0.35); + cursor: pointer; +} + +div.initial_prompt p.help { + text-align: center; +} + +div.initial_prompt p.close { + text-align: right; + font-style: italic; +} + +div.slidy_toc { + position: absolute; + z-index: 300; + width: 60%; + max-width: 30em; + height: 30em; + overflow: auto; + top: auto; + right: auto; + left: 4em; + bottom: 4em; + padding: 1em; + background: rgb(240,240,240); + border-style: solid; + border-width: 2px; + font-size: 60%; +} + +div.slidy_toc .toc_heading { + text-align: center; + width: 100%; + margin: 0; + margin-bottom: 1em; + border-bottom-style: solid; + border-bottom-color: rgb(180,180,180); + border-bottom-width: 1px; +} + +div.slide { + z-index: 20; + margin: 0 0 0 0; + padding-top: 0; + padding-bottom: 0; + padding-left: 20px; + padding-right: 20px; + border-width: 0; + clear: both; + top: 0; + bottom: 0; + left: 0; + right: 0; + line-height: 120%; + background-color: transparent; +} + +div.background { + display: none; +} + +div.handout { + margin-left: 20px; + margin-right: 20px; +} + +div.slide.titlepage { + text-align: center; +} + +div.slide.titlepage.h1 { + padding-top: 10%; +} + +div.slide h1 { + padding-left: 0; + padding-right: 20pt; + padding-top: 4pt; + padding-bottom: 4pt; + margin-top: 0; + margin-left: 0; + margin-right: 60pt; + margin-bottom: 0.5em; + display: block; + font-size: 160%; + line-height: 1.2em; + background: transparent; +} + +div.toc { + position: absolute; + top: auto; + bottom: 4em; + left: 4em; + right: auto; + width: 60%; + max-width: 30em; + height: 30em; + border: solid thin black; + padding: 1em; + background: rgb(240,240,240); + color: black; + z-index: 300; + overflow: auto; + display: block; + visibility: visible; +} + +div.toc-heading { + width: 100%; + border-bottom: solid 1px rgb(180,180,180); + margin-bottom: 1em; + text-align: center; +} + +/* +pre { + font-size: 80%; + font-weight: bold; + line-height: 120%; + padding-top: 0.2em; + padding-bottom: 0.2em; + padding-left: 1em; + padding-right: 1em; + border-style: solid; + border-left-width: 1em; + border-top-width: thin; + border-right-width: thin; + border-bottom-width: thin; + border-color: #95ABD0; + color: #00428C; + background-color: #E4E5E7; +} +*/ + +/* +li pre { margin-left: 0; } + +blockquote { font-style: italic } + +img { background-color: transparent } + +p.copyright { font-size: smaller } +*/ + +.center { text-align: center } +.footnote { font-size: smaller; margin-left: 2em; } + +/* +a img { border-width: 0; border-style: none } +*/ + +a:visited { color: navy } +a:link { color: navy } +a:hover { color: red; text-decoration: underline } +a:active { color: red; text-decoration: underline } + +a {text-decoration: none} +.navbar a:link {color: white} +.navbar a:visited {color: yellow} +.navbar a:active {color: red} +.navbar a:hover {color: red} + +/* +ul { list-style-type: square; } +ul ul { list-style-type: disc; } +ul ul ul { list-style-type: circle; } +ul ul ul ul { list-style-type: disc; } +li { margin-left: 0.5em; margin-top: 0.5em; } +li li { font-size: 85%; font-style: italic } +li li li { font-size: 85%; font-style: normal } +*/ + +div dt +{ + margin-left: 0; + margin-top: 1em; + margin-bottom: 0.5em; + font-weight: bold; +} +div dd +{ + margin-left: 2em; + margin-bottom: 0.5em; +} + + +/* +p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table { + margin-left: 1em; + margin-right: 1em; +} +*/ + +p.subhead { font-weight: bold; margin-top: 2em; } + +.smaller { font-size: smaller } +.bigger { font-size: 130% } + +/* +td,th { padding: 0.2em } +*/ + +ul { + margin: 0.5em 1.5em 0.5em 1.5em; + padding: 0; +} + +ol { + margin: 0.5em 1.5em 0.5em 1.5em; + padding: 0; +} + +ul { list-style-type: square; } +ul ul { list-style-type: disc; } +ul ul ul { list-style-type: circle; } +ul ul ul ul { list-style-type: disc; } + +/* +ul li { + list-style: square; + margin: 0.1em 0em 0.6em 0; + padding: 0 0 0 0; + line-height: 140%; +} + +ol li { + margin: 0.1em 0em 0.6em 1.5em; + padding: 0 0 0 0px; + line-height: 140%; + list-style-type: decimal; +} + +li ul li { + font-size: 85%; + font-style: italic; + list-style-type: disc; + background: transparent; + padding: 0 0 0 0; +} +li li ul li { + font-size: 85%; + font-style: normal; + list-style-type: circle; + background: transparent; + padding: 0 0 0 0; +} +li li li ul li { + list-style-type: disc; + background: transparent; + padding: 0 0 0 0; +} + +li ol li { + list-style-type: decimal; +} + + +li li ol li { + list-style-type: decimal; +} +*/ + +/* + setting class="outline" on ol or ul makes it behave as an + ouline list where blocklevel content in li elements is + hidden by default and can be expanded or collapsed with + mouse click. Set class="expand" on li to override default +*/ + +ol.outline li:hover { cursor: pointer } +ol.outline li.nofold:hover { cursor: default } + +ul.outline li:hover { cursor: pointer } +ul.outline li.nofold:hover { cursor: default } + +ol.outline { list-style:decimal; } +ol.outline ol { list-style-type:lower-alpha } + +ol.outline li.nofold { + padding: 0 0 0 20px; + background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em; +} +ol.outline li.unfolded { + padding: 0 0 0 20px; + background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em; +} +ol.outline li.folded { + padding: 0 0 0 20px; + background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em; +} +ol.outline li.unfolded:hover { + padding: 0 0 0 20px; + background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em; +} +ol.outline li.folded:hover { + padding: 0 0 0 20px; + background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em; +} + +ul.outline li.nofold { + padding: 0 0 0 20px; + background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em; +} +ul.outline li.unfolded { + padding: 0 0 0 20px; + background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em; +} +ul.outline li.folded { + padding: 0 0 0 20px; + background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em; +} +ul.outline li.unfolded:hover { + padding: 0 0 0 20px; + background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em; +} +ul.outline li.folded:hover { + padding: 0 0 0 20px; + background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em; +} + +/* for slides with class "title" in table of contents */ +a.titleslide { font-weight: bold; font-style: italic } + +/* + hide images for work around for save as bug + where browsers fail to save images used by CSS +*/ +img.hidden { display: none; visibility: hidden } +div.initial_prompt { display: none; visibility: hidden } + + div.slide { + visibility: visible; + position: inherit; + } + div.handout { + border-top-style: solid; + border-top-width: thin; + border-top-color: black; + } + +@media screen { + .hidden { display: none; visibility: visible } + + div.slide.hidden { display: block; visibility: visible } + div.handout.hidden { display: block; visibility: visible } + div.background { display: none; visibility: hidden } + body.single_slide div.initial_prompt { display: block; visibility: visible } + body.single_slide div.background { display: block; visibility: visible } + body.single_slide div.background.hidden { display: none; visibility: hidden } + body.single_slide .invisible { visibility: hidden } + body.single_slide .hidden { display: none; visibility: hidden } + body.single_slide div.slide { position: absolute } + body.single_slide div.handout { display: none; visibility: hidden } +} + +@media print { + .hidden { display: block; visibility: visible } + +/* + div.slide pre { font-size: 60%; padding-left: 0.5em; } +*/ + div.toolbar { display: none; visibility: hidden; } + div.slidy_toc { display: none; visibility: hidden; } + div.background { display: none; visibility: hidden; } + div.slide { page-break-before: always } + /* :first-child isn't reliable for print media */ + div.slide.first-slide { page-break-before: avoid } +} + + +/* SJR: AsciiDoc slidy backend tweaks */ + +ol, ul { + margin: 0.8em 1.5em 0.8em 1.8em; +} +li > ul, li > ol { + margin-top: 0.5em; +} + +.outline > li.folded, +.outline > li.unfolded { + color: #527bbd; +} +ul > li{ color: #aaa; } +ul > li > *, ol > li > * { color: black; } + +li { + margin-top: 0.5em; + margin-bottom: 0.5em; +} diff -Nru asciidoc-8.6.10/asciidoc/resources/stylesheets/toc2.css asciidoc-10.1.2/asciidoc/resources/stylesheets/toc2.css --- asciidoc-8.6.10/asciidoc/resources/stylesheets/toc2.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/stylesheets/toc2.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,34 @@ +@media screen { + body { + max-width: 50em; /* approximately 80 characters wide */ + margin-left: 16em; + } + + #toc { + position: fixed; + top: 0; + left: 0; + bottom: 0; + width: 13em; + padding: 0.5em; + padding-bottom: 1.5em; + margin: 0; + overflow: auto; + border-right: 3px solid #f8f8f8; + background-color: white; + } + + #toc .toclevel1 { + margin-top: 0.5em; + } + + #toc .toclevel2 { + margin-top: 0.25em; + display: list-item; + color: #aaaaaa; + } + + #toctitle { + margin-top: 0.5em; + } +} diff -Nru asciidoc-8.6.10/asciidoc/resources/stylesheets/xhtml11-quirks.css asciidoc-10.1.2/asciidoc/resources/stylesheets/xhtml11-quirks.css --- asciidoc-8.6.10/asciidoc/resources/stylesheets/xhtml11-quirks.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/stylesheets/xhtml11-quirks.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,43 @@ +/* Workarounds for IE6's broken and incomplete CSS2. */ + +div.sidebar-content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} +div.sidebar-title, div.image-title { + color: #527bbd; + font-family: Arial,Helvetica,sans-serif; + font-weight: bold; + margin-top: 0.0em; + margin-bottom: 0.5em; +} + +div.listingblock div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock-attribution { + padding-top: 0.5em; + text-align: right; +} + +pre.verseblock-content { + font-family: inherit; +} +div.verseblock-attribution { + padding-top: 0.75em; + text-align: left; +} + +div.exampleblock-content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock.latex div.image-title { margin-top: 0.5em; } + +/* IE6 sets dynamically generated links as visited. */ +div#toc a:visited { color: blue; } diff -Nru asciidoc-8.6.10/asciidoc/resources/text.conf asciidoc-10.1.2/asciidoc/resources/text.conf --- asciidoc-8.6.10/asciidoc/resources/text.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/text.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,16 @@ +# text.conf +# Used by the AsciiDoc a2x(1) toolchain wrapper utility. +# Filters to add leading blank line and margin indent to verbatim +# block elements so lynx(1) generated text output looks nicer. + +[paradef-default] +verse-style=template="verseparagraph",filter="echo; echo; sed 's/^/ /'" + +[paradef-literal] +filter=echo; echo; sed 's/^/ /' + +[blockdef-listing] +filter=echo; sed 's/^/ /' + +[blockdef-literal] +filter=echo; sed 's/^/ /' diff -Nru asciidoc-8.6.10/asciidoc/resources/themes/flask/flask.css asciidoc-10.1.2/asciidoc/resources/themes/flask/flask.css --- asciidoc-8.6.10/asciidoc/resources/themes/flask/flask.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/themes/flask/flask.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,597 @@ +/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ + +/* Default font. */ +body { + font-family: Georgia,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Arial,Helvetica,sans-serif; +} + +body { + margin: 1em 5% 1em 5%; +} + +a { + color: blue; + text-decoration: underline; +} +a:visited { + color: fuchsia; +} + +em { + font-style: italic; + color: navy; +} + +strong { + font-weight: bold; + color: #083194; +} + +h1, h2, h3, h4, h5, h6 { + color: #527bbd; + margin-top: 1.2em; + margin-bottom: 0.5em; + line-height: 1.3; +} + +h1, h2, h3 { + border-bottom: 2px solid silver; +} +h2 { + padding-top: 0.5em; +} +h3 { + float: left; +} +h3 + * { + clear: left; +} +h5 { + font-size: 1.0em; +} + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid silver; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} +ul > li { color: #aaa; } +ul > li > * { color: black; } + +pre { + padding: 0; + margin: 0; +} + +#author { + color: #527bbd; + font-weight: bold; + font-size: 1.1em; +} +#email { +} +#revnumber, #revdate, #revremark { +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} +#footer-text { + float: left; + padding-bottom: 0.5em; +} +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} +div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.admonitionblock { + margin-top: 2.0em; + margin-bottom: 2.0em; + margin-right: 10%; + color: #606060; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #527bbd; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid #dddddd; + border-left: 4px solid #f0f0f0; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid #dddddd; + border-left: 5px solid #f0f0f0; + background: #f8f8f8; + padding: 0.5em; +} + +div.quoteblock, div.verseblock { + padding-left: 1.0em; + margin-left: 1.0em; + margin-right: 10%; + border-left: 5px solid #f0f0f0; + color: #777777; +} + +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock > pre.content { + font-family: inherit; + font-size: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #527bbd; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 3px solid #dddddd; +} + +div.exampleblock > div.content { + border-left: 3px solid #dddddd; + padding-left: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: navy; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: navy; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +.footnote, .footnoteref { + font-size: 0.8em; +} + +span.footnote, span.footnoteref { + vertical-align: super; +} + +#footnotes { + margin: 20px 0 20px 0; + padding: 7px 0 0 0; +} + +#footnotes div.footnote { + margin: 0 0 5px 0; +} + +#footnotes hr { + border: none; + border-top: 1px solid silver; + height: 1px; + text-align: left; + margin-left: 0; + width: 20%; + min-width: 100px; +} + +div.colist td { + padding-right: 0.5em; + padding-bottom: 0.3em; + vertical-align: top; +} +div.colist td img { + margin-top: 0.3em; +} + +@media print { + #footer-badges { display: none; } +} + +#toc { + margin-bottom: 2.5em; +} + +#toctitle { + color: #527bbd; + font-size: 1.1em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { + margin-top: 0; + margin-bottom: 0; +} +div.toclevel2 { + margin-left: 2em; + font-size: 0.9em; +} +div.toclevel3 { + margin-left: 4em; + font-size: 0.9em; +} +div.toclevel4 { + margin-left: 6em; + font-size: 0.9em; +} + +span.aqua { color: aqua; } +span.black { color: black; } +span.blue { color: blue; } +span.fuchsia { color: fuchsia; } +span.gray { color: gray; } +span.green { color: green; } +span.lime { color: lime; } +span.maroon { color: maroon; } +span.navy { color: navy; } +span.olive { color: olive; } +span.purple { color: purple; } +span.red { color: red; } +span.silver { color: silver; } +span.teal { color: teal; } +span.white { color: white; } +span.yellow { color: yellow; } + +span.aqua-background { background: aqua; } +span.black-background { background: black; } +span.blue-background { background: blue; } +span.fuchsia-background { background: fuchsia; } +span.gray-background { background: gray; } +span.green-background { background: green; } +span.lime-background { background: lime; } +span.maroon-background { background: maroon; } +span.navy-background { background: navy; } +span.olive-background { background: olive; } +span.purple-background { background: purple; } +span.red-background { background: red; } +span.silver-background { background: silver; } +span.teal-background { background: teal; } +span.white-background { background: white; } +span.yellow-background { background: yellow; } + +span.big { font-size: 2em; } +span.small { font-size: 0.6em; } + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + + +/* + * xhtml11 specific + * + * */ + +tt { + font-family: monospace; + font-size: inherit; + color: navy; +} + +div.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +div.tableblock > table { + border: 3px solid #527bbd; +} +thead, p.table.header { + font-weight: bold; + color: #527bbd; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overridden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +/* + * html5 specific + * + * */ + +.monospaced { + font-family: monospace; + font-size: inherit; + color: navy; +} + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #527bbd; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #527bbd; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #527bbd; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + +/* + * manpage specific + * + * */ + +body.manpage h1 { + padding-top: 0.5em; + padding-bottom: 0.5em; + border-top: 2px solid silver; + border-bottom: 2px solid silver; +} +body.manpage h2 { + border-style: none; +} +body.manpage div.sectionbody { + margin-left: 3em; +} + +@media print { + body.manpage div#toc { display: none; } +} + + +/* + * Theme specific overrides of the preceding (asciidoc.css) CSS. + * + */ +body { + font-family: Garamond, Georgia, serif; + font-size: 17px; + color: #3E4349; + line-height: 1.3em; +} +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Garmond, Georgia, serif; + font-weight: normal; + border-bottom-width: 0; + color: #3E4349; +} +div.title, caption.title { color: #596673; font-weight: bold; } +h1 { font-size: 240%; } +h2 { font-size: 180%; } +h3 { font-size: 150%; } +h4 { font-size: 130%; } +h5 { font-size: 115%; } +h6 { font-size: 100%; } +#header h1 { margin-top: 0; } +#toc { + color: #444444; + line-height: 1.5; + padding-top: 1.5em; +} +#toctitle { + font-size: 20px; +} +#toc a { + border-bottom: 1px dotted #999999; + color: #444444 !important; + text-decoration: none !important; +} +#toc a:hover { + border-bottom: 1px solid #6D4100; + color: #6D4100 !important; + text-decoration: none !important; +} +div.toclevel1 { margin-top: 0.2em; font-size: 16px; } +div.toclevel2 { margin-top: 0.15em; font-size: 14px; } +em, dt, td.hdlist1 { color: black; } +strong { color: #3E4349; } +a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; } +a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } +a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } +div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; } +th.tableblock, td.tableblock { border: 1px solid #E8E8E8; } +ul > li > * { color: #3E4349; } +pre, tt, .monospaced { font-family: Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; } +tt, .monospaced { font-size: 0.9em; color: black; +} +div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; } +div.verseblock { border-left-width: 0; margin-left: 3em; } +div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;} +div.admonitionblock td.content { border-left: 3px solid #E8E8E8; } diff -Nru asciidoc-8.6.10/asciidoc/resources/themes/volnitsky/volnitsky.css asciidoc-10.1.2/asciidoc/resources/themes/volnitsky/volnitsky.css --- asciidoc-8.6.10/asciidoc/resources/themes/volnitsky/volnitsky.css 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/themes/volnitsky/volnitsky.css 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,438 @@ +/* + * AsciiDoc 'volnitsky' theme for xhtml11 and html5 backends. + * Based on css from http://volnitsky.com, which was in turn based on default + * theme from AsciiDoc + * + * FIXME: The styling is still a bit rough in places. + * + */ + +/* Default font. */ +body { + font-family: Georgia,"Times New Roman",Times,serif; +} + +/* Title font. */ +h1, h2, h3, h4, h5, h6, +div.title, caption.title, +thead, p.table.header, +#toctitle, +#author, #revnumber, #revdate, #revremark, +#footer { + font-family: Candara,Arial,sans-serif; +} + + +#toc a { + border-bottom: 1px dotted #999999; + color: #3A3A4D !important; + text-decoration: none !important; +} +#toc a:hover { + border-bottom: 1px solid #6D4100; + color: #6D4100 !important; + text-decoration: none !important; +} +a { color: #666688; text-decoration: none; border-bottom: 1px dotted #666688; } +a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } +a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } + +em { + font-style: italic; + color: #444466; +} + +strong { + font-weight: bold; + color: #444466; +} + +h1, h2, h3, h4, h5, h6 { + color: #666688; + margin-bottom: 0.5em; + line-height: 1.3; + letter-spacing:+0.15em; +} + +h1, h2, h3 { border-bottom: 2px solid #ccd; } +h2 { padding-top: 0.5em; } +h3 { float: left; } +h3 + * { clear: left; } + +div.sectionbody { + margin-left: 0; +} + +hr { + border: 1px solid #444466; +} + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +ul, ol, li > p { + margin-top: 0; +} + +pre { + padding: 0; + margin: 0; +} + +#author { + color: #444466; + font-weight: bold; + font-size: 1.1em; +} + +#footer { + font-size: small; + border-top: 2px solid silver; + padding-top: 0.5em; + margin-top: 4.0em; +} + +#footer-text { + float: left; + padding-bottom: 0.5em; +} + +#footer-badges { + float: right; + padding-bottom: 0.5em; +} + +#preamble { + margin-top: 1.5em; + margin-bottom: 1.5em; +} + +div.tableblock, div.imageblock, div.exampleblock, div.verseblock, +div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, +div.admonitionblock { + margin-top: 1.5em; + margin-bottom: 1.5em; +} + +div.admonitionblock { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +div.content { /* Block element content. */ + padding: 0; +} + +/* Block element titles. */ +div.title, caption.title { + color: #444466; + font-weight: bold; + text-align: left; + margin-top: 1.0em; + margin-bottom: 0.5em; +} +div.title + * { + margin-top: 0; +} + +td div.title:first-child { + margin-top: 0.0em; +} +div.content div.title:first-child { + margin-top: 0.0em; +} +div.content + div.title { + margin-top: 0.0em; +} + +div.sidebarblock > div.content { + background: #ffffee; + border: 1px solid silver; + padding: 0.5em; +} + +div.listingblock > div.content { + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +div.quoteblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.quoteblock > div.attribution { + padding-top: 0.5em; + text-align: right; +} + +div.verseblock { + padding-left: 2.0em; + margin-right: 10%; +} +div.verseblock > pre.content { + font-family: inherit; +} +div.verseblock > div.attribution { + padding-top: 0.75em; + text-align: left; +} +/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ +div.verseblock + div.attribution { + text-align: left; +} + +div.admonitionblock .icon { + vertical-align: top; + font-size: 1.1em; + font-weight: bold; + text-decoration: underline; + color: #444466; + padding-right: 0.5em; +} +div.admonitionblock td.content { + padding-left: 0.5em; + border-left: 2px solid silver; +} + +div.exampleblock > div.content { + border-left: 2px solid silver; + padding: 0.5em; +} + +div.imageblock div.content { padding-left: 0; } +span.image img { border-style: none; } +a.image:visited { color: white; } + +dl { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +dt { + margin-top: 0.5em; + margin-bottom: 0; + font-style: normal; + color: #444466; +} +dd > *:first-child { + margin-top: 0.1em; +} + +ul, ol { + list-style-position: outside; +} +ol.arabic { + list-style-type: decimal; +} +ol.loweralpha { + list-style-type: lower-alpha; +} +ol.upperalpha { + list-style-type: upper-alpha; +} +ol.lowerroman { + list-style-type: lower-roman; +} +ol.upperroman { + list-style-type: upper-roman; +} + +div.compact ul, div.compact ol, +div.compact p, div.compact p, +div.compact div, div.compact div { + margin-top: 0.1em; + margin-bottom: 0.1em; +} + +div.tableblock > table { + border: 3px solid #444466; +} +thead { + font-weight: bold; + color: #444466; +} +tfoot { + font-weight: bold; +} +td > div.verse { + white-space: pre; +} +p.table { + margin-top: 0; +} +/* Because the table frame attribute is overridden by CSS in most browsers. */ +div.tableblock > table[frame="void"] { + border-style: none; +} +div.tableblock > table[frame="hsides"] { + border-left-style: none; + border-right-style: none; +} +div.tableblock > table[frame="vsides"] { + border-top-style: none; + border-bottom-style: none; +} + + +div.hdlist { + margin-top: 0.8em; + margin-bottom: 0.8em; +} +div.hdlist tr { + padding-bottom: 15px; +} +dt.hdlist1.strong, td.hdlist1.strong { + font-weight: bold; +} +td.hdlist1 { + vertical-align: top; + font-style: normal; + padding-right: 0.8em; + color: #444466; +} +td.hdlist2 { + vertical-align: top; +} +div.hdlist.compact tr { + margin: 0; + padding-bottom: 0; +} + +.comment { + background: yellow; +} + +@media print { + #footer-badges { display: none; } +} + +#toctitle { + color: #666688; + font-size: 1.2em; + font-weight: bold; + margin-top: 1.0em; + margin-bottom: 0.1em; +} + +div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; } +div.toclevel1 { margin-top: 0.3em; margin-left: 0; font-size: 1.0em; } +div.toclevel2 { margin-top: 0.25em; margin-left: 2em; font-size: 0.9em; } +div.toclevel3 { margin-left: 4em; font-size: 0.8em; } +div.toclevel4 { margin-left: 6em; font-size: 0.8em; } + +body { + margin: 1em 5%; + max-width: 55em; + padding-left: 0; + +} + +.monospaced, tt, div.listingblock > div.content { + font-family: Consolas, "Andale Mono", "Courier New", monospace; + color: #004400; + background: #f4f4f4; + max-width: 80em; + line-height: 1.2em; +} + +.paragraph p { + line-height: 1.5em; + margin-top: 1em; +} + +.paragraph p, li, dd, .content { max-width: 45em; } +.admonitionblock { max-width: 35em; } + +div.sectionbody div.ulist > ul > li { + list-style-type: square; + color: #aaa; +} + div.sectionbody div.ulist > ul > li > * { + color: black; + /*font-size: 50%;*/ + } + + +div.sectionbody div.ulist > ul > li div.ulist > ul > li { + color: #ccd ; +} + div.sectionbody div.ulist > ul > li div.ulist > ul > li > * { + color: black ; + } + +em { + font-style: normal ! important; + font-weight: bold ! important; + color: #662222 ! important; + letter-spacing:+0.08em ! important; +} + +span.underline { text-decoration: underline; } +span.overline { text-decoration: overline; } +span.line-through { text-decoration: line-through; } + +/* + * html5 specific + * + * */ + +table.tableblock { + margin-top: 1.0em; + margin-bottom: 1.5em; +} +thead, p.tableblock.header { + font-weight: bold; + color: #666688; +} +p.tableblock { + margin-top: 0; +} +table.tableblock { + border-width: 3px; + border-spacing: 0px; + border-style: solid; + border-color: #444466; + border-collapse: collapse; +} +th.tableblock, td.tableblock { + border-width: 1px; + padding: 4px; + border-style: solid; + border-color: #444466; +} + +table.tableblock.frame-topbot { + border-left-style: hidden; + border-right-style: hidden; +} +table.tableblock.frame-sides { + border-top-style: hidden; + border-bottom-style: hidden; +} +table.tableblock.frame-none { + border-style: hidden; +} + +th.tableblock.halign-left, td.tableblock.halign-left { + text-align: left; +} +th.tableblock.halign-center, td.tableblock.halign-center { + text-align: center; +} +th.tableblock.halign-right, td.tableblock.halign-right { + text-align: right; +} + +th.tableblock.valign-top, td.tableblock.valign-top { + vertical-align: top; +} +th.tableblock.valign-middle, td.tableblock.valign-middle { + vertical-align: middle; +} +th.tableblock.valign-bottom, td.tableblock.valign-bottom { + vertical-align: bottom; +} + + diff -Nru asciidoc-8.6.10/asciidoc/resources/xhtml11.conf asciidoc-10.1.2/asciidoc/resources/xhtml11.conf --- asciidoc-8.6.10/asciidoc/resources/xhtml11.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/xhtml11.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,726 @@ +# +# xhtml11.conf +# +# Asciidoc configuration file. +# xhtml11 backend, generates XHTML 1.1 conformant markup. +# + +[miscellaneous] +outfilesuffix=.html + +[attributes] +basebackend=html +basebackend-html= +basebackend-xhtml11= + +[replacements2] +# Line break. +(?m)^(.*)\s\+$=\1
    + +[replacements] +ifdef::asciidoc7compatible[] +# Superscripts. +\^(.+?)\^=\1 +# Subscripts. +~(.+?)~=\1 +endif::asciidoc7compatible[] + +[ruler-blockmacro] +
    + +[pagebreak-blockmacro] +
    + +[blockdef-pass] +asciimath-style=template="asciimathblock",subs=() +latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py" + +[macros] +# math macros. +# Special characters are escaped in HTML math markup. +(?s)[\\]?(?Pasciimath):(?P\S*?)\[(?P.*?)(?asciimath)::(?P\S*?)(\[(?P.*?)\])$=#[specialcharacters] +(?s)[\\]?(?Platexmath):(?P\S*?)\[(?:\$\s*)?(?P.*?)(?:\s*\$)?(?latexmath)::(?P\S*?)(\[(?:\\\[\s*)?(?P.*?)(?:\s*\\\])?\])$=#[specialcharacters] + +[asciimath-inlinemacro] +`{passtext}` + +[asciimath-blockmacro] +
    +
    +
    {title}
    +`{passtext}` +
    + +[asciimathblock] +
    +
    +
    {title}
    +`|` +
    + +[latexmath-inlinemacro] +${passtext}$ + +[latexmath-blockmacro] +
    +
    +
    {title}
    +{backslash}[{passtext}{backslash}] +
    + +[latexmathblock] +
    +
    +
    {title}
    +\[|\] +
    + +[image-inlinemacro] + + +{data-uri%}{alt={target}} +{data-uri#}{alt={target}} +{link#} + + +[image-blockmacro] +
    + +
    {caption={figure-caption} {counter:figure-number}. }{title}
    +
    + +[unfloat-blockmacro] +
    + +[toc-blockmacro] +template::[toc] + +[indexterm-inlinemacro] +# Index term. +{empty} + +[indexterm2-inlinemacro] +# Index term. +# Single entry index term that is visible in the primary text flow. +{1} + +[footnote-inlinemacro] +# footnote:[]. +
    [{0}]
    + +[footnoteref-inlinemacro] +# footnoteref:[], create reference to footnote. +{2%}
    [{1}]
    +# footnoteref:[,], create footnote with ID. +{2#}
    [{2}]
    + +[callout-inlinemacro] +ifndef::icons[] +<{index}> +endif::icons[] +ifdef::icons[] +ifndef::data-uri[] +{index} +endif::data-uri[] +ifdef::data-uri[] +{index} +endif::data-uri[] +endif::icons[] + +# Comment line macros. +[comment-inlinemacro] +{showcomments#}
    {passtext}
    + +[comment-blockmacro] +{showcomments#}

    {passtext}

    + +[literal-inlinemacro] +# Inline literal. +{passtext} + +# List tags. +[listtags-bulleted] +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    + +[listtags-numbered] +# The start attribute is not valid XHTML 1.1 but all browsers support it. +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    + +[listtags-labeled] +list=
    {title?
    {title}
    }
    |
    +entry= +label= +term=
    |
    +item=
    |
    +text=

    |

    + +[listtags-horizontal] +list=
    {title?
    {title}
    }{labelwidth?}{itemwidth?}|
    +label=| +term=|
    +entry=| +item=| +text=

    |

    + +[listtags-qanda] +list=
    {title?
    {title}
    }
      |
    +entry=
  • |
  • +label= +term=

    |

    +item= +text=

    |

    + +[listtags-callout] +ifndef::icons[] +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    +endif::icons[] +ifdef::icons[] +list=
    {title?
    {title}
    }|
    +ifndef::data-uri[] +item={listindex}| +endif::data-uri[] +ifdef::data-uri[] +item={listindex}| +endif::data-uri[] +text=| +endif::icons[] + +[listtags-glossary] +list=
    {title?
    {title}
    }
    |
    +label= +entry= +term=
    |
    +item=
    |
    +text=

    |

    + +[listtags-bibliography] +list=
    {title?
    {title}
    }
      |
    +item=
  • |
  • +text=

    |

    + +[tags] +# Quoted text. +emphasis={1?}|{1?} +strong={1?}|{1?} +monospaced={1?}|{1?} +singlequoted={lsquo}{1?}|{1?}{rsquo} +doublequoted={ldquo}{1?}|{1?}{rdquo} +unquoted={1?}|{1?} +superscript={1?}|{1?} +subscript={1?}|{1?} + +ifdef::deprecated-quotes[] +# Override with deprecated quote attributes. +emphasis={role?}|{role?} +strong={role?}|{role?} +monospaced={role?}|{role?} +singlequoted={role?}{1,2,3?}{amp}#8216;|{amp}#8217;{1,2,3?}{role?} +doublequoted={role?}{1,2,3?}{amp}#8220;|{amp}#8221;{1,2,3?}{role?} +unquoted={role?}{1,2,3?}|{1,2,3?}{role?} +superscript={role?}|{role?} +subscript={role?}|{role?} +endif::deprecated-quotes[] + +# Inline macros +[http-inlinemacro] +{0={name}:{target}} +[https-inlinemacro] +{0={name}:{target}} +[ftp-inlinemacro] +{0={name}:{target}} +[file-inlinemacro] +{0={name}:{target}} +[irc-inlinemacro] +{0={name}:{target}} +[mailto-inlinemacro] +{0={target}} +[link-inlinemacro] +{0={target}} +[callto-inlinemacro] +{0={target}} +# anchor:id[text] +[anchor-inlinemacro] + +# [[id,text]] +[anchor2-inlinemacro] + +# [[[id]]] +[anchor3-inlinemacro] +[{1}] +# xref:id[text] +[xref-inlinemacro] +{0=[{target}]} +# <> +[xref2-inlinemacro] +{2=[{1}]} + +# Special word substitution. +[emphasizedwords] +{words} +[monospacedwords] +{words} +[strongwords] +{words} + +# Paragraph substitution. +[paragraph] +
    {title?
    {title}
    }

    +| +

    + +[admonitionparagraph] +template::[admonitionblock] + +# Delimited blocks. +[listingblock] +
    +
    {caption=}{title}
    +
    +
    
    +|
    +
    +
    + +[literalblock] +
    +
    {title}
    +
    +
    
    +|
    +
    +
    + +[sidebarblock] +
    +
    +
    {title}
    +| +
    + +[openblock] +
    +
    {title}
    +
    +| +
    + +[partintroblock] +template::[openblock] + +[abstractblock] +template::[quoteblock] + +[quoteblock] +
    +
    {title}
    +
    +| +
    +
    +{citetitle}{attribution?
    } +— {attribution} +
    + +[verseblock] +
    +
    {title}
    +
    +|
    +
    +
    +{citetitle}{attribution?
    } +— {attribution} +
    + +[exampleblock] +
    +
    {caption={example-caption} {counter:example-number}. }{title}
    +
    +| +
    + +[admonitionblock] +
    + + + +
    +{data-uri%}{icons#}{caption} +{data-uri#}{icons#}{caption} +{icons%}
    {caption}
    +
    +
    {title}
    +| +
    +
    + +# Tables. +[tabletags-default] +colspec= +bodyrow=| +headdata=| +bodydata=| +paragraph=

    |

    + +[tabletags-header] +paragraph=

    |

    + +[tabletags-emphasis] +paragraph=

    |

    + +[tabletags-strong] +paragraph=

    |

    + +[tabletags-monospaced] +paragraph=

    |

    + +[tabletags-verse] +bodydata=
    |
    +paragraph= + +[tabletags-literal] +bodydata=
    |
    +paragraph= + +[tabletags-asciidoc] +bodydata=
    |
    +paragraph= + +[table] +
    + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    {caption={table-caption} {counter:table-number}. }{title}
    +
    + +#-------------------------------------------------------------------- +# Deprecated old table definitions. +# + +[miscellaneous] +# Screen width in pixels. +pagewidth=800 +pageunits= + +[old_tabledef-default] +template=old_table +colspec= +bodyrow=| +headdata=| +footdata=| +bodydata=| + +[old_table] +
    + + +{colspecs} +{headrows#} +{headrows} +{headrows#} +{footrows#} +{footrows} +{footrows#} + +{bodyrows} + +
    {caption={table-caption}}{title}
    +
    + +# End of deprecated old table definitions. +#-------------------------------------------------------------------- + +[floatingtitle] +{title} + +[preamble] +# Untitled elements between header and first section title. +
    +
    +| +
    +
    + +# Document sections. +[sect0] +{title} +| + +[sect1] +
    +{numbered?{sectnum} }{title} +
    +| +
    +
    + +[sect2] +
    +{numbered?{sectnum} }{title} +| +
    + +[sect3] +
    +{numbered?{sectnum} }{title} +| +
    + +[sect4] +
    +{title} +| +
    + +[appendix] +
    +{numbered?{sectnum} }{appendix-caption} {counter:appendix-number:A}: {title} +
    +| +
    +
    + +[toc] +
    +
    {toc-title}
    + +
    + +[header] + + + + + + + + +{title} +{title%}{doctitle=} +ifdef::linkcss[] + +ifdef::quirks[] + +endif::quirks[] +ifeval::["{source-highlighter}"=="pygments"] + +endif::[] + +# DEPRECATED: 'pygments' attribute. +ifdef::pygments[] + +ifdef::toc2[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +ifndef::disable-javascript[] +ifdef::linkcss[] + + + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::disable-javascript[] +ifdef::asciimath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::asciimath[] +ifdef::latexmath[] +ifdef::linkcss[] + +endif::linkcss[] +ifndef::linkcss[] + +endif::linkcss[] +endif::latexmath[] +ifdef::mathjax[] + + +endif::mathjax[] +{docinfo1,docinfo2#}{include:{docdir}/docinfo.html} +{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} +template::[docinfo] + + +# Article, book header. +ifndef::doctype-manpage[] + +endif::doctype-manpage[] +# Man page header. +ifdef::doctype-manpage[] + +endif::doctype-manpage[] +
    + +[footer] +
    +{disable-javascript%

    } + + + + +[footer-date] +# Default footer date is document modification time +ifeval::["{footer-style=default}"!="revdate"] + {docdate} {doctime} +endif::[] +# If set to "revdate", it'll be set to the revision date +ifeval::["{footer-style=default}"=="revdate"] + {revdate} +endif::[] + +ifdef::doctype-manpage[] +[synopsis] +template::[sect1] +endif::doctype-manpage[] + +ifdef::quirks[] +include::xhtml11-quirks.conf[] +endif::quirks[] diff -Nru asciidoc-8.6.10/asciidoc/resources/xhtml11-quirks.conf asciidoc-10.1.2/asciidoc/resources/xhtml11-quirks.conf --- asciidoc-8.6.10/asciidoc/resources/xhtml11-quirks.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/resources/xhtml11-quirks.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,61 @@ +# +# xhtml11-quirks.conf +# +# Workarounds for IE6's broken # and incomplete CSS2. +# + +[image-blockmacro] +
    + +
    {caption={figure-caption} {counter:figure-number}: }{title}
    +
    + +[sidebarblock] +
    +
    + +[quoteblock] +
    +
    {title}
    +
    +| +
    +
    +{citetitle}
    +— {attribution} +
    + +[verseblock] +
    +
    {title}
    +
    +|
    +
    +
    +{citetitle}
    +— {attribution} +
    + +[exampleblock] +
    +
    {caption={example-caption} {counter:example-number}: }{title}
    +
    +| +
    + +[sect2] +
    +# The
    is because the IE6 adjacent-sibling CSS selector is broken. +{numbered?{sectnum} }{title}
    +| +
    + diff -Nru asciidoc-8.6.10/asciidoc/utils.py asciidoc-10.1.2/asciidoc/utils.py --- asciidoc-8.6.10/asciidoc/utils.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/asciidoc/utils.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,206 @@ +import ast +import math +import os +import re +import time +from typing import List, Optional, Tuple, Union +import unicodedata + + +def userdir() -> Optional[str]: + """ + Return user's home directory or None if it is not defined. + """ + result = os.path.expanduser('~') + if result == '~': + result = None + return result + + +def file_in(fname, directory) -> bool: + """Return True if file fname resides inside directory.""" + assert os.path.isfile(fname) + # Empty directory (not to be confused with None) is the current directory. + if directory == '': + directory = os.getcwd() + else: + assert os.path.isdir(directory) + directory = os.path.realpath(directory) + fname = os.path.realpath(fname) + return os.path.commonprefix((directory, fname)) == directory + + +def assign(dst, src): + """Assign all attributes from 'src' object to 'dst' object.""" + for a, v in list(src.__dict__.items()): + setattr(dst, a, v) + + +def strip_quotes(s: str) -> str: + """Trim white space and, if necessary, quote characters from s.""" + s = s.strip() + # Strip quotation mark characters from quoted strings. + if len(s) >= 3 and s[0] == '"' and s[-1] == '"': + s = s[1:-1] + return s + + +def is_re(s) -> bool: + """Return True if s is a valid regular expression else return False.""" + try: + re.compile(s) + return True + except BaseException: + return False + + +def re_join(relist: List) -> List: + """Join list of regular expressions re1,re2,... to single regular + expression (re1)|(re2)|...""" + if len(relist) == 0: + return None + result = [] + # Delete named groups to avoid ambiguity. + for s in relist: + result.append(re.sub(r'\?P<\S+?>', '', s)) + result = ')|('.join(result) + result = '(' + result + ')' + return result + + +def lstrip_list(s: Union[List, Tuple]) -> Union[List, Tuple]: + """ + Return list with empty items from start of list removed. + """ + for i in range(len(s)): + if s[i]: + break + else: + return [] + return s[i:] + + +def rstrip_list(s: Union[List, Tuple]) -> Union[List, Tuple]: + """ + Return list with empty items from end of list removed. + """ + for i in range(len(s) - 1, -1, -1): + if s[i]: + break + else: + return [] + return s[:i + 1] + + +def strip_list(s: Union[List, Tuple]) -> Union[List, Tuple]: + """ + Return list with empty items from start and end of list removed. + """ + s = lstrip_list(s) + s = rstrip_list(s) + return s + + +def is_array(obj) -> bool: + """ + Return True if object is list or tuple type. + """ + return isinstance(obj, list) or isinstance(obj, tuple) + + +def dovetail(lines1, lines2): + """ + Append list or tuple of strings 'lines2' to list 'lines1'. Join the last + non-blank item in 'lines1' with the first non-blank item in 'lines2' into a + single string. + """ + assert is_array(lines1) + assert is_array(lines2) + lines1 = strip_list(lines1) + lines2 = strip_list(lines2) + if not lines1 or not lines2: + return list(lines1) + list(lines2) + result = list(lines1[:-1]) + result.append(lines1[-1] + lines2[0]) + result += list(lines2[1:]) + return result + + +def dovetail_tags(stag, content, etag): + """Merge the end tag with the first content line and the last + content line with the end tag. This ensures verbatim elements don't + include extraneous opening and closing line breaks.""" + return dovetail(dovetail(stag, content), etag) + + +def py2round(n: Union[float, int], d: int = 0) -> int: + """Utility function to get python2 rounding in python3. Python3 changed it such that + given two equally close multiples, it'll round towards the even choice. For example, + round(42.5) == 42 instead of the expected round(42.5) == 43). This function gives us + back that functionality.""" + p = 10 ** d + return float(math.floor((n * p) + math.copysign(0.5, n))) / p + + +east_asian_widths = { + 'W': 2, # Wide + 'F': 2, # Full-width (wide) + 'Na': 1, # Narrow + 'H': 1, # Half-width (narrow) + 'N': 1, # Neutral (not East Asian, treated as narrow) + 'A': 1, # Ambiguous (s/b wide in East Asian context, narrow otherwise, but that + # doesn't work) +} +"""Mapping of result codes from `unicodedata.east_asian_width()` to character +column widths.""" + + +def column_width(s: str) -> int: + width = 0 + for c in s: + width += east_asian_widths[unicodedata.east_asian_width(c)] + return width + + +def date_time_str(t: float) -> Tuple[str, str]: + """Convert seconds since the Epoch to formatted local date and time strings.""" + source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH') + if source_date_epoch is not None: + t = time.gmtime(min(t, int(source_date_epoch))) + else: + t = time.localtime(t) + date_str = time.strftime('%Y-%m-%d', t) + time_str = time.strftime('%H:%M:%S', t) + if source_date_epoch is not None: + time_str += ' UTC' + elif time.daylight and t.tm_isdst == 1: + time_str += ' ' + time.tzname[1] + else: + time_str += ' ' + time.tzname[0] + return date_str, time_str + + +def get_args(val): + d = {} + args = ast.parse("d(" + val + ")", mode='eval').body.args + i = 1 + for arg in args: + if isinstance(arg, ast.Name): + d[str(i)] = ast.literal_eval(arg.id) + else: + d[str(i)] = ast.literal_eval(arg) + i += 1 + return d + + +def get_kwargs(val): + d = {} + args = ast.parse("d(" + val + ")", mode='eval').body.keywords + for arg in args: + d[arg.arg] = ast.literal_eval(arg.value) + return d + + +def parse_to_list(val): + values = ast.parse("[" + val + "]", mode='eval').body.elts + return [ast.literal_eval(v) for v in values] diff -Nru asciidoc-8.6.10/asciidocapi.py asciidoc-10.1.2/asciidocapi.py --- asciidoc-8.6.10/asciidocapi.py 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/asciidocapi.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,259 +0,0 @@ -#!/usr/bin/env python -""" -asciidocapi - AsciiDoc API wrapper class. - -The AsciiDocAPI class provides an API for executing asciidoc. Minimal example -compiles `mydoc.txt` to `mydoc.html`: - - import asciidocapi - asciidoc = asciidocapi.AsciiDocAPI() - asciidoc.execute('mydoc.txt') - -- Full documentation in asciidocapi.txt. -- See the doctests below for more examples. - -Doctests: - -1. Check execution: - - >>> import StringIO - >>> infile = StringIO.StringIO('Hello *{author}*') - >>> outfile = StringIO.StringIO() - >>> asciidoc = AsciiDocAPI() - >>> asciidoc.options('--no-header-footer') - >>> asciidoc.attributes['author'] = 'Joe Bloggs' - >>> asciidoc.execute(infile, outfile, backend='html4') - >>> print outfile.getvalue() -

    Hello Joe Bloggs

    - - >>> asciidoc.attributes['author'] = 'Bill Smith' - >>> infile = StringIO.StringIO('Hello _{author}_') - >>> outfile = StringIO.StringIO() - >>> asciidoc.execute(infile, outfile, backend='docbook') - >>> print outfile.getvalue() - Hello Bill Smith - -2. Check error handling: - - >>> import StringIO - >>> asciidoc = AsciiDocAPI() - >>> infile = StringIO.StringIO('---------') - >>> outfile = StringIO.StringIO() - >>> asciidoc.execute(infile, outfile) - Traceback (most recent call last): - File "", line 1, in - File "asciidocapi.py", line 189, in execute - raise AsciiDocError(self.messages[-1]) - AsciiDocError: ERROR: : line 1: [blockdef-listing] missing closing delimiter - - -Copyright (C) 2009 Stuart Rackham. Free use of this software is granted -under the terms of the GNU General Public License (GPL). - -""" - -import sys,os,re,imp - -API_VERSION = '0.1.2' -MIN_ASCIIDOC_VERSION = '8.4.1' # Minimum acceptable AsciiDoc version. - - -def find_in_path(fname, path=None): - """ - Find file fname in paths. Return None if not found. - """ - if path is None: - path = os.environ.get('PATH', '') - for dir in path.split(os.pathsep): - fpath = os.path.join(dir, fname) - if os.path.isfile(fpath): - return fpath - else: - return None - - -class AsciiDocError(Exception): - pass - - -class Options(object): - """ - Stores asciidoc(1) command options. - """ - def __init__(self, values=[]): - self.values = values[:] - def __call__(self, name, value=None): - """Shortcut for append method.""" - self.append(name, value) - def append(self, name, value=None): - if type(value) in (int,float): - value = str(value) - self.values.append((name,value)) - - -class Version(object): - """ - Parse and compare AsciiDoc version numbers. Instance attributes: - - string: String version number '.[.][suffix]'. - major: Integer major version number. - minor: Integer minor version number. - micro: Integer micro version number. - suffix: Suffix (begins with non-numeric character) is ignored when - comparing. - - Doctest examples: - - >>> Version('8.2.5') < Version('8.3 beta 1') - True - >>> Version('8.3.0') == Version('8.3. beta 1') - True - >>> Version('8.2.0') < Version('8.20') - True - >>> Version('8.20').major - 8 - >>> Version('8.20').minor - 20 - >>> Version('8.20').micro - 0 - >>> Version('8.20').suffix - '' - >>> Version('8.20 beta 1').suffix - 'beta 1' - - """ - def __init__(self, version): - self.string = version - reo = re.match(r'^(\d+)\.(\d+)(\.(\d+))?\s*(.*?)\s*$', self.string) - if not reo: - raise ValueError('invalid version number: %s' % self.string) - groups = reo.groups() - self.major = int(groups[0]) - self.minor = int(groups[1]) - self.micro = int(groups[3] or '0') - self.suffix = groups[4] or '' - def __cmp__(self, other): - result = cmp(self.major, other.major) - if result == 0: - result = cmp(self.minor, other.minor) - if result == 0: - result = cmp(self.micro, other.micro) - return result - - -class AsciiDocAPI(object): - """ - AsciiDoc API class. - """ - def __init__(self, asciidoc_py=None): - """ - Locate and import asciidoc.py. - Initialize instance attributes. - """ - self.options = Options() - self.attributes = {} - self.messages = [] - # Search for the asciidoc command file. - # Try ASCIIDOC_PY environment variable first. - cmd = os.environ.get('ASCIIDOC_PY') - if cmd: - if not os.path.isfile(cmd): - raise AsciiDocError('missing ASCIIDOC_PY file: %s' % cmd) - elif asciidoc_py: - # Next try path specified by caller. - cmd = asciidoc_py - if not os.path.isfile(cmd): - raise AsciiDocError('missing file: %s' % cmd) - else: - # Try shell search paths. - for fname in ['asciidoc.py','asciidoc.pyc','asciidoc']: - cmd = find_in_path(fname) - if cmd: break - else: - # Finally try current working directory. - for cmd in ['asciidoc.py','asciidoc.pyc','asciidoc']: - if os.path.isfile(cmd): break - else: - raise AsciiDocError('failed to locate asciidoc') - self.cmd = os.path.realpath(cmd) - self.__import_asciidoc() - - def __import_asciidoc(self, reload=False): - ''' - Import asciidoc module (script or compiled .pyc). - See - http://groups.google.com/group/asciidoc/browse_frm/thread/66e7b59d12cd2f91 - for an explanation of why a seemingly straight-forward job turned out - quite complicated. - ''' - if os.path.splitext(self.cmd)[1] in ['.py','.pyc']: - sys.path.insert(0, os.path.dirname(self.cmd)) - try: - try: - if reload: - import __builtin__ # Because reload() is shadowed. - __builtin__.reload(self.asciidoc) - else: - import asciidoc - self.asciidoc = asciidoc - except ImportError: - raise AsciiDocError('failed to import ' + self.cmd) - finally: - del sys.path[0] - else: - # The import statement can only handle .py or .pyc files, have to - # use imp.load_source() for scripts with other names. - try: - imp.load_source('asciidoc', self.cmd) - import asciidoc - self.asciidoc = asciidoc - except ImportError: - raise AsciiDocError('failed to import ' + self.cmd) - if Version(self.asciidoc.VERSION) < Version(MIN_ASCIIDOC_VERSION): - raise AsciiDocError( - 'asciidocapi %s requires asciidoc %s or better' - % (API_VERSION, MIN_ASCIIDOC_VERSION)) - - def execute(self, infile, outfile=None, backend=None): - """ - Compile infile to outfile using backend format. - infile can outfile can be file path strings or file like objects. - """ - self.messages = [] - opts = Options(self.options.values) - if outfile is not None: - opts('--out-file', outfile) - if backend is not None: - opts('--backend', backend) - for k,v in self.attributes.items(): - if v == '' or k[-1] in '!@': - s = k - elif v is None: # A None value undefines the attribute. - s = k + '!' - else: - s = '%s=%s' % (k,v) - opts('--attribute', s) - args = [infile] - # The AsciiDoc command was designed to process source text then - # exit, there are globals and statics in asciidoc.py that have - # to be reinitialized before each run -- hence the reload. - self.__import_asciidoc(reload=True) - try: - try: - self.asciidoc.execute(self.cmd, opts.values, args) - finally: - self.messages = self.asciidoc.messages[:] - except SystemExit, e: - if e.code: - raise AsciiDocError(self.messages[-1]) - - -if __name__ == "__main__": - """ - Run module doctests. - """ - import doctest - options = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS - test_result = doctest.testmod(optionflags=options) - print(test_result) - sys.exit(test_result.failed > 0) diff -Nru asciidoc-8.6.10/asciidoc.conf asciidoc-10.1.2/asciidoc.conf --- asciidoc-8.6.10/asciidoc.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/asciidoc.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,648 +0,0 @@ -# -# asciidoc.conf -# -# Asciidoc global configuration file. -# Contains backend independent configuration settings that are applied to all -# AsciiDoc documents. -# - -[miscellaneous] -tabsize=8 -textwidth=70 -newline=\r\n - -[attributes] -backend-alias-html=xhtml11 -backend-alias-docbook=docbook45 -toclevels=2 -toc-placement=auto -sectids= -iconsdir=./images/icons -encoding=UTF-8 -# Uncomment to use xhtml11 quirks mode CSS. -#quirks= -# HTML source code highlighter (source-highlight, pygments or highlight). -source-highlighter=source-highlight -# Uncomment to use deprecated quote attributes. -#deprecated-quotes= -empty= -sp=" " -# Attribute and AttributeList element patterns. -attributeentry-pattern=^:(?P\w[^.]*?)(\.(?P.*?))?:(\s+(?P.*))?$ -attributelist-pattern=(?u)(^\[\[(?P[\w_:][\w_:.-]*)(,(?P.*?))?\]\]$)|(^\[(?P.*)\]$) -# Substitution attributes for escaping AsciiDoc processing. -amp=& -lt=< -gt=> -brvbar=| -nbsp=  -zwsp=​ -wj=⁠ -deg=° -backslash=\ -two-colons=:: -two-semicolons=;; -plus=+ -# DEPRECATED: underscore attribute names. -two_colons=:: -two_semicolons=;; -# Left and right single and double quote characters. -# See http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks -lsquo=‘ -rsquo=’ -ldquo=“ -rdquo=” - -[titles] -subs=specialcharacters,quotes,replacements,macros,attributes,replacements2 -# Double-line title pattern and underlines. -sectiontitle=^(?P.*?)$ -underlines="==","--","~~","^^","++" -# Single-line title patterns. -sect0=^= +(?P<title>[\S].*?)( +=)?$ -sect1=^== +(?P<title>[\S].*?)( +==)?$ -sect2=^=== +(?P<title>[\S].*?)( +===)?$ -sect3=^==== +(?P<title>[\S].*?)( +====)?$ -sect4=^===== +(?P<title>[\S].*?)( +=====)?$ -blocktitle=^\.(?P<title>([^.\s].*)|(\.[^.\s].*))$ - -[specialcharacters] -&=& -<=< ->=> - -[quotes] -# The order is important, quotes are processed in conf file order. -**=#strong -*=strong -``|''=doublequoted -'=emphasis -`|'=singlequoted -ifdef::no-inline-literal[] -`=monospaced -endif::no-inline-literal[] -# +++ and $$ quoting is applied to the +++ and $$ inline passthrough -# macros to allow quoted attributes to be used. -# This trick only works with inline passthrough macros. -+++=#unquoted -$$=#unquoted -++=#monospaced -+=monospaced -__=#emphasis -_=emphasis -\##=#unquoted -\#=unquoted -^=#superscript -~=#subscript - -[specialwords] -emphasizedwords= -strongwords= -monospacedwords= - -[replacements] -# Replacements performed in order of configuration file entry. The first entry -# of each replacement pair performs the (non-escaped) replacement, the second -# strips the backslash from the escaped replacement. - -# (C) Copyright (entity reference ©) -(?<!\\)\(C\)=© -\\\(C\)=(C) - -# (R) registered trade mark (entity reference ® -(?<!\\)\(R\)=® -\\\(R\)=(R) - -# (TM) Trademark (entity reference ™) -(?<!\\)\(TM\)=™ -\\\(TM\)=(TM) - -# -- Spaced and unspaced em dashes (entity reference —). -# Space on both sides is translated to thin space characters. -(^-- )=—  -(\n-- )|( -- )|( --\n)= —  -(\w)--(\w)=\1—\2 -\\--(?!-)=-- - -# Replace vertical typewriter apostrophe with punctuation apostrophe. -(\w)'(\w)=\1’\2 -(\w)\\'(\w)=\1'\2 - -# ... Ellipsis (entity reference …) -(?<!\\)\.\.\.=… -\\\.\.\.=... - -# Arrows from the Arrows block of Unicode. -# -> right arrow -(?<!\\)->=→ -\\->=-> -# => right double arrow -(?<!\\)\=>=⇒ -\\\=>==> -# <- left arrow -(?<!\\)<-=← -\\<-=<- -# <= left double arrow -(?<!\\)<\==⇐ -\\<\==<= - -# Arbitrary entity references. -(?<!\\)&([:_#a-zA-Z][:_.\-\w]*?;)=&\1 -\\(&[:_#a-zA-Z][:_.\-\w]*?;)=\1 - -#----------- -# Paragraphs -#----------- -[paradef-default] -delimiter=(?s)(?P<text>\S.*) -posattrs=style -style=normal -template::[paragraph-styles] - -[paradef-literal] -delimiter=(?s)(?P<text>\s+.*) -options=listelement -posattrs=style -style=literal -template::[paragraph-styles] - -[paradef-admonition] -delimiter=(?s)^\s*(?P<style>NOTE|TIP|IMPORTANT|WARNING|CAUTION):\s+(?P<text>.+) -template::[paragraph-styles] - -[paragraph-styles] -normal-style=template="paragraph" -comment-style=template="paragraph",options=('skip',) -verse-style=template="verseparagraph",posattrs=("style","attribution","citetitle") -quote-style=template="quoteparagraph",posattrs=("style","attribution","citetitle") -literal-style=template="literalparagraph",subs=("verbatim",) -listing-style=template="listingparagraph",subs=("verbatim",) -example-style=template="exampleparagraph" -sidebar-style=template="sidebarparagraph" -abstract-style=template="abstractparagraph" -partintro-style=template="partintroparagraph" -NOTE-style=template="admonitionparagraph",name="note",caption="{note-caption}" -TIP-style=template="admonitionparagraph",name="tip",caption="{tip-caption}" -IMPORTANT-style=template="admonitionparagraph",name="important",caption="{important-caption}" -WARNING-style=template="admonitionparagraph",name="warning",caption="{warning-caption}" -CAUTION-style=template="admonitionparagraph",name="caution",caption="{caution-caption}" - -[literalparagraph] -template::[literalblock] - -[verseparagraph] -template::[verseblock] - -[quoteparagraph] -template::[quoteblock] - -[listingparagraph] -template::[listingblock] - -[exampleparagraph] -template::[exampleblock] - -[sidebarparagraph] -template::[sidebarblock] - -[abstractparagraph] -template::[abstractblock] - -[partintroparagraph] -template::[partintroblock] - - -[macros] -#-------------- -# Inline macros -#-------------- -# Backslash prefix required for escape processing. -# (?s) re flag for line spanning. - -# Macros using default syntax. -(?su)(?<!\w)[\\]?(?P<name>http|https|ftp|file|irc|mailto|callto|image|link|anchor|xref|indexterm|indexterm2):(?P<target>\S*?)\[(?P<attrlist>.*?)(?<!\\)\]= - -# These URL types don't require any special attribute list formatting. -(?su)(?<!\S)[\\]?(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])= -# Allow a leading parenthesis and square bracket. -(?su)(?<\=[([])[\\]?(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])= -# Allow <> brackets. -(?su)[\\]?<(?P<name>http|https|ftp|file|irc):(?P<target>//[^\s<>]*[\w/])>= - -# Email addresses don't require special attribute list formatting. -# The before ">: and after "< character exclusions stop multiple substitution. -(?su)(?<![">:\w._/-])[\\]?(?P<target>\w[\w._-]*@[\w._-]*\w)(?!["<\w_-])=mailto - -# Allow footnote macros hard up against the preceding word so the footnote mark -# can be placed against the noted text without an intervening space -# (http://groups.google.com/group/asciidoc/browse_frm/thread/e1dcb7ee0efc17b5). -(?su)[\\]?(?P<name>footnote|footnoteref):(?P<target>\S*?)\[(?P<attrlist>.*?)(?<!\\)\]= - -# Anchor: [[[id]]]. Bibliographic anchor. -(?su)[\\]?\[\[\[(?P<attrlist>[\w_:][\w_:.-]*?)\]\]\]=anchor3 -# Anchor: [[id,xreflabel]] -(?su)[\\]?\[\[(?P<attrlist>[\w"_:].*?)\]\]=anchor2 -# Link: <<id,text>> -(?su)[\\]?<<(?P<attrlist>[\w"_:].*?)>>=xref2 - -ifdef::asciidoc7compatible[] -# Index term: ++primary,secondary,tertiary++ -(?su)(?<!\S)[\\]?\+\+(?P<attrlist>[^+].*?)\+\+(?!\+)=indexterm -# Index term: +primary+ -# Follows ++...++ macro otherwise it will match them. -(?<!\S)[\\]?\+(?P<attrlist>[^\s\+][^+].*?)\+(?!\+)=indexterm2 -endif::asciidoc7compatible[] - -ifndef::asciidoc7compatible[] -# Index term: (((primary,secondary,tertiary))) -(?su)(?<!\()[\\]?\(\(\((?P<attrlist>[^(].*?)\)\)\)(?!\))=indexterm -# Index term: ((primary)) -# Follows (((...))) macro otherwise it will match them. -(?<!\()[\\]?\(\((?P<attrlist>[^\s\(][^(].*?)\)\)(?!\))=indexterm2 -endif::asciidoc7compatible[] - -# Callout -[\\]?<(?P<index>\d+)>=callout - -# Passthrough macros. -(?su)[\\]?(?P<name>pass):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[] - -# Triple-plus and double-dollar inline passthroughs. -(?su)[\\]?\+\+\+(?P<passtext>.*?)\+\+\+=pass[] -(?su)[\\]?\$\$(?P<passtext>.*?)\$\$=pass[specialcharacters] - -# Inline literal. -ifndef::no-inline-literal[] -(?su)(?<![`\w])([\\]?`(?P<passtext>[^`\s]|[^`\s].*?\S)`)(?![`\w])=literal[specialcharacters] -endif::no-inline-literal[] - -# Inline comment. -(?mu)^[\\]?//(?P<passtext>[^/].*|)$=comment[specialcharacters] - -# Default (catchall) inline macro is not implemented so there is no ambiguity -# with previous definition that could result in double substitution of escaped -# references. -#(?su)[\\]?(?P<name>\w(\w|-)*?):(?P<target>\S*?)\[(?P<passtext>.*?)(?<!\\)\]= - -#------------- -# Block macros -#------------- -# Macros using default syntax. -(?u)^(?P<name>image|unfloat|toc)::(?P<target>\S*?)(\[(?P<attrlist>.*?)\])$=# - -# Passthrough macros. -(?u)^(?P<name>pass)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=# - -^'{3,}$=#ruler -^<{3,}$=#pagebreak -^//(?P<passtext>[^/].*|)$=#comment[specialcharacters] - -# Implemented in HTML backends. -[unfloat-blockmacro] -[toc-blockmacro] - -#----------------- -# Delimited blocks -#----------------- -[blockdef-comment] -delimiter=^/{4,}$ -options=skip -posattrs=style - -[blockdef-sidebar] -delimiter=^\*{4,}$ -template=sidebarblock -options=sectionbody -posattrs=style -# DEPRECATED: Use Openblock instead. -abstract-style=template="abstractblock" - -[blockdef-open] -# A block without opening or closing tags. -delimiter=^--$ -posattrs=style -style=default -default-style=template="openblock",options=("sectionbody",) -comment-style=template="openblock",options=("skip",) -abstract-style=template="abstractblock",options=("sectionbody",) -partintro-style=template="partintroblock",options=("sectionbody",) -example-style=template="exampleblock",options=("sectionbody",) -sidebar-style=template="sidebarblock",options=("sectionbody",) -verse-style=template="verseblock",posattrs=("style","attribution","citetitle") -quote-style=template="quoteblock",posattrs=("style","attribution","citetitle"),options=("sectionbody",) -literal-style=template="literalparagraph",subs=("verbatim",) -listing-style=template="listingparagraph",subs=("verbatim",) -NOTE-style=template="admonitionblock",name="note",caption="{note-caption}",options=("sectionbody",) -TIP-style=template="admonitionblock",name="tip",caption="{tip-caption}",options=("sectionbody",) -IMPORTANT-style=template="admonitionblock",name="important",caption="{important-caption}",options=("sectionbody",) -WARNING-style=template="admonitionblock",name="warning",caption="{warning-caption}",options=("sectionbody",) -CAUTION-style=template="admonitionblock",name="caution",caption="{caution-caption}",options=("sectionbody",) - -[blockdef-pass] -delimiter=^\+{4,}$ -template=passblock -# Default subs choosen for backward compatibility. -subs=attributes,macros -posattrs=style -pass-style=template="passblock",subs=() - -[blockdef-listing] -delimiter=^-{4,}$ -template=listingblock -subs=verbatim -posattrs=style - -[blockdef-literal] -delimiter=^\.{4,}$ -template=literalblock -subs=verbatim -posattrs=style -listing-style=template="listingblock" -# DEPRECATED: Use verse style on quote blocks instead. -verse-style=template="verseblock",subs="normal" - -[blockdef-quote] -delimiter=^_{4,}$ -subs=normal -style=quote -posattrs=style,attribution,citetitle -quote-style=template="quoteblock",options=("sectionbody",) -verse-style=template="verseblock" - -[blockdef-example] -delimiter=^={4,}$ -template=exampleblock -options=sectionbody -posattrs=style -NOTE-style=template="admonitionblock",name="note",caption="{note-caption}" -TIP-style=template="admonitionblock",name="tip",caption="{tip-caption}" -IMPORTANT-style=template="admonitionblock",name="important",caption="{important-caption}" -WARNING-style=template="admonitionblock",name="warning",caption="{warning-caption}" -CAUTION-style=template="admonitionblock",name="caution",caption="{caution-caption}" - -# For use by custom filters. -# DEPRECATED: No longer used, a styled listing block (blockdef-listing) is preferable. -[blockdef-filter] -delimiter=^~{4,}$ -template=listingblock -subs=none -posattrs=style - -#------- -# Lists -#------- -[listdef-bulleted] -# - bullets. -delimiter=^\s*- +(?P<text>.+)$ -posattrs=style -type=bulleted -tags=bulleted -callout-style=tags="callout" -bibliography-style=tags="bibliography" - -[listdef-bulleted1] -# * bullets. -template::[listdef-bulleted] -delimiter=^\s*\* +(?P<text>.+)$ - -[listdef-bulleted2] -# ** bullets. -template::[listdef-bulleted] -delimiter=^\s*\*{2} +(?P<text>.+)$ - -[listdef-bulleted3] -# *** bullets. -template::[listdef-bulleted] -delimiter=^\s*\*{3} +(?P<text>.+)$ - -[listdef-bulleted4] -# **** bullets. -template::[listdef-bulleted] -delimiter=^\s*\*{4} +(?P<text>.+)$ - -[listdef-bulleted5] -# ***** bullets. -template::[listdef-bulleted] -delimiter=^\s*\*{5} +(?P<text>.+)$ - -[listdef-arabic] -# Arabic numbering. -delimiter=^\s*(?P<index>\d+\.) +(?P<text>.+)$ -posattrs=style -type=numbered -tags=numbered -style=arabic - -[listdef-loweralpha] -# Lower alpha numbering. -template::[listdef-arabic] -delimiter=^\s*(?P<index>[a-z]\.) +(?P<text>.+)$ -style=loweralpha - -[listdef-upperalpha] -# Upper alpha numbering. -template::[listdef-arabic] -delimiter=^\s*(?P<index>[A-Z]\.) +(?P<text>.+)$ -style=upperalpha - -[listdef-lowerroman] -# Lower roman numbering. -template::[listdef-arabic] -delimiter=^\s*(?P<index>[ivx]+\)) +(?P<text>.+)$ -style=lowerroman - -[listdef-upperroman] -# Upper roman numbering. -template::[listdef-arabic] -delimiter=^\s*(?P<index>[IVX]+\)) +(?P<text>.+)$ -style=upperroman - -[listdef-numbered1] -# . numbering. -template::[listdef-arabic] -delimiter=^\s*\. +(?P<text>.+)$ - -[listdef-numbered2] -# .. numbering. -template::[listdef-loweralpha] -delimiter=^\s*\.{2} +(?P<text>.+)$ - -[listdef-numbered3] -# ... numbering. -template::[listdef-lowerroman] -delimiter=^\s*\.{3} +(?P<text>.+)$ - -[listdef-numbered4] -# .... numbering. -template::[listdef-upperalpha] -delimiter=^\s*\.{4} +(?P<text>.+)$ - -[listdef-numbered5] -# ..... numbering. -template::[listdef-upperroman] -delimiter=^\s*\.{5} +(?P<text>.+)$ - -[listdef-labeled] -# label:: item. -delimiter=^\s*(?P<label>.*[^:])::(\s+(?P<text>.+))?$ -posattrs=style -type=labeled -tags=labeled -vertical-style=tags="labeled" -horizontal-style=tags="horizontal" -glossary-style=tags="glossary" -qanda-style=tags="qanda" - -[listdef-labeled2] -# label;; item. -template::[listdef-labeled] -delimiter=^\s*(?P<label>.*[^;]);;(\s+(?P<text>.+))?$ - -[listdef-labeled3] -# label::: item. -template::[listdef-labeled] -delimiter=^\s*(?P<label>.*[^:]):{3}(\s+(?P<text>.+))?$ - -[listdef-labeled4] -# label:::: item. -template::[listdef-labeled] -delimiter=^\s*(?P<label>.*[^:]):{4}(\s+(?P<text>.+))?$ - -[listdef-callout] -posattrs=style -delimiter=^<?(?P<index>\d*>) +(?P<text>.+)$ -type=callout -tags=callout -style=arabic - -# DEPRECATED: Old list syntax. -[listdef-qanda] -posattrs=style -delimiter=^\s*(?P<label>.*\S)\?\?$ -type=labeled -tags=qanda - -# DEPRECATED: Old list syntax. -[listdef-bibliography] -posattrs=style -delimiter=^\+ +(?P<text>.+)$ -type=bulleted -tags=bibliography - -# DEPRECATED: Old list syntax. -[listdef-glossary] -delimiter=^(?P<label>.*\S):-$ -posattrs=style -type=labeled -tags=glossary - -#------- -# Tables -#------- -[tabledef-default] -delimiter=^\|={3,}$ -posattrs=style -template=table -default-style=tags="default" -verse-style=tags="verse" -literal-style=tags="literal",subs=("specialcharacters",) -emphasis-style=tags="emphasis" -strong-style=tags="strong" -monospaced-style=tags="monospaced" -header-style=tags="header" -asciidoc-style=tags="asciidoc",subs=(),filter='"{python}" "{asciidoc-file}" -b {backend} {asciidoc-args}{lang? -a "lang={lang}@"}{icons? -a icons -a "iconsdir={iconsdir}"}{imagesdir? -a "imagesdir={imagesdir}"}{data-uri? -a data-uri} -a "indir={indir}"{trace? -a "trace={trace}"}{blockname? -a "blockname={blockname}"} -s -' - -[tabledef-nested] -# Same as [tabledef-default] but with different delimiter and separator. -delimiter=^!={3,}$ -separator=((?<!\S)((?P<span>[\d.]+)(?P<op>[*+]))?(?P<align>[<\^>.]{,3})?(?P<style>[a-z])?)?! -posattrs=style -template=table -verse-style=tags="verse" -literal-style=tags="literal",subs=("specialcharacters",) -emphasis-style=tags="emphasis" -strong-style=tags="strong" -monospaced-style=tags="monospaced" -header-style=tags="header" -asciidoc-style=tags="asciidoc",subs=(),filter='"{python}" "{asciidoc-file}" -b {backend} {asciidoc-args}{lang? -a "lang={lang}@"}{icons? -a icons -a "iconsdir={iconsdir}"}{imagesdir? -a "imagesdir={imagesdir}"}{data-uri? -a data-uri} -a "indir={indir}"{trace? -a "trace={trace}"}{blockname? -a "blockname={blockname}"} -s -' - -#---------------------------------------- -# Common block and macro markup templates -#---------------------------------------- -[comment-inlinemacro] -# Outputs nothing. - -[comment-blockmacro] -# Outputs nothing. - -[pass-blockmacro] -{passtext} - -[pass-inlinemacro] -template::[pass-blockmacro] - -[passblock] -| - -[filter-image-blockmacro] -# Synthesize missing target attribute for filter generated file names. -# The tag split | ensures missing target file names are auto-generated -# before the filter is executed, the remainder (the [image-blockmacro]) -# is excuted after the filter to ensure data URI encoding comes after -# the image is created. -{target%}{counter2:target-number} -{target%}{set2:target:{docname}__{target-number}.png} -| -template::[image-blockmacro] - -[+docinfo] -# Blank section to suppress missing template warning. - -#---------------------------------- -# Default special section templates -#---------------------------------- -[abstract] -template::[sect1] - -[colophon] -template::[sect1] - -[dedication] -template::[sect1] - -[preface] -template::[sect1] - -[appendix] -template::[sect1] - -[glossary] -template::[sect1] - -[bibliography] -template::[sect1] - -[index] -template::[sect1] - -[synopsis] -template::[sect1] - -#-------------------------------------------------------------------- -# Deprecated old table definitions. -# - -[old_tabledef-default] -fillchar=- -format=fixed - -[old_tabledef-csv] -fillchar=~ -format=csv - -[old_tabledef-dsv] -fillchar=_ -format=dsv - -# End of deprecated old table definitions. -#-------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/asciidoc.py asciidoc-10.1.2/asciidoc.py --- asciidoc-8.6.10/asciidoc.py 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/asciidoc.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,6265 +0,0 @@ -#!/usr/bin/env python2 -""" -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -Copyright (C) 2002-2010 Stuart Rackham. Free use of this software is granted -under the terms of the GNU General Public License (GPL). -""" - -import sys, os, re, time, traceback, tempfile, subprocess, codecs, locale, unicodedata, copy - -### Used by asciidocapi.py ### -VERSION = '8.6.10' # See CHANGLOG file for version history. - -MIN_PYTHON_VERSION = '2.6' # Require this version of Python or better. - -#--------------------------------------------------------------------------- -# Program constants. -#--------------------------------------------------------------------------- -DEFAULT_BACKEND = 'html' -DEFAULT_DOCTYPE = 'article' -# Allowed substitution options for List, Paragraph and DelimitedBlock -# definition subs entry. -SUBS_OPTIONS = ('specialcharacters','quotes','specialwords', - 'replacements', 'attributes','macros','callouts','normal','verbatim', - 'none','replacements2','replacements3') -# Default value for unspecified subs and presubs configuration file entries. -SUBS_NORMAL = ('specialcharacters','quotes','attributes', - 'specialwords','replacements','macros','replacements2') -SUBS_VERBATIM = ('specialcharacters','callouts') - -NAME_RE = r'(?u)[^\W\d][-\w]*' # Valid section or attribute name. -OR, AND = ',', '+' # Attribute list separators. - - -#--------------------------------------------------------------------------- -# Utility functions and classes. -#--------------------------------------------------------------------------- - -class EAsciiDoc(Exception): pass - -class OrderedDict(dict): - """ - Dictionary ordered by insertion order. - Python Cookbook: Ordered Dictionary, Submitter: David Benjamin. - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747 - """ - def __init__(self, d=None, **kwargs): - self._keys = [] - if d is None: d = kwargs - dict.__init__(self, d) - def __delitem__(self, key): - dict.__delitem__(self, key) - self._keys.remove(key) - def __setitem__(self, key, item): - dict.__setitem__(self, key, item) - if key not in self._keys: self._keys.append(key) - def clear(self): - dict.clear(self) - self._keys = [] - def copy(self): - d = dict.copy(self) - d._keys = self._keys[:] - return d - def items(self): - return zip(self._keys, self.values()) - def keys(self): - return self._keys - def popitem(self): - try: - key = self._keys[-1] - except IndexError: - raise KeyError('dictionary is empty') - val = self[key] - del self[key] - return (key, val) - def setdefault(self, key, failobj = None): - dict.setdefault(self, key, failobj) - if key not in self._keys: self._keys.append(key) - def update(self, d=None, **kwargs): - if d is None: - d = kwargs - dict.update(self, d) - for key in d.keys(): - if key not in self._keys: self._keys.append(key) - def values(self): - return map(self.get, self._keys) - -class AttrDict(dict): - """ - Like a dictionary except values can be accessed as attributes i.e. obj.foo - can be used in addition to obj['foo']. - If an item is not present None is returned. - """ - def __getattr__(self, key): - try: return self[key] - except KeyError: return None - def __setattr__(self, key, value): - self[key] = value - def __delattr__(self, key): - try: del self[key] - except KeyError, k: raise AttributeError, k - def __repr__(self): - return '<AttrDict ' + dict.__repr__(self) + '>' - def __getstate__(self): - return dict(self) - def __setstate__(self,value): - for k,v in value.items(): self[k]=v - -class InsensitiveDict(dict): - """ - Like a dictionary except key access is case insensitive. - Keys are stored in lower case. - """ - def __getitem__(self, key): - return dict.__getitem__(self, key.lower()) - def __setitem__(self, key, value): - dict.__setitem__(self, key.lower(), value) - def has_key(self, key): - return dict.has_key(self,key.lower()) - def get(self, key, default=None): - return dict.get(self, key.lower(), default) - def update(self, dict): - for k,v in dict.items(): - self[k] = v - def setdefault(self, key, default = None): - return dict.setdefault(self, key.lower(), default) - - -class Trace(object): - """ - Used in conjunction with the 'trace' attribute to generate diagnostic - output. There is a single global instance of this class named trace. - """ - SUBS_NAMES = ('specialcharacters','quotes','specialwords', - 'replacements', 'attributes','macros','callouts', - 'replacements2','replacements3') - def __init__(self): - self.name_re = '' # Regexp pattern to match trace names. - self.linenos = True - self.offset = 0 - def __call__(self, name, before, after=None): - """ - Print trace message if tracing is on and the trace 'name' matches the - document 'trace' attribute (treated as a regexp). - 'before' is the source text before substitution; 'after' text is the - source text after substitutuion. - The 'before' and 'after' messages are only printed if they differ. - """ - name_re = document.attributes.get('trace') - if name_re == 'subs': # Alias for all the inline substitutions. - name_re = '|'.join(self.SUBS_NAMES) - self.name_re = name_re - if self.name_re is not None: - msg = message.format(name, 'TRACE: ', self.linenos, offset=self.offset) - if before != after and re.match(self.name_re,name): - if is_array(before): - before = '\n'.join(before) - if after is None: - msg += '\n%s\n' % before - else: - if is_array(after): - after = '\n'.join(after) - msg += '\n<<<\n%s\n>>>\n%s\n' % (before,after) - message.stderr(msg) - -class Message: - """ - Message functions. - """ - PROG = os.path.basename(os.path.splitext(__file__)[0]) - - def __init__(self): - # Set to True or False to globally override line numbers method - # argument. Has no effect when set to None. - self.linenos = None - self.messages = [] - self.prev_msg = '' - - def stdout(self,msg): - print msg - - def stderr(self,msg=''): - if msg == self.prev_msg: # Suppress repeated messages. - return - self.messages.append(msg) - if __name__ == '__main__': - sys.stderr.write('%s: %s%s' % (self.PROG, msg, os.linesep)) - self.prev_msg = msg - - def verbose(self, msg,linenos=True): - if config.verbose: - msg = self.format(msg,linenos=linenos) - self.stderr(msg) - - def warning(self, msg,linenos=True,offset=0): - msg = self.format(msg,'WARNING: ',linenos,offset=offset) - document.has_warnings = True - self.stderr(msg) - - def deprecated(self, msg, linenos=True): - msg = self.format(msg, 'DEPRECATED: ', linenos) - self.stderr(msg) - - def format(self, msg, prefix='', linenos=True, cursor=None, offset=0): - """Return formatted message string.""" - if self.linenos is not False and ((linenos or self.linenos) and reader.cursor): - if cursor is None: - cursor = reader.cursor - prefix += '%s: line %d: ' % (os.path.basename(cursor[0]),cursor[1]+offset) - return prefix + msg - - def error(self, msg, cursor=None, halt=False): - """ - Report fatal error. - If halt=True raise EAsciiDoc exception. - If halt=False don't exit application, continue in the hope of reporting - all fatal errors finishing with a non-zero exit code. - """ - if halt: - raise EAsciiDoc, self.format(msg,linenos=False,cursor=cursor) - else: - msg = self.format(msg,'ERROR: ',cursor=cursor) - self.stderr(msg) - document.has_errors = True - - def unsafe(self, msg): - self.error('unsafe: '+msg) - - -def userdir(): - """ - Return user's home directory or None if it is not defined. - """ - result = os.path.expanduser('~') - if result == '~': - result = None - return result - -def localapp(): - """ - Return True if we are not executing the system wide version - i.e. the configuration is in the executable's directory. - """ - return os.path.isfile(os.path.join(APP_DIR, 'asciidoc.conf')) - -def file_in(fname, directory): - """Return True if file fname resides inside directory.""" - assert os.path.isfile(fname) - # Empty directory (not to be confused with None) is the current directory. - if directory == '': - directory = os.getcwd() - else: - assert os.path.isdir(directory) - directory = os.path.realpath(directory) - fname = os.path.realpath(fname) - return os.path.commonprefix((directory, fname)) == directory - -def safe(): - return document.safe - -def is_safe_file(fname, directory=None): - # A safe file must reside in 'directory' (defaults to the source - # file directory). - if directory is None: - if document.infile == '<stdin>': - return not safe() - directory = os.path.dirname(document.infile) - elif directory == '': - directory = '.' - return ( - not safe() - or file_in(fname, directory) - or file_in(fname, APP_DIR) - or file_in(fname, CONF_DIR) - ) - -def safe_filename(fname, parentdir): - """ - Return file name which must reside in the parent file directory. - Return None if file is not safe. - """ - if not os.path.isabs(fname): - # Include files are relative to parent document - # directory. - fname = os.path.normpath(os.path.join(parentdir,fname)) - if not is_safe_file(fname, parentdir): - message.unsafe('include file: %s' % fname) - return None - return fname - -def assign(dst,src): - """Assign all attributes from 'src' object to 'dst' object.""" - for a,v in src.__dict__.items(): - setattr(dst,a,v) - -def strip_quotes(s): - """Trim white space and, if necessary, quote characters from s.""" - s = s.strip() - # Strip quotation mark characters from quoted strings. - if len(s) >= 3 and s[0] == '"' and s[-1] == '"': - s = s[1:-1] - return s - -def is_re(s): - """Return True if s is a valid regular expression else return False.""" - try: re.compile(s) - except: return False - else: return True - -def re_join(relist): - """Join list of regular expressions re1,re2,... to single regular - expression (re1)|(re2)|...""" - if len(relist) == 0: - return None - result = [] - # Delete named groups to avoid ambiguity. - for s in relist: - result.append(re.sub(r'\?P<\S+?>','',s)) - result = ')|('.join(result) - result = '('+result+')' - return result - -def lstrip_list(s): - """ - Return list with empty items from start of list removed. - """ - for i in range(len(s)): - if s[i]: break - else: - return [] - return s[i:] - -def rstrip_list(s): - """ - Return list with empty items from end of list removed. - """ - for i in range(len(s)-1,-1,-1): - if s[i]: break - else: - return [] - return s[:i+1] - -def strip_list(s): - """ - Return list with empty items from start and end of list removed. - """ - s = lstrip_list(s) - s = rstrip_list(s) - return s - -def is_array(obj): - """ - Return True if object is list or tuple type. - """ - return isinstance(obj,list) or isinstance(obj,tuple) - -def dovetail(lines1, lines2): - """ - Append list or tuple of strings 'lines2' to list 'lines1'. Join the last - non-blank item in 'lines1' with the first non-blank item in 'lines2' into a - single string. - """ - assert is_array(lines1) - assert is_array(lines2) - lines1 = strip_list(lines1) - lines2 = strip_list(lines2) - if not lines1 or not lines2: - return list(lines1) + list(lines2) - result = list(lines1[:-1]) - result.append(lines1[-1] + lines2[0]) - result += list(lines2[1:]) - return result - -def dovetail_tags(stag,content,etag): - """Merge the end tag with the first content line and the last - content line with the end tag. This ensures verbatim elements don't - include extraneous opening and closing line breaks.""" - return dovetail(dovetail(stag,content), etag) - -# The following functions are so we don't have to use the dangerous -# built-in eval() function. -if float(sys.version[:3]) >= 2.6 or sys.platform[:4] == 'java': - # Use AST module if CPython >= 2.6 or Jython. - import ast - from ast import literal_eval - - def get_args(val): - d = {} - args = ast.parse("d(" + val + ")", mode='eval').body.args - i = 1 - for arg in args: - if isinstance(arg, ast.Name): - d[str(i)] = literal_eval(arg.id) - else: - d[str(i)] = literal_eval(arg) - i += 1 - return d - - def get_kwargs(val): - d = {} - args = ast.parse("d(" + val + ")", mode='eval').body.keywords - for arg in args: - d[arg.arg] = literal_eval(arg.value) - return d - - def parse_to_list(val): - values = ast.parse("[" + val + "]", mode='eval').body.elts - return [literal_eval(v) for v in values] - -else: # Use deprecated CPython compiler module. - import compiler - from compiler.ast import Const, Dict, Expression, Name, Tuple, UnarySub, Keyword - - # Code from: - # http://mail.python.org/pipermail/python-list/2009-September/1219992.html - # Modified to use compiler.ast.List as this module has a List - def literal_eval(node_or_string): - """ - Safely evaluate an expression node or a string containing a Python - expression. The string or node provided may only consist of the - following Python literal structures: strings, numbers, tuples, - lists, dicts, booleans, and None. - """ - _safe_names = {'None': None, 'True': True, 'False': False} - if isinstance(node_or_string, basestring): - node_or_string = compiler.parse(node_or_string, mode='eval') - if isinstance(node_or_string, Expression): - node_or_string = node_or_string.node - def _convert(node): - if isinstance(node, Const) and isinstance(node.value, - (basestring, int, float, long, complex)): - return node.value - elif isinstance(node, Tuple): - return tuple(map(_convert, node.nodes)) - elif isinstance(node, compiler.ast.List): - return list(map(_convert, node.nodes)) - elif isinstance(node, Dict): - return dict((_convert(k), _convert(v)) for k, v - in node.items) - elif isinstance(node, Name): - if node.name in _safe_names: - return _safe_names[node.name] - elif isinstance(node, UnarySub): - return -_convert(node.expr) - raise ValueError('malformed string') - return _convert(node_or_string) - - def get_args(val): - d = {} - args = compiler.parse("d(" + val + ")", mode='eval').node.args - i = 1 - for arg in args: - if isinstance(arg, Keyword): - break - d[str(i)] = literal_eval(arg) - i = i + 1 - return d - - def get_kwargs(val): - d = {} - args = compiler.parse("d(" + val + ")", mode='eval').node.args - i = 0 - for arg in args: - if isinstance(arg, Keyword): - break - i += 1 - args = args[i:] - for arg in args: - d[str(arg.name)] = literal_eval(arg.expr) - return d - - def parse_to_list(val): - values = compiler.parse("[" + val + "]", mode='eval').node.asList() - return [literal_eval(v) for v in values] - -def parse_attributes(attrs,dict): - """Update a dictionary with name/value attributes from the attrs string. - The attrs string is a comma separated list of values and keyword name=value - pairs. Values must preceed keywords and are named '1','2'... The entire - attributes list is named '0'. If keywords are specified string values must - be quoted. Examples: - - attrs: '' - dict: {} - - attrs: 'hello,world' - dict: {'2': 'world', '0': 'hello,world', '1': 'hello'} - - attrs: '"hello", planet="earth"' - dict: {'planet': 'earth', '0': '"hello",planet="earth"', '1': 'hello'} - """ - def f(*args,**keywords): - # Name and add aguments '1','2'... to keywords. - for i in range(len(args)): - if not str(i+1) in keywords: - keywords[str(i+1)] = args[i] - return keywords - - if not attrs: - return - dict['0'] = attrs - # Replace line separators with spaces so line spanning works. - s = re.sub(r'\s', ' ', attrs) - d = {} - try: - d.update(get_args(s)) - d.update(get_kwargs(s)) - for v in d.values(): - if not (isinstance(v,str) or isinstance(v,int) or isinstance(v,float) or v is None): - raise Exception - except Exception: - s = s.replace('"','\\"') - s = s.split(',') - s = map(lambda x: '"' + x.strip() + '"', s) - s = ','.join(s) - try: - d = {} - d.update(get_args(s)) - d.update(get_kwargs(s)) - except Exception: - return # If there's a syntax error leave with {0}=attrs. - for k in d.keys(): # Drop any empty positional arguments. - if d[k] == '': del d[k] - dict.update(d) - assert len(d) > 0 - -def parse_named_attributes(s,attrs): - """Update a attrs dictionary with name="value" attributes from the s string. - Returns False if invalid syntax. - Example: - attrs: 'star="sun",planet="earth"' - dict: {'planet':'earth', 'star':'sun'} - """ - def f(**keywords): return keywords - - try: - d = {} - d = get_kwargs(s) - attrs.update(d) - return True - except Exception: - return False - -def parse_list(s): - """Parse comma separated string of Python literals. Return a tuple of of - parsed values.""" - try: - result = tuple(parse_to_list(s)) - except Exception: - raise EAsciiDoc,'malformed list: '+s - return result - -def parse_options(options,allowed,errmsg): - """Parse comma separated string of unquoted option names and return as a - tuple of valid options. 'allowed' is a list of allowed option values. - If allowed=() then all legitimate names are allowed. - 'errmsg' is an error message prefix if an illegal option error is thrown.""" - result = [] - if options: - for s in re.split(r'\s*,\s*',options): - if (allowed and s not in allowed) or not is_name(s): - raise EAsciiDoc,'%s: %s' % (errmsg,s) - result.append(s) - return tuple(result) - -def symbolize(s): - """Drop non-symbol characters and convert to lowercase.""" - return re.sub(r'(?u)[^\w\-_]', '', s).lower() - -def is_name(s): - """Return True if s is valid attribute, macro or tag name - (starts with alpha containing alphanumeric and dashes only).""" - return re.match(r'^'+NAME_RE+r'$',s) is not None - -def subs_quotes(text): - """Quoted text is marked up and the resulting text is - returned.""" - keys = config.quotes.keys() - for q in keys: - i = q.find('|') - if i != -1 and q != '|' and q != '||': - lq = q[:i] # Left quote. - rq = q[i+1:] # Right quote. - else: - lq = rq = q - tag = config.quotes[q] - if not tag: continue - # Unconstrained quotes prefix the tag name with a hash. - if tag[0] == '#': - tag = tag[1:] - # Unconstrained quotes can appear anywhere. - reo = re.compile(r'(?msu)(^|.)(\[(?P<attrlist>[^[\]]+?)\])?' \ - + r'(?:' + re.escape(lq) + r')' \ - + r'(?P<content>.+?)(?:'+re.escape(rq)+r')') - else: - # The text within constrained quotes must be bounded by white space. - # Non-word (\W) characters are allowed at boundaries to accomodate - # enveloping quotes and punctuation e.g. a='x', ('x'), 'x', ['x']. - reo = re.compile(r'(?msu)(^|[^\w;:}])(\[(?P<attrlist>[^[\]]+?)\])?' \ - + r'(?:' + re.escape(lq) + r')' \ - + r'(?P<content>\S|\S.*?\S)(?:'+re.escape(rq)+r')(?=\W|$)') - pos = 0 - while True: - mo = reo.search(text,pos) - if not mo: break - if text[mo.start()] == '\\': - # Delete leading backslash. - text = text[:mo.start()] + text[mo.start()+1:] - # Skip past start of match. - pos = mo.start() + 1 - else: - attrlist = {} - parse_attributes(mo.group('attrlist'), attrlist) - stag,etag = config.tag(tag, attrlist) - s = mo.group(1) + stag + mo.group('content') + etag - text = text[:mo.start()] + s + text[mo.end():] - pos = mo.start() + len(s) - return text - -def subs_tag(tag,dict={}): - """Perform attribute substitution and split tag string returning start, end - tag tuple (c.f. Config.tag()).""" - if not tag: - return [None,None] - s = subs_attrs(tag,dict) - if not s: - message.warning('tag \'%s\' dropped: contains undefined attribute' % tag) - return [None,None] - result = s.split('|') - if len(result) == 1: - return result+[None] - elif len(result) == 2: - return result - else: - raise EAsciiDoc,'malformed tag: %s' % tag - -def parse_entry(entry, dict=None, unquote=False, unique_values=False, - allow_name_only=False, escape_delimiter=True): - """Parse name=value entry to dictionary 'dict'. Return tuple (name,value) - or None if illegal entry. - If name= then value is set to ''. - If name and allow_name_only=True then value is set to ''. - If name! and allow_name_only=True then value is set to None. - Leading and trailing white space is striped from 'name' and 'value'. - 'name' can contain any printable characters. - If the '=' delimiter character is allowed in the 'name' then - it must be escaped with a backslash and escape_delimiter must be True. - If 'unquote' is True leading and trailing double-quotes are stripped from - 'name' and 'value'. - If unique_values' is True then dictionary entries with the same value are - removed before the parsed entry is added.""" - if escape_delimiter: - mo = re.search(r'(?:[^\\](=))',entry) - else: - mo = re.search(r'(=)',entry) - if mo: # name=value entry. - if mo.group(1): - name = entry[:mo.start(1)] - if escape_delimiter: - name = name.replace(r'\=','=') # Unescape \= in name. - value = entry[mo.end(1):] - elif allow_name_only and entry: # name or name! entry. - name = entry - if name[-1] == '!': - name = name[:-1] - value = None - else: - value = '' - else: - return None - if unquote: - name = strip_quotes(name) - if value is not None: - value = strip_quotes(value) - else: - name = name.strip() - if value is not None: - value = value.strip() - if not name: - return None - if dict is not None: - if unique_values: - for k,v in dict.items(): - if v == value: del dict[k] - dict[name] = value - return name,value - -def parse_entries(entries, dict, unquote=False, unique_values=False, - allow_name_only=False,escape_delimiter=True): - """Parse name=value entries from from lines of text in 'entries' into - dictionary 'dict'. Blank lines are skipped.""" - entries = config.expand_templates(entries) - for entry in entries: - if entry and not parse_entry(entry, dict, unquote, unique_values, - allow_name_only, escape_delimiter): - raise EAsciiDoc,'malformed section entry: %s' % entry - -def dump_section(name,dict,f=sys.stdout): - """Write parameters in 'dict' as in configuration file section format with - section 'name'.""" - f.write('[%s]%s' % (name,writer.newline)) - for k,v in dict.items(): - k = str(k) - k = k.replace('=',r'\=') # Escape = in name. - # Quote if necessary. - if len(k) != len(k.strip()): - k = '"'+k+'"' - if v and len(v) != len(v.strip()): - v = '"'+v+'"' - if v is None: - # Don't dump undefined attributes. - continue - else: - s = k+'='+v - if s[0] == '#': - s = '\\' + s # Escape so not treated as comment lines. - f.write('%s%s' % (s,writer.newline)) - f.write(writer.newline) - -def update_attrs(attrs,dict): - """Update 'attrs' dictionary with parsed attributes in dictionary 'dict'.""" - for k,v in dict.items(): - if not is_name(k): - raise EAsciiDoc,'illegal attribute name: %s' % k - attrs[k] = v - -def is_attr_defined(attrs,dic): - """ - Check if the sequence of attributes is defined in dictionary 'dic'. - Valid 'attrs' sequence syntax: - <attr> Return True if single attrbiute is defined. - <attr1>,<attr2>,... Return True if one or more attributes are defined. - <attr1>+<attr2>+... Return True if all the attributes are defined. - """ - if OR in attrs: - for a in attrs.split(OR): - if dic.get(a.strip()) is not None: - return True - else: return False - elif AND in attrs: - for a in attrs.split(AND): - if dic.get(a.strip()) is None: - return False - else: return True - else: - return dic.get(attrs.strip()) is not None - -def filter_lines(filter_cmd, lines, attrs={}): - """ - Run 'lines' through the 'filter_cmd' shell command and return the result. - The 'attrs' dictionary contains additional filter attributes. - """ - def findfilter(name,dir,filter): - """Find filter file 'fname' with style name 'name' in directory - 'dir'. Return found file path or None if not found.""" - if name: - result = os.path.join(dir,'filters',name,filter) - if os.path.isfile(result): - return result - result = os.path.join(dir,'filters',filter) - if os.path.isfile(result): - return result - return None - - # Return input lines if there's not filter. - if not filter_cmd or not filter_cmd.strip(): - return lines - # Perform attributes substitution on the filter command. - s = subs_attrs(filter_cmd, attrs) - if not s: - message.error('undefined filter attribute in command: %s' % filter_cmd) - return [] - filter_cmd = s.strip() - # Parse for quoted and unquoted command and command tail. - # Double quoted. - mo = re.match(r'^"(?P<cmd>[^"]+)"(?P<tail>.*)$', filter_cmd) - if not mo: - # Single quoted. - mo = re.match(r"^'(?P<cmd>[^']+)'(?P<tail>.*)$", filter_cmd) - if not mo: - # Unquoted catch all. - mo = re.match(r'^(?P<cmd>\S+)(?P<tail>.*)$', filter_cmd) - cmd = mo.group('cmd').strip() - found = None - if not os.path.dirname(cmd): - # Filter command has no directory path so search filter directories. - filtername = attrs.get('style') - d = document.attributes.get('docdir') - if d: - found = findfilter(filtername, d, cmd) - if not found: - if USER_DIR: - found = findfilter(filtername, USER_DIR, cmd) - if not found: - if localapp(): - found = findfilter(filtername, APP_DIR, cmd) - else: - found = findfilter(filtername, CONF_DIR, cmd) - else: - if os.path.isfile(cmd): - found = cmd - else: - message.warning('filter not found: %s' % cmd) - if found: - filter_cmd = '"' + found + '"' + mo.group('tail') - if found: - if cmd.endswith('.py'): - filter_cmd = '"%s" %s' % (document.attributes['python'], - filter_cmd) - elif cmd.endswith('.rb'): - filter_cmd = 'ruby ' + filter_cmd - - message.verbose('filtering: ' + filter_cmd) - if os.name == 'nt': - # Remove redundant quoting -- this is not just - # cosmetic, unnecessary quoting appears to cause - # command line truncation. - filter_cmd = re.sub(r'"([^ ]+?)"', r'\1', filter_cmd) - try: - p = subprocess.Popen(filter_cmd, shell=True, - stdin=subprocess.PIPE, stdout=subprocess.PIPE) - output = p.communicate(os.linesep.join(lines))[0] - except Exception: - raise EAsciiDoc,'filter error: %s: %s' % (filter_cmd, sys.exc_info()[1]) - if output: - result = [s.rstrip() for s in output.split(os.linesep)] - else: - result = [] - filter_status = p.wait() - if filter_status: - message.warning('filter non-zero exit code: %s: returned %d' % - (filter_cmd, filter_status)) - if lines and not result: - message.warning('no output from filter: %s' % filter_cmd) - return result - -def system(name, args, is_macro=False, attrs=None): - """ - Evaluate a system attribute ({name:args}) or system block macro - (name::[args]). - If is_macro is True then we are processing a system block macro otherwise - it's a system attribute. - The attrs dictionary is updated by the counter and set system attributes. - NOTE: The include1 attribute is used internally by the include1::[] macro - and is not for public use. - """ - if is_macro: - syntax = '%s::[%s]' % (name,args) - separator = '\n' - else: - syntax = '{%s:%s}' % (name,args) - separator = writer.newline - if name not in ('eval','eval3','sys','sys2','sys3','include','include1','counter','counter2','set','set2','template'): - if is_macro: - msg = 'illegal system macro name: %s' % name - else: - msg = 'illegal system attribute name: %s' % name - message.warning(msg) - return None - if is_macro: - s = subs_attrs(args) - if s is None: - message.warning('skipped %s: undefined attribute in: %s' % (name,args)) - return None - args = s - if name != 'include1': - message.verbose('evaluating: %s' % syntax) - if safe() and name not in ('include','include1'): - message.unsafe(syntax) - return None - result = None - if name in ('eval','eval3'): - try: - result = eval(args) - if result is True: - result = '' - elif result is False: - result = None - elif result is not None: - result = str(result) - except Exception: - message.warning('%s: evaluation error' % syntax) - elif name in ('sys','sys2','sys3'): - result = '' - fd,tmp = tempfile.mkstemp() - os.close(fd) - try: - cmd = args - cmd = cmd + (' > "%s"' % tmp) - if name == 'sys2': - cmd = cmd + ' 2>&1' - if os.name == 'nt': - # Remove redundant quoting -- this is not just - # cosmetic, unnecessary quoting appears to cause - # command line truncation. - cmd = re.sub(r'"([^ ]+?)"', r'\1', cmd) - message.verbose('shelling: %s' % cmd) - if os.system(cmd): - message.warning('%s: non-zero exit status' % syntax) - try: - if os.path.isfile(tmp): - f = open(tmp) - try: - lines = [s.rstrip() for s in f] - finally: - f.close() - else: - lines = [] - except Exception: - raise EAsciiDoc,'%s: temp file read error' % syntax - result = separator.join(lines) - finally: - if os.path.isfile(tmp): - os.remove(tmp) - elif name in ('counter','counter2'): - mo = re.match(r'^(?P<attr>[^:]*?)(:(?P<seed>.*))?$', args) - attr = mo.group('attr') - seed = mo.group('seed') - if seed and (not re.match(r'^\d+$', seed) and len(seed) > 1): - message.warning('%s: illegal counter seed: %s' % (syntax,seed)) - return None - if not is_name(attr): - message.warning('%s: illegal attribute name' % syntax) - return None - value = document.attributes.get(attr) - if value: - if not re.match(r'^\d+$', value) and len(value) > 1: - message.warning('%s: illegal counter value: %s' - % (syntax,value)) - return None - if re.match(r'^\d+$', value): - expr = value + '+1' - else: - expr = 'chr(ord("%s")+1)' % value - try: - result = str(eval(expr)) - except Exception: - message.warning('%s: evaluation error: %s' % (syntax, expr)) - else: - if seed: - result = seed - else: - result = '1' - document.attributes[attr] = result - if attrs is not None: - attrs[attr] = result - if name == 'counter2': - result = '' - elif name in ('set','set2'): - mo = re.match(r'^(?P<attr>[^:]*?)(:(?P<value>.*))?$', args) - attr = mo.group('attr') - value = mo.group('value') - if value is None: - value = '' - if attr.endswith('!'): - attr = attr[:-1] - value = None - if not is_name(attr): - message.warning('%s: illegal attribute name' % syntax) - else: - if attrs is not None: - attrs[attr] = value - if name != 'set2': # set2 only updates local attributes. - document.attributes[attr] = value - if value is None: - result = None - else: - result = '' - elif name == 'include': - if not os.path.exists(args): - message.warning('%s: file does not exist' % syntax) - elif not is_safe_file(args): - message.unsafe(syntax) - else: - f = open(args) - try: - result = [s.rstrip() for s in f] - finally: - f.close() - if result: - result = subs_attrs(result) - result = separator.join(result) - result = result.expandtabs(reader.tabsize) - else: - result = '' - elif name == 'include1': - result = separator.join(config.include1[args]) - elif name == 'template': - if not args in config.sections: - message.warning('%s: template does not exist' % syntax) - else: - result = [] - for line in config.sections[args]: - line = subs_attrs(line) - if line is not None: - result.append(line) - result = '\n'.join(result) - else: - assert False - if result and name in ('eval3','sys3'): - macros.passthroughs.append(result) - result = '\x07' + str(len(macros.passthroughs)-1) + '\x07' - return result - -def subs_attrs(lines, dictionary=None): - """Substitute 'lines' of text with attributes from the global - document.attributes dictionary and from 'dictionary' ('dictionary' - entries take precedence). Return a tuple of the substituted lines. 'lines' - containing undefined attributes are deleted. If 'lines' is a string then - return a string. - - - Attribute references are substituted in the following order: simple, - conditional, system. - - Attribute references inside 'dictionary' entry values are substituted. - """ - - def end_brace(text,start): - """Return index following end brace that matches brace at start in - text.""" - assert text[start] == '{' - n = 0 - result = start - for c in text[start:]: - # Skip braces that are followed by a backslash. - if result == len(text)-1 or text[result+1] != '\\': - if c == '{': n = n + 1 - elif c == '}': n = n - 1 - result = result + 1 - if n == 0: break - return result - - if type(lines) == str: - string_result = True - lines = [lines] - else: - string_result = False - if dictionary is None: - attrs = document.attributes - else: - # Remove numbered document attributes so they don't clash with - # attribute list positional attributes. - attrs = {} - for k,v in document.attributes.items(): - if not re.match(r'^\d+$', k): - attrs[k] = v - # Substitute attribute references inside dictionary values. - for k,v in dictionary.items(): - if v is None: - del dictionary[k] - else: - v = subs_attrs(str(v)) - if v is None: - del dictionary[k] - else: - dictionary[k] = v - attrs.update(dictionary) - # Substitute all attributes in all lines. - result = [] - for line in lines: - # Make it easier for regular expressions. - line = line.replace('\\{','{\\') - line = line.replace('\\}','}\\') - # Expand simple attributes ({name}). - # Nested attributes not allowed. - reo = re.compile(r'(?su)\{(?P<name>[^\\\W][-\w]*?)\}(?!\\)') - pos = 0 - while True: - mo = reo.search(line,pos) - if not mo: break - s = attrs.get(mo.group('name')) - if s is None: - pos = mo.end() - else: - s = str(s) - line = line[:mo.start()] + s + line[mo.end():] - pos = mo.start() + len(s) - # Expand conditional attributes. - # Single name -- higher precedence. - reo1 = re.compile(r'(?su)\{(?P<name>[^\\\W][-\w]*?)' \ - r'(?P<op>\=|\?|!|#|%|@|\$)' \ - r'(?P<value>.*?)\}(?!\\)') - # Multiple names (n1,n2,... or n1+n2+...) -- lower precedence. - reo2 = re.compile(r'(?su)\{(?P<name>[^\\\W][-\w'+OR+AND+r']*?)' \ - r'(?P<op>\=|\?|!|#|%|@|\$)' \ - r'(?P<value>.*?)\}(?!\\)') - for reo in [reo1,reo2]: - pos = 0 - while True: - mo = reo.search(line,pos) - if not mo: break - attr = mo.group() - name = mo.group('name') - if reo == reo2: - if OR in name: - sep = OR - else: - sep = AND - names = [s.strip() for s in name.split(sep) if s.strip() ] - for n in names: - if not re.match(r'^[^\\\W][-\w]*$',n): - message.error('illegal attribute syntax: %s' % attr) - if sep == OR: - # Process OR name expression: n1,n2,... - for n in names: - if attrs.get(n) is not None: - lval = '' - break - else: - lval = None - else: - # Process AND name expression: n1+n2+... - for n in names: - if attrs.get(n) is None: - lval = None - break - else: - lval = '' - else: - lval = attrs.get(name) - op = mo.group('op') - # mo.end() not good enough because '{x={y}}' matches '{x={y}'. - end = end_brace(line,mo.start()) - rval = line[mo.start('value'):end-1] - UNDEFINED = '{zzzzz}' - if lval is None: - if op == '=': s = rval - elif op == '?': s = '' - elif op == '!': s = rval - elif op == '#': s = UNDEFINED # So the line is dropped. - elif op == '%': s = rval - elif op in ('@','$'): - s = UNDEFINED # So the line is dropped. - else: - assert False, 'illegal attribute: %s' % attr - else: - if op == '=': s = lval - elif op == '?': s = rval - elif op == '!': s = '' - elif op == '#': s = rval - elif op == '%': s = UNDEFINED # So the line is dropped. - elif op in ('@','$'): - v = re.split(r'(?<!\\):',rval) - if len(v) not in (2,3): - message.error('illegal attribute syntax: %s' % attr) - s = '' - elif not is_re('^'+v[0]+'$'): - message.error('illegal attribute regexp: %s' % attr) - s = '' - else: - v = [s.replace('\\:',':') for s in v] - re_mo = re.match('^'+v[0]+'$',lval) - if op == '@': - if re_mo: - s = v[1] # {<name>@<re>:<v1>[:<v2>]} - else: - if len(v) == 3: # {<name>@<re>:<v1>:<v2>} - s = v[2] - else: # {<name>@<re>:<v1>} - s = '' - else: - if re_mo: - if len(v) == 2: # {<name>$<re>:<v1>} - s = v[1] - elif v[1] == '': # {<name>$<re>::<v2>} - s = UNDEFINED # So the line is dropped. - else: # {<name>$<re>:<v1>:<v2>} - s = v[1] - else: - if len(v) == 2: # {<name>$<re>:<v1>} - s = UNDEFINED # So the line is dropped. - else: # {<name>$<re>:<v1>:<v2>} - s = v[2] - else: - assert False, 'illegal attribute: %s' % attr - s = str(s) - line = line[:mo.start()] + s + line[end:] - pos = mo.start() + len(s) - # Drop line if it contains unsubstituted {name} references. - skipped = re.search(r'(?su)\{[^\\\W][-\w]*?\}(?!\\)', line) - if skipped: - trace('dropped line', line) - continue; - # Expand system attributes (eval has precedence). - reos = [ - re.compile(r'(?su)\{(?P<action>eval):(?P<expr>.*?)\}(?!\\)'), - re.compile(r'(?su)\{(?P<action>[^\\\W][-\w]*?):(?P<expr>.*?)\}(?!\\)'), - ] - skipped = False - for reo in reos: - pos = 0 - while True: - mo = reo.search(line,pos) - if not mo: break - expr = mo.group('expr') - action = mo.group('action') - expr = expr.replace('{\\','{') - expr = expr.replace('}\\','}') - s = system(action, expr, attrs=dictionary) - if dictionary is not None and action in ('counter','counter2','set','set2'): - # These actions create and update attributes. - attrs.update(dictionary) - if s is None: - # Drop line if the action returns None. - skipped = True - break - line = line[:mo.start()] + s + line[mo.end():] - pos = mo.start() + len(s) - if skipped: - break - if not skipped: - # Remove backslash from escaped entries. - line = line.replace('{\\','{') - line = line.replace('}\\','}') - result.append(line) - if string_result: - if result: - return '\n'.join(result) - else: - return None - else: - return tuple(result) - -def char_encoding(): - encoding = document.attributes.get('encoding') - if encoding: - try: - codecs.lookup(encoding) - except LookupError,e: - raise EAsciiDoc,str(e) - return encoding - -def char_len(s): - return len(char_decode(s)) - -east_asian_widths = {'W': 2, # Wide - 'F': 2, # Full-width (wide) - 'Na': 1, # Narrow - 'H': 1, # Half-width (narrow) - 'N': 1, # Neutral (not East Asian, treated as narrow) - 'A': 1} # Ambiguous (s/b wide in East Asian context, - # narrow otherwise, but that doesn't work) -"""Mapping of result codes from `unicodedata.east_asian_width()` to character -column widths.""" - -def column_width(s): - text = char_decode(s) - if isinstance(text, unicode): - width = 0 - for c in text: - width += east_asian_widths[unicodedata.east_asian_width(c)] - return width - else: - return len(text) - -def char_decode(s): - if char_encoding(): - try: - return s.decode(char_encoding()) - except Exception: - raise EAsciiDoc, \ - "'%s' codec can't decode \"%s\"" % (char_encoding(), s) - else: - return s - -def char_encode(s): - if char_encoding(): - return s.encode(char_encoding()) - else: - return s - -def date_time_str(t): - """Convert seconds since the Epoch to formatted local date and time strings.""" - source_date_epoch = os.environ.get('SOURCE_DATE_EPOCH') - if source_date_epoch is not None: - t = time.gmtime(min(t, int(source_date_epoch))) - else: - t = time.localtime(t) - date_str = time.strftime('%Y-%m-%d',t) - time_str = time.strftime('%H:%M:%S',t) - if source_date_epoch is not None: - time_str += ' UTC' - elif time.daylight and t.tm_isdst == 1: - time_str += ' ' + time.tzname[1] - else: - time_str += ' ' + time.tzname[0] - # Attempt to convert the localtime to the output encoding. - try: - time_str = char_encode(time_str.decode(locale.getdefaultlocale()[1])) - except Exception: - pass - return date_str, time_str - - -class Lex: - """Lexical analysis routines. Static methods and attributes only.""" - prev_element = None - prev_cursor = None - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def next(): - """Returns class of next element on the input (None if EOF). The - reader is assumed to be at the first line following a previous element, - end of file or line one. Exits with the reader pointing to the first - line of the next element or EOF (leading blank lines are skipped).""" - reader.skip_blank_lines() - if reader.eof(): return None - # Optimization: If we've already checked for an element at this - # position return the element. - if Lex.prev_element and Lex.prev_cursor == reader.cursor: - return Lex.prev_element - if AttributeEntry.isnext(): - result = AttributeEntry - elif AttributeList.isnext(): - result = AttributeList - elif BlockTitle.isnext() and not tables_OLD.isnext(): - result = BlockTitle - elif Title.isnext(): - if AttributeList.style() == 'float': - result = FloatingTitle - else: - result = Title - elif macros.isnext(): - result = macros.current - elif lists.isnext(): - result = lists.current - elif blocks.isnext(): - result = blocks.current - elif tables_OLD.isnext(): - result = tables_OLD.current - elif tables.isnext(): - result = tables.current - else: - if not paragraphs.isnext(): - raise EAsciiDoc,'paragraph expected' - result = paragraphs.current - # Optimization: Cache answer. - Lex.prev_cursor = reader.cursor - Lex.prev_element = result - return result - - @staticmethod - def canonical_subs(options): - """Translate composite subs values.""" - if len(options) == 1: - if options[0] == 'none': - options = () - elif options[0] == 'normal': - options = config.subsnormal - elif options[0] == 'verbatim': - options = config.subsverbatim - return options - - @staticmethod - def subs_1(s,options): - """Perform substitution specified in 'options' (in 'options' order).""" - if not s: - return s - if document.attributes.get('plaintext') is not None: - options = ('specialcharacters',) - result = s - options = Lex.canonical_subs(options) - for o in options: - if o == 'specialcharacters': - result = config.subs_specialchars(result) - elif o == 'attributes': - result = subs_attrs(result) - elif o == 'quotes': - result = subs_quotes(result) - elif o == 'specialwords': - result = config.subs_specialwords(result) - elif o in ('replacements','replacements2','replacements3'): - result = config.subs_replacements(result,o) - elif o == 'macros': - result = macros.subs(result) - elif o == 'callouts': - result = macros.subs(result,callouts=True) - else: - raise EAsciiDoc,'illegal substitution option: %s' % o - trace(o, s, result) - if not result: - break - return result - - @staticmethod - def subs(lines,options): - """Perform inline processing specified by 'options' (in 'options' - order) on sequence of 'lines'.""" - if not lines or not options: - return lines - options = Lex.canonical_subs(options) - # Join lines so quoting can span multiple lines. - para = '\n'.join(lines) - if 'macros' in options: - para = macros.extract_passthroughs(para) - for o in options: - if o == 'attributes': - # If we don't substitute attributes line-by-line then a single - # undefined attribute will drop the entire paragraph. - lines = subs_attrs(para.split('\n')) - para = '\n'.join(lines) - else: - para = Lex.subs_1(para,(o,)) - if 'macros' in options: - para = macros.restore_passthroughs(para) - return para.splitlines() - - @staticmethod - def set_margin(lines, margin=0): - """Utility routine that sets the left margin to 'margin' space in a - block of non-blank lines.""" - # Calculate width of block margin. - lines = list(lines) - width = len(lines[0]) - for s in lines: - i = re.search(r'\S',s).start() - if i < width: width = i - # Strip margin width from all lines. - for i in range(len(lines)): - lines[i] = ' '*margin + lines[i][width:] - return lines - -#--------------------------------------------------------------------------- -# Document element classes parse AsciiDoc reader input and write DocBook writer -# output. -#--------------------------------------------------------------------------- -class Document(object): - - # doctype property. - def getdoctype(self): - return self.attributes.get('doctype') - def setdoctype(self,doctype): - self.attributes['doctype'] = doctype - doctype = property(getdoctype,setdoctype) - - # backend property. - def getbackend(self): - return self.attributes.get('backend') - def setbackend(self,backend): - if backend: - backend = self.attributes.get('backend-alias-' + backend, backend) - self.attributes['backend'] = backend - backend = property(getbackend,setbackend) - - def __init__(self): - self.infile = None # Source file name. - self.outfile = None # Output file name. - self.attributes = InsensitiveDict() - self.level = 0 # 0 => front matter. 1,2,3 => sect1,2,3. - self.has_errors = False # Set true if processing errors were flagged. - self.has_warnings = False # Set true if warnings were flagged. - self.safe = False # Default safe mode. - def update_attributes(self,attrs=None): - """ - Set implicit attributes and attributes in 'attrs'. - """ - t = time.time() - self.attributes['localdate'], self.attributes['localtime'] = date_time_str(t) - self.attributes['asciidoc-version'] = VERSION - self.attributes['asciidoc-file'] = APP_FILE - self.attributes['asciidoc-dir'] = APP_DIR - if localapp(): - self.attributes['asciidoc-confdir'] = APP_DIR - else: - self.attributes['asciidoc-confdir'] = CONF_DIR - self.attributes['user-dir'] = USER_DIR - if config.verbose: - self.attributes['verbose'] = '' - # Update with configuration file attributes. - if attrs: - self.attributes.update(attrs) - # Update with command-line attributes. - self.attributes.update(config.cmd_attrs) - # Extract miscellaneous configuration section entries from attributes. - if attrs: - config.load_miscellaneous(attrs) - config.load_miscellaneous(config.cmd_attrs) - self.attributes['newline'] = config.newline - # File name related attributes can't be overridden. - if self.infile is not None: - if self.infile and os.path.exists(self.infile): - t = os.path.getmtime(self.infile) - elif self.infile == '<stdin>': - t = time.time() - else: - t = None - if t: - self.attributes['docdate'], self.attributes['doctime'] = date_time_str(t) - if self.infile != '<stdin>': - self.attributes['infile'] = self.infile - self.attributes['indir'] = os.path.dirname(self.infile) - self.attributes['docfile'] = self.infile - self.attributes['docdir'] = os.path.dirname(self.infile) - self.attributes['docname'] = os.path.splitext( - os.path.basename(self.infile))[0] - if self.outfile: - if self.outfile != '<stdout>': - self.attributes['outfile'] = self.outfile - self.attributes['outdir'] = os.path.dirname(self.outfile) - if self.infile == '<stdin>': - self.attributes['docname'] = os.path.splitext( - os.path.basename(self.outfile))[0] - ext = os.path.splitext(self.outfile)[1][1:] - elif config.outfilesuffix: - ext = config.outfilesuffix[1:] - else: - ext = '' - if ext: - self.attributes['filetype'] = ext - self.attributes['filetype-'+ext] = '' - def load_lang(self): - """ - Load language configuration file. - """ - lang = self.attributes.get('lang') - if lang is None: - filename = 'lang-en.conf' # Default language file. - else: - filename = 'lang-' + lang + '.conf' - if config.load_from_dirs(filename): - self.attributes['lang'] = lang # Reinstate new lang attribute. - else: - if lang is None: - # The default language file must exist. - message.error('missing conf file: %s' % filename, halt=True) - else: - message.warning('missing language conf file: %s' % filename) - def set_deprecated_attribute(self,old,new): - """ - Ensures the 'old' name of an attribute that was renamed to 'new' is - still honored. - """ - if self.attributes.get(new) is None: - if self.attributes.get(old) is not None: - self.attributes[new] = self.attributes[old] - else: - self.attributes[old] = self.attributes[new] - def consume_attributes_and_comments(self,comments_only=False,noblanks=False): - """ - Returns True if one or more attributes or comments were consumed. - If 'noblanks' is True then consumation halts if a blank line is - encountered. - """ - result = False - finished = False - while not finished: - finished = True - if noblanks and not reader.read_next(): return result - if blocks.isnext() and 'skip' in blocks.current.options: - result = True - finished = False - blocks.current.translate() - if noblanks and not reader.read_next(): return result - if macros.isnext() and macros.current.name == 'comment': - result = True - finished = False - macros.current.translate() - if not comments_only: - if AttributeEntry.isnext(): - result = True - finished = False - AttributeEntry.translate() - if AttributeList.isnext(): - result = True - finished = False - AttributeList.translate() - return result - def parse_header(self,doctype,backend): - """ - Parses header, sets corresponding document attributes and finalizes - document doctype and backend properties. - Returns False if the document does not have a header. - 'doctype' and 'backend' are the doctype and backend option values - passed on the command-line, None if no command-line option was not - specified. - """ - assert self.level == 0 - # Skip comments and attribute entries that preceed the header. - self.consume_attributes_and_comments() - if doctype is not None: - # Command-line overrides header. - self.doctype = doctype - elif self.doctype is None: - # Was not set on command-line or in document header. - self.doctype = DEFAULT_DOCTYPE - # Process document header. - has_header = (Title.isnext() and Title.level == 0 - and AttributeList.style() != 'float') - if self.doctype == 'manpage' and not has_header: - message.error('manpage document title is mandatory',halt=True) - if has_header: - Header.parse() - # Command-line entries override header derived entries. - self.attributes.update(config.cmd_attrs) - # DEPRECATED: revision renamed to revnumber. - self.set_deprecated_attribute('revision','revnumber') - # DEPRECATED: date renamed to revdate. - self.set_deprecated_attribute('date','revdate') - if doctype is not None: - # Command-line overrides header. - self.doctype = doctype - if backend is not None: - # Command-line overrides header. - self.backend = backend - elif self.backend is None: - # Was not set on command-line or in document header. - self.backend = DEFAULT_BACKEND - else: - # Has been set in document header. - self.backend = self.backend # Translate alias in header. - assert self.doctype in ('article','manpage','book'), 'illegal document type' - return has_header - def translate(self,has_header): - if self.doctype == 'manpage': - # Translate mandatory NAME section. - if Lex.next() is not Title: - message.error('name section expected') - else: - Title.translate() - if Title.level != 1: - message.error('name section title must be at level 1') - if not isinstance(Lex.next(),Paragraph): - message.error('malformed name section body') - lines = reader.read_until(r'^$') - s = ' '.join(lines) - mo = re.match(r'^(?P<manname>.*?)\s+-\s+(?P<manpurpose>.*)$',s) - if not mo: - message.error('malformed name section body') - self.attributes['manname'] = mo.group('manname').strip() - self.attributes['manpurpose'] = mo.group('manpurpose').strip() - names = [s.strip() for s in self.attributes['manname'].split(',')] - if len(names) > 9: - message.warning('too many manpage names') - for i,name in enumerate(names): - self.attributes['manname%d' % (i+1)] = name - if has_header: - # Do postponed substitutions (backend confs have been loaded). - self.attributes['doctitle'] = Title.dosubs(self.attributes['doctitle']) - if config.header_footer: - hdr = config.subs_section('header',{}) - writer.write(hdr,trace='header') - if 'title' in self.attributes: - del self.attributes['title'] - self.consume_attributes_and_comments() - if self.doctype in ('article','book'): - # Translate 'preamble' (untitled elements between header - # and first section title). - if Lex.next() is not Title: - stag,etag = config.section2tags('preamble') - writer.write(stag,trace='preamble open') - Section.translate_body() - writer.write(etag,trace='preamble close') - elif self.doctype == 'manpage' and 'name' in config.sections: - writer.write(config.subs_section('name',{}), trace='name') - else: - self.process_author_names() - if config.header_footer: - hdr = config.subs_section('header',{}) - writer.write(hdr,trace='header') - if Lex.next() is not Title: - Section.translate_body() - # Process remaining sections. - while not reader.eof(): - if Lex.next() is not Title: - raise EAsciiDoc,'section title expected' - Section.translate() - Section.setlevel(0) # Write remaining unwritten section close tags. - # Substitute document parameters and write document footer. - if config.header_footer: - ftr = config.subs_section('footer',{}) - writer.write(ftr,trace='footer') - def parse_author(self,s): - """ Return False if the author is malformed.""" - attrs = self.attributes # Alias for readability. - s = s.strip() - mo = re.match(r'^(?P<name1>[^<>\s]+)' - '(\s+(?P<name2>[^<>\s]+))?' - '(\s+(?P<name3>[^<>\s]+))?' - '(\s+<(?P<email>\S+)>)?$',s) - if not mo: - # Names that don't match the formal specification. - if s: - attrs['firstname'] = s - return - firstname = mo.group('name1') - if mo.group('name3'): - middlename = mo.group('name2') - lastname = mo.group('name3') - else: - middlename = None - lastname = mo.group('name2') - firstname = firstname.replace('_',' ') - if middlename: - middlename = middlename.replace('_',' ') - if lastname: - lastname = lastname.replace('_',' ') - email = mo.group('email') - if firstname: - attrs['firstname'] = firstname - if middlename: - attrs['middlename'] = middlename - if lastname: - attrs['lastname'] = lastname - if email: - attrs['email'] = email - return - def process_author_names(self): - """ Calculate any missing author related attributes.""" - attrs = self.attributes # Alias for readability. - firstname = attrs.get('firstname','') - middlename = attrs.get('middlename','') - lastname = attrs.get('lastname','') - author = attrs.get('author') - initials = attrs.get('authorinitials') - if author and not (firstname or middlename or lastname): - self.parse_author(author) - attrs['author'] = author.replace('_',' ') - self.process_author_names() - return - if not author: - author = '%s %s %s' % (firstname, middlename, lastname) - author = author.strip() - author = re.sub(r'\s+',' ', author) - if not initials: - initials = (char_decode(firstname)[:1] + - char_decode(middlename)[:1] + char_decode(lastname)[:1]) - initials = char_encode(initials).upper() - names = [firstname,middlename,lastname,author,initials] - for i,v in enumerate(names): - v = config.subs_specialchars(v) - v = subs_attrs(v) - names[i] = v - firstname,middlename,lastname,author,initials = names - if firstname: - attrs['firstname'] = firstname - if middlename: - attrs['middlename'] = middlename - if lastname: - attrs['lastname'] = lastname - if author: - attrs['author'] = author - if initials: - attrs['authorinitials'] = initials - if author: - attrs['authored'] = '' - - -class Header: - """Static methods and attributes only.""" - REV_LINE_RE = r'^(\D*(?P<revnumber>.*?),)?(?P<revdate>.*?)(:\s*(?P<revremark>.*))?$' - RCS_ID_RE = r'^\$Id: \S+ (?P<revnumber>\S+) (?P<revdate>\S+) \S+ (?P<author>\S+) (\S+ )?\$$' - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def parse(): - assert Lex.next() is Title and Title.level == 0 - attrs = document.attributes # Alias for readability. - # Postpone title subs until backend conf files have been loaded. - Title.translate(skipsubs=True) - attrs['doctitle'] = Title.attributes['title'] - document.consume_attributes_and_comments(noblanks=True) - s = reader.read_next() - mo = None - if s: - # Process first header line after the title that is not a comment - # or an attribute entry. - s = reader.read() - mo = re.match(Header.RCS_ID_RE,s) - if not mo: - document.parse_author(s) - document.consume_attributes_and_comments(noblanks=True) - if reader.read_next(): - # Process second header line after the title that is not a - # comment or an attribute entry. - s = reader.read() - s = subs_attrs(s) - if s: - mo = re.match(Header.RCS_ID_RE,s) - if not mo: - mo = re.match(Header.REV_LINE_RE,s) - document.consume_attributes_and_comments(noblanks=True) - s = attrs.get('revnumber') - if s: - mo = re.match(Header.RCS_ID_RE,s) - if mo: - revnumber = mo.group('revnumber') - if revnumber: - attrs['revnumber'] = revnumber.strip() - author = mo.groupdict().get('author') - if author and 'firstname' not in attrs: - document.parse_author(author) - revremark = mo.groupdict().get('revremark') - if revremark is not None: - revremark = [revremark] - # Revision remarks can continue on following lines. - while reader.read_next(): - if document.consume_attributes_and_comments(noblanks=True): - break - revremark.append(reader.read()) - revremark = Lex.subs(revremark,['normal']) - revremark = '\n'.join(revremark).strip() - attrs['revremark'] = revremark - revdate = mo.group('revdate') - if revdate: - attrs['revdate'] = revdate.strip() - elif revnumber or revremark: - # Set revision date to ensure valid DocBook revision. - attrs['revdate'] = attrs['docdate'] - document.process_author_names() - if document.doctype == 'manpage': - # manpage title formatted like mantitle(manvolnum). - mo = re.match(r'^(?P<mantitle>.*)\((?P<manvolnum>.*)\)$', - attrs['doctitle']) - if not mo: - message.error('malformed manpage title') - else: - mantitle = mo.group('mantitle').strip() - mantitle = subs_attrs(mantitle) - if mantitle is None: - message.error('undefined attribute in manpage title') - # mantitle is lowered only if in ALL CAPS - if mantitle == mantitle.upper(): - mantitle = mantitle.lower() - attrs['mantitle'] = mantitle; - attrs['manvolnum'] = mo.group('manvolnum').strip() - -class AttributeEntry: - """Static methods and attributes only.""" - pattern = None - subs = None - name = None - name2 = None - value = None - attributes = {} # Accumulates all the parsed attribute entries. - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def isnext(): - result = False # Assume not next. - if not AttributeEntry.pattern: - pat = document.attributes.get('attributeentry-pattern') - if not pat: - message.error("[attributes] missing 'attributeentry-pattern' entry") - AttributeEntry.pattern = pat - line = reader.read_next() - if line: - # Attribute entry formatted like :<name>[.<name2>]:[ <value>] - mo = re.match(AttributeEntry.pattern,line) - if mo: - AttributeEntry.name = mo.group('attrname') - AttributeEntry.name2 = mo.group('attrname2') - AttributeEntry.value = mo.group('attrvalue') or '' - AttributeEntry.value = AttributeEntry.value.strip() - result = True - return result - @staticmethod - def translate(): - assert Lex.next() is AttributeEntry - attr = AttributeEntry # Alias for brevity. - reader.read() # Discard attribute entry from reader. - while attr.value.endswith(' +'): - if not reader.read_next(): break - attr.value = attr.value[:-1] + reader.read().strip() - if attr.name2 is not None: - # Configuration file attribute. - if attr.name2 != '': - # Section entry attribute. - section = {} - # Some sections can have name! syntax. - if attr.name in ('attributes','miscellaneous') and attr.name2[-1] == '!': - section[attr.name] = [attr.name2] - else: - section[attr.name] = ['%s=%s' % (attr.name2,attr.value)] - config.load_sections(section) - config.load_miscellaneous(config.conf_attrs) - else: - # Markup template section attribute. - config.sections[attr.name] = [attr.value] - else: - # Normal attribute. - if attr.name[-1] == '!': - # Names like name! undefine the attribute. - attr.name = attr.name[:-1] - attr.value = None - # Strip white space and illegal name chars. - attr.name = re.sub(r'(?u)[^\w\-_]', '', attr.name).lower() - # Don't override most command-line attributes. - if attr.name in config.cmd_attrs \ - and attr.name not in ('trace','numbered'): - return - # Update document attributes with attribute value. - if attr.value is not None: - mo = re.match(r'^pass:(?P<attrs>.*)\[(?P<value>.*)\]$', attr.value) - if mo: - # Inline passthrough syntax. - attr.subs = mo.group('attrs') - attr.value = mo.group('value') # Passthrough. - else: - # Default substitution. - # DEPRECATED: attributeentry-subs - attr.subs = document.attributes.get('attributeentry-subs', - 'specialcharacters,attributes') - attr.subs = parse_options(attr.subs, SUBS_OPTIONS, - 'illegal substitution option') - attr.value = Lex.subs((attr.value,), attr.subs) - attr.value = writer.newline.join(attr.value) - document.attributes[attr.name] = attr.value - elif attr.name in document.attributes: - del document.attributes[attr.name] - attr.attributes[attr.name] = attr.value - -class AttributeList: - """Static methods and attributes only.""" - pattern = None - match = None - attrs = {} - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def initialize(): - if not 'attributelist-pattern' in document.attributes: - message.error("[attributes] missing 'attributelist-pattern' entry") - AttributeList.pattern = document.attributes['attributelist-pattern'] - @staticmethod - def isnext(): - result = False # Assume not next. - line = reader.read_next() - if line: - mo = re.match(AttributeList.pattern, line) - if mo: - AttributeList.match = mo - result = True - return result - @staticmethod - def translate(): - assert Lex.next() is AttributeList - reader.read() # Discard attribute list from reader. - attrs = {} - d = AttributeList.match.groupdict() - for k,v in d.items(): - if v is not None: - if k == 'attrlist': - v = subs_attrs(v) - if v: - parse_attributes(v, attrs) - else: - AttributeList.attrs[k] = v - AttributeList.subs(attrs) - AttributeList.attrs.update(attrs) - @staticmethod - def subs(attrs): - '''Substitute single quoted attribute values normally.''' - reo = re.compile(r"^'.*'$") - for k,v in attrs.items(): - if reo.match(str(v)): - attrs[k] = Lex.subs_1(v[1:-1], config.subsnormal) - @staticmethod - def style(): - return AttributeList.attrs.get('style') or AttributeList.attrs.get('1') - @staticmethod - def consume(d={}): - """Add attribute list to the dictionary 'd' and reset the list.""" - if AttributeList.attrs: - d.update(AttributeList.attrs) - AttributeList.attrs = {} - # Generate option attributes. - if 'options' in d: - options = parse_options(d['options'], (), 'illegal option name') - for option in options: - d[option+'-option'] = '' - -class BlockTitle: - """Static methods and attributes only.""" - title = None - pattern = None - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def isnext(): - result = False # Assume not next. - line = reader.read_next() - if line: - mo = re.match(BlockTitle.pattern,line) - if mo: - BlockTitle.title = mo.group('title') - result = True - return result - @staticmethod - def translate(): - assert Lex.next() is BlockTitle - reader.read() # Discard title from reader. - # Perform title substitutions. - if not Title.subs: - Title.subs = config.subsnormal - s = Lex.subs((BlockTitle.title,), Title.subs) - s = writer.newline.join(s) - if not s: - message.warning('blank block title') - BlockTitle.title = s - @staticmethod - def consume(d={}): - """If there is a title add it to dictionary 'd' then reset title.""" - if BlockTitle.title: - d['title'] = BlockTitle.title - BlockTitle.title = None - -class Title: - """Processes Header and Section titles. Static methods and attributes - only.""" - # Class variables - underlines = ('==','--','~~','^^','++') # Levels 0,1,2,3,4. - subs = () - pattern = None - level = 0 - attributes = {} - sectname = None - section_numbers = [0]*len(underlines) - dump_dict = {} - linecount = None # Number of lines in title (1 or 2). - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def translate(skipsubs=False): - """Parse the Title.attributes and Title.level from the reader. The - real work has already been done by parse().""" - assert Lex.next() in (Title,FloatingTitle) - # Discard title from reader. - for i in range(Title.linecount): - reader.read() - Title.setsectname() - if not skipsubs: - Title.attributes['title'] = Title.dosubs(Title.attributes['title']) - @staticmethod - def dosubs(title): - """ - Perform title substitutions. - """ - if not Title.subs: - Title.subs = config.subsnormal - title = Lex.subs((title,), Title.subs) - title = writer.newline.join(title) - if not title: - message.warning('blank section title') - return title - @staticmethod - def isnext(): - lines = reader.read_ahead(2) - return Title.parse(lines) - @staticmethod - def parse(lines): - """Parse title at start of lines tuple.""" - if len(lines) == 0: return False - if len(lines[0]) == 0: return False # Title can't be blank. - # Check for single-line titles. - result = False - for level in range(len(Title.underlines)): - k = 'sect%s' % level - if k in Title.dump_dict: - mo = re.match(Title.dump_dict[k], lines[0]) - if mo: - Title.attributes = mo.groupdict() - Title.level = level - Title.linecount = 1 - result = True - break - if not result: - # Check for double-line titles. - if not Title.pattern: return False # Single-line titles only. - if len(lines) < 2: return False - title,ul = lines[:2] - title_len = column_width(title) - ul_len = char_len(ul) - if ul_len < 2: return False - # Fast elimination check. - if ul[:2] not in Title.underlines: return False - # Length of underline must be within +-3 of title. - if not ((ul_len-3 < title_len < ul_len+3) - # Next test for backward compatibility. - or (ul_len-3 < char_len(title) < ul_len+3)): - return False - # Check for valid repetition of underline character pairs. - s = ul[:2]*((ul_len+1)/2) - if ul != s[:ul_len]: return False - # Don't be fooled by back-to-back delimited blocks, require at - # least one alphanumeric character in title. - if not re.search(r'(?u)\w',title): return False - mo = re.match(Title.pattern, title) - if mo: - Title.attributes = mo.groupdict() - Title.level = list(Title.underlines).index(ul[:2]) - Title.linecount = 2 - result = True - # Check for expected pattern match groups. - if result: - if not 'title' in Title.attributes: - message.warning('[titles] entry has no <title> group') - Title.attributes['title'] = lines[0] - for k,v in Title.attributes.items(): - if v is None: del Title.attributes[k] - try: - Title.level += int(document.attributes.get('leveloffset','0')) - except: - pass - Title.attributes['level'] = str(Title.level) - return result - @staticmethod - def load(entries): - """Load and validate [titles] section entries dictionary.""" - if 'underlines' in entries: - errmsg = 'malformed [titles] underlines entry' - try: - underlines = parse_list(entries['underlines']) - except Exception: - raise EAsciiDoc,errmsg - if len(underlines) != len(Title.underlines): - raise EAsciiDoc,errmsg - for s in underlines: - if len(s) !=2: - raise EAsciiDoc,errmsg - Title.underlines = tuple(underlines) - Title.dump_dict['underlines'] = entries['underlines'] - if 'subs' in entries: - Title.subs = parse_options(entries['subs'], SUBS_OPTIONS, - 'illegal [titles] subs entry') - Title.dump_dict['subs'] = entries['subs'] - if 'sectiontitle' in entries: - pat = entries['sectiontitle'] - if not pat or not is_re(pat): - raise EAsciiDoc,'malformed [titles] sectiontitle entry' - Title.pattern = pat - Title.dump_dict['sectiontitle'] = pat - if 'blocktitle' in entries: - pat = entries['blocktitle'] - if not pat or not is_re(pat): - raise EAsciiDoc,'malformed [titles] blocktitle entry' - BlockTitle.pattern = pat - Title.dump_dict['blocktitle'] = pat - # Load single-line title patterns. - for k in ('sect0','sect1','sect2','sect3','sect4'): - if k in entries: - pat = entries[k] - if not pat or not is_re(pat): - raise EAsciiDoc,'malformed [titles] %s entry' % k - Title.dump_dict[k] = pat - # TODO: Check we have either a Title.pattern or at least one - # single-line title pattern -- can this be done here or do we need - # check routine like the other block checkers? - @staticmethod - def dump(): - dump_section('titles',Title.dump_dict) - @staticmethod - def setsectname(): - """ - Set Title section name: - If the first positional or 'template' attribute is set use it, - next search for section title in [specialsections], - if not found use default 'sect<level>' name. - """ - sectname = AttributeList.attrs.get('1') - if sectname and sectname != 'float': - Title.sectname = sectname - elif 'template' in AttributeList.attrs: - Title.sectname = AttributeList.attrs['template'] - else: - for pat,sect in config.specialsections.items(): - mo = re.match(pat,Title.attributes['title']) - if mo: - title = mo.groupdict().get('title') - if title is not None: - Title.attributes['title'] = title.strip() - else: - Title.attributes['title'] = mo.group().strip() - Title.sectname = sect - break - else: - Title.sectname = 'sect%d' % Title.level - @staticmethod - def getnumber(level): - """Return next section number at section 'level' formatted like - 1.2.3.4.""" - number = '' - for l in range(len(Title.section_numbers)): - n = Title.section_numbers[l] - if l == 0: - continue - elif l < level: - number = '%s%d.' % (number, n) - elif l == level: - number = '%s%d.' % (number, n + 1) - Title.section_numbers[l] = n + 1 - elif l > level: - # Reset unprocessed section levels. - Title.section_numbers[l] = 0 - return number - - -class FloatingTitle(Title): - '''Floated titles are translated differently.''' - @staticmethod - def isnext(): - return Title.isnext() and AttributeList.style() == 'float' - @staticmethod - def translate(): - assert Lex.next() is FloatingTitle - Title.translate() - Section.set_id() - AttributeList.consume(Title.attributes) - template = 'floatingtitle' - if template in config.sections: - stag,etag = config.section2tags(template,Title.attributes) - writer.write(stag,trace='floating title') - else: - message.warning('missing template section: [%s]' % template) - - -class Section: - """Static methods and attributes only.""" - endtags = [] # Stack of currently open section (level,endtag) tuples. - ids = [] # List of already used ids. - def __init__(self): - raise AssertionError,'no class instances allowed' - @staticmethod - def savetag(level,etag): - """Save section end.""" - Section.endtags.append((level,etag)) - @staticmethod - def setlevel(level): - """Set document level and write open section close tags up to level.""" - while Section.endtags and Section.endtags[-1][0] >= level: - writer.write(Section.endtags.pop()[1],trace='section close') - document.level = level - @staticmethod - def gen_id(title): - """ - The normalized value of the id attribute is an NCName according to - the 'Namespaces in XML' Recommendation: - NCName ::= NCNameStartChar NCNameChar* - NCNameChar ::= NameChar - ':' - NCNameStartChar ::= Letter | '_' - NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' - """ - # Replace non-alpha numeric characters in title with underscores and - # convert to lower case. - base_id = re.sub(r'(?u)\W+', '_', char_decode(title)).strip('_').lower() - if 'ascii-ids' in document.attributes: - # Replace non-ASCII characters with ASCII equivalents. - import unicodedata - base_id = unicodedata.normalize('NFKD', base_id).encode('ascii','ignore') - base_id = char_encode(base_id) - # Prefix the ID name with idprefix attribute or underscore if not - # defined. Prefix ensures the ID does not clash with existing IDs. - idprefix = document.attributes.get('idprefix','_') - base_id = idprefix + base_id - i = 1 - while True: - if i == 1: - id = base_id - else: - id = '%s_%d' % (base_id, i) - if id not in Section.ids: - Section.ids.append(id) - return id - else: - id = base_id - i += 1 - @staticmethod - def set_id(): - if not document.attributes.get('sectids') is None \ - and 'id' not in AttributeList.attrs: - # Generate ids for sections. - AttributeList.attrs['id'] = Section.gen_id(Title.attributes['title']) - @staticmethod - def translate(): - assert Lex.next() is Title - prev_sectname = Title.sectname - Title.translate() - if Title.level == 0 and document.doctype != 'book': - message.error('only book doctypes can contain level 0 sections') - if Title.level > document.level \ - and 'basebackend-docbook' in document.attributes \ - and prev_sectname in ('colophon','abstract', \ - 'dedication','glossary','bibliography'): - message.error('%s section cannot contain sub-sections' % prev_sectname) - if Title.level > document.level+1: - # Sub-sections of multi-part book level zero Preface and Appendices - # are meant to be out of sequence. - if document.doctype == 'book' \ - and document.level == 0 \ - and Title.level == 2 \ - and prev_sectname in ('preface','appendix'): - pass - else: - message.warning('section title out of sequence: ' - 'expected level %d, got level %d' - % (document.level+1, Title.level)) - Section.set_id() - Section.setlevel(Title.level) - if 'numbered' in document.attributes: - Title.attributes['sectnum'] = Title.getnumber(document.level) - else: - Title.attributes['sectnum'] = '' - AttributeList.consume(Title.attributes) - stag,etag = config.section2tags(Title.sectname,Title.attributes) - Section.savetag(Title.level,etag) - writer.write(stag,trace='section open: level %d: %s' % - (Title.level, Title.attributes['title'])) - Section.translate_body() - @staticmethod - def translate_body(terminator=Title): - isempty = True - next = Lex.next() - while next and next is not terminator: - if isinstance(terminator,DelimitedBlock) and next is Title: - message.error('section title not permitted in delimited block') - next.translate() - next = Lex.next() - isempty = False - # The section is not empty if contains a subsection. - if next and isempty and Title.level > document.level: - isempty = False - # Report empty sections if invalid markup will result. - if isempty: - if document.backend == 'docbook' and Title.sectname != 'index': - message.error('empty section is not valid') - -class AbstractBlock: - - blocknames = [] # Global stack of names for push_blockname() and pop_blockname(). - - def __init__(self): - # Configuration parameter names common to all blocks. - self.CONF_ENTRIES = ('delimiter','options','subs','presubs','postsubs', - 'posattrs','style','.*-style','template','filter') - self.start = None # File reader cursor at start delimiter. - self.defname=None # Configuration file block definition section name. - # Configuration parameters. - self.delimiter=None # Regular expression matching block delimiter. - self.delimiter_reo=None # Compiled delimiter. - self.template=None # template section entry. - self.options=() # options entry list. - self.presubs=None # presubs/subs entry list. - self.postsubs=() # postsubs entry list. - self.filter=None # filter entry. - self.posattrs=() # posattrs entry list. - self.style=None # Default style. - self.styles=OrderedDict() # Each entry is a styles dictionary. - # Before a block is processed it's attributes (from it's - # attributes list) are merged with the block configuration parameters - # (by self.merge_attributes()) resulting in the template substitution - # dictionary (self.attributes) and the block's processing parameters - # (self.parameters). - self.attributes={} - # The names of block parameters. - self.PARAM_NAMES=('template','options','presubs','postsubs','filter') - self.parameters=None - # Leading delimiter match object. - self.mo=None - def short_name(self): - """ Return the text following the first dash in the section name.""" - i = self.defname.find('-') - if i == -1: - return self.defname - else: - return self.defname[i+1:] - def error(self, msg, cursor=None, halt=False): - message.error('[%s] %s' % (self.defname,msg), cursor, halt) - def is_conf_entry(self,param): - """Return True if param matches an allowed configuration file entry - name.""" - for s in self.CONF_ENTRIES: - if re.match('^'+s+'$',param): - return True - return False - def load(self,defname,entries): - """Update block definition from section 'entries' dictionary.""" - self.defname = defname - self.update_parameters(entries, self, all=True) - def update_parameters(self, src, dst=None, all=False): - """ - Parse processing parameters from src dictionary to dst object. - dst defaults to self.parameters. - If all is True then copy src entries that aren't parameter names. - """ - dst = dst or self.parameters - msg = '[%s] malformed entry %%s: %%s' % self.defname - def copy(obj,k,v): - if isinstance(obj,dict): - obj[k] = v - else: - setattr(obj,k,v) - for k,v in src.items(): - if not re.match(r'\d+',k) and not is_name(k): - raise EAsciiDoc, msg % (k,v) - if k == 'template': - if not is_name(v): - raise EAsciiDoc, msg % (k,v) - copy(dst,k,v) - elif k == 'filter': - copy(dst,k,v) - elif k == 'options': - if isinstance(v,str): - v = parse_options(v, (), msg % (k,v)) - # Merge with existing options. - v = tuple(set(dst.options).union(set(v))) - copy(dst,k,v) - elif k in ('subs','presubs','postsubs'): - # Subs is an alias for presubs. - if k == 'subs': k = 'presubs' - if isinstance(v,str): - v = parse_options(v, SUBS_OPTIONS, msg % (k,v)) - copy(dst,k,v) - elif k == 'delimiter': - if v and is_re(v): - copy(dst,k,v) - else: - raise EAsciiDoc, msg % (k,v) - elif k == 'style': - if is_name(v): - copy(dst,k,v) - else: - raise EAsciiDoc, msg % (k,v) - elif k == 'posattrs': - v = parse_options(v, (), msg % (k,v)) - copy(dst,k,v) - else: - mo = re.match(r'^(?P<style>.*)-style$',k) - if mo: - if not v: - raise EAsciiDoc, msg % (k,v) - style = mo.group('style') - if not is_name(style): - raise EAsciiDoc, msg % (k,v) - d = {} - if not parse_named_attributes(v,d): - raise EAsciiDoc, msg % (k,v) - if 'subs' in d: - # Subs is an alias for presubs. - d['presubs'] = d['subs'] - del d['subs'] - self.styles[style] = d - elif all or k in self.PARAM_NAMES: - copy(dst,k,v) # Derived class specific entries. - def get_param(self,name,params=None): - """ - Return named processing parameter from params dictionary. - If the parameter is not in params look in self.parameters. - """ - if params and name in params: - return params[name] - elif name in self.parameters: - return self.parameters[name] - else: - return None - def get_subs(self,params=None): - """ - Return (presubs,postsubs) tuple. - """ - presubs = self.get_param('presubs',params) - postsubs = self.get_param('postsubs',params) - return (presubs,postsubs) - def dump(self): - """Write block definition to stdout.""" - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('['+self.defname+']') - if self.is_conf_entry('delimiter'): - write('delimiter='+self.delimiter) - if self.template: - write('template='+self.template) - if self.options: - write('options='+','.join(self.options)) - if self.presubs: - if self.postsubs: - write('presubs='+','.join(self.presubs)) - else: - write('subs='+','.join(self.presubs)) - if self.postsubs: - write('postsubs='+','.join(self.postsubs)) - if self.filter: - write('filter='+self.filter) - if self.posattrs: - write('posattrs='+','.join(self.posattrs)) - if self.style: - write('style='+self.style) - if self.styles: - for style,d in self.styles.items(): - s = '' - for k,v in d.items(): s += '%s=%r,' % (k,v) - write('%s-style=%s' % (style,s[:-1])) - def validate(self): - """Validate block after the complete configuration has been loaded.""" - if self.is_conf_entry('delimiter') and not self.delimiter: - raise EAsciiDoc,'[%s] missing delimiter' % self.defname - if self.style: - if not is_name(self.style): - raise EAsciiDoc, 'illegal style name: %s' % self.style - if not self.style in self.styles: - if not isinstance(self,List): # Lists don't have templates. - message.warning('[%s] \'%s\' style not in %s' % ( - self.defname,self.style,self.styles.keys())) - # Check all styles for missing templates. - all_styles_have_template = True - for k,v in self.styles.items(): - t = v.get('template') - if t and not t in config.sections: - # Defer check if template name contains attributes. - if not re.search(r'{.+}',t): - message.warning('missing template section: [%s]' % t) - if not t: - all_styles_have_template = False - # Check we have a valid template entry or alternatively that all the - # styles have templates. - if self.is_conf_entry('template') and not 'skip' in self.options: - if self.template: - if not self.template in config.sections: - # Defer check if template name contains attributes. - if not re.search(r'{.+}',self.template): - message.warning('missing template section: [%s]' - % self.template) - elif not all_styles_have_template: - if not isinstance(self,List): # Lists don't have templates. - message.warning('missing styles templates: [%s]' % self.defname) - def isnext(self): - """Check if this block is next in document reader.""" - result = False - reader.skip_blank_lines() - if reader.read_next(): - if not self.delimiter_reo: - # Cache compiled delimiter optimization. - self.delimiter_reo = re.compile(self.delimiter) - mo = self.delimiter_reo.match(reader.read_next()) - if mo: - self.mo = mo - result = True - return result - def translate(self): - """Translate block from document reader.""" - if not self.presubs: - self.presubs = config.subsnormal - if reader.cursor: - self.start = reader.cursor[:] - def push_blockname(self, blockname=None): - ''' - On block entry set the 'blockname' attribute. - Only applies to delimited blocks, lists and tables. - ''' - if blockname is None: - blockname = self.attributes.get('style', self.short_name()).lower() - trace('push blockname', blockname) - self.blocknames.append(blockname) - document.attributes['blockname'] = blockname - def pop_blockname(self): - ''' - On block exits restore previous (parent) 'blockname' attribute or - undefine it if we're no longer inside a block. - ''' - assert len(self.blocknames) > 0 - blockname = self.blocknames.pop() - trace('pop blockname', blockname) - if len(self.blocknames) == 0: - document.attributes['blockname'] = None - else: - document.attributes['blockname'] = self.blocknames[-1] - def merge_attributes(self,attrs,params=[]): - """ - Use the current block's attribute list (attrs dictionary) to build a - dictionary of block processing parameters (self.parameters) and tag - substitution attributes (self.attributes). - - 1. Copy the default parameters (self.*) to self.parameters. - self.parameters are used internally to render the current block. - Optional params array of additional parameters. - - 2. Copy attrs to self.attributes. self.attributes are used for template - and tag substitution in the current block. - - 3. If a style attribute was specified update self.parameters with the - corresponding style parameters; if there are any style parameters - remaining add them to self.attributes (existing attribute list entries - take precedence). - - 4. Set named positional attributes in self.attributes if self.posattrs - was specified. - - 5. Finally self.parameters is updated with any corresponding parameters - specified in attrs. - - """ - - def check_array_parameter(param): - # Check the parameter is a sequence type. - if not is_array(self.parameters[param]): - message.error('malformed %s parameter: %s' % - (param, self.parameters[param])) - # Revert to default value. - self.parameters[param] = getattr(self,param) - - params = list(self.PARAM_NAMES) + params - self.attributes = {} - if self.style: - # If a default style is defined make it available in the template. - self.attributes['style'] = self.style - self.attributes.update(attrs) - # Calculate dynamic block parameters. - # Start with configuration file defaults. - self.parameters = AttrDict() - for name in params: - self.parameters[name] = getattr(self,name) - # Load the selected style attributes. - posattrs = self.posattrs - if posattrs and posattrs[0] == 'style': - # Positional attribute style has highest precedence. - style = self.attributes.get('1') - else: - style = None - if not style: - # Use explicit style attribute, fall back to default style. - style = self.attributes.get('style',self.style) - if style: - if not is_name(style): - message.error('illegal style name: %s' % style) - style = self.style - # Lists have implicit styles and do their own style checks. - elif style not in self.styles and not isinstance(self,List): - message.warning('missing style: [%s]: %s' % (self.defname,style)) - style = self.style - if style in self.styles: - self.attributes['style'] = style - for k,v in self.styles[style].items(): - if k == 'posattrs': - posattrs = v - elif k in params: - self.parameters[k] = v - elif not k in self.attributes: - # Style attributes don't take precedence over explicit. - self.attributes[k] = v - # Set named positional attributes. - for i,v in enumerate(posattrs): - if str(i+1) in self.attributes: - self.attributes[v] = self.attributes[str(i+1)] - # Override config and style attributes with attribute list attributes. - self.update_parameters(attrs) - check_array_parameter('options') - check_array_parameter('presubs') - check_array_parameter('postsubs') - -class AbstractBlocks: - """List of block definitions.""" - PREFIX = '' # Conf file section name prefix set in derived classes. - BLOCK_TYPE = None # Block type set in derived classes. - def __init__(self): - self.current=None - self.blocks = [] # List of Block objects. - self.default = None # Default Block. - self.delimiters = None # Combined delimiters regular expression. - def load(self,sections): - """Load block definition from 'sections' dictionary.""" - for k in sections.keys(): - if re.match(r'^'+ self.PREFIX + r'.+$',k): - d = {} - parse_entries(sections.get(k,()),d) - for b in self.blocks: - if b.defname == k: - break - else: - b = self.BLOCK_TYPE() - self.blocks.append(b) - try: - b.load(k,d) - except EAsciiDoc,e: - raise EAsciiDoc,'[%s] %s' % (k,str(e)) - def dump(self): - for b in self.blocks: - b.dump() - def isnext(self): - for b in self.blocks: - if b.isnext(): - self.current = b - return True; - return False - def validate(self): - """Validate the block definitions.""" - # Validate delimiters and build combined lists delimiter pattern. - delimiters = [] - for b in self.blocks: - assert b.__class__ is self.BLOCK_TYPE - b.validate() - if b.delimiter: - delimiters.append(b.delimiter) - self.delimiters = re_join(delimiters) - -class Paragraph(AbstractBlock): - def __init__(self): - AbstractBlock.__init__(self) - self.text=None # Text in first line of paragraph. - def load(self,name,entries): - AbstractBlock.load(self,name,entries) - def dump(self): - AbstractBlock.dump(self) - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('') - def isnext(self): - result = AbstractBlock.isnext(self) - if result: - self.text = self.mo.groupdict().get('text') - return result - def translate(self): - AbstractBlock.translate(self) - attrs = self.mo.groupdict().copy() - if 'text' in attrs: del attrs['text'] - BlockTitle.consume(attrs) - AttributeList.consume(attrs) - self.merge_attributes(attrs) - reader.read() # Discard (already parsed item first line). - body = reader.read_until(paragraphs.terminators) - if 'skip' in self.parameters.options: - return - body = [self.text] + list(body) - presubs = self.parameters.presubs - postsubs = self.parameters.postsubs - if document.attributes.get('plaintext') is None: - body = Lex.set_margin(body) # Move body to left margin. - body = Lex.subs(body,presubs) - template = self.parameters.template - template = subs_attrs(template,attrs) - stag = config.section2tags(template, self.attributes,skipend=True)[0] - if self.parameters.filter: - body = filter_lines(self.parameters.filter,body,self.attributes) - body = Lex.subs(body,postsubs) - etag = config.section2tags(template, self.attributes,skipstart=True)[1] - # Write start tag, content, end tag. - writer.write(dovetail_tags(stag,body,etag),trace='paragraph') - -class Paragraphs(AbstractBlocks): - """List of paragraph definitions.""" - BLOCK_TYPE = Paragraph - PREFIX = 'paradef-' - def __init__(self): - AbstractBlocks.__init__(self) - self.terminators=None # List of compiled re's. - def initialize(self): - self.terminators = [ - re.compile(r'^\+$|^$'), - re.compile(AttributeList.pattern), - re.compile(blocks.delimiters), - re.compile(tables.delimiters), - re.compile(tables_OLD.delimiters), - ] - def load(self,sections): - AbstractBlocks.load(self,sections) - def validate(self): - AbstractBlocks.validate(self) - # Check we have a default paragraph definition, put it last in list. - for b in self.blocks: - if b.defname == 'paradef-default': - self.blocks.append(b) - self.default = b - self.blocks.remove(b) - break - else: - raise EAsciiDoc,'missing section: [paradef-default]' - -class List(AbstractBlock): - NUMBER_STYLES= ('arabic','loweralpha','upperalpha','lowerroman', - 'upperroman') - def __init__(self): - AbstractBlock.__init__(self) - self.CONF_ENTRIES += ('type','tags') - self.PARAM_NAMES += ('tags',) - # listdef conf file parameters. - self.type=None - self.tags=None # Name of listtags-<tags> conf section. - # Calculated parameters. - self.tag=None # Current tags AttrDict. - self.label=None # List item label (labeled lists). - self.text=None # Text in first line of list item. - self.index=None # Matched delimiter 'index' group (numbered lists). - self.type=None # List type ('numbered','bulleted','labeled'). - self.ordinal=None # Current list item ordinal number (1..) - self.number_style=None # Current numbered list style ('arabic'..) - def load(self,name,entries): - AbstractBlock.load(self,name,entries) - def dump(self): - AbstractBlock.dump(self) - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('type='+self.type) - write('tags='+self.tags) - write('') - def validate(self): - AbstractBlock.validate(self) - tags = [self.tags] - tags += [s['tags'] for s in self.styles.values() if 'tags' in s] - for t in tags: - if t not in lists.tags: - self.error('missing section: [listtags-%s]' % t,halt=True) - def isnext(self): - result = AbstractBlock.isnext(self) - if result: - self.label = self.mo.groupdict().get('label') - self.text = self.mo.groupdict().get('text') - self.index = self.mo.groupdict().get('index') - return result - def translate_entry(self): - assert self.type == 'labeled' - entrytag = subs_tag(self.tag.entry, self.attributes) - labeltag = subs_tag(self.tag.label, self.attributes) - writer.write(entrytag[0],trace='list entry open') - writer.write(labeltag[0],trace='list label open') - # Write labels. - while Lex.next() is self: - reader.read() # Discard (already parsed item first line). - writer.write_tag(self.tag.term, [self.label], - self.presubs, self.attributes,trace='list term') - if self.text: break - writer.write(labeltag[1],trace='list label close') - # Write item text. - self.translate_item() - writer.write(entrytag[1],trace='list entry close') - def translate_item(self): - if self.type == 'callout': - self.attributes['coids'] = calloutmap.calloutids(self.ordinal) - itemtag = subs_tag(self.tag.item, self.attributes) - writer.write(itemtag[0],trace='list item open') - # Write ItemText. - text = reader.read_until(lists.terminators) - if self.text: - text = [self.text] + list(text) - if text: - writer.write_tag(self.tag.text, text, self.presubs, self.attributes,trace='list text') - # Process explicit and implicit list item continuations. - while True: - continuation = reader.read_next() == '+' - if continuation: reader.read() # Discard continuation line. - while Lex.next() in (BlockTitle,AttributeList): - # Consume continued element title and attributes. - Lex.next().translate() - if not continuation and BlockTitle.title: - # Titled elements terminate the list. - break - next = Lex.next() - if next in lists.open: - break - elif isinstance(next,List): - next.translate() - elif isinstance(next,Paragraph) and 'listelement' in next.options: - next.translate() - elif continuation: - # This is where continued elements are processed. - if next is Title: - message.error('section title not allowed in list item',halt=True) - next.translate() - else: - break - writer.write(itemtag[1],trace='list item close') - - @staticmethod - def calc_style(index): - """Return the numbered list style ('arabic'...) of the list item index. - Return None if unrecognized style.""" - if re.match(r'^\d+[\.>]$', index): - style = 'arabic' - elif re.match(r'^[ivx]+\)$', index): - style = 'lowerroman' - elif re.match(r'^[IVX]+\)$', index): - style = 'upperroman' - elif re.match(r'^[a-z]\.$', index): - style = 'loweralpha' - elif re.match(r'^[A-Z]\.$', index): - style = 'upperalpha' - else: - assert False - return style - - @staticmethod - def calc_index(index,style): - """Return the ordinal number of (1...) of the list item index - for the given list style.""" - def roman_to_int(roman): - roman = roman.lower() - digits = {'i':1,'v':5,'x':10} - result = 0 - for i in range(len(roman)): - digit = digits[roman[i]] - # If next digit is larger this digit is negative. - if i+1 < len(roman) and digits[roman[i+1]] > digit: - result -= digit - else: - result += digit - return result - index = index[:-1] - if style == 'arabic': - ordinal = int(index) - elif style == 'lowerroman': - ordinal = roman_to_int(index) - elif style == 'upperroman': - ordinal = roman_to_int(index) - elif style == 'loweralpha': - ordinal = ord(index) - ord('a') + 1 - elif style == 'upperalpha': - ordinal = ord(index) - ord('A') + 1 - else: - assert False - return ordinal - - def check_index(self): - """Check calculated self.ordinal (1,2,...) against the item number - in the document (self.index) and check the number style is the same as - the first item (self.number_style).""" - assert self.type in ('numbered','callout') - if self.index: - style = self.calc_style(self.index) - if style != self.number_style: - message.warning('list item style: expected %s got %s' % - (self.number_style,style), offset=1) - ordinal = self.calc_index(self.index,style) - if ordinal != self.ordinal: - message.warning('list item index: expected %s got %s' % - (self.ordinal,ordinal), offset=1) - - def check_tags(self): - """ Check that all necessary tags are present. """ - tags = set(Lists.TAGS) - if self.type != 'labeled': - tags = tags.difference(['entry','label','term']) - missing = tags.difference(self.tag.keys()) - if missing: - self.error('missing tag(s): %s' % ','.join(missing), halt=True) - def translate(self): - AbstractBlock.translate(self) - if self.short_name() in ('bibliography','glossary','qanda'): - message.deprecated('old %s list syntax' % self.short_name()) - lists.open.append(self) - attrs = self.mo.groupdict().copy() - for k in ('label','text','index'): - if k in attrs: del attrs[k] - if self.index: - # Set the numbering style from first list item. - attrs['style'] = self.calc_style(self.index) - BlockTitle.consume(attrs) - AttributeList.consume(attrs) - self.merge_attributes(attrs,['tags']) - self.push_blockname() - if self.type in ('numbered','callout'): - self.number_style = self.attributes.get('style') - if self.number_style not in self.NUMBER_STYLES: - message.error('illegal numbered list style: %s' % self.number_style) - # Fall back to default style. - self.attributes['style'] = self.number_style = self.style - self.tag = lists.tags[self.parameters.tags] - self.check_tags() - if 'width' in self.attributes: - # Set horizontal list 'labelwidth' and 'itemwidth' attributes. - v = str(self.attributes['width']) - mo = re.match(r'^(\d{1,2})%?$',v) - if mo: - labelwidth = int(mo.group(1)) - self.attributes['labelwidth'] = str(labelwidth) - self.attributes['itemwidth'] = str(100-labelwidth) - else: - self.error('illegal attribute value: width="%s"' % v) - stag,etag = subs_tag(self.tag.list, self.attributes) - if stag: - writer.write(stag,trace='list open') - self.ordinal = 0 - # Process list till list syntax changes or there is a new title. - while Lex.next() is self and not BlockTitle.title: - self.ordinal += 1 - document.attributes['listindex'] = str(self.ordinal) - if self.type in ('numbered','callout'): - self.check_index() - if self.type in ('bulleted','numbered','callout'): - reader.read() # Discard (already parsed item first line). - self.translate_item() - elif self.type == 'labeled': - self.translate_entry() - else: - raise AssertionError,'illegal [%s] list type' % self.defname - if etag: - writer.write(etag,trace='list close') - if self.type == 'callout': - calloutmap.validate(self.ordinal) - calloutmap.listclose() - lists.open.pop() - if len(lists.open): - document.attributes['listindex'] = str(lists.open[-1].ordinal) - self.pop_blockname() - -class Lists(AbstractBlocks): - """List of List objects.""" - BLOCK_TYPE = List - PREFIX = 'listdef-' - TYPES = ('bulleted','numbered','labeled','callout') - TAGS = ('list', 'entry','item','text', 'label','term') - def __init__(self): - AbstractBlocks.__init__(self) - self.open = [] # A stack of the current and parent lists. - self.tags={} # List tags dictionary. Each entry is a tags AttrDict. - self.terminators=None # List of compiled re's. - def initialize(self): - self.terminators = [ - re.compile(r'^\+$|^$'), - re.compile(AttributeList.pattern), - re.compile(lists.delimiters), - re.compile(blocks.delimiters), - re.compile(tables.delimiters), - re.compile(tables_OLD.delimiters), - ] - def load(self,sections): - AbstractBlocks.load(self,sections) - self.load_tags(sections) - def load_tags(self,sections): - """ - Load listtags-* conf file sections to self.tags. - """ - for section in sections.keys(): - mo = re.match(r'^listtags-(?P<name>\w+)$',section) - if mo: - name = mo.group('name') - if name in self.tags: - d = self.tags[name] - else: - d = AttrDict() - parse_entries(sections.get(section,()),d) - for k in d.keys(): - if k not in self.TAGS: - message.warning('[%s] contains illegal list tag: %s' % - (section,k)) - self.tags[name] = d - def validate(self): - AbstractBlocks.validate(self) - for b in self.blocks: - # Check list has valid type. - if not b.type in Lists.TYPES: - raise EAsciiDoc,'[%s] illegal type' % b.defname - b.validate() - def dump(self): - AbstractBlocks.dump(self) - for k,v in self.tags.items(): - dump_section('listtags-'+k, v) - - -class DelimitedBlock(AbstractBlock): - def __init__(self): - AbstractBlock.__init__(self) - def load(self,name,entries): - AbstractBlock.load(self,name,entries) - def dump(self): - AbstractBlock.dump(self) - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('') - def isnext(self): - return AbstractBlock.isnext(self) - def translate(self): - AbstractBlock.translate(self) - reader.read() # Discard delimiter. - self.merge_attributes(AttributeList.attrs) - if not 'skip' in self.parameters.options: - BlockTitle.consume(self.attributes) - AttributeList.consume() - self.push_blockname() - options = self.parameters.options - if 'skip' in options: - reader.read_until(self.delimiter,same_file=True) - elif safe() and self.defname == 'blockdef-backend': - message.unsafe('Backend Block') - reader.read_until(self.delimiter,same_file=True) - else: - template = self.parameters.template - template = subs_attrs(template,self.attributes) - name = self.short_name()+' block' - if 'sectionbody' in options: - # The body is treated like a section body. - stag,etag = config.section2tags(template,self.attributes) - writer.write(stag,trace=name+' open') - Section.translate_body(self) - writer.write(etag,trace=name+' close') - else: - stag = config.section2tags(template,self.attributes,skipend=True)[0] - body = reader.read_until(self.delimiter,same_file=True) - presubs = self.parameters.presubs - postsubs = self.parameters.postsubs - body = Lex.subs(body,presubs) - if self.parameters.filter: - body = filter_lines(self.parameters.filter,body,self.attributes) - body = Lex.subs(body,postsubs) - # Write start tag, content, end tag. - etag = config.section2tags(template,self.attributes,skipstart=True)[1] - writer.write(dovetail_tags(stag,body,etag),trace=name) - trace(self.short_name()+' block close',etag) - if reader.eof(): - self.error('missing closing delimiter',self.start) - else: - delimiter = reader.read() # Discard delimiter line. - assert re.match(self.delimiter,delimiter) - self.pop_blockname() - -class DelimitedBlocks(AbstractBlocks): - """List of delimited blocks.""" - BLOCK_TYPE = DelimitedBlock - PREFIX = 'blockdef-' - def __init__(self): - AbstractBlocks.__init__(self) - def load(self,sections): - """Update blocks defined in 'sections' dictionary.""" - AbstractBlocks.load(self,sections) - def validate(self): - AbstractBlocks.validate(self) - -class Column: - """Table column.""" - def __init__(self, width=None, align_spec=None, style=None): - self.width = width or '1' - self.halign, self.valign = Table.parse_align_spec(align_spec) - self.style = style # Style name or None. - # Calculated attribute values. - self.abswidth = None # 1.. (page units). - self.pcwidth = None # 1..99 (percentage). - -class Cell: - def __init__(self, data, span_spec=None, align_spec=None, style=None): - self.data = data - self.span, self.vspan = Table.parse_span_spec(span_spec) - self.halign, self.valign = Table.parse_align_spec(align_spec) - self.style = style - self.reserved = False - def __repr__(self): - return '<Cell: %d.%d %s.%s %s "%s">' % ( - self.span, self.vspan, - self.halign, self.valign, - self.style or '', - self.data) - def clone_reserve(self): - """Return a clone of self to reserve vertically spanned cell.""" - result = copy.copy(self) - result.vspan = 1 - result.reserved = True - return result - -class Table(AbstractBlock): - ALIGN = {'<':'left', '>':'right', '^':'center'} - VALIGN = {'<':'top', '>':'bottom', '^':'middle'} - FORMATS = ('psv','csv','dsv') - SEPARATORS = dict( - csv=',', - dsv=r':|\n', - # The count and align group matches are not exact. - psv=r'((?<!\S)((?P<span>[\d.]+)(?P<op>[*+]))?(?P<align>[<\^>.]{,3})?(?P<style>[a-z])?)?\|' - ) - def __init__(self): - AbstractBlock.__init__(self) - self.CONF_ENTRIES += ('format','tags','separator') - # tabledef conf file parameters. - self.format='psv' - self.separator=None - self.tags=None # Name of tabletags-<tags> conf section. - # Calculated parameters. - self.abswidth=None # 1.. (page units). - self.pcwidth = None # 1..99 (percentage). - self.rows=[] # Parsed rows, each row is a list of Cells. - self.columns=[] # List of Columns. - @staticmethod - def parse_align_spec(align_spec): - """ - Parse AsciiDoc cell alignment specifier and return 2-tuple with - horizonatal and vertical alignment names. Unspecified alignments - set to None. - """ - result = (None, None) - if align_spec: - mo = re.match(r'^([<\^>])?(\.([<\^>]))?$', align_spec) - if mo: - result = (Table.ALIGN.get(mo.group(1)), - Table.VALIGN.get(mo.group(3))) - return result - @staticmethod - def parse_span_spec(span_spec): - """ - Parse AsciiDoc cell span specifier and return 2-tuple with horizonatal - and vertical span counts. Set default values (1,1) if not - specified. - """ - result = (None, None) - if span_spec: - mo = re.match(r'^(\d+)?(\.(\d+))?$', span_spec) - if mo: - result = (mo.group(1) and int(mo.group(1)), - mo.group(3) and int(mo.group(3))) - return (result[0] or 1, result[1] or 1) - def load(self,name,entries): - AbstractBlock.load(self,name,entries) - def dump(self): - AbstractBlock.dump(self) - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('format='+self.format) - write('') - def validate(self): - AbstractBlock.validate(self) - if self.format not in Table.FORMATS: - self.error('illegal format=%s' % self.format,halt=True) - self.tags = self.tags or 'default' - tags = [self.tags] - tags += [s['tags'] for s in self.styles.values() if 'tags' in s] - for t in tags: - if t not in tables.tags: - self.error('missing section: [tabletags-%s]' % t,halt=True) - if self.separator: - # Evaluate escape characters. - self.separator = literal_eval('"'+self.separator+'"') - #TODO: Move to class Tables - # Check global table parameters. - elif config.pagewidth is None: - self.error('missing [miscellaneous] entry: pagewidth') - elif config.pageunits is None: - self.error('missing [miscellaneous] entry: pageunits') - def validate_attributes(self): - """Validate and parse table attributes.""" - # Set defaults. - format = self.format - tags = self.tags - separator = self.separator - abswidth = float(config.pagewidth) - pcwidth = 100.0 - for k,v in self.attributes.items(): - if k == 'format': - if v not in self.FORMATS: - self.error('illegal %s=%s' % (k,v)) - else: - format = v - elif k == 'tags': - if v not in tables.tags: - self.error('illegal %s=%s' % (k,v)) - else: - tags = v - elif k == 'separator': - separator = v - elif k == 'width': - if not re.match(r'^\d{1,3}%$',v) or int(v[:-1]) > 100: - self.error('illegal %s=%s' % (k,v)) - else: - abswidth = float(v[:-1])/100 * config.pagewidth - pcwidth = float(v[:-1]) - # Calculate separator if it has not been specified. - if not separator: - separator = Table.SEPARATORS[format] - if format == 'csv': - if len(separator) > 1: - self.error('illegal csv separator=%s' % separator) - separator = ',' - else: - if not is_re(separator): - self.error('illegal regular expression: separator=%s' % - separator) - self.parameters.format = format - self.parameters.tags = tags - self.parameters.separator = separator - self.abswidth = abswidth - self.pcwidth = pcwidth - def get_tags(self,params): - tags = self.get_param('tags',params) - assert(tags and tags in tables.tags) - return tables.tags[tags] - def get_style(self,prefix): - """ - Return the style dictionary whose name starts with 'prefix'. - """ - if prefix is None: - return None - names = self.styles.keys() - names.sort() - for name in names: - if name.startswith(prefix): - return self.styles[name] - else: - self.error('missing style: %s*' % prefix) - return None - def parse_cols(self, cols, halign, valign): - """ - Build list of column objects from table 'cols', 'halign' and 'valign' - attributes. - """ - # [<multiplier>*][<align>][<width>][<style>] - COLS_RE1 = r'^((?P<count>\d+)\*)?(?P<align>[<\^>.]{,3})?(?P<width>\d+%?)?(?P<style>[a-z]\w*)?$' - # [<multiplier>*][<width>][<align>][<style>] - COLS_RE2 = r'^((?P<count>\d+)\*)?(?P<width>\d+%?)?(?P<align>[<\^>.]{,3})?(?P<style>[a-z]\w*)?$' - reo1 = re.compile(COLS_RE1) - reo2 = re.compile(COLS_RE2) - cols = str(cols) - if re.match(r'^\d+$',cols): - for i in range(int(cols)): - self.columns.append(Column()) - else: - for col in re.split(r'\s*,\s*',cols): - mo = reo1.match(col) - if not mo: - mo = reo2.match(col) - if mo: - count = int(mo.groupdict().get('count') or 1) - for i in range(count): - self.columns.append( - Column(mo.group('width'), mo.group('align'), - self.get_style(mo.group('style'))) - ) - else: - self.error('illegal column spec: %s' % col,self.start) - # Set column (and indirectly cell) default alignments. - for col in self.columns: - col.halign = col.halign or halign or document.attributes.get('halign') or 'left' - col.valign = col.valign or valign or document.attributes.get('valign') or 'top' - # Validate widths and calculate missing widths. - n = 0; percents = 0; props = 0 - for col in self.columns: - if col.width: - if col.width[-1] == '%': percents += int(col.width[:-1]) - else: props += int(col.width) - n += 1 - if percents > 0 and props > 0: - self.error('mixed percent and proportional widths: %s' - % cols,self.start) - pcunits = percents > 0 - # Fill in missing widths. - if n < len(self.columns) and percents < 100: - if pcunits: - width = float(100 - percents)/float(len(self.columns) - n) - else: - width = 1 - for col in self.columns: - if not col.width: - if pcunits: - col.width = str(int(width))+'%' - percents += width - else: - col.width = str(width) - props += width - # Calculate column alignment and absolute and percent width values. - percents = 0 - for col in self.columns: - if pcunits: - col.pcwidth = float(col.width[:-1]) - else: - col.pcwidth = (float(col.width)/props)*100 - col.abswidth = self.abswidth * (col.pcwidth/100) - if config.pageunits in ('cm','mm','in','em'): - col.abswidth = '%.2f' % round(col.abswidth,2) - else: - col.abswidth = '%d' % round(col.abswidth) - percents += col.pcwidth - col.pcwidth = int(col.pcwidth) - if round(percents) > 100: - self.error('total width exceeds 100%%: %s' % cols,self.start) - elif round(percents) < 100: - self.error('total width less than 100%%: %s' % cols,self.start) - def build_colspecs(self): - """ - Generate column related substitution attributes. - """ - cols = [] - i = 1 - for col in self.columns: - colspec = self.get_tags(col.style).colspec - if colspec: - self.attributes['halign'] = col.halign - self.attributes['valign'] = col.valign - self.attributes['colabswidth'] = col.abswidth - self.attributes['colpcwidth'] = col.pcwidth - self.attributes['colnumber'] = str(i) - s = subs_attrs(colspec, self.attributes) - if not s: - message.warning('colspec dropped: contains undefined attribute') - else: - cols.append(s) - i += 1 - if cols: - self.attributes['colspecs'] = writer.newline.join(cols) - def parse_rows(self, text): - """ - Parse the table source text into self.rows (a list of rows, each row - is a list of Cells. - """ - reserved = {} # Reserved cells generated by rowspans. - if self.parameters.format in ('psv','dsv'): - colcount = len(self.columns) - parsed_cells = self.parse_psv_dsv(text) - ri = 0 # Current row index 0.. - ci = 0 # Column counter 0..colcount - row = [] - i = 0 - while True: - resv = reserved.get(ri) and reserved[ri].get(ci) - if resv: - # We have a cell generated by a previous row span so - # process it before continuing with the current parsed - # cell. - cell = resv - else: - if i >= len(parsed_cells): - break # No more parsed or reserved cells. - cell = parsed_cells[i] - i += 1 - if cell.vspan > 1: - # Generate ensuing reserved cells spanned vertically by - # the current cell. - for j in range(1, cell.vspan): - if not ri+j in reserved: - reserved[ri+j] = {} - reserved[ri+j][ci] = cell.clone_reserve() - ci += cell.span - if ci <= colcount: - row.append(cell) - if ci >= colcount: - self.rows.append(row) - ri += 1 - row = [] - ci = 0 - elif self.parameters.format == 'csv': - self.rows = self.parse_csv(text) - else: - assert True,'illegal table format' - # Check for empty rows containing only reserved (spanned) cells. - for ri,row in enumerate(self.rows): - empty = True - for cell in row: - if not cell.reserved: - empty = False - break - if empty: - message.warning('table row %d: empty spanned row' % (ri+1)) - # Check that all row spans match. - for ri,row in enumerate(self.rows): - row_span = 0 - for cell in row: - row_span += cell.span - if ri == 0: - header_span = row_span - if row_span < header_span: - message.warning('table row %d: does not span all columns' % (ri+1)) - if row_span > header_span: - message.warning('table row %d: exceeds columns span' % (ri+1)) - def subs_rows(self, rows, rowtype='body'): - """ - Return a string of output markup from a list of rows, each row - is a list of raw data text. - """ - tags = tables.tags[self.parameters.tags] - if rowtype == 'header': - rtag = tags.headrow - elif rowtype == 'footer': - rtag = tags.footrow - else: - rtag = tags.bodyrow - result = [] - stag,etag = subs_tag(rtag,self.attributes) - for row in rows: - result.append(stag) - result += self.subs_row(row,rowtype) - result.append(etag) - return writer.newline.join(result) - def subs_row(self, row, rowtype): - """ - Substitute the list of Cells using the data tag. - Returns a list of marked up table cell elements. - """ - result = [] - i = 0 - for cell in row: - if cell.reserved: - # Skip vertically spanned placeholders. - i += cell.span - continue - if i >= len(self.columns): - break # Skip cells outside the header width. - col = self.columns[i] - self.attributes['halign'] = cell.halign or col.halign - self.attributes['valign'] = cell.valign or col.valign - self.attributes['colabswidth'] = col.abswidth - self.attributes['colpcwidth'] = col.pcwidth - self.attributes['colnumber'] = str(i+1) - self.attributes['colspan'] = str(cell.span) - self.attributes['colstart'] = self.attributes['colnumber'] - self.attributes['colend'] = str(i+cell.span) - self.attributes['rowspan'] = str(cell.vspan) - self.attributes['morerows'] = str(cell.vspan-1) - # Fill missing column data with blanks. - if i > len(self.columns) - 1: - data = '' - else: - data = cell.data - if rowtype == 'header': - # Use table style unless overriden by cell style. - colstyle = cell.style - else: - # If the cell style is not defined use the column style. - colstyle = cell.style or col.style - tags = self.get_tags(colstyle) - presubs,postsubs = self.get_subs(colstyle) - data = [data] - data = Lex.subs(data, presubs) - data = filter_lines(self.get_param('filter',colstyle), - data, self.attributes) - data = Lex.subs(data, postsubs) - if rowtype != 'header': - ptag = tags.paragraph - if ptag: - stag,etag = subs_tag(ptag,self.attributes) - text = '\n'.join(data).strip() - data = [] - for para in re.split(r'\n{2,}',text): - data += dovetail_tags([stag],para.split('\n'),[etag]) - if rowtype == 'header': - dtag = tags.headdata - elif rowtype == 'footer': - dtag = tags.footdata - else: - dtag = tags.bodydata - stag,etag = subs_tag(dtag,self.attributes) - result = result + dovetail_tags([stag],data,[etag]) - i += cell.span - return result - def parse_csv(self,text): - """ - Parse the table source text and return a list of rows, each row - is a list of Cells. - """ - import StringIO - import csv - rows = [] - rdr = csv.reader(StringIO.StringIO('\r\n'.join(text)), - delimiter=self.parameters.separator, skipinitialspace=True) - try: - for row in rdr: - rows.append([Cell(data) for data in row]) - except Exception: - self.error('csv parse error: %s' % row) - return rows - def parse_psv_dsv(self,text): - """ - Parse list of PSV or DSV table source text lines and return a list of - Cells. - """ - def append_cell(data, span_spec, op, align_spec, style): - op = op or '+' - if op == '*': # Cell multiplier. - span = Table.parse_span_spec(span_spec)[0] - for i in range(span): - cells.append(Cell(data, '1', align_spec, style)) - elif op == '+': # Column spanner. - cells.append(Cell(data, span_spec, align_spec, style)) - else: - self.error('illegal table cell operator') - text = '\n'.join(text) - separator = '(?msu)'+self.parameters.separator - format = self.parameters.format - start = 0 - span = None - op = None - align = None - style = None - cells = [] - data = '' - for mo in re.finditer(separator,text): - data += text[start:mo.start()] - if data.endswith('\\'): - data = data[:-1]+mo.group() # Reinstate escaped separators. - else: - append_cell(data, span, op, align, style) - span = mo.groupdict().get('span') - op = mo.groupdict().get('op') - align = mo.groupdict().get('align') - style = mo.groupdict().get('style') - if style: - style = self.get_style(style) - data = '' - start = mo.end() - # Last cell follows final separator. - data += text[start:] - append_cell(data, span, op, align, style) - # We expect a dummy blank item preceeding first PSV cell. - if format == 'psv': - if cells[0].data.strip() != '': - self.error('missing leading separator: %s' % separator, - self.start) - else: - cells.pop(0) - return cells - def translate(self): - AbstractBlock.translate(self) - reader.read() # Discard delimiter. - # Reset instance specific properties. - self.columns = [] - self.rows = [] - attrs = {} - BlockTitle.consume(attrs) - # Mix in document attribute list. - AttributeList.consume(attrs) - self.merge_attributes(attrs) - self.validate_attributes() - # Add global and calculated configuration parameters. - self.attributes['pagewidth'] = config.pagewidth - self.attributes['pageunits'] = config.pageunits - self.attributes['tableabswidth'] = int(self.abswidth) - self.attributes['tablepcwidth'] = int(self.pcwidth) - # Read the entire table. - text = reader.read_until(self.delimiter) - if reader.eof(): - self.error('missing closing delimiter',self.start) - else: - delimiter = reader.read() # Discard closing delimiter. - assert re.match(self.delimiter,delimiter) - if len(text) == 0: - message.warning('[%s] table is empty' % self.defname) - return - self.push_blockname('table') - cols = attrs.get('cols') - if not cols: - # Calculate column count from number of items in first line. - if self.parameters.format == 'csv': - cols = text[0].count(self.parameters.separator) + 1 - else: - cols = 0 - for cell in self.parse_psv_dsv(text[:1]): - cols += cell.span - self.parse_cols(cols, attrs.get('halign'), attrs.get('valign')) - # Set calculated attributes. - self.attributes['colcount'] = len(self.columns) - self.build_colspecs() - self.parse_rows(text) - # The 'rowcount' attribute is used by the experimental LaTeX backend. - self.attributes['rowcount'] = str(len(self.rows)) - # Generate headrows, footrows, bodyrows. - # Headrow, footrow and bodyrow data replaces same named attributes in - # the table markup template. In order to ensure this data does not get - # a second attribute substitution (which would interfere with any - # already substituted inline passthroughs) unique placeholders are used - # (the tab character does not appear elsewhere since it is expanded on - # input) which are replaced after template attribute substitution. - headrows = footrows = bodyrows = None - for option in self.parameters.options: - self.attributes[option+'-option'] = '' - if self.rows and 'header' in self.parameters.options: - headrows = self.subs_rows(self.rows[0:1],'header') - self.attributes['headrows'] = '\x07headrows\x07' - self.rows = self.rows[1:] - if self.rows and 'footer' in self.parameters.options: - footrows = self.subs_rows( self.rows[-1:], 'footer') - self.attributes['footrows'] = '\x07footrows\x07' - self.rows = self.rows[:-1] - if self.rows: - bodyrows = self.subs_rows(self.rows) - self.attributes['bodyrows'] = '\x07bodyrows\x07' - table = subs_attrs(config.sections[self.parameters.template], - self.attributes) - table = writer.newline.join(table) - # Before we finish replace the table head, foot and body place holders - # with the real data. - if headrows: - table = table.replace('\x07headrows\x07', headrows, 1) - if footrows: - table = table.replace('\x07footrows\x07', footrows, 1) - if bodyrows: - table = table.replace('\x07bodyrows\x07', bodyrows, 1) - writer.write(table,trace='table') - self.pop_blockname() - -class Tables(AbstractBlocks): - """List of tables.""" - BLOCK_TYPE = Table - PREFIX = 'tabledef-' - TAGS = ('colspec', 'headrow','footrow','bodyrow', - 'headdata','footdata', 'bodydata','paragraph') - def __init__(self): - AbstractBlocks.__init__(self) - # Table tags dictionary. Each entry is a tags dictionary. - self.tags={} - def load(self,sections): - AbstractBlocks.load(self,sections) - self.load_tags(sections) - def load_tags(self,sections): - """ - Load tabletags-* conf file sections to self.tags. - """ - for section in sections.keys(): - mo = re.match(r'^tabletags-(?P<name>\w+)$',section) - if mo: - name = mo.group('name') - if name in self.tags: - d = self.tags[name] - else: - d = AttrDict() - parse_entries(sections.get(section,()),d) - for k in d.keys(): - if k not in self.TAGS: - message.warning('[%s] contains illegal table tag: %s' % - (section,k)) - self.tags[name] = d - def validate(self): - AbstractBlocks.validate(self) - # Check we have a default table definition, - for i in range(len(self.blocks)): - if self.blocks[i].defname == 'tabledef-default': - default = self.blocks[i] - break - else: - raise EAsciiDoc,'missing section: [tabledef-default]' - # Propagate defaults to unspecified table parameters. - for b in self.blocks: - if b is not default: - if b.format is None: b.format = default.format - if b.template is None: b.template = default.template - # Check tags and propagate default tags. - if not 'default' in self.tags: - raise EAsciiDoc,'missing section: [tabletags-default]' - default = self.tags['default'] - for tag in ('bodyrow','bodydata','paragraph'): # Mandatory default tags. - if tag not in default: - raise EAsciiDoc,'missing [tabletags-default] entry: %s' % tag - for t in self.tags.values(): - if t is not default: - if t.colspec is None: t.colspec = default.colspec - if t.headrow is None: t.headrow = default.headrow - if t.footrow is None: t.footrow = default.footrow - if t.bodyrow is None: t.bodyrow = default.bodyrow - if t.headdata is None: t.headdata = default.headdata - if t.footdata is None: t.footdata = default.footdata - if t.bodydata is None: t.bodydata = default.bodydata - if t.paragraph is None: t.paragraph = default.paragraph - # Use body tags if header and footer tags are not specified. - for t in self.tags.values(): - if not t.headrow: t.headrow = t.bodyrow - if not t.footrow: t.footrow = t.bodyrow - if not t.headdata: t.headdata = t.bodydata - if not t.footdata: t.footdata = t.bodydata - # Check table definitions are valid. - for b in self.blocks: - b.validate() - def dump(self): - AbstractBlocks.dump(self) - for k,v in self.tags.items(): - dump_section('tabletags-'+k, v) - -class Macros: - # Default system macro syntax. - SYS_RE = r'(?u)^(?P<name>[\\]?\w(\w|-)*?)::(?P<target>\S*?)' + \ - r'(\[(?P<attrlist>.*?)\])$' - def __init__(self): - self.macros = [] # List of Macros. - self.current = None # The last matched block macro. - self.passthroughs = [] - # Initialize default system macro. - m = Macro() - m.pattern = self.SYS_RE - m.prefix = '+' - m.reo = re.compile(m.pattern) - self.macros.append(m) - def load(self,entries): - for entry in entries: - m = Macro() - m.load(entry) - if m.name is None: - # Delete undefined macro. - for i,m2 in enumerate(self.macros): - if m2.pattern == m.pattern: - del self.macros[i] - break - else: - message.warning('unable to delete missing macro: %s' % m.pattern) - else: - # Check for duplicates. - for m2 in self.macros: - if m2.pattern == m.pattern: - message.verbose('macro redefinition: %s%s' % (m.prefix,m.name)) - break - else: - self.macros.append(m) - def dump(self): - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('[macros]') - # Dump all macros except the first (built-in system) macro. - for m in self.macros[1:]: - # Escape = in pattern. - macro = '%s=%s%s' % (m.pattern.replace('=',r'\='), m.prefix, m.name) - if m.subslist is not None: - macro += '[' + ','.join(m.subslist) + ']' - write(macro) - write('') - def validate(self): - # Check all named sections exist. - if config.verbose: - for m in self.macros: - if m.name and m.prefix != '+': - m.section_name() - def subs(self,text,prefix='',callouts=False): - # If callouts is True then only callout macros are processed, if False - # then all non-callout macros are processed. - result = text - for m in self.macros: - if m.prefix == prefix: - if callouts ^ (m.name != 'callout'): - result = m.subs(result) - return result - def isnext(self): - """Return matching macro if block macro is next on reader.""" - reader.skip_blank_lines() - line = reader.read_next() - if line: - for m in self.macros: - if m.prefix == '#': - if m.reo.match(line): - self.current = m - return m - return False - def match(self,prefix,name,text): - """Return re match object matching 'text' with macro type 'prefix', - macro name 'name'.""" - for m in self.macros: - if m.prefix == prefix: - mo = m.reo.match(text) - if mo: - if m.name == name: - return mo - if re.match(name, mo.group('name')): - return mo - return None - def extract_passthroughs(self,text,prefix=''): - """ Extract the passthrough text and replace with temporary - placeholders.""" - self.passthroughs = [] - for m in self.macros: - if m.has_passthrough() and m.prefix == prefix: - text = m.subs_passthroughs(text, self.passthroughs) - return text - def restore_passthroughs(self,text): - """ Replace passthough placeholders with the original passthrough - text.""" - for i,v in enumerate(self.passthroughs): - text = text.replace('\x07'+str(i)+'\x07', self.passthroughs[i]) - return text - -class Macro: - def __init__(self): - self.pattern = None # Matching regular expression. - self.name = '' # Conf file macro name (None if implicit). - self.prefix = '' # '' if inline, '+' if system, '#' if block. - self.reo = None # Compiled pattern re object. - self.subslist = [] # Default subs for macros passtext group. - def has_passthrough(self): - return self.pattern.find(r'(?P<passtext>') >= 0 - def section_name(self,name=None): - """Return macro markup template section name based on macro name and - prefix. Return None section not found.""" - assert self.prefix != '+' - if not name: - assert self.name - name = self.name - if self.prefix == '#': - suffix = '-blockmacro' - else: - suffix = '-inlinemacro' - if name+suffix in config.sections: - return name+suffix - else: - message.warning('missing macro section: [%s]' % (name+suffix)) - return None - def load(self,entry): - e = parse_entry(entry) - if e is None: - # Only the macro pattern was specified, mark for deletion. - self.name = None - self.pattern = entry - return - if not is_re(e[0]): - raise EAsciiDoc,'illegal macro regular expression: %s' % e[0] - pattern, name = e - if name and name[0] in ('+','#'): - prefix, name = name[0], name[1:] - else: - prefix = '' - # Parse passthrough subslist. - mo = re.match(r'^(?P<name>[^[]*)(\[(?P<subslist>.*)\])?$', name) - name = mo.group('name') - if name and not is_name(name): - raise EAsciiDoc,'illegal section name in macro entry: %s' % entry - subslist = mo.group('subslist') - if subslist is not None: - # Parse and validate passthrough subs. - subslist = parse_options(subslist, SUBS_OPTIONS, - 'illegal subs in macro entry: %s' % entry) - self.pattern = pattern - self.reo = re.compile(pattern) - self.prefix = prefix - self.name = name - self.subslist = subslist or [] - - def subs(self,text): - def subs_func(mo): - """Function called to perform macro substitution. - Uses matched macro regular expression object and returns string - containing the substituted macro body.""" - # Check if macro reference is escaped. - if mo.group()[0] == '\\': - return mo.group()[1:] # Strip leading backslash. - d = mo.groupdict() - # Delete groups that didn't participate in match. - for k,v in d.items(): - if v is None: del d[k] - if self.name: - name = self.name - else: - if not 'name' in d: - message.warning('missing macro name group: %s' % mo.re.pattern) - return '' - name = d['name'] - section_name = self.section_name(name) - if not section_name: - return '' - # If we're dealing with a block macro get optional block ID and - # block title. - if self.prefix == '#' and self.name != 'comment': - AttributeList.consume(d) - BlockTitle.consume(d) - # Parse macro attributes. - if 'attrlist' in d: - if d['attrlist'] in (None,''): - del d['attrlist'] - else: - if self.prefix == '': - # Unescape ] characters in inline macros. - d['attrlist'] = d['attrlist'].replace('\\]',']') - parse_attributes(d['attrlist'],d) - # Generate option attributes. - if 'options' in d: - options = parse_options(d['options'], (), - '%s: illegal option name' % name) - for option in options: - d[option+'-option'] = '' - # Substitute single quoted attribute values in block macros. - if self.prefix == '#': - AttributeList.subs(d) - if name == 'callout': - listindex =int(d['index']) - d['coid'] = calloutmap.add(listindex) - # The alt attribute is the first image macro positional attribute. - if name == 'image' and '1' in d: - d['alt'] = d['1'] - # Unescape special characters in LaTeX target file names. - if document.backend == 'latex' and 'target' in d and d['target']: - if not '0' in d: - d['0'] = d['target'] - d['target']= config.subs_specialchars_reverse(d['target']) - # BUG: We've already done attribute substitution on the macro which - # means that any escaped attribute references are now unescaped and - # will be substituted by config.subs_section() below. As a partial - # fix have withheld {0} from substitution but this kludge doesn't - # fix it for other attributes containing unescaped references. - # Passthrough macros don't have this problem. - a0 = d.get('0') - if a0: - d['0'] = chr(0) # Replace temporarily with unused character. - body = config.subs_section(section_name,d) - if len(body) == 0: - result = '' - elif len(body) == 1: - result = body[0] - else: - if self.prefix == '#': - result = writer.newline.join(body) - else: - # Internally processed inline macros use UNIX line - # separator. - result = '\n'.join(body) - if a0: - result = result.replace(chr(0), a0) - return result - - return self.reo.sub(subs_func, text) - - def translate(self): - """ Block macro translation.""" - assert self.prefix == '#' - s = reader.read() - before = s - if self.has_passthrough(): - s = macros.extract_passthroughs(s,'#') - s = subs_attrs(s) - if s: - s = self.subs(s) - if self.has_passthrough(): - s = macros.restore_passthroughs(s) - if s: - trace('macro block',before,s) - writer.write(s) - - def subs_passthroughs(self, text, passthroughs): - """ Replace macro attribute lists in text with placeholders. - Substitute and append the passthrough attribute lists to the - passthroughs list.""" - def subs_func(mo): - """Function called to perform inline macro substitution. - Uses matched macro regular expression object and returns string - containing the substituted macro body.""" - # Don't process escaped macro references. - if mo.group()[0] == '\\': - return mo.group() - d = mo.groupdict() - if not 'passtext' in d: - message.warning('passthrough macro %s: missing passtext group' % - d.get('name','')) - return mo.group() - passtext = d['passtext'] - if re.search('\x07\\d+\x07', passtext): - message.warning('nested inline passthrough') - return mo.group() - if d.get('subslist'): - if d['subslist'].startswith(':'): - message.error('block macro cannot occur here: %s' % mo.group(), - halt=True) - subslist = parse_options(d['subslist'], SUBS_OPTIONS, - 'illegal passthrough macro subs option') - else: - subslist = self.subslist - passtext = Lex.subs_1(passtext,subslist) - if passtext is None: passtext = '' - if self.prefix == '': - # Unescape ] characters in inline macros. - passtext = passtext.replace('\\]',']') - passthroughs.append(passtext) - # Tabs guarantee the placeholders are unambiguous. - result = ( - text[mo.start():mo.start('passtext')] + - '\x07' + str(len(passthroughs)-1) + '\x07' + - text[mo.end('passtext'):mo.end()] - ) - return result - - return self.reo.sub(subs_func, text) - - -class CalloutMap: - def __init__(self): - self.comap = {} # key = list index, value = callouts list. - self.calloutindex = 0 # Current callout index number. - self.listnumber = 1 # Current callout list number. - def listclose(self): - # Called when callout list is closed. - self.listnumber += 1 - self.calloutindex = 0 - self.comap = {} - def add(self,listindex): - # Add next callout index to listindex map entry. Return the callout id. - self.calloutindex += 1 - # Append the coindex to a list in the comap dictionary. - if not listindex in self.comap: - self.comap[listindex] = [self.calloutindex] - else: - self.comap[listindex].append(self.calloutindex) - return self.calloutid(self.listnumber, self.calloutindex) - @staticmethod - def calloutid(listnumber,calloutindex): - return 'CO%d-%d' % (listnumber,calloutindex) - def calloutids(self,listindex): - # Retieve list of callout indexes that refer to listindex. - if listindex in self.comap: - result = '' - for coindex in self.comap[listindex]: - result += ' ' + self.calloutid(self.listnumber,coindex) - return result.strip() - else: - message.warning('no callouts refer to list item '+str(listindex)) - return '' - def validate(self,maxlistindex): - # Check that all list indexes referenced by callouts exist. - for listindex in self.comap.keys(): - if listindex > maxlistindex: - message.warning('callout refers to non-existent list item ' - + str(listindex)) - -#--------------------------------------------------------------------------- -# Input stream Reader and output stream writer classes. -#--------------------------------------------------------------------------- - -UTF8_BOM = '\xef\xbb\xbf' - -class Reader1: - """Line oriented AsciiDoc input file reader. Processes include and - conditional inclusion system macros. Tabs are expanded and lines are right - trimmed.""" - # This class is not used directly, use Reader class instead. - READ_BUFFER_MIN = 10 # Read buffer low level. - def __init__(self): - self.f = None # Input file object. - self.fname = None # Input file name. - self.next = [] # Read ahead buffer containing - # [filename,linenumber,linetext] lists. - self.cursor = None # Last read() [filename,linenumber,linetext]. - self.tabsize = 8 # Tab expansion number of spaces. - self.parent = None # Included reader's parent reader. - self._lineno = 0 # The last line read from file object f. - self.current_depth = 0 # Current include depth. - self.max_depth = 10 # Initial maxiumum allowed include depth. - self.bom = None # Byte order mark (BOM). - self.infile = None # Saved document 'infile' attribute. - self.indir = None # Saved document 'indir' attribute. - def open(self,fname): - self.fname = fname - message.verbose('reading: '+fname) - if fname == '<stdin>': - self.f = sys.stdin - self.infile = None - self.indir = None - else: - self.f = open(fname,'rb') - self.infile = fname - self.indir = os.path.dirname(fname) - document.attributes['infile'] = self.infile - document.attributes['indir'] = self.indir - self._lineno = 0 # The last line read from file object f. - self.next = [] - # Prefill buffer by reading the first line and then pushing it back. - if Reader1.read(self): - if self.cursor[2].startswith(UTF8_BOM): - self.cursor[2] = self.cursor[2][len(UTF8_BOM):] - self.bom = UTF8_BOM - self.unread(self.cursor) - self.cursor = None - def closefile(self): - """Used by class methods to close nested include files.""" - self.f.close() - self.next = [] - def close(self): - self.closefile() - self.__init__() - def read(self, skip=False): - """Read next line. Return None if EOF. Expand tabs. Strip trailing - white space. Maintain self.next read ahead buffer. If skip=True then - conditional exclusion is active (ifdef and ifndef macros).""" - # Top up buffer. - if len(self.next) <= self.READ_BUFFER_MIN: - s = self.f.readline() - if s: - self._lineno = self._lineno + 1 - while s: - if self.tabsize != 0: - s = s.expandtabs(self.tabsize) - s = s.rstrip() - self.next.append([self.fname,self._lineno,s]) - if len(self.next) > self.READ_BUFFER_MIN: - break - s = self.f.readline() - if s: - self._lineno = self._lineno + 1 - # Return first (oldest) buffer entry. - if len(self.next) > 0: - self.cursor = self.next[0] - del self.next[0] - result = self.cursor[2] - # Check for include macro. - mo = macros.match('+',r'^include[1]?$',result) - if mo and not skip: - # Parse include macro attributes. - attrs = {} - parse_attributes(mo.group('attrlist'),attrs) - warnings = attrs.get('warnings', True) - # Don't process include macro once the maximum depth is reached. - if self.current_depth >= self.max_depth: - message.warning('maximum include depth exceeded') - return result - # Perform attribute substitution on include macro file name. - fname = subs_attrs(mo.group('target')) - if not fname: - return Reader1.read(self) # Return next input line. - if self.fname != '<stdin>': - fname = os.path.expandvars(os.path.expanduser(fname)) - fname = safe_filename(fname, os.path.dirname(self.fname)) - if not fname: - return Reader1.read(self) # Return next input line. - if not os.path.isfile(fname): - if warnings: - message.warning('include file not found: %s' % fname) - return Reader1.read(self) # Return next input line. - if mo.group('name') == 'include1': - if not config.dumping: - if fname not in config.include1: - message.verbose('include1: ' + fname, linenos=False) - # Store the include file in memory for later - # retrieval by the {include1:} system attribute. - f = open(fname) - try: - config.include1[fname] = [ - s.rstrip() for s in f] - finally: - f.close() - return '{include1:%s}' % fname - else: - # This is a configuration dump, just pass the macro - # call through. - return result - # Clone self and set as parent (self assumes the role of child). - parent = Reader1() - assign(parent,self) - self.parent = parent - # Set attributes in child. - if 'tabsize' in attrs: - try: - val = int(attrs['tabsize']) - if not val >= 0: - raise ValueError, 'not >= 0' - self.tabsize = val - except ValueError: - raise EAsciiDoc, 'illegal include macro tabsize argument' - else: - self.tabsize = config.tabsize - if 'depth' in attrs: - try: - val = int(attrs['depth']) - if not val >= 1: - raise ValueError, 'not >= 1' - self.max_depth = self.current_depth + val - except ValueError: - raise EAsciiDoc, "include macro: illegal 'depth' argument" - # Process included file. - message.verbose('include: ' + fname, linenos=False) - self.open(fname) - self.current_depth = self.current_depth + 1 - result = Reader1.read(self) - else: - if not Reader1.eof(self): - result = Reader1.read(self) - else: - result = None - return result - def eof(self): - """Returns True if all lines have been read.""" - if len(self.next) == 0: - # End of current file. - if self.parent: - self.closefile() - assign(self,self.parent) # Restore parent reader. - document.attributes['infile'] = self.infile - document.attributes['indir'] = self.indir - return Reader1.eof(self) - else: - return True - else: - return False - def read_next(self): - """Like read() but does not advance file pointer.""" - if Reader1.eof(self): - return None - else: - return self.next[0][2] - def unread(self,cursor): - """Push the line (filename,linenumber,linetext) tuple back into the read - buffer. Note that it's up to the caller to restore the previous - cursor.""" - assert cursor - self.next.insert(0,cursor) - -class Reader(Reader1): - """ Wraps (well, sought of) Reader1 class and implements conditional text - inclusion.""" - def __init__(self): - Reader1.__init__(self) - self.depth = 0 # if nesting depth. - self.skip = False # true if we're skipping ifdef...endif. - self.skipname = '' # Name of current endif macro target. - self.skipto = -1 # The depth at which skipping is reenabled. - def read_super(self): - result = Reader1.read(self,self.skip) - if result is None and self.skip: - raise EAsciiDoc,'missing endif::%s[]' % self.skipname - return result - def read(self): - result = self.read_super() - if result is None: - return None - while self.skip: - mo = macros.match('+',r'ifdef|ifndef|ifeval|endif',result) - if mo: - name = mo.group('name') - target = mo.group('target') - attrlist = mo.group('attrlist') - if name == 'endif': - self.depth -= 1 - if self.depth < 0: - raise EAsciiDoc,'mismatched macro: %s' % result - if self.depth == self.skipto: - self.skip = False - if target and self.skipname != target: - raise EAsciiDoc,'mismatched macro: %s' % result - else: - if name in ('ifdef','ifndef'): - if not target: - raise EAsciiDoc,'missing macro target: %s' % result - if not attrlist: - self.depth += 1 - elif name == 'ifeval': - if not attrlist: - raise EAsciiDoc,'missing ifeval condition: %s' % result - self.depth += 1 - result = self.read_super() - if result is None: - return None - mo = macros.match('+',r'ifdef|ifndef|ifeval|endif',result) - if mo: - name = mo.group('name') - target = mo.group('target') - attrlist = mo.group('attrlist') - if name == 'endif': - self.depth = self.depth-1 - else: - if not target and name in ('ifdef','ifndef'): - raise EAsciiDoc,'missing macro target: %s' % result - defined = is_attr_defined(target, document.attributes) - if name == 'ifdef': - if attrlist: - if defined: return attrlist - else: - self.skip = not defined - elif name == 'ifndef': - if attrlist: - if not defined: return attrlist - else: - self.skip = defined - elif name == 'ifeval': - if safe(): - message.unsafe('ifeval invalid') - raise EAsciiDoc,'ifeval invalid safe document' - if not attrlist: - raise EAsciiDoc,'missing ifeval condition: %s' % result - cond = False - attrlist = subs_attrs(attrlist) - if attrlist: - try: - cond = eval(attrlist) - except Exception,e: - raise EAsciiDoc,'error evaluating ifeval condition: %s: %s' % (result, str(e)) - message.verbose('ifeval: %s: %r' % (attrlist, cond)) - self.skip = not cond - if not attrlist or name == 'ifeval': - if self.skip: - self.skipto = self.depth - self.skipname = target - self.depth = self.depth+1 - result = self.read() - if result: - # Expand executable block macros. - mo = macros.match('+',r'eval|sys|sys2',result) - if mo: - action = mo.group('name') - cmd = mo.group('attrlist') - result = system(action, cmd, is_macro=True) - self.cursor[2] = result # So we don't re-evaluate. - if result: - # Unescape escaped system macros. - if macros.match('+',r'\\eval|\\sys|\\sys2|\\ifdef|\\ifndef|\\endif|\\include|\\include1',result): - result = result[1:] - return result - def eof(self): - return self.read_next() is None - def read_next(self): - save_cursor = self.cursor - result = self.read() - if result is not None: - self.unread(self.cursor) - self.cursor = save_cursor - return result - def read_lines(self,count=1): - """Return tuple containing count lines.""" - result = [] - i = 0 - while i < count and not self.eof(): - result.append(self.read()) - return tuple(result) - def read_ahead(self,count=1): - """Same as read_lines() but does not advance the file pointer.""" - result = [] - putback = [] - save_cursor = self.cursor - try: - i = 0 - while i < count and not self.eof(): - result.append(self.read()) - putback.append(self.cursor) - i = i+1 - while putback: - self.unread(putback.pop()) - finally: - self.cursor = save_cursor - return tuple(result) - def skip_blank_lines(self): - reader.read_until(r'\s*\S+') - def read_until(self,terminators,same_file=False): - """Like read() but reads lines up to (but not including) the first line - that matches the terminator regular expression, regular expression - object or list of regular expression objects. If same_file is True then - the terminating pattern must occur in the file the was being read when - the routine was called.""" - if same_file: - fname = self.cursor[0] - result = [] - if not isinstance(terminators,list): - if isinstance(terminators,basestring): - terminators = [re.compile(terminators)] - else: - terminators = [terminators] - while not self.eof(): - save_cursor = self.cursor - s = self.read() - if not same_file or fname == self.cursor[0]: - for reo in terminators: - if reo.match(s): - self.unread(self.cursor) - self.cursor = save_cursor - return tuple(result) - result.append(s) - return tuple(result) - -class Writer: - """Writes lines to output file.""" - def __init__(self): - self.newline = '\r\n' # End of line terminator. - self.f = None # Output file object. - self.fname = None # Output file name. - self.lines_out = 0 # Number of lines written. - self.skip_blank_lines = False # If True don't output blank lines. - def open(self,fname,bom=None): - ''' - bom is optional byte order mark. - http://en.wikipedia.org/wiki/Byte-order_mark - ''' - self.fname = fname - if fname == '<stdout>': - self.f = sys.stdout - else: - self.f = open(fname,'wb+') - message.verbose('writing: '+writer.fname,False) - if bom: - self.f.write(bom) - self.lines_out = 0 - def close(self): - if self.fname != '<stdout>': - self.f.close() - def write_line(self, line=None): - if not (self.skip_blank_lines and (not line or not line.strip())): - self.f.write((line or '') + self.newline) - self.lines_out = self.lines_out + 1 - def write(self,*args,**kwargs): - """Iterates arguments, writes tuple and list arguments one line per - element, else writes argument as single line. If no arguments writes - blank line. If argument is None nothing is written. self.newline is - appended to each line.""" - if 'trace' in kwargs and len(args) > 0: - trace(kwargs['trace'],args[0]) - if len(args) == 0: - self.write_line() - self.lines_out = self.lines_out + 1 - else: - for arg in args: - if is_array(arg): - for s in arg: - self.write_line(s) - elif arg is not None: - self.write_line(arg) - def write_tag(self,tag,content,subs=None,d=None,**kwargs): - """Write content enveloped by tag. - Substitutions specified in the 'subs' list are perform on the - 'content'.""" - if subs is None: - subs = config.subsnormal - stag,etag = subs_tag(tag,d) - content = Lex.subs(content,subs) - if 'trace' in kwargs: - trace(kwargs['trace'],[stag]+content+[etag]) - if stag: - self.write(stag) - if content: - self.write(content) - if etag: - self.write(etag) - -#--------------------------------------------------------------------------- -# Configuration file processing. -#--------------------------------------------------------------------------- -def _subs_specialwords(mo): - """Special word substitution function called by - Config.subs_specialwords().""" - word = mo.re.pattern # The special word. - template = config.specialwords[word] # The corresponding markup template. - if not template in config.sections: - raise EAsciiDoc,'missing special word template [%s]' % template - if mo.group()[0] == '\\': - return mo.group()[1:] # Return escaped word. - args = {} - args['words'] = mo.group() # The full match string is argument 'words'. - args.update(mo.groupdict()) # Add other named match groups to the arguments. - # Delete groups that didn't participate in match. - for k,v in args.items(): - if v is None: del args[k] - lines = subs_attrs(config.sections[template],args) - if len(lines) == 0: - result = '' - elif len(lines) == 1: - result = lines[0] - else: - result = writer.newline.join(lines) - return result - -class Config: - """Methods to process configuration files.""" - # Non-template section name regexp's. - ENTRIES_SECTIONS= ('tags','miscellaneous','attributes','specialcharacters', - 'specialwords','macros','replacements','quotes','titles', - r'paradef-.+',r'listdef-.+',r'blockdef-.+',r'tabledef-.+', - r'tabletags-.+',r'listtags-.+','replacements[23]', - r'old_tabledef-.+') - def __init__(self): - self.sections = OrderedDict() # Keyed by section name containing - # lists of section lines. - # Command-line options. - self.verbose = False - self.header_footer = True # -s, --no-header-footer option. - # [miscellaneous] section. - self.tabsize = 8 - self.textwidth = 70 # DEPRECATED: Old tables only. - self.newline = '\r\n' - self.pagewidth = None - self.pageunits = None - self.outfilesuffix = '' - self.subsnormal = SUBS_NORMAL - self.subsverbatim = SUBS_VERBATIM - - self.tags = {} # Values contain (stag,etag) tuples. - self.specialchars = {} # Values of special character substitutions. - self.specialwords = {} # Name is special word pattern, value is macro. - self.replacements = OrderedDict() # Key is find pattern, value is - #replace pattern. - self.replacements2 = OrderedDict() - self.replacements3 = OrderedDict() - self.specialsections = {} # Name is special section name pattern, value - # is corresponding section name. - self.quotes = OrderedDict() # Values contain corresponding tag name. - self.fname = '' # Most recently loaded configuration file name. - self.conf_attrs = {} # Attributes entries from conf files. - self.cmd_attrs = {} # Attributes from command-line -a options. - self.loaded = [] # Loaded conf files. - self.include1 = {} # Holds include1::[] files for {include1:}. - self.dumping = False # True if asciidoc -c option specified. - self.filters = [] # Filter names specified by --filter option. - - def init(self, cmd): - """ - Check Python version and locate the executable and configuration files - directory. - cmd is the asciidoc command or asciidoc.py path. - """ - if float(sys.version[:3]) < float(MIN_PYTHON_VERSION): - message.stderr('FAILED: Python %s or better required' % - MIN_PYTHON_VERSION) - sys.exit(1) - if not os.path.exists(cmd): - message.stderr('FAILED: Missing asciidoc command: %s' % cmd) - sys.exit(1) - global APP_FILE - APP_FILE = os.path.realpath(cmd) - global APP_DIR - APP_DIR = os.path.dirname(APP_FILE) - global USER_DIR - USER_DIR = userdir() - if USER_DIR is not None: - USER_DIR = os.path.join(USER_DIR,'.asciidoc') - if not os.path.isdir(USER_DIR): - USER_DIR = None - - def load_file(self, fname, dir=None, include=[], exclude=[]): - """ - Loads sections dictionary with sections from file fname. - Existing sections are overlaid. - The 'include' list contains the section names to be loaded. - The 'exclude' list contains section names not to be loaded. - Return False if no file was found in any of the locations. - """ - def update_section(section): - """ Update section in sections with contents. """ - if section and contents: - if section in sections and self.entries_section(section): - if ''.join(contents): - # Merge entries. - sections[section] += contents - else: - del sections[section] - else: - if section.startswith('+'): - # Append section. - if section in sections: - sections[section] += contents - else: - sections[section] = contents - else: - # Replace section. - sections[section] = contents - if dir: - fname = os.path.join(dir, fname) - # Sliently skip missing configuration file. - if not os.path.isfile(fname): - return False - # Don't load conf files twice (local and application conf files are the - # same if the source file is in the application directory). - if os.path.realpath(fname) in self.loaded: - return True - rdr = Reader() # Reader processes system macros. - message.linenos = False # Disable document line numbers. - rdr.open(fname) - message.linenos = None - self.fname = fname - reo = re.compile(r'(?u)^\[(?P<section>\+?[^\W\d][\w-]*)\]\s*$') - sections = OrderedDict() - section,contents = '',[] - while not rdr.eof(): - s = rdr.read() - if s and s[0] == '#': # Skip comment lines. - continue - if s[:2] == '\\#': # Unescape lines starting with '#'. - s = s[1:] - s = s.rstrip() - found = reo.findall(s) - if found: - update_section(section) # Store previous section. - section = found[0].lower() - contents = [] - else: - contents.append(s) - update_section(section) # Store last section. - rdr.close() - if include: - for s in set(sections) - set(include): - del sections[s] - if exclude: - for s in set(sections) & set(exclude): - del sections[s] - attrs = {} - self.load_sections(sections,attrs) - if not include: - # If all sections are loaded mark this file as loaded. - self.loaded.append(os.path.realpath(fname)) - document.update_attributes(attrs) # So they are available immediately. - return True - - def load_sections(self,sections,attrs=None): - """ - Loads sections dictionary. Each dictionary entry contains a - list of lines. - Updates 'attrs' with parsed [attributes] section entries. - """ - # Delete trailing blank lines from sections. - for k in sections.keys(): - for i in range(len(sections[k])-1,-1,-1): - if not sections[k][i]: - del sections[k][i] - elif not self.entries_section(k): - break - # Update new sections. - for k,v in sections.items(): - if k.startswith('+'): - # Append section. - k = k[1:] - if k in self.sections: - self.sections[k] += v - else: - self.sections[k] = v - else: - # Replace section. - self.sections[k] = v - self.parse_tags() - # Internally [miscellaneous] section entries are just attributes. - d = {} - parse_entries(sections.get('miscellaneous',()), d, unquote=True, - allow_name_only=True) - parse_entries(sections.get('attributes',()), d, unquote=True, - allow_name_only=True) - update_attrs(self.conf_attrs,d) - if attrs is not None: - attrs.update(d) - d = {} - parse_entries(sections.get('titles',()),d) - Title.load(d) - parse_entries(sections.get('specialcharacters',()),self.specialchars,escape_delimiter=False) - parse_entries(sections.get('quotes',()),self.quotes) - self.parse_specialwords() - self.parse_replacements() - self.parse_replacements('replacements2') - self.parse_replacements('replacements3') - self.parse_specialsections() - paragraphs.load(sections) - lists.load(sections) - blocks.load(sections) - tables_OLD.load(sections) - tables.load(sections) - macros.load(sections.get('macros',())) - - def get_load_dirs(self): - """ - Return list of well known paths with conf files. - """ - result = [] - if localapp(): - # Load from folders in asciidoc executable directory. - result.append(APP_DIR) - else: - # Load from global configuration directory. - result.append(CONF_DIR) - # Load configuration files from ~/.asciidoc if it exists. - if USER_DIR is not None: - result.append(USER_DIR) - return result - - def find_in_dirs(self, filename, dirs=None): - """ - Find conf files from dirs list. - Return list of found file paths. - Return empty list if not found in any of the locations. - """ - result = [] - if dirs is None: - dirs = self.get_load_dirs() - for d in dirs: - f = os.path.join(d,filename) - if os.path.isfile(f): - result.append(f) - return result - - def load_from_dirs(self, filename, dirs=None, include=[]): - """ - Load conf file from dirs list. - If dirs not specified try all the well known locations. - Return False if no file was sucessfully loaded. - """ - count = 0 - for f in self.find_in_dirs(filename,dirs): - if self.load_file(f, include=include): - count += 1 - return count != 0 - - def load_backend(self, dirs=None): - """ - Load the backend configuration files from dirs list. - If dirs not specified try all the well known locations. - If a <backend>.conf file was found return it's full path name, - if not found return None. - """ - result = None - if dirs is None: - dirs = self.get_load_dirs() - conf = document.backend + '.conf' - conf2 = document.backend + '-' + document.doctype + '.conf' - # First search for filter backends. - for d in [os.path.join(d, 'backends', document.backend) for d in dirs]: - if self.load_file(conf,d): - result = os.path.join(d, conf) - self.load_file(conf2,d) - if not result: - # Search in the normal locations. - for d in dirs: - if self.load_file(conf,d): - result = os.path.join(d, conf) - self.load_file(conf2,d) - return result - - def load_filters(self, dirs=None): - """ - Load filter configuration files from 'filters' directory in dirs list. - If dirs not specified try all the well known locations. Suppress - loading if a file named __noautoload__ is in same directory as the conf - file unless the filter has been specified with the --filter - command-line option (in which case it is loaded unconditionally). - """ - if dirs is None: - dirs = self.get_load_dirs() - for d in dirs: - # Load filter .conf files. - filtersdir = os.path.join(d,'filters') - for dirpath,dirnames,filenames in os.walk(filtersdir): - subdirs = dirpath[len(filtersdir):].split(os.path.sep) - # True if processing a filter specified by a --filter option. - filter_opt = len(subdirs) > 1 and subdirs[1] in self.filters - if '__noautoload__' not in filenames or filter_opt: - for f in filenames: - if re.match(r'^.+\.conf$',f): - self.load_file(f,dirpath) - - def find_config_dir(self, *dirnames): - """ - Return path of configuration directory. - Try all the well known locations. - Return None if directory not found. - """ - for d in [os.path.join(d, *dirnames) for d in self.get_load_dirs()]: - if os.path.isdir(d): - return d - return None - - def set_theme_attributes(self): - theme = document.attributes.get('theme') - if theme and 'themedir' not in document.attributes: - themedir = self.find_config_dir('themes', theme) - if themedir: - document.attributes['themedir'] = themedir - iconsdir = os.path.join(themedir, 'icons') - if 'data-uri' in document.attributes and os.path.isdir(iconsdir): - document.attributes['iconsdir'] = iconsdir - else: - message.warning('missing theme: %s' % theme, linenos=False) - - def load_miscellaneous(self,d): - """Set miscellaneous configuration entries from dictionary 'd'.""" - def set_if_int_ge(name, d, min_value): - if name in d: - try: - val = int(d[name]) - if not val >= min_value: - raise ValueError, "not >= " + str(min_value) - setattr(self, name, val) - except ValueError: - raise EAsciiDoc, 'illegal [miscellaneous] %s entry' % name - set_if_int_ge('tabsize', d, 0) - set_if_int_ge('textwidth', d, 1) # DEPRECATED: Old tables only. - - if 'pagewidth' in d: - try: - val = float(d['pagewidth']) - self.pagewidth = val - except ValueError: - raise EAsciiDoc, 'illegal [miscellaneous] pagewidth entry' - - if 'pageunits' in d: - self.pageunits = d['pageunits'] - if 'outfilesuffix' in d: - self.outfilesuffix = d['outfilesuffix'] - if 'newline' in d: - # Convert escape sequences to their character values. - self.newline = literal_eval('"'+d['newline']+'"') - if 'subsnormal' in d: - self.subsnormal = parse_options(d['subsnormal'],SUBS_OPTIONS, - 'illegal [%s] %s: %s' % - ('miscellaneous','subsnormal',d['subsnormal'])) - if 'subsverbatim' in d: - self.subsverbatim = parse_options(d['subsverbatim'],SUBS_OPTIONS, - 'illegal [%s] %s: %s' % - ('miscellaneous','subsverbatim',d['subsverbatim'])) - - def validate(self): - """Check the configuration for internal consistancy. Called after all - configuration files have been loaded.""" - message.linenos = False # Disable document line numbers. - # Heuristic to validate that at least one configuration file was loaded. - if not self.specialchars or not self.tags or not lists: - raise EAsciiDoc,'incomplete configuration files' - # Check special characters are only one character long. - for k in self.specialchars.keys(): - if len(k) != 1: - raise EAsciiDoc,'[specialcharacters] ' \ - 'must be a single character: %s' % k - # Check all special words have a corresponding inline macro body. - for macro in self.specialwords.values(): - if not is_name(macro): - raise EAsciiDoc,'illegal special word name: %s' % macro - if not macro in self.sections: - message.warning('missing special word macro: [%s]' % macro) - # Check all text quotes have a corresponding tag. - for q in self.quotes.keys()[:]: - tag = self.quotes[q] - if not tag: - del self.quotes[q] # Undefine quote. - else: - if tag[0] == '#': - tag = tag[1:] - if not tag in self.tags: - message.warning('[quotes] %s missing tag definition: %s' % (q,tag)) - # Check all specialsections section names exist. - for k,v in self.specialsections.items(): - if not v: - del self.specialsections[k] - elif not v in self.sections: - message.warning('missing specialsections section: [%s]' % v) - paragraphs.validate() - lists.validate() - blocks.validate() - tables_OLD.validate() - tables.validate() - macros.validate() - message.linenos = None - - def entries_section(self,section_name): - """ - Return True if conf file section contains entries, not a markup - template. - """ - for name in self.ENTRIES_SECTIONS: - if re.match(name,section_name): - return True - return False - - def dump(self): - """Dump configuration to stdout.""" - # Header. - hdr = '' - hdr = hdr + '#' + writer.newline - hdr = hdr + '# Generated by AsciiDoc %s for %s %s.%s' % \ - (VERSION,document.backend,document.doctype,writer.newline) - t = time.asctime(time.localtime(time.time())) - hdr = hdr + '# %s%s' % (t,writer.newline) - hdr = hdr + '#' + writer.newline - sys.stdout.write(hdr) - # Dump special sections. - # Dump only the configuration file and command-line attributes. - # [miscellanous] entries are dumped as part of the [attributes]. - d = {} - d.update(self.conf_attrs) - d.update(self.cmd_attrs) - dump_section('attributes',d) - Title.dump() - dump_section('quotes',self.quotes) - dump_section('specialcharacters',self.specialchars) - d = {} - for k,v in self.specialwords.items(): - if v in d: - d[v] = '%s "%s"' % (d[v],k) # Append word list. - else: - d[v] = '"%s"' % k - dump_section('specialwords',d) - dump_section('replacements',self.replacements) - dump_section('replacements2',self.replacements2) - dump_section('replacements3',self.replacements3) - dump_section('specialsections',self.specialsections) - d = {} - for k,v in self.tags.items(): - d[k] = '%s|%s' % v - dump_section('tags',d) - paragraphs.dump() - lists.dump() - blocks.dump() - tables_OLD.dump() - tables.dump() - macros.dump() - # Dump remaining sections. - for k in self.sections.keys(): - if not self.entries_section(k): - sys.stdout.write('[%s]%s' % (k,writer.newline)) - for line in self.sections[k]: - sys.stdout.write('%s%s' % (line,writer.newline)) - sys.stdout.write(writer.newline) - - def subs_section(self,section,d): - """Section attribute substitution using attributes from - document.attributes and 'd'. Lines containing undefinded - attributes are deleted.""" - if section in self.sections: - return subs_attrs(self.sections[section],d) - else: - message.warning('missing section: [%s]' % section) - return () - - def parse_tags(self): - """Parse [tags] section entries into self.tags dictionary.""" - d = {} - parse_entries(self.sections.get('tags',()),d) - for k,v in d.items(): - if v is None: - if k in self.tags: - del self.tags[k] - elif v == '': - self.tags[k] = (None,None) - else: - mo = re.match(r'(?P<stag>.*)\|(?P<etag>.*)',v) - if mo: - self.tags[k] = (mo.group('stag'), mo.group('etag')) - else: - raise EAsciiDoc,'[tag] %s value malformed' % k - - def tag(self, name, d=None): - """Returns (starttag,endtag) tuple named name from configuration file - [tags] section. Raise error if not found. If a dictionary 'd' is - passed then merge with document attributes and perform attribute - substitution on tags.""" - if not name in self.tags: - raise EAsciiDoc, 'missing tag: %s' % name - stag,etag = self.tags[name] - if d is not None: - # TODO: Should we warn if substitution drops a tag? - if stag: - stag = subs_attrs(stag,d) - if etag: - etag = subs_attrs(etag,d) - if stag is None: stag = '' - if etag is None: etag = '' - return (stag,etag) - - def parse_specialsections(self): - """Parse specialsections section to self.specialsections dictionary.""" - # TODO: This is virtually the same as parse_replacements() and should - # be factored to single routine. - d = {} - parse_entries(self.sections.get('specialsections',()),d,unquote=True) - for pat,sectname in d.items(): - pat = strip_quotes(pat) - if not is_re(pat): - raise EAsciiDoc,'[specialsections] entry ' \ - 'is not a valid regular expression: %s' % pat - if sectname is None: - if pat in self.specialsections: - del self.specialsections[pat] - else: - self.specialsections[pat] = sectname - - def parse_replacements(self,sect='replacements'): - """Parse replacements section into self.replacements dictionary.""" - d = OrderedDict() - parse_entries(self.sections.get(sect,()), d, unquote=True) - for pat,rep in d.items(): - if not self.set_replacement(pat, rep, getattr(self,sect)): - raise EAsciiDoc,'[%s] entry in %s is not a valid' \ - ' regular expression: %s' % (sect,self.fname,pat) - - @staticmethod - def set_replacement(pat, rep, replacements): - """Add pattern and replacement to replacements dictionary.""" - pat = strip_quotes(pat) - if not is_re(pat): - return False - if rep is None: - if pat in replacements: - del replacements[pat] - else: - replacements[pat] = strip_quotes(rep) - return True - - def subs_replacements(self,s,sect='replacements'): - """Substitute patterns from self.replacements in 's'.""" - result = s - for pat,rep in getattr(self,sect).items(): - result = re.sub(pat, rep, result) - return result - - def parse_specialwords(self): - """Parse special words section into self.specialwords dictionary.""" - reo = re.compile(r'(?:\s|^)(".+?"|[^"\s]+)(?=\s|$)') - for line in self.sections.get('specialwords',()): - e = parse_entry(line) - if not e: - raise EAsciiDoc,'[specialwords] entry in %s is malformed: %s' \ - % (self.fname,line) - name,wordlist = e - if not is_name(name): - raise EAsciiDoc,'[specialwords] name in %s is illegal: %s' \ - % (self.fname,name) - if wordlist is None: - # Undefine all words associated with 'name'. - for k,v in self.specialwords.items(): - if v == name: - del self.specialwords[k] - else: - words = reo.findall(wordlist) - for word in words: - word = strip_quotes(word) - if not is_re(word): - raise EAsciiDoc,'[specialwords] entry in %s ' \ - 'is not a valid regular expression: %s' \ - % (self.fname,word) - self.specialwords[word] = name - - def subs_specialchars(self,s): - """Perform special character substitution on string 's'.""" - """It may seem like a good idea to escape special characters with a '\' - character, the reason we don't is because the escape character itself - then has to be escaped and this makes including code listings - problematic. Use the predefined {amp},{lt},{gt} attributes instead.""" - result = '' - for ch in s: - result = result + self.specialchars.get(ch,ch) - return result - - def subs_specialchars_reverse(self,s): - """Perform reverse special character substitution on string 's'.""" - result = s - for k,v in self.specialchars.items(): - result = result.replace(v, k) - return result - - def subs_specialwords(self,s): - """Search for word patterns from self.specialwords in 's' and - substitute using corresponding macro.""" - result = s - for word in self.specialwords.keys(): - result = re.sub(word, _subs_specialwords, result) - return result - - def expand_templates(self,entries): - """Expand any template::[] macros in a list of section entries.""" - result = [] - for line in entries: - mo = macros.match('+',r'template',line) - if mo: - s = mo.group('attrlist') - if s in self.sections: - result += self.expand_templates(self.sections[s]) - else: - message.warning('missing section: [%s]' % s) - result.append(line) - else: - result.append(line) - return result - - def expand_all_templates(self): - for k,v in self.sections.items(): - self.sections[k] = self.expand_templates(v) - - def section2tags(self, section, d={}, skipstart=False, skipend=False): - """Perform attribute substitution on 'section' using document - attributes plus 'd' attributes. Return tuple (stag,etag) containing - pre and post | placeholder tags. 'skipstart' and 'skipend' are - used to suppress substitution.""" - assert section is not None - if section in self.sections: - body = self.sections[section] - else: - message.warning('missing section: [%s]' % section) - body = () - # Split macro body into start and end tag lists. - stag = [] - etag = [] - in_stag = True - for s in body: - if in_stag: - mo = re.match(r'(?P<stag>.*)\|(?P<etag>.*)',s) - if mo: - if mo.group('stag'): - stag.append(mo.group('stag')) - if mo.group('etag'): - etag.append(mo.group('etag')) - in_stag = False - else: - stag.append(s) - else: - etag.append(s) - # Do attribute substitution last so {brkbar} can be used to escape |. - # But don't do attribute substitution on title -- we've already done it. - title = d.get('title') - if title: - d['title'] = chr(0) # Replace with unused character. - if not skipstart: - stag = subs_attrs(stag, d) - if not skipend: - etag = subs_attrs(etag, d) - # Put the {title} back. - if title: - stag = map(lambda x: x.replace(chr(0), title), stag) - etag = map(lambda x: x.replace(chr(0), title), etag) - d['title'] = title - return (stag,etag) - - -#--------------------------------------------------------------------------- -# Deprecated old table classes follow. -# Naming convention is an _OLD name suffix. -# These will be removed from future versions of AsciiDoc - -def join_lines_OLD(lines): - """Return a list in which lines terminated with the backslash line - continuation character are joined.""" - result = [] - s = '' - continuation = False - for line in lines: - if line and line[-1] == '\\': - s = s + line[:-1] - continuation = True - continue - if continuation: - result.append(s+line) - s = '' - continuation = False - else: - result.append(line) - if continuation: - result.append(s) - return result - -class Column_OLD: - """Table column.""" - def __init__(self): - self.colalign = None # 'left','right','center' - self.rulerwidth = None - self.colwidth = None # Output width in page units. - -class Table_OLD(AbstractBlock): - COL_STOP = r"(`|'|\.)" # RE. - ALIGNMENTS = {'`':'left', "'":'right', '.':'center'} - FORMATS = ('fixed','csv','dsv') - def __init__(self): - AbstractBlock.__init__(self) - self.CONF_ENTRIES += ('template','fillchar','format','colspec', - 'headrow','footrow','bodyrow','headdata', - 'footdata', 'bodydata') - # Configuration parameters. - self.fillchar=None - self.format=None # 'fixed','csv','dsv' - self.colspec=None - self.headrow=None - self.footrow=None - self.bodyrow=None - self.headdata=None - self.footdata=None - self.bodydata=None - # Calculated parameters. - self.underline=None # RE matching current table underline. - self.isnumeric=False # True if numeric ruler. - self.tablewidth=None # Optional table width scale factor. - self.columns=[] # List of Columns. - # Other. - self.check_msg='' # Message set by previous self.validate() call. - def load(self,name,entries): - AbstractBlock.load(self,name,entries) - """Update table definition from section entries in 'entries'.""" - for k,v in entries.items(): - if k == 'fillchar': - if v and len(v) == 1: - self.fillchar = v - else: - raise EAsciiDoc,'malformed table fillchar: %s' % v - elif k == 'format': - if v in Table_OLD.FORMATS: - self.format = v - else: - raise EAsciiDoc,'illegal table format: %s' % v - elif k == 'colspec': - self.colspec = v - elif k == 'headrow': - self.headrow = v - elif k == 'footrow': - self.footrow = v - elif k == 'bodyrow': - self.bodyrow = v - elif k == 'headdata': - self.headdata = v - elif k == 'footdata': - self.footdata = v - elif k == 'bodydata': - self.bodydata = v - def dump(self): - AbstractBlock.dump(self) - write = lambda s: sys.stdout.write('%s%s' % (s,writer.newline)) - write('fillchar='+self.fillchar) - write('format='+self.format) - if self.colspec: - write('colspec='+self.colspec) - if self.headrow: - write('headrow='+self.headrow) - if self.footrow: - write('footrow='+self.footrow) - write('bodyrow='+self.bodyrow) - if self.headdata: - write('headdata='+self.headdata) - if self.footdata: - write('footdata='+self.footdata) - write('bodydata='+self.bodydata) - write('') - def validate(self): - AbstractBlock.validate(self) - """Check table definition and set self.check_msg if invalid else set - self.check_msg to blank string.""" - # Check global table parameters. - if config.textwidth is None: - self.check_msg = 'missing [miscellaneous] textwidth entry' - elif config.pagewidth is None: - self.check_msg = 'missing [miscellaneous] pagewidth entry' - elif config.pageunits is None: - self.check_msg = 'missing [miscellaneous] pageunits entry' - elif self.headrow is None: - self.check_msg = 'missing headrow entry' - elif self.footrow is None: - self.check_msg = 'missing footrow entry' - elif self.bodyrow is None: - self.check_msg = 'missing bodyrow entry' - elif self.headdata is None: - self.check_msg = 'missing headdata entry' - elif self.footdata is None: - self.check_msg = 'missing footdata entry' - elif self.bodydata is None: - self.check_msg = 'missing bodydata entry' - else: - # No errors. - self.check_msg = '' - def isnext(self): - return AbstractBlock.isnext(self) - def parse_ruler(self,ruler): - """Parse ruler calculating underline and ruler column widths.""" - fc = re.escape(self.fillchar) - # Strip and save optional tablewidth from end of ruler. - mo = re.match(r'^(.*'+fc+r'+)([\d\.]+)$',ruler) - if mo: - ruler = mo.group(1) - self.tablewidth = float(mo.group(2)) - self.attributes['tablewidth'] = str(float(self.tablewidth)) - else: - self.tablewidth = None - self.attributes['tablewidth'] = '100.0' - # Guess whether column widths are specified numerically or not. - if ruler[1] != self.fillchar: - # If the first column does not start with a fillchar then numeric. - self.isnumeric = True - elif ruler[1:] == self.fillchar*len(ruler[1:]): - # The case of one column followed by fillchars is numeric. - self.isnumeric = True - else: - self.isnumeric = False - # Underlines must be 3 or more fillchars. - self.underline = r'^' + fc + r'{3,}$' - splits = re.split(self.COL_STOP,ruler)[1:] - # Build self.columns. - for i in range(0,len(splits),2): - c = Column_OLD() - c.colalign = self.ALIGNMENTS[splits[i]] - s = splits[i+1] - if self.isnumeric: - # Strip trailing fillchars. - s = re.sub(fc+r'+$','',s) - if s == '': - c.rulerwidth = None - else: - try: - val = int(s) - if not val > 0: - raise ValueError, 'not > 0' - c.rulerwidth = val - except ValueError: - raise EAsciiDoc, 'malformed ruler: bad width' - else: # Calculate column width from inter-fillchar intervals. - if not re.match(r'^'+fc+r'+$',s): - raise EAsciiDoc,'malformed ruler: illegal fillchars' - c.rulerwidth = len(s)+1 - self.columns.append(c) - # Fill in unspecified ruler widths. - if self.isnumeric: - if self.columns[0].rulerwidth is None: - prevwidth = 1 - for c in self.columns: - if c.rulerwidth is None: - c.rulerwidth = prevwidth - prevwidth = c.rulerwidth - def build_colspecs(self): - """Generate colwidths and colspecs. This can only be done after the - table arguments have been parsed since we use the table format.""" - self.attributes['cols'] = len(self.columns) - # Calculate total ruler width. - totalwidth = 0 - for c in self.columns: - totalwidth = totalwidth + c.rulerwidth - if totalwidth <= 0: - raise EAsciiDoc,'zero width table' - # Calculate marked up colwidths from rulerwidths. - for c in self.columns: - # Convert ruler width to output page width. - width = float(c.rulerwidth) - if self.format == 'fixed': - if self.tablewidth is None: - # Size proportional to ruler width. - colfraction = width/config.textwidth - else: - # Size proportional to page width. - colfraction = width/totalwidth - else: - # Size proportional to page width. - colfraction = width/totalwidth - c.colwidth = colfraction * config.pagewidth # To page units. - if self.tablewidth is not None: - c.colwidth = c.colwidth * self.tablewidth # Scale factor. - if self.tablewidth > 1: - c.colwidth = c.colwidth/100 # tablewidth is in percent. - # Build colspecs. - if self.colspec: - cols = [] - i = 0 - for c in self.columns: - i += 1 - self.attributes['colalign'] = c.colalign - self.attributes['colwidth'] = str(int(c.colwidth)) - self.attributes['colnumber'] = str(i + 1) - s = subs_attrs(self.colspec,self.attributes) - if not s: - message.warning('colspec dropped: contains undefined attribute') - else: - cols.append(s) - self.attributes['colspecs'] = writer.newline.join(cols) - def split_rows(self,rows): - """Return a two item tuple containing a list of lines up to but not - including the next underline (continued lines are joined ) and the - tuple of all lines after the underline.""" - reo = re.compile(self.underline) - i = 0 - while not reo.match(rows[i]): - i = i+1 - if i == 0: - raise EAsciiDoc,'missing table rows' - if i >= len(rows): - raise EAsciiDoc,'closing [%s] underline expected' % self.defname - return (join_lines_OLD(rows[:i]), rows[i+1:]) - def parse_rows(self, rows, rtag, dtag): - """Parse rows list using the row and data tags. Returns a substituted - list of output lines.""" - result = [] - # Source rows are parsed as single block, rather than line by line, to - # allow the CSV reader to handle multi-line rows. - if self.format == 'fixed': - rows = self.parse_fixed(rows) - elif self.format == 'csv': - rows = self.parse_csv(rows) - elif self.format == 'dsv': - rows = self.parse_dsv(rows) - else: - assert True,'illegal table format' - # Substitute and indent all data in all rows. - stag,etag = subs_tag(rtag,self.attributes) - for row in rows: - result.append(' '+stag) - for data in self.subs_row(row,dtag): - result.append(' '+data) - result.append(' '+etag) - return result - def subs_row(self, data, dtag): - """Substitute the list of source row data elements using the data tag. - Returns a substituted list of output table data items.""" - result = [] - if len(data) < len(self.columns): - message.warning('fewer row data items then table columns') - if len(data) > len(self.columns): - message.warning('more row data items than table columns') - for i in range(len(self.columns)): - if i > len(data) - 1: - d = '' # Fill missing column data with blanks. - else: - d = data[i] - c = self.columns[i] - self.attributes['colalign'] = c.colalign - self.attributes['colwidth'] = str(int(c.colwidth)) - self.attributes['colnumber'] = str(i + 1) - stag,etag = subs_tag(dtag,self.attributes) - # Insert AsciiDoc line break (' +') where row data has newlines - # ('\n'). This is really only useful when the table format is csv - # and the output markup is HTML. It's also a bit dubious in that it - # assumes the user has not modified the shipped line break pattern. - subs = self.get_subs()[0] - if 'replacements2' in subs: - # Insert line breaks in cell data. - d = re.sub(r'(?m)\n',r' +\n',d) - d = d.split('\n') # So writer.newline is written. - else: - d = [d] - result = result + [stag] + Lex.subs(d,subs) + [etag] - return result - def parse_fixed(self,rows): - """Parse the list of source table rows. Each row item in the returned - list contains a list of cell data elements.""" - result = [] - for row in rows: - data = [] - start = 0 - # build an encoded representation - row = char_decode(row) - for c in self.columns: - end = start + c.rulerwidth - if c is self.columns[-1]: - # Text in last column can continue forever. - # Use the encoded string to slice, but convert back - # to plain string before further processing - data.append(char_encode(row[start:]).strip()) - else: - data.append(char_encode(row[start:end]).strip()) - start = end - result.append(data) - return result - def parse_csv(self,rows): - """Parse the list of source table rows. Each row item in the returned - list contains a list of cell data elements.""" - import StringIO - import csv - result = [] - rdr = csv.reader(StringIO.StringIO('\r\n'.join(rows)), - skipinitialspace=True) - try: - for row in rdr: - result.append(row) - except Exception: - raise EAsciiDoc,'csv parse error: %s' % row - return result - def parse_dsv(self,rows): - """Parse the list of source table rows. Each row item in the returned - list contains a list of cell data elements.""" - separator = self.attributes.get('separator',':') - separator = literal_eval('"'+separator+'"') - if len(separator) != 1: - raise EAsciiDoc,'malformed dsv separator: %s' % separator - # TODO If separator is preceeded by an odd number of backslashes then - # it is escaped and should not delimit. - result = [] - for row in rows: - # Skip blank lines - if row == '': continue - # Unescape escaped characters. - row = literal_eval('"'+row.replace('"','\\"')+'"') - data = row.split(separator) - data = [s.strip() for s in data] - result.append(data) - return result - def translate(self): - message.deprecated('old tables syntax') - AbstractBlock.translate(self) - # Reset instance specific properties. - self.underline = None - self.columns = [] - attrs = {} - BlockTitle.consume(attrs) - # Add relevant globals to table substitutions. - attrs['pagewidth'] = str(config.pagewidth) - attrs['pageunits'] = config.pageunits - # Mix in document attribute list. - AttributeList.consume(attrs) - # Validate overridable attributes. - for k,v in attrs.items(): - if k == 'format': - if v not in self.FORMATS: - raise EAsciiDoc, 'illegal [%s] %s: %s' % (self.defname,k,v) - self.format = v - elif k == 'tablewidth': - try: - self.tablewidth = float(attrs['tablewidth']) - except Exception: - raise EAsciiDoc, 'illegal [%s] %s: %s' % (self.defname,k,v) - self.merge_attributes(attrs) - # Parse table ruler. - ruler = reader.read() - assert re.match(self.delimiter,ruler) - self.parse_ruler(ruler) - # Read the entire table. - table = [] - while True: - line = reader.read_next() - # Table terminated by underline followed by a blank line or EOF. - if len(table) > 0 and re.match(self.underline,table[-1]): - if line in ('',None): - break; - if line is None: - raise EAsciiDoc,'closing [%s] underline expected' % self.defname - table.append(reader.read()) - # EXPERIMENTAL: The number of lines in the table, requested by Benjamin Klum. - self.attributes['rows'] = str(len(table)) - if self.check_msg: # Skip if table definition was marked invalid. - message.warning('skipping [%s] table: %s' % (self.defname,self.check_msg)) - return - self.push_blockname('table') - # Generate colwidths and colspecs. - self.build_colspecs() - # Generate headrows, footrows, bodyrows. - # Headrow, footrow and bodyrow data replaces same named attributes in - # the table markup template. In order to ensure this data does not get - # a second attribute substitution (which would interfere with any - # already substituted inline passthroughs) unique placeholders are used - # (the tab character does not appear elsewhere since it is expanded on - # input) which are replaced after template attribute substitution. - headrows = footrows = [] - bodyrows,table = self.split_rows(table) - if table: - headrows = bodyrows - bodyrows,table = self.split_rows(table) - if table: - footrows,table = self.split_rows(table) - if headrows: - headrows = self.parse_rows(headrows, self.headrow, self.headdata) - headrows = writer.newline.join(headrows) - self.attributes['headrows'] = '\x07headrows\x07' - if footrows: - footrows = self.parse_rows(footrows, self.footrow, self.footdata) - footrows = writer.newline.join(footrows) - self.attributes['footrows'] = '\x07footrows\x07' - bodyrows = self.parse_rows(bodyrows, self.bodyrow, self.bodydata) - bodyrows = writer.newline.join(bodyrows) - self.attributes['bodyrows'] = '\x07bodyrows\x07' - table = subs_attrs(config.sections[self.template],self.attributes) - table = writer.newline.join(table) - # Before we finish replace the table head, foot and body place holders - # with the real data. - if headrows: - table = table.replace('\x07headrows\x07', headrows, 1) - if footrows: - table = table.replace('\x07footrows\x07', footrows, 1) - table = table.replace('\x07bodyrows\x07', bodyrows, 1) - writer.write(table,trace='table') - self.pop_blockname() - -class Tables_OLD(AbstractBlocks): - """List of tables.""" - BLOCK_TYPE = Table_OLD - PREFIX = 'old_tabledef-' - def __init__(self): - AbstractBlocks.__init__(self) - def load(self,sections): - AbstractBlocks.load(self,sections) - def validate(self): - # Does not call AbstractBlocks.validate(). - # Check we have a default table definition, - for i in range(len(self.blocks)): - if self.blocks[i].defname == 'old_tabledef-default': - default = self.blocks[i] - break - else: - raise EAsciiDoc,'missing section: [OLD_tabledef-default]' - # Set default table defaults. - if default.format is None: default.subs = 'fixed' - # Propagate defaults to unspecified table parameters. - for b in self.blocks: - if b is not default: - if b.fillchar is None: b.fillchar = default.fillchar - if b.format is None: b.format = default.format - if b.template is None: b.template = default.template - if b.colspec is None: b.colspec = default.colspec - if b.headrow is None: b.headrow = default.headrow - if b.footrow is None: b.footrow = default.footrow - if b.bodyrow is None: b.bodyrow = default.bodyrow - if b.headdata is None: b.headdata = default.headdata - if b.footdata is None: b.footdata = default.footdata - if b.bodydata is None: b.bodydata = default.bodydata - # Check all tables have valid fill character. - for b in self.blocks: - if not b.fillchar or len(b.fillchar) != 1: - raise EAsciiDoc,'[%s] missing or illegal fillchar' % b.defname - # Build combined tables delimiter patterns and assign defaults. - delimiters = [] - for b in self.blocks: - # Ruler is: - # (ColStop,(ColWidth,FillChar+)?)+, FillChar+, TableWidth? - b.delimiter = r'^(' + Table_OLD.COL_STOP \ - + r'(\d*|' + re.escape(b.fillchar) + r'*)' \ - + r')+' \ - + re.escape(b.fillchar) + r'+' \ - + '([\d\.]*)$' - delimiters.append(b.delimiter) - if not b.headrow: - b.headrow = b.bodyrow - if not b.footrow: - b.footrow = b.bodyrow - if not b.headdata: - b.headdata = b.bodydata - if not b.footdata: - b.footdata = b.bodydata - self.delimiters = re_join(delimiters) - # Check table definitions are valid. - for b in self.blocks: - b.validate() - if config.verbose: - if b.check_msg: - message.warning('[%s] table definition: %s' % (b.defname,b.check_msg)) - -# End of deprecated old table classes. -#--------------------------------------------------------------------------- - -#--------------------------------------------------------------------------- -# filter and theme plugin commands. -#--------------------------------------------------------------------------- -import shutil, zipfile - -def die(msg): - message.stderr(msg) - sys.exit(1) - -def extract_zip(zip_file, destdir): - """ - Unzip Zip file to destination directory. - Throws exception if error occurs. - """ - zipo = zipfile.ZipFile(zip_file, 'r') - try: - for zi in zipo.infolist(): - outfile = zi.filename - if not outfile.endswith('/'): - d, outfile = os.path.split(outfile) - directory = os.path.normpath(os.path.join(destdir, d)) - if not os.path.isdir(directory): - os.makedirs(directory) - outfile = os.path.join(directory, outfile) - perms = (zi.external_attr >> 16) & 0777 - message.verbose('extracting: %s' % outfile) - flags = os.O_CREAT | os.O_WRONLY - if sys.platform == 'win32': - flags |= os.O_BINARY - if perms == 0: - # Zip files created under Windows do not include permissions. - fh = os.open(outfile, flags) - else: - fh = os.open(outfile, flags, perms) - try: - os.write(fh, zipo.read(zi.filename)) - finally: - os.close(fh) - finally: - zipo.close() - -def create_zip(zip_file, src, skip_hidden=False): - """ - Create Zip file. If src is a directory archive all contained files and - subdirectories, if src is a file archive the src file. - Files and directories names starting with . are skipped - if skip_hidden is True. - Throws exception if error occurs. - """ - zipo = zipfile.ZipFile(zip_file, 'w') - try: - if os.path.isfile(src): - arcname = os.path.basename(src) - message.verbose('archiving: %s' % arcname) - zipo.write(src, arcname, zipfile.ZIP_DEFLATED) - elif os.path.isdir(src): - srcdir = os.path.abspath(src) - if srcdir[-1] != os.path.sep: - srcdir += os.path.sep - for root, dirs, files in os.walk(srcdir): - arcroot = os.path.abspath(root)[len(srcdir):] - if skip_hidden: - for d in dirs[:]: - if d.startswith('.'): - message.verbose('skipping: %s' % os.path.join(arcroot, d)) - del dirs[dirs.index(d)] - for f in files: - filename = os.path.join(root,f) - arcname = os.path.join(arcroot, f) - if skip_hidden and f.startswith('.'): - message.verbose('skipping: %s' % arcname) - continue - message.verbose('archiving: %s' % arcname) - zipo.write(filename, arcname, zipfile.ZIP_DEFLATED) - else: - raise ValueError,'src must specify directory or file: %s' % src - finally: - zipo.close() - -class Plugin: - """ - --filter and --theme option commands. - """ - CMDS = ('install','remove','list','build') - - type = None # 'backend', 'filter' or 'theme'. - - @staticmethod - def get_dir(): - """ - Return plugins path (.asciidoc/filters or .asciidoc/themes) in user's - home direcory or None if user home not defined. - """ - result = userdir() - if result: - result = os.path.join(result, '.asciidoc', Plugin.type+'s') - return result - - @staticmethod - def install(args): - """ - Install plugin Zip file. - args[0] is plugin zip file path. - args[1] is optional destination plugins directory. - """ - if len(args) not in (1,2): - die('invalid number of arguments: --%s install %s' - % (Plugin.type, ' '.join(args))) - zip_file = args[0] - if not os.path.isfile(zip_file): - die('file not found: %s' % zip_file) - reo = re.match(r'^\w+',os.path.split(zip_file)[1]) - if not reo: - die('file name does not start with legal %s name: %s' - % (Plugin.type, zip_file)) - plugin_name = reo.group() - if len(args) == 2: - plugins_dir = args[1] - if not os.path.isdir(plugins_dir): - die('directory not found: %s' % plugins_dir) - else: - plugins_dir = Plugin.get_dir() - if not plugins_dir: - die('user home directory is not defined') - plugin_dir = os.path.join(plugins_dir, plugin_name) - if os.path.exists(plugin_dir): - die('%s is already installed: %s' % (Plugin.type, plugin_dir)) - try: - os.makedirs(plugin_dir) - except Exception,e: - die('failed to create %s directory: %s' % (Plugin.type, str(e))) - try: - extract_zip(zip_file, plugin_dir) - except Exception,e: - if os.path.isdir(plugin_dir): - shutil.rmtree(plugin_dir) - die('failed to extract %s: %s' % (Plugin.type, str(e))) - - @staticmethod - def remove(args): - """ - Delete plugin directory. - args[0] is plugin name. - args[1] is optional plugin directory (defaults to ~/.asciidoc/<plugin_name>). - """ - if len(args) not in (1,2): - die('invalid number of arguments: --%s remove %s' - % (Plugin.type, ' '.join(args))) - plugin_name = args[0] - if not re.match(r'^\w+$',plugin_name): - die('illegal %s name: %s' % (Plugin.type, plugin_name)) - if len(args) == 2: - d = args[1] - if not os.path.isdir(d): - die('directory not found: %s' % d) - else: - d = Plugin.get_dir() - if not d: - die('user directory is not defined') - plugin_dir = os.path.join(d, plugin_name) - if not os.path.isdir(plugin_dir): - die('cannot find %s: %s' % (Plugin.type, plugin_dir)) - try: - message.verbose('removing: %s' % plugin_dir) - shutil.rmtree(plugin_dir) - except Exception,e: - die('failed to delete %s: %s' % (Plugin.type, str(e))) - - @staticmethod - def list(args): - """ - List all plugin directories (global and local). - """ - for d in [os.path.join(d, Plugin.type+'s') for d in config.get_load_dirs()]: - if os.path.isdir(d): - for f in os.walk(d).next()[1]: - message.stdout(os.path.join(d,f)) - - @staticmethod - def build(args): - """ - Create plugin Zip file. - args[0] is Zip file name. - args[1] is plugin directory. - """ - if len(args) != 2: - die('invalid number of arguments: --%s build %s' - % (Plugin.type, ' '.join(args))) - zip_file = args[0] - plugin_source = args[1] - if not (os.path.isdir(plugin_source) or os.path.isfile(plugin_source)): - die('plugin source not found: %s' % plugin_source) - try: - create_zip(zip_file, plugin_source, skip_hidden=True) - except Exception,e: - die('failed to create %s: %s' % (zip_file, str(e))) - - -#--------------------------------------------------------------------------- -# Application code. -#--------------------------------------------------------------------------- -# Constants -# --------- -APP_FILE = None # This file's full path. -APP_DIR = None # This file's directory. -USER_DIR = None # ~/.asciidoc -# Global configuration files directory (set by Makefile build target). -CONF_DIR = '/etc/asciidoc' -HELP_FILE = 'help.conf' # Default (English) help file. - -# Globals -# ------- -document = Document() # The document being processed. -config = Config() # Configuration file reader. -reader = Reader() # Input stream line reader. -writer = Writer() # Output stream line writer. -message = Message() # Message functions. -paragraphs = Paragraphs() # Paragraph definitions. -lists = Lists() # List definitions. -blocks = DelimitedBlocks() # DelimitedBlock definitions. -tables_OLD = Tables_OLD() # Table_OLD definitions. -tables = Tables() # Table definitions. -macros = Macros() # Macro definitions. -calloutmap = CalloutMap() # Coordinates callouts and callout list. -trace = Trace() # Implements trace attribute processing. - -### Used by asciidocapi.py ### -# List of message strings written to stderr. -messages = message.messages - - -def asciidoc(backend, doctype, confiles, infile, outfile, options): - """Convert AsciiDoc document to DocBook document of type doctype - The AsciiDoc document is read from file object src the translated - DocBook file written to file object dst.""" - def load_conffiles(include=[], exclude=[]): - # Load conf files specified on the command-line and by the conf-files attribute. - files = document.attributes.get('conf-files','') - files = [f.strip() for f in files.split('|') if f.strip()] - files += confiles - if files: - for f in files: - if os.path.isfile(f): - config.load_file(f, include=include, exclude=exclude) - else: - raise EAsciiDoc,'missing configuration file: %s' % f - try: - document.attributes['python'] = sys.executable - for f in config.filters: - if not config.find_config_dir('filters', f): - raise EAsciiDoc,'missing filter: %s' % f - if doctype not in (None,'article','manpage','book'): - raise EAsciiDoc,'illegal document type' - # Set processing options. - for o in options: - if o == '-c': config.dumping = True - if o == '-s': config.header_footer = False - if o == '-v': config.verbose = True - document.update_attributes() - if '-e' not in options: - # Load asciidoc.conf files in two passes: the first for attributes - # the second for everything. This is so that locally set attributes - # available are in the global asciidoc.conf - if not config.load_from_dirs('asciidoc.conf',include=['attributes']): - raise EAsciiDoc,'configuration file asciidoc.conf missing' - load_conffiles(include=['attributes']) - config.load_from_dirs('asciidoc.conf') - if infile != '<stdin>': - indir = os.path.dirname(infile) - config.load_file('asciidoc.conf', indir, - include=['attributes','titles','specialchars']) - else: - load_conffiles(include=['attributes','titles','specialchars']) - document.update_attributes() - # Check the infile exists. - if infile != '<stdin>': - if not os.path.isfile(infile): - raise EAsciiDoc,'input file %s missing' % infile - document.infile = infile - AttributeList.initialize() - # Open input file and parse document header. - reader.tabsize = config.tabsize - reader.open(infile) - has_header = document.parse_header(doctype,backend) - # doctype is now finalized. - document.attributes['doctype-'+document.doctype] = '' - config.set_theme_attributes() - # Load backend configuration files. - if '-e' not in options: - f = document.backend + '.conf' - conffile = config.load_backend() - if not conffile: - raise EAsciiDoc,'missing backend conf file: %s' % f - document.attributes['backend-confdir'] = os.path.dirname(conffile) - # backend is now known. - document.attributes['backend-'+document.backend] = '' - document.attributes[document.backend+'-'+document.doctype] = '' - doc_conffiles = [] - if '-e' not in options: - # Load filters and language file. - config.load_filters() - document.load_lang() - if infile != '<stdin>': - # Load local conf files (files in the source file directory). - config.load_file('asciidoc.conf', indir) - config.load_backend([indir]) - config.load_filters([indir]) - # Load document specific configuration files. - f = os.path.splitext(infile)[0] - doc_conffiles = [ - f for f in (f+'.conf', f+'-'+document.backend+'.conf') - if os.path.isfile(f) ] - for f in doc_conffiles: - config.load_file(f) - load_conffiles() - # Build asciidoc-args attribute. - args = '' - # Add custom conf file arguments. - for f in doc_conffiles + confiles: - args += ' --conf-file "%s"' % f - # Add command-line and header attributes. - attrs = {} - attrs.update(AttributeEntry.attributes) - attrs.update(config.cmd_attrs) - if 'title' in attrs: # Don't pass the header title. - del attrs['title'] - for k,v in attrs.items(): - if v: - args += ' --attribute "%s=%s"' % (k,v) - else: - args += ' --attribute "%s"' % k - document.attributes['asciidoc-args'] = args - # Build outfile name. - if outfile is None: - outfile = os.path.splitext(infile)[0] + '.' + document.backend - if config.outfilesuffix: - # Change file extension. - outfile = os.path.splitext(outfile)[0] + config.outfilesuffix - document.outfile = outfile - # Document header attributes override conf file attributes. - document.attributes.update(AttributeEntry.attributes) - document.update_attributes() - # Set the default embedded icons directory. - if 'data-uri' in document.attributes and not os.path.isdir(document.attributes['iconsdir']): - document.attributes['iconsdir'] = os.path.join( - document.attributes['asciidoc-confdir'], 'images/icons') - # Configuration is fully loaded. - config.expand_all_templates() - # Check configuration for consistency. - config.validate() - # Initialize top level block name. - if document.attributes.get('blockname'): - AbstractBlock.blocknames.append(document.attributes['blockname']) - paragraphs.initialize() - lists.initialize() - if config.dumping: - config.dump() - else: - writer.newline = config.newline - try: - writer.open(outfile, reader.bom) - try: - document.translate(has_header) # Generate the output. - finally: - writer.close() - finally: - reader.closefile() - except KeyboardInterrupt: - raise - except Exception,e: - # Cleanup. - if outfile and outfile != '<stdout>' and os.path.isfile(outfile): - os.unlink(outfile) - # Build and print error description. - msg = 'FAILED: ' - if reader.cursor: - msg = message.format('', msg) - if isinstance(e, EAsciiDoc): - message.stderr('%s%s' % (msg,str(e))) - else: - if __name__ == '__main__': - message.stderr(msg+'unexpected error:') - message.stderr('-'*60) - traceback.print_exc(file=sys.stderr) - message.stderr('-'*60) - else: - message.stderr('%sunexpected error: %s' % (msg,str(e))) - sys.exit(1) - -def usage(msg=''): - if msg: - message.stderr(msg) - show_help('default', sys.stderr) - -def show_help(topic, f=None): - """Print help topic to file object f.""" - if f is None: - f = sys.stdout - # Select help file. - lang = config.cmd_attrs.get('lang') - if lang and lang != 'en': - help_file = 'help-' + lang + '.conf' - else: - help_file = HELP_FILE - # Print [topic] section from help file. - config.load_from_dirs(help_file) - if len(config.sections) == 0: - # Default to English if specified language help files not found. - help_file = HELP_FILE - config.load_from_dirs(help_file) - if len(config.sections) == 0: - message.stderr('no help topics found') - sys.exit(1) - n = 0 - for k in config.sections: - if re.match(re.escape(topic), k): - n += 1 - lines = config.sections[k] - if n == 0: - if topic != 'topics': - message.stderr('help topic not found: [%s] in %s' % (topic, help_file)) - message.stderr('available help topics: %s' % ', '.join(config.sections.keys())) - sys.exit(1) - elif n > 1: - message.stderr('ambiguous help topic: %s' % topic) - else: - for line in lines: - print >>f, line - -### Used by asciidocapi.py ### -def execute(cmd,opts,args): - """ - Execute asciidoc with command-line options and arguments. - cmd is asciidoc command or asciidoc.py path. - opts and args conform to values returned by getopt.getopt(). - Raises SystemExit if an error occurs. - - Doctests: - - 1. Check execution: - - >>> import StringIO - >>> infile = StringIO.StringIO('Hello *{author}*') - >>> outfile = StringIO.StringIO() - >>> opts = [] - >>> opts.append(('--backend','html4')) - >>> opts.append(('--no-header-footer',None)) - >>> opts.append(('--attribute','author=Joe Bloggs')) - >>> opts.append(('--out-file',outfile)) - >>> execute(__file__, opts, [infile]) - >>> print outfile.getvalue() - <p>Hello <strong>Joe Bloggs</strong></p> - - >>> - - """ - config.init(cmd) - if len(args) > 1: - usage('Too many arguments') - sys.exit(1) - backend = None - doctype = None - confiles = [] - outfile = None - options = [] - help_option = False - for o,v in opts: - if o in ('--help','-h'): - help_option = True - #DEPRECATED: --unsafe option. - if o == '--unsafe': - document.safe = False - if o == '--safe': - document.safe = True - if o == '--version': - print('asciidoc %s' % VERSION) - sys.exit(0) - if o in ('-b','--backend'): - backend = v - if o in ('-c','--dump-conf'): - options.append('-c') - if o in ('-d','--doctype'): - doctype = v - if o in ('-e','--no-conf'): - options.append('-e') - if o in ('-f','--conf-file'): - confiles.append(v) - if o == '--filter': - config.filters.append(v) - if o in ('-n','--section-numbers'): - o = '-a' - v = 'numbered' - if o == '--theme': - o = '-a' - v = 'theme='+v - if o in ('-a','--attribute'): - e = parse_entry(v, allow_name_only=True) - if not e: - usage('Illegal -a option: %s' % v) - sys.exit(1) - k,v = e - # A @ suffix denotes don't override existing document attributes. - if v and v[-1] == '@': - document.attributes[k] = v[:-1] - else: - config.cmd_attrs[k] = v - if o in ('-o','--out-file'): - outfile = v - if o in ('-s','--no-header-footer'): - options.append('-s') - if o in ('-v','--verbose'): - options.append('-v') - if help_option: - if len(args) == 0: - show_help('default') - else: - show_help(args[-1]) - sys.exit(0) - if len(args) == 0 and len(opts) == 0: - usage() - sys.exit(0) - if len(args) == 0: - usage('No source file specified') - sys.exit(1) - stdin,stdout = sys.stdin,sys.stdout - try: - infile = args[0] - if infile == '-': - infile = '<stdin>' - elif isinstance(infile, str): - infile = os.path.abspath(infile) - else: # Input file is file object from API call. - sys.stdin = infile - infile = '<stdin>' - if outfile == '-': - outfile = '<stdout>' - elif isinstance(outfile, str): - outfile = os.path.abspath(outfile) - elif outfile is None: - if infile == '<stdin>': - outfile = '<stdout>' - else: # Output file is file object from API call. - sys.stdout = outfile - outfile = '<stdout>' - # Do the work. - asciidoc(backend, doctype, confiles, infile, outfile, options) - if document.has_errors: - sys.exit(1) - finally: - sys.stdin,sys.stdout = stdin,stdout - -if __name__ == '__main__': - # Process command line options. - import getopt - try: - #DEPRECATED: --unsafe option. - opts,args = getopt.getopt(sys.argv[1:], - 'a:b:cd:ef:hno:svw:', - ['attribute=','backend=','conf-file=','doctype=','dump-conf', - 'help','no-conf','no-header-footer','out-file=', - 'section-numbers','verbose','version','safe','unsafe', - 'doctest','filter=','theme=']) - except getopt.GetoptError: - message.stderr('illegal command options') - sys.exit(1) - opt_names = [opt[0] for opt in opts] - if '--doctest' in opt_names: - # Run module doctests. - import doctest - options = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS - failures,tries = doctest.testmod(optionflags=options) - if failures == 0: - message.stderr('All doctests passed') - sys.exit(0) - else: - sys.exit(1) - # Look for plugin management commands. - count = 0 - for o,v in opts: - if o in ('-b','--backend','--filter','--theme'): - if o == '-b': - o = '--backend' - plugin = o[2:] - cmd = v - if cmd not in Plugin.CMDS: - continue - count += 1 - if count > 1: - die('--backend, --filter and --theme options are mutually exclusive') - if count == 1: - # Execute plugin management commands. - if not cmd: - die('missing --%s command' % plugin) - if cmd not in Plugin.CMDS: - die('illegal --%s command: %s' % (plugin, cmd)) - Plugin.type = plugin - config.init(sys.argv[0]) - config.verbose = bool(set(['-v','--verbose']) & set(opt_names)) - getattr(Plugin,cmd)(args) - else: - # Execute asciidoc. - try: - execute(sys.argv[0],opts,args) - except KeyboardInterrupt: - sys.exit(1) diff -Nru asciidoc-8.6.10/BUGS.adoc asciidoc-10.1.2/BUGS.adoc --- asciidoc-8.6.10/BUGS.adoc 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/BUGS.adoc 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,17 @@ +Bugs and Known Problems +======================= + +AsciiDoc +-------- +- Reported line numbers in diagnostic messages are sometimes wrong. +- Attribute references in macro attribute lists can't be unescaped + (with the exception of attribute list entry `{0}`). +- Section numbering is incorrect when outputting HTML from a + multi-part book type document. This is not a biggy since multi-part + books are generally processed to DocBook. +- A row of apostrophes in an inline context throws AsciiDoc into an + endless loop. The problem seems to be in the input file 'Reader'. + +dblatex +------- +See `./asciidoc/resources/dblatex/dblatex/dblatex-readme.txt`. diff -Nru asciidoc-8.6.10/BUGS.txt asciidoc-10.1.2/BUGS.txt --- asciidoc-8.6.10/BUGS.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/BUGS.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Bugs and Known Problems -======================= - -AsciiDoc --------- -- Reported line numbers in diagnostic messages are sometimes wrong. -- Attribute references in macro attribute lists can't be unescaped - (with the exception of attribute list entry `{0}`). -- Section numbering is incorrect when outputting HTML from a - multi-part book type document. This is not a biggy since multi-part - books are generally processed to DocBook. -- A row of apostrophes in an inline context throws AsciiDoc into an - endless loop. The problem seems to be in the input file 'Reader'. - -dblatex -------- -See `./dblatex/dblatex-readme.txt`. diff -Nru asciidoc-8.6.10/build_manifest.sh asciidoc-10.1.2/build_manifest.sh --- asciidoc-8.6.10/build_manifest.sh 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/build_manifest.sh 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,40 @@ +#!/usr/bin/env bash + +cat > MANIFEST.tmp <<- EOM +asciidoc/*.py +asciidoc/resources/**/* +asciidoc/resources/*.conf +doc/asciidoc.conf +doc/article-docinfo.xml +doc/customers.csv +doc/*.1 +doc/*.txt +doc/asciidoc.dict +images/* +tests/data/* +tests/inputs/* +tests/*.py +tests/testasciidoc.conf +*.sh +BUGS.adoc +CHANGELOG.adoc +configure.ac +COPYRIGHT +Dockerfile +install-sh +INSTALL.adoc +LICENSE +MANIFEST.in +Makefile.in +README.md +setup.py +EOM + +rm -f MANIFEST +while read in; do + if [ ! -z "${in}" ]; then + ls -1Ad ${in} | grep -v ".pyc" | grep -v "__pycache__" >> MANIFEST + fi +done < MANIFEST.tmp +echo "MANIFEST" >> MANIFEST +rm -f MANIFEST.tmp diff -Nru asciidoc-8.6.10/CHANGELOG.adoc asciidoc-10.1.2/CHANGELOG.adoc --- asciidoc-8.6.10/CHANGELOG.adoc 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/CHANGELOG.adoc 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,3366 @@ +AsciiDoc ChangeLog +================== + +:website: https://asciidoc-py.github.io/ + +Version 10.1.2 (2022-02-17) +--------------------------- +.Bug fixes +- DESTDIR passed to pip as part of make install +- Add number of missing files to release tarballs +- Fix parsing asciidoc_opt values with spaces for a2x + +.Miscellaneous +- Cleanup unused parts of Makefile +- Website files removed from main asciidoc-py repo + +Version 10.1.1 (2021-12-20) +--------------------------- +.Bug fixes +- Fix RuntimeWarning when executing asciidoc or a2x within repository +- Fix index out of range error in a2x (thanks @osmith42) + +Version 10.1.0 (2021-12-17) +--------------------------- +.Features +- Add top-level `__version__` and `VERSION` module exports (thanks @tbpassin) + +.Bug fixes +- Fix self reference errors in AsciiDocApi (thanks @tbpassin) +- Add back asciidoc execute print in a2x verbose + +Version 10.0.2 (2021-11-12) +--------------------------- +.Bug fixes +- Fix errors not displaying when called via a2x (thanks @osmith42) +- Fix incorrect parsing of asciidoc_opts in a2x (thanks @lmarz) + +.Miscellaneous +- Fix automating homebrew release updates + +Version 10.0.1 (2021-10-28) +--------------------------- +.Bug fixes +- Fix running make docs +- Fix warning in music filter when using GraphicsMagick +- Fix handling escaped attributes inside of macros +- Include *.xsl and *.sty files in pip installations + +Version 10.0.0 (2021-10-16) +--------------------------- +.Breaking Changes +AsciiDoc.py has been rewritten to be a https://pypi.org/project/asciidoc/[proper Python package], installable via pip. Downloading and running asciidoc from the repo is not recommended, but can be done through `python3 -m asciidoc` or `python3 -m asciidoc.a2x`. CLI usage should remain the same where both `asciidoc` and `a2x` CLI commands are available after pip installation. Support for overriding the bundled *.conf files is done through CLI flags, environment variables, etc., and not through directly editing the files within the installation. Importing asciidoc should no longer require the `asciidocapi.py` script, and can be done through regular python import, e.g. `import asciidoc; asciidoc.execute(...)`. + +The APIs of the asciidoc and a2x scripts are now considered "provisional" with no guarantee of BC between releases with the exception of the `asciidoc.execute` method. Please post an issue on our tracker for any method you directly rely on and would like to have BC for. + +.Features +- Install using `pip install asciidoc` + +.Miscellaneous +- Changed website domain to https://asciidoc-py.github.io/. The old domain will redirect for a period of time, but will be updated at some point to point at website created by the https://asciidoc-wg.eclipse.org/[AsciiDoc Working Group]. + +.Testing +- Test against 3.10 stable + +Version 9.1.1 (2021-09-18) +-------------------------- +.Bug fixes +- Cleanup outfile on system-exiting exceptions (thanks @felipec) + +.Testing +- Add missing requires directive for source-highlight (thanks @marv) + +Version 9.1.0 (2021-02-08) +-------------------------- +.Features +- Can specify a line range when using the `include` macro. +- Setting the `SGML_CATALOG_FILES` environment variable will set `--catalogs` on xmllint within a2x. + +Version 9.0.5 (2021-01-24) +-------------------------- +.Bug fixes +- Use config newline setting in system attribute evaluation (thanks @hoadlck). + +.Testing +- Update to deadsnakes/python@v2.0.2. + +Version 9.0.4 (2020-10-20) +-------------------------- +.Bug fixes +- Fix listing out installed plugins (e.g. --filter list). +- Fix python version check failing on 3.10 (thanks @hroncok). + +.Testing +- Update to deadsnakes/python@v2.0.0 for testing dev python versions. +- Move from testing against 3.9-dev to stable 3.9. +- Add 3.10-dev test target. + +Version 9.0.3 (2020-10-05) +-------------------------- +.Bug fixes +- Fix extra newline characters inserted into generated source (thanks @hoadlck). + +.Testing +- Validate line endings as part of test suite. + +Version 9.0.2 (2020-07-21) +-------------------------- +.Bug fixes +- Revert to using optparse from argparse for a2x. + +Version 9.0.1 (2020-06-26) +-------------------------- +.Bug fixes +- Fix a2x crashing on decoding generated HTML pages. + +.Building +- Fix generated tar.gz not having files under top-level asciidoc folder. + +.Testing +- Test against Python 3.9. + +Version 9.0.0 (2020-06-02) +-------------------------- +.Additions and changes +- Port asciidoc to run on Python 3.5+ (see https://github.com/asciidoc/asciidoc for the EOL Python 2 implementation). +- Drop internal implementation of OrderedDict and use the standard library collections.OrderedDict instead. +- Implement Dockerfile for running asciidoc. +- Add Catalan translation. +- Add docbook5 backend. +- Fix misspellings in various files and documents. +- Use UTC for testing instead of Pacific/Auckland (which observes daylight saving time). +- Use "with" context statement for opening and closing files instead of older try/finally pattern. +- Search sibling paths before system wide paths in asciidocapi. +- Add manpage for testasciidoc.py. +- Use argparse instead of optparse for argument parsing. +- Add simplified Chinese translation (thanks @muirmok). +- vim-asciidoc: speed up the refresh process for big files (thanks @aerostitch). +- Allow specifying floatstyle attribute for figures, tables, equations, examples in docbook (thanks @psaris). +- Use https://pypi.org/project/trans/[trans python module] (if available) to better handle character decomposition to ascii for ascii-ids (thanks @rkel). +- Use lru_cache to memoize repeated calls to macro look-up, giving potential ~15% speed-up on parsing. + +.Bug fixes +- Fix index terms requiring two characters instead of just one (see https://github.com/asciidoc/asciidoc-py3/pull/2#issuecomment-392605876). +- Properly capture and use colophon, dedication, and preface for docbooks in Japanese (see https://github.com/asciidoc/asciidoc-py3/pull/2#issuecomment-392623181). +- make install did not include the unwraplatex.py filter. +- Fix a2x option collection from input file with non-ascii encoding. +- Fix options attribute not being properly parsed in Delimited Blocks attribute list. + +.Building +- Migrate from hierarchical A-A-P build system to top-level Makefile. +- Add `make help` target that prints out usage message for make. +- Fix double slash issue in Makefile when installing asciidoc or its docs. + +.Testing +- Commit generated test files to the repository for continuous integration. +- Test against Python 3.5+ on Travis-CI. +- Remove symlink tests/asciidocapi.py in favor of just appending to sys.path. +- Add requires directive to testasciidoc.conf to indicate necessary external dependencies (e.g. source-highlight). + +Version 8.6.10 (2017-09-22) +--------------------------- +.Additions and changes +- Improve reproducibility of builds (e.g. support SOURCE_DATE_EPOCH) +- Add SVG output support +- Improve documentation +- Update translations +- Full list of changes is at https://github.com/asciidoc/asciidoc/compare/asciidoc:8.6.9...asciidoc:8.6.10 + +Version 8.6.9 (2013-11-09) +-------------------------- +.Additions and changes +- 'html5', 'xhtml11' and 'slidy' outputs now wrap 'pre' element + contents at right margin (see +https://groups.google.com/group/asciidoc/browse_thread/thread/9877a316b7a47309). +- Vim syntax file: highlight line breaks in lists (patch submitted by + Alex Efros). See + https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a). +- Vim syntax file: fixed highlighting of lines with spaces preceding + an indented paragraph. See + https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a +- Vim syntax file: dropped ')' from list of illegal characters + following opening quote. See + https://groups.google.com/group/asciidoc/browse_thread/thread/1a60eb4507a0555f/264c39c6a89fc7a0 +- Added {plus} intrinsic attribute. See + http://code.google.com/p/asciidoc/issues/detail?id=14 +- Allow `tabsize=0 in` configuration file. See + https://groups.google.com/group/asciidoc/browse_thread/thread/c88457020288ce1d +- Removed 'wordpress' backend into the blogpost project (where it + belongs) as an AsciiDoc backend plugin. +- Added HTML5 footer badges. +- Added favicon to AsciiDoc website. +- Changed AsciiDoc website domain to 'asciidoc.org'. +- Vim syntax file: closing quote character cannot be immediately + followed by same closing quote character. +- Documentation updates. +- If admonition icons are embedded using the Data URI Scheme and the + icons directory is undefined or does not exist then the 'iconsdir' + attribute is set to the location of the icons installed in the + AsciiDoc configuration directory. +- Updated `./stylesheets/pygments.css` from pygments 1.4. +- HTML backends: Align inline images to text-bottom. +- html4 backend: Added 'hr' attribute to make the inter-section + horizontal ruler element optional. +- Documented 'Callout lists cannot be used within tables'. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/268f9b46ebc192d3 +- Removed Vim related stuff from the installer makefile. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 + and + https://groups.google.com/group/asciidoc/browse_thread/thread/cd07629fa7a53fb3 +- Dropped `vim/ftdetect/asciidoc_filetype.vim` from distribution, the + file detection was broken and the default settings satisfied no one. +- Vim syntax highlighter: increase sync backtracking to catch changes + to large block elements. +- Added Romanian language configuration file. Contributed by Vitalie + Lazu. See + https://groups.google.com/group/asciidoc/browse_thread/thread/2fe14a10dbf20d20/27726e7e13f7bfc7?lnk=gst&q=romanian#27726e7e13f7bfc7 +- Added ruler and line-break outputs to HTML Help outputs. Patch + submitted by DonM. See + https://groups.google.com/group/asciidoc/browse_thread/thread/b131d0155eccd73e +- Added Czech language configuration file. Contributed by Petr Klíma. +- html4 backend: allow embedded images and icons (data-uri + attribute). +- html4 backend: table and example block caption place at bottom for + consistency. +- html4 backend: dropped border around example block. +- html4 backend: cellpaddings made equal to 4 for consistency. +- Vim syntax highligher: Highlight closing OpenBlock delimiter when it + immediately follows a list. +- Updated html5 backend (previous commit was xhtml11 only). See: + https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 +- Embedded data-uri images now figure file mimetype from file contents + rather than the file extension. Patch submitted by Lex Trotman. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 + +.Bug fixes +- `indexterm2:[]` macro syntax now recognized. See + https://groups.google.com/group/asciidoc/browse_thread/thread/1b3f1a0f0a21425e +- Synthesised `*-option` attributes for options set in table conf file + style entries. See + https://groups.google.com/group/asciidoc/browse_thread/thread/8aa340a3069ef5f1/a727a8a564eea76c +- Makefile: Fixed sh compatibility issue. See + https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 + + +Version 8.6.8 (2012-07-17) +-------------------------- +.Release highlights +Added full complement of styles to 'Open Blocks' and 'Normal +Paragraphs' -- those with a minimalist bent could construct virtually +any document using just Title, Normal Paragraph and Open Block +syntaxes. + +.Other additions and changes +- Increased default maximum include depth from 5 to 10. +- Emit warning if maximum include depth is exceeded. +- Suppress repeated console messages. +- Music filter: removed '--beams=None' option from abc2ly invocation + because it is broken on LilyPond 2.14 (Ubuntu 12.04). +- Replaced obsolete '<tt>' tag with '<code>' in HTML backends. +- Allow configuration attribute entries to create a new section + (previously you could only modify existing sections). See: + https://groups.google.com/group/asciidoc/browse_thread/thread/7be28e9714f249c7[discussion + list]. +- Documented `{wj}` (word-joiner) attribute and updated FAQ. See: + https://groups.google.com/group/asciidoc/browse_thread/thread/961a957ab5872ebf[discussion + list]. +- FAQ: Added 'How can I place a footnote immediately following quoted + text?' See + https://groups.google.com/group/asciidoc/browse_thread/thread/961a957ab5872ebf[discussion + list]. +- Added Greek language configuration file. Contributed by Michael + Dourmousoglou. See + https://groups.google.com/group/asciidoc/browse_thread/thread/9e79d8494ef8d870[discussion + list]. +- FAQ: Added 'Using roles to select fonts for PDF'. Submitted by Lex + Trotman and based on solution by Antonio Borneo. See: + https://groups.google.com/group/asciidoc/browse_frm/thread/64b071bb21de9cf0[discussion + list]. +- Apply same monospaced font size to all monospaced text. +- Changed '0' number padding to spaces in numbered GNU + source-highlight outputs. +- Allow 'highlight' source highlighter to use 'python' for Python + `{language}` name. r1142: Update the AsciiDoc 'source' filter to + allow the use of the 'highlight' source code highlighter. See + https://groups.google.com/group/asciidoc/browse_frm/thread/e045c9986c71d72a[discussion + list]. ++ +NOTE: The 'pygments' attribute has been deprecated in favor of the new +'source-highlighter' attribute. + +- Vim syntax highlighter: Don't confuse trailing open block delimiter + with section underline. +- Added 'skip' option to paragraphs (c.f. Delimited Block 'skip' + option). + +.Bug fixes +- *FIXED*: latex, music and graphviz filters: When the filter output + image is data-uri encoded write it to the indir (instead of the + outdir) so that encoder can find it. See + https://groups.google.com/group/asciidoc/browse_thread/thread/f5174f450a61f14b[discussion + list]. +- *FIXED*: Escape the ']' character inside inline macros. See + https://groups.google.com/group/asciidoc/browse_thread/thread/db3b734a6931cb74[discussion + list]. +- *FIXED*: source highlighter filter: Pass 'role' attribute to HTML + backends. +- *FIXED*: source highlight filter: docbook backend: 'role' attribute + was not passed to listings without a title. Patch submitted by Lex + Trotman. See + https://groups.google.com/group/asciidoc/browse_thread/thread/13c9ee97930342b3[discussion + list]. +- *FIXED*: music2png.py: 'FOPException: Raster ByteInterleavedRaster' + error (FOP 1.0, ImageMagick 6.6.9-7). + + + +Version 8.6.7 (2012-03-17) +-------------------------- +.Release highlights +No major enhancements but quite a few bug fixes which, among other +things, fixes Jython compatibility and improves Windows compatibility. + +.All additions and changes +- Vim syntax highlighter: highlight entity refs in macro arguments. +- Added files with `.asciidoc` extension to Vim file type detection. + http://groups.google.com/group/asciidoc/browse_thread/thread/a9762e21ec0cc244/5d3a4ebf20e6847e[Patch] + submitted by Dag Wiers. +- Added 'replacement3' substitution to enable + http://groups.google.com/group/asciidoc/browse_thread/thread/843d7d3d671006fb/25628e14c829db3f[ODT + whitespace processing]. +- Added 'unbreakable' option to XHTML and HTML 5 backends. +- Implemented toc::[] block macro and 'toc-placement' attribute for + HTML backends to allow the Table of Contents placement to be set + manually by the author. +- Added FAQs: 'How can I control page breaks when printing HTML + outputs?' and 'Is it possible to reposition the Table of Contents + in HTML outputs?'. +- Added `--backend` and `--backend-opts` options to the 'a2x' command + to allow 'a2x' to use backend plugin code extensions. + http://groups.google.com/group/asciidoc/browse_thread/thread/b8e93740b7cd0e1d/b5e0b83fe37ae31a[Patch] + submitted by Lex Trotman. +- Added + http://groups.google.com/group/asciidoc/browse_thread/thread/3d06b0105dfbb780/8c60eb7a62f522e4[args + block attribute] to source highlight blocks to allow arbitrary + parameters to be passed to the source highlighters. +- If the 'ascii-ids' attribute is defined then non-ascii characters in + auto-generated IDs + http://groups.google.com/group/asciidoc/browse_thread/thread/33e99b78e2472122[are + replaced] by their nearest ascii equivalents (to work around DocBook + processor limitations). +- Added global 'blockname' attribute which is dynamically updated to + identify the current block. See + http://groups.google.com/group/asciidoc/browse_thread/thread/8200e29815c40f72[discussion + list]. +- 'xhtml11', 'html5' backends: Include book part TOC entries for + multi-part books. Patch submitted by Loïc Paillotin. +- Removed code filter example from the AsciiDoc User Guide so that + backends implemented as external plugins can compile the manual. See + http://groups.google.com/group/asciidoc/browse_thread/thread/849e5ea91f43adf2[discussion + list]. +- If the delimited block 'skip' option is set then do not consume + block title and attributes. This makes it possible for the comment + delimited blocks to use an attribute list (previously the comment + delimited block was hardwired to skip preceding attributes and + titles). See + http://groups.google.com/group/asciidoc/browse_thread/thread/e92a75abcc382701[discussion + list]. +- Added `backend-confdir` intrinsic attribute. + +.Bug fixes +- *FIXED*: slidy backend: broken 'stylesheet' attribute. + http://groups.google.com/group/asciidoc/browse_thread/thread/58d0843ae4345afd[Patch] + submitted by Micheal Hackett. +- *FIXED*: Restored + http://groups.google.com/group/asciidoc/browse_thread/thread/b0e69e393b6f9f20/47a2c7586f9e40c6?lnk=gst&q=themes+tarball#47a2c7586f9e40c6[missing + themes] to zip file distribution archive. +- *FIXED*: Grammatical error in error messages. + http://groups.google.com/group/asciidoc/browse_thread/thread/b9d705c6b6b39f59/1e120483dafca109[Patch] + submitted by Dag Wieers. +- *FIXED*: Use configured normal substitution in preference to the + default one. +- *FIXED*: The 'eval' block macro would execute multiple times if it + evaluated to 'None'. +- *FIXED*: Duplicated entries in TOC of large document. + http://groups.google.com/group/asciidoc/browse_thread/thread/103445ab9d95cb0c[Patch] + submitted by Sebastien Helleu. +- *FIXED*: Python 2.4 backward + http://code.google.com/p/asciidoc/issues/detail?id=9[incompatibility]. +- *FIXED*: 8.6.6 regression broke Jython compatibility. See + http://groups.google.com/group/asciidoc/browse_thread/thread/4608b77ec289f6c4[discussion + list]. +- *FIXED*: Leaky file handles in a2x and music and latex filters which + created incompatibility problems for Jython. +- *FIXED*: All Python filters are executed with the same Python + interpreter that executes the asciidoc parent (previously filters + were hardwired to execute the 'python' interpreter). This prevents + http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b/3af3b4e57b827c78?lnk=gst&q=archlinux#3af3b4e57b827c78[Python + mix-ups]. +- *FIXED*: Microsoft Windows shelled command-line truncation that + caused shelled commands to fail e.g. the 'data-uri' attribute + failure. + + +Version 8.6.6 (2011-09-04) +-------------------------- +.Release highlights +- The AsciiDoc plugin architecture has been enhanced, unified and + extended: + * Plugin commands have been added to the asciidoc(1) `--backend` + option. + * An asciidoc(1) `--theme` option has been implemented to specify a + theme and to manage theme plugins. + * A plugin 'build' command (for creating plugins) added. + * 'build', 'install', 'list' and 'remove' plugin commands are all + recognized by asciidoc(1) `--backend`, `--filter` and `--theme` + options. +- A security update by Kenny MacDermid removes the use of `eval()` on + untrusted input (to disallow code malicious execution). + +.All additions and changes +- 'xhtml11', 'html5': Made verse and quote block text darker to print + legibly in Google Chrome browser. +- Added plugin 'build' command for plugin file creation. +- Merged `--help plugins` back to `--help manpage` so it matches the + asciidoc(1) manpage. +- The `--filter` command-line option can specify the name of filters + that will be unconditionally loaded. +- If a filter directory contains a file named `__noautoload__` then + the filter is not automatically loaded (you can used the `--filter` + command-line option to override this behavior). +- tests: Add Italian language tests. Patch submitted by Simon + Ruderich. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a +- tests: Add tests for localized man pages. Patch submitted by Simon + Ruderich. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a +- If the section name is prefixed with a '+' character then the + section contents is appended to the contents of an already existing + same-named section (the default behavior is to replace the the + section). +- If a configuration file section named 'docinfo' is loaded then it + will be included in the document header. Typically the 'docinfo' + section name will be prefixed with a '+' character so that it is + appended to (rather than replace) other 'docinfo' sections. +- Added `{sp}` intrinsic attribute for single space character. See + http://groups.google.com/group/asciidoc/browse_thread/thread/a839aa01db0765d2 +- Fixed TOC and footnotes generator. Patch submitted by Will. See + http://groups.google.com/group/asciidoc/browse_thread/thread/734ac5afed736987 +- The `asciidoc-confdir` attribute is set to the asciidoc executable + directory if it contains global configuration files i.e. a local + asciidoc installation. +- asciidoc now throws an error instead of just a warning of the + backend configuration file is not found. +- latex filter: write MD5 file after successful PNG file generation. + Always delete temp files irrespective of outcome. +- Added truecolor option to LaTeX filter. Patch submitted by Michel + Krämer. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851 +- Unit test for table column specifiers with merged cells. Patch + submitted by Simon Ruderich. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a +- Added verbose message for `ifeval::[]` macro evaluation. +- Added test case for `ifeval::[]` evaluation. +- Security update to remove the use of `eval()` on untrusted input (to + disallow code malicious execution). Patch submitted by Kenny + MacDermid. +- Changed web site layout from table to CSS based. See + http://groups.google.com/group/asciidoc/browse_thread/thread/ec8e8481eb0e27b0/d1c035092b5bb7a4?lnk=gst&q=caption+option#d1c035092b5bb7a4 +- a2x: Pass `--format` option value to asciidoc as 'a2x-format' + attribute. Patch submitted by Lex Trotman + (http://groups.google.com/group/asciidoc/browse_thread/thread/3e177b84bc133ca9/659796dfadad30ea?lnk=gst&q=a2x+format#659796dfadad30ea). +- Added two FAQs submitted by Lex Trotman. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/16d3fb9672a408e7 +- html5,xhtml11: Implemented themes directory structure. +- html5,xhtml11: Implemented asciidoc `--theme` management option + (install, list, build and remove commands). +- html5,xhtml11: A theme can now optionally include a JavaScript file + `<theme>.js` +- html5,xhtml11: If the 'data-uri' attribute is defined then icons + from the theme icons directory (if they exist) will be embedded in + the generated document. +- Added optional 'warnings' argument to include macros. +- The asciidoc `--verbose` option now prints file inclusion messages. +- xhtml11, html5: Remove necessity for separate manpage CSS files. +- Added 'css-signature' attribute to tests. +- Add 'css-signature' attribute to set a CSS signature for the + document. Patch submitted by Peg Russell, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/bacbf8aeb8ad6a3a +- White background for toc2 TOC viewport so that horizontally scrolled + content does not obscure the the TOC. Patch submitted by Lionel + Orry, see: http://code.google.com/p/asciidoc/issues/detail?id=8 + +.Bug fixes +- *FIXED*: Plugin install command: Delete backend directory is install + fails. +- *FIXED*: Plugin install command: Fixed bug extracting binary files + on Windows (reported by Jean-Michel Inglebert). +- *FIXED*: tests: Skip blank sections in testasciidoc.conf test + configuration file instead of throwing an exception (reported by + Jean-Michel Inglebert). +- *FIXED*: If a plugin Zip file does not contain file permissions + (probably because it was created under Windows) then install it + using the default permissions. +- *FIXED*: Fixed missing quote in preceding LaTeX filter patch. Fix + submitted by Simon Ruderich. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851 +- *FIXED*: Some path attributes were processed as escaped Python + strings which could result in corrupted path names with backslash + separated Windows path names. Reported by Will. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/e8f3938bcb4c8bb4/44d13113a35738ef +- *FIXED*: Vertically spanned table cells resulted in incorrect column + styles being applied to some cells. Reported by Will: + http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a/9afc4559d51e1dbd +- *FIXED*: LaTeX backend: fixed bad escapes. Patch submitted by Mark + McCurry: + http://groups.google.com/group/asciidoc/browse_thread/thread/8c111f1046b33691/158a944cf4d5ff0d?lnk=gst&q=latex+escapes#158a944cf4d5ff0d +- *FIXED*: When using slidy backend, display of characters with + accents is wrong because of 'meta http-equiv' line missing. Reported + by Fabrice Flore-Thebault. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/eaf25f21d1da180a + + +Version 8.6.5 (2011-05-20) +-------------------------- +.Release highlights +- The addition of an 'html5' backend to generate HTML 5 output. Apart + from the inclusion of 'audio' and 'video' block macros the 'html5' + backend is functionally identical to the 'xhtml11' backend. + +- A new 'flask' theme for 'xhtml11' and 'html5' backends inspired by + the http://flask.pocoo.org/docs/[Flask website] styling (see 'toc2' + example in the next item below). + +- The new 'toc2' attribute generates a table of contents in + the left hand margin ('xhtml11' and 'html5' backends). + link:article-html5-toc2.html[This example] was generated using + the following command: + + asciidoc -b html5 -a icons -a toc2 -a theme=flask article.txt + +- `a2x(1)` now has a flexible mechanism for copying arbitrary + resource files to HTML based outputs -- this is very handy for + generating EPUB files with embedded fonts and other resources. + + * The `a2x(1)` `--resource` option can be used to inject any file + into EPUB output documents e.g. CSS resources such as fonts and + background images. + * Explicitly specified resources are added to the EPUB OPF manifest + automatically. + * You can explicitly specify file extension MIME types. + * The enhanced resource processing works around a couple of DocBook + XSL bugs (see link:epub-notes.html[EPUB Notes]). + +.All additions and changes +- A new 'flask' theme for 'xhtml11' and 'html5' backends. A shameless + knock-off of the http://flask.pocoo.org/docs/[Flask website] + styling. +- Added HTML 5 article with 'toc2' table of contents to the example on + the AsciiDoc website home page. +- Added 'filters' and 'topics' help topics. Fixed documentation + errors in help text. Patch submitted by Lionel Orry, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/9da9d48a6461ff14 +- Pass parent configuration files, command-line attributes and header + attributes to table asciidoc filters. Based on patch submitted by + Simon Ruderich, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/5c792cbb395b753b +- Allow a 'title' attribute entry in the document header so that HTML + backends can set the 'title' element separately from the displayed + document title (the 'doctitle' attribute). +- Pass 'lang' attribute to 'asciidoc' table style filter. Patch + submitted by Simon Ruderich, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/e2100b7cb29283ce +- xhtml11,html5: Added 'toc2' attribute which generates a scrollable + table of contents in the left hand margin. Based on customized CSS + written by Suraj Kurapati, see + http://groups.google.com/group/asciidoc/browse_thread/thread/c5e30ee5555877f5 +- Added 'asciidoc-confdir' intrinsic attribute which expands to the + global conf directory. +- Documented that you can specify multiple CSS files with the a2x(1) + `--stylesheet` command option. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/baf3218551d05a05 +- Improved xhtml11 backend's table of contents generation latency. + Patch submitted by Hongli Lai. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/5a7fe64fbfd65ad +- Added html5 backend. +- For consistency converted all DOS formatted configuration and text + files to UNIX format. +- html4: Added ability to use 'role' attribute with most block + elements. Patch contributed by Simon Ruderich. See + http://groups.google.com/group/asciidoc/browse_thread/thread/5620ba634fdb030a +- Added Dutch language configuration file and accompanying test file + (contributed by Dag Wieers, see + http://groups.google.com/group/asciidoc/browse_thread/thread/f969b9ce987d7f5d). +- Configuration files are loaded in two passes when the -e + command-line option is used (the same behavior as when the -e option + is not used). Patch submitted by haad. See + http://groups.google.com/group/asciidoc/browse_thread/thread/cd0f47495fd04181 + and + http://code.google.com/p/asciidoc/issues/detail?id=6&q=label%3APriority-Medium +- Documented how to include embedded fonts in an EPUB document. +- a2x: Added `.<ext>=<mimetype>` resource specifier syntax. +- a2x: Enable admonition icons in example EPUBs. +- a2x: allow environment variables and tilde home directories in + resource manifest files. +- a2x: don't process non-existent resource directories. +- a2x: assume resource option is a directory if the name ends with a + directory separator. +- a2x: Added a new syntax to the `--resource` option specifier which + allows the destination path to be specified. +- a2x: Copy resources referenced in the OPF and resources referenced + by the generated HTML (in theory DocBook XSL should ensure they are + identical but this is not always the case e.g. + http://sourceforge.net/tracker/?func=detail&atid=373747&aid=2854075&group_id=21935). +- Drop border from callout list image links. +- html4: Moved manpage NAME section out of header so that the name + section is rendered when the asciidoc(1) `--no-header-footer` option + is specified (so that manpages processed blogpost include the NAME + section). +- Vim syntax highlighter: TODO markers now appear in list items and + literal paragraphs and blocks. +- Constrained quotes can now be bounded on the left by a } character. + See: + http://groups.google.com/group/asciidoc/browse_thread/thread/b24cc3362f35b801 +- Added text-decoration roles (underline, overline, line-through, + blink) for xhtml11 and html5 outputs. + +.Bug fixes +- *FIXED*: epubcheck 1.1 previously issued a warning for files not + registered in the manifest (epubcheck 1.0.5 did not). This resulted + in a problem compiling the adventures-of-sherlock-holmes.txt example + (the `underline.png` resource was not in the manifest). + + +Version 8.6.4 (2011-02-20) +-------------------------- +.Additions and changes +- Added text foreground and background color along with text size CSS + styles for XHTML outputs, see {website}userguide.html#X96[]. +- Vim syntax highlighter: highlight macros that start with an + attribute reference (a common idiom). +- Vim syntax highlighter: highlight attribute references in macro + attribute lists. +- Attribute entries can be used to set configuration markup templates. +- Double-width East Asian characters in titles now correctly match the + title underline widths. Submitted by Changjian Gao (see + http://groups.google.com/group/asciidoc/browse_thread/thread/77f28b0dfe60d262). +- Implemented {website}manpage.html[asciidoc(1)] filter commands, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/40c64cd33ee1905c +- User's home directory now calculated in a platform independent + manner. +- Added double-quote characters to French language file. Patch + contributed Yves-Alexis Perez, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 +- Vim Syntax highlighter: Highlight closing OpenBlocks which + immediately follow a literal paragraph. +- Changed UNIX `/dev/null` to OS independent `os.devnull` in filters + code. Suggested by Henrik Maier: + http://groups.google.com/group/asciidoc/browse_thread/thread/5ac8e8ea895147e9 +- Vim syntax highlighter: Single and double quoted text now highlights + correctly when preceded by an attributes list. +- Added Ukrainian language file (`lang-uk.conf`). Added double-quote + characters to Russian language file.conf). Patches contributed by + Lavruschenko Oleksandr, see + http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 +- Single and double quote characters are now set using the `{lsquo}`, + `{rsquo}`, `{ldquo}` and `{rdquo}` attributes. This makes is easy to + customise language specific quotes. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 +- Implemented 'conf-files' attribute to allow configuration files to + be specified in the source document. Suggested by Lex Trotman, see: + http://groups.google.com/group/asciidoc/browse_thread/thread/b11066a828ab45b9 + +.Bug fixes +- *FIXED*: Auto-generated section title ids are now Unicode aware. +- *FIXED*: Setting 'quotes' configuration entries using document + attribute entries failed if the attribute entry was not in the + document header. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/a1dd0562dee8b939 +- *FIXED*: If the input and output file names were different then the + output file name was incorrectly used to synthesize 'docinfo' file + names. Reported by Christian Zuckschwerdt. +- *FIXED*: An error can occur when more than one consecutive quotes + are defined as a blank string. Reported by Peggy Russell. +- *FIXED*: Encoding error in automatically generated author initials. + Patch submitted by Xin Wang. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/f44615dca0b834e9 + + +Version 8.6.3 (2010-11-14) +-------------------------- +.Additions and changes +- Added and 'unbreakable' option to bulleted and numbered lists + (thanks to Henrik Maier for this patch). +- Added `ifeval::[]` system macro (thanks to Henrik Maier for + suggesting this feature). +- The image 'scale' attribute sets the DocBook 'imagedata' element + 'scale' attribute. Patch submitted by Henrik Maier. +- DocBook 'preface', 'colophon' and 'dedication' style section titles + now work. Based on patch submitted by Henrik Maier. +- 'a2x': Do not inject xsltproc parameters if they were specified on + the command-line (parameter double-ups generate xsltproc 'Global + parameter already defined' errors). +- 'a2x': Refactored xsltproc parameter injection. +- 'a2x': articles chunked at section level by default. +- 'attributes', 'titles' and 'specialcharacters' sections are now read + from the local `asciidoc.conf` file before the header is parsed. + This fixes a regression problem. See + http://groups.google.com/group/asciidoc/browse_thread/thread/1b3f88f1f8118ab3 +- Document header attributes take precedence over configuration file + attributes. +- Refactored 'music', 'graphviz' and 'latex' filter configurations. +- Refactored source filter configuration and added literal paragraph + source style. +- Separated paragraph styles from paragraph syntax -- any style can be + applied to any syntax. +- Added 'listing' and 'quote' paragraph styles. +- Renamed paragraph 'default' style to 'normal'. +- Updated `--help` option text. +- 'a2x': The `asciidoc_opts`, `dblatex_opts`, `fop_opts` and + `xsltproc_opts` command-line options can be specified multiple + times. This makes embedding multiple 'a2x' options in document + headers easier to manage and less error prone. +- Added ASCIIMathML and LaTeXMathML support to slidy backend. +- Pass the 'encoding' attribute to the Pygments source highlight + filter command. +- 'a2x': HTML Help `.hhk` file named after AsciiDoc source file. +- 'a2x': Added `--xsl-file` option to allow custom XSL stylesheets to + be specified. +- Make builds the man pages. Patch submitted by Sebastian Pipping. See + http://groups.google.com/group/asciidoc/browse_thread/thread/c21c2902c29bae64 + +.Bug fixes +- *FIXED*: Sometimes double backquotes were misinterpreted as inline + literal macros. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/f510ea82a88aaee8 +- *FIXED*: Regression in 8.6.2: command-line attributes were not + available to the global asciidoc.conf. +- *FIXED*: Postponed document title substitutions until backend conf + files have been loaded (8.6.2 regression). See + http://groups.google.com/group/asciidoc/browse_thread/thread/42b63ce90c2563b8 +- *FIXED*: The XSL Stylesheets customizations were preventing chapter + and section level TOCs from being generated when using XSL + Stylesheets via 'a2x'. See + http://groups.google.com/group/asciidoc/browse_thread/thread/42b63ce90c2563b8 +- *FIXED*: ``UnicodeDecodeError: \'ascii' codec can't decode byte'' + error. This error is due to a limitation in the Python HTMLParser + module, see: http://bugs.python.org/issue3932 +- *FIXED*: Broken `--no-conf` option (8.6.2 regression). +- *FIXED*: Regression in 8.6.2: configuration attribute entries set in + the document header may cause a 'FAILED: incomplete configuration + files' error. +- *FIXED*: 'html4': corrected self closed meta tags. +- *FIXED*: 'a2x' regression in 8.6.2: HTML Help `.hhp` file name had + reverted to default name instead of the AsciiDoc source file name. + See: + http://groups.google.com/group/asciidoc/browse_thread/thread/dedc961b23e9ac56 +- *FIXED*: Attributes in man page title caused it to be dropped + resulting in invalid DocBook output. +- *FIXED*: `make uninstall` now deletes the `asciidoc.1` and `a2x.1` + man pages. + + +Version 8.6.2 (2010-10-03) +-------------------------- +.Additions and changes +- 'docbook45': Enclosed bibliographic lists in a 'bibliodiv' -- you + can now include block titles with bibliographic lists. +- Added optional 'keywords', 'description' and 'title' document header + meta-data attributes to HTML backends for SEO. +- AttributeEntry values can span multiple lines with a ' +' line + continuation. +- Added 'slidy' backend (based on Phillip Lord's slidy backend + https://phillordbio-asciidoc-fixes.googlecode.com/hg/). +- Implemented 'OpenBlock' 'partintro' style for book part + introductions. +- Comment lines substitute special characters only. +- Backend specific global configuration files (all except + `asciidoc.conf`) are loaded *after* the header has been parsed -- + virtually any attribute can now be specified in the document header. +- 'xhtml11': Volnitsky theme: allow bulleted lists to have intervening + children. +- 'xhtml11': refactored CSS font-family rules to start of file. +- 'xhtml11': list bullets colored gray. +- 'ifdef' and 'ifndef' system block macros accept multiple attribute + names: multiple names separated by commas are 'ored'; multiple + attribute names separated by pluses are 'anded'. +- 'xhtml11': Volnitsky theme: set max-width on labeled lists. +- Vim syntax highlighter: Entities inside quoted text are now + highlighted. +- Added 'role' and 'id' attributes to HTML outputs generated by + 'OpenBlocks'. +- Allow floating titles to generate 'h1' (level 0) titles in HTML + outputs. +- Added a 'start' attribute to numbered lists to set the start number. + See: + http://groups.google.com/group/asciidoc/browse_thread/thread/c14a4c3b1e4f6dc5 +- Added two more docinfo attributes 'docinfo1' and 'docinfo2' to allow + and control inclusion of a shared docinfo file. See + http://groups.google.com/group/asciidoc/browse_thread/thread/c948697943432e24 +- Vim syntax highlighter highlights multi-name conditional attributes. +- LaTeX backend patch submitted by Andreas Hermann Braml (see + http://groups.google.com/group/asciidoc/browse_thread/thread/1c415fc4540ce5e5). +- Implemented 'backend aliases'; renamed `docbook.conf` to + `docbook45.conf` and aliased 'docbook45' backend to 'docbook'; + aliased 'xhtml11' to 'html'. + +.Bug fixes +- *FIXED*: Filter commands located in filter directories local to the + source document that where not in the search 'PATH' where not found. +- *FIXED*: Volnitsky theme: Verseblock font set normal instead of + monospaced. +- *FIXED*: 'xhtml11': Callout icons were not rendered as Data URIs + when 'icons' and 'data-uri' attributes were specified. +- *FIXED*: Long standing bug: nested include macros did not restore + the parent document 'infile' and 'indir' attributes. See: + http://groups.google.com/group/asciidoc/browse_thread/thread/8712a95e95a292a7 +- *FIXED*: 'html4': set preamble ID anchor. +- *FIXED*: 'xhtml11': dropped unusable 'id' and 'role' attributes from + preamble template. +- *FIXED*: Bug in multi-name conditional attributes e.g. `{x,y#}` + fails if x or y is undefined. +- *FIXED*: latex filter not being installed by Makefile. Thanks to + Grant Edwards for this patch. See + http://groups.google.com/group/asciidoc/browse_thread/thread/c4427a3902d130a8 +- *FIXED*: 'a2x': Long-standing bug in a2x which always passes + `--string-param navig.graphics 0` to 'xsltproc', regardless of + whether icons are enabled or not. Reported by Michael Wild: + http://groups.google.com/group/asciidoc/browse_thread/thread/59a610068e4acb58 + + +Version 8.6.1 (2010-08-22) +-------------------------- +.Additions and changes +- 'a2x': `--resource-dir` option renamed to `--resource`. +- 'a2x': `--resource` option accepts both file and directory names. +- 'a2x': Added `-m,--resource-manifest` option. +- Added Vim syntax highlighting for quote attribute lists. +- Load 'asciidoc.conf' from all configuration directories before any + other configuration files. This ensures that attributes used for + conditional inclusion are set before backend configuration files are + processed. Previously if you wanted to control global conf file + inclusion your only choice was to modify the global 'asciidoc.conf' + file. +- AsciiDoc 'Quote element' attributes have been simplified and + generalized -- positional color and size attributes and named 'role' + attribute have been replaced by a single positional attribute. + +.Bug fixes +- *FIXED*: 'testasciidoc.py': `BACKEND` command argument was being + ignored. +- *FIXED*: Broken 'docinfo' file functionality in 'html4' and + 'xhtml11' backends (previously the docinfo file was included in + the 'body' instead of the 'header'). + +Regression issues +~~~~~~~~~~~~~~~~~ +This release breaks compatibility with quoted element positional color +and size attributes (HTML backends). To revert to the deprecated quote +behavior define the 'deprecated-quotes' attribute in the global +`asciidoc.conf` file or on the command-line. For a more detailed +explanation of the rationale behind this change see +http://groups.google.com/group/asciidoc/browse_thread/thread/b22603bfb879418c. + + +Version 8.6.0 (2010-08-16) +-------------------------- +.Additions and changes +- The AsciiDoc distribution can now be built ``out of the box'' + from the distribution tarball or the Mercurial repository + (provided you have the requisite build applications installed). +- The global configuration files directory is ignored by both + 'asciidoc' and 'a2x' if AsciiDoc configuration files are installed + in the same directory as the asciidoc executable. This change + allows both a system wide copy and multiple local copies of AsciiDoc + to coexist on the same host PC. +- CSS 'quirks' mode is no longer the default 'xhtml11' output + (http://groups.google.com/group/asciidoc/browse_thread/thread/1c02d27d49221aa2). +- Relaxed anchor ID name syntax + (http://groups.google.com/group/asciidoc/browse_thread/thread/5f3e825c74ed30c). +- Added document files: `doc/epub-notes.txt`, + `doc/publishing-ebooks-with-asciidoc.txt`. +- 'a2x': If all other resource locations are exhausted then recursively + search directories named 'images' and 'stylesheets' in the + 'asciidoc' configuration files directory. +- 'a2x': options can also be set in the AsciiDoc source file. If the + source file contains a line beginning with '// a2x:' then the + remainder of the line will be treated as a2x command-line options. +- Added dblatex table-width processing instruction -- tables generated + by dblatex now observe the AsciiDoc table width as a percentage + (thanks to Gustav Broberg for suggesting this enhancement). +- 'a2x': Don't exit if the `--epubcheck` option is set and 'epubcheck' + is missing, issue warning and continue. +- Added a global 'plaintext' attribute for dealing with large amounts + of imported text. +- The author name format has been relaxed, if the the author does not + match the formal specification then it is assigned to the + 'firstname' attribute (previously asciidoc exited with an error + message). +- FAQ and documentation updates. +- Refactored chunked.xsl and epub.xsl files. +- Exchanged article.epub for more relevant book.epub on website. +- Put asciidoc.epub User Guide on website. +- 'a2x': Chunking EPUB and HTML outputs set to a per chapter basis and + the first chapter is separate from preceding contents. +- Changed dates format in example article and books to suppress EPUB + validation error. +- Added 'style' and 'role' CSS classes to xhtml11 section templates. +- Added the 'role' element to xhtml11 backend block templates. +- Suppressed md5 module deprecation warning from music and Graphviz filters. +- Pygments (https://pygments.org/) option added to source code + highlight filter. Based on Pygments source code filter written by + David Hajage + (http://groups.google.com/group/asciidoc/browse_thread/thread/d8d042f5a3021369/8934ebbb8cb7144b). +- xhtml11: Added a new theme (volnitsky). Written and contributed by + Leonid V. Volnitsky. +- xhtml11: Set body element class name to document type. +- Added refentryinfo element and contents (including revdate) to man + page DocBook output. Man pages are now dated using the revdate + attribute value if it has been defined. Based on patch supplied by + Rainer Muller + http://groups.google.com/group/asciidoc/browse_frm/thread/319e5cd94493e330/3fcb83fab067af42. +- Added `{template:...}` system attribute. +- Table of contents attribute 'toc' can now be specified in the + document header. +- Reimplemented music and latex filter -m option functionality when + the input is stdin using MD5 checksums. +- Added 'latex' filter. +- Added auto file name generation to image generating filters + (latex,music, graphviz). +- Added `counter2` and `set2` system attributes (to implement image + auto file name generation). +- Undefined attribute in filter command generates error but does not + exit. +- Attribute substitution proceeds from start line to end line + (previously was in reverse order which was really confusing). +- Tidied up music filter code: + * Format option is optional and default to 'abc' unless Lilypond + notation detected. + * The -m option does not apply to stdin input. +- Added paragraph styles to music and graphviz filters. +- Documented dynamic template names. 753: Graphviz filter can now + generate SVG format images. Patch submitted by Elmo Todurov, see: + http://groups.google.com/group/asciidoc/browse_frm/thread/fe9b33d8f5f1e0af + The xhtml11 SVG Graphviz template marked EXPERIMENTAL. No SVG + support for other backends. +- AsciiDoc template names can now contain embedded attribute + references. +- Added 'legalnotice' tag to `doc/article-docinfo.xml` example. +- xhtml11 backend: Callouts and callout lists display callout icons + when the 'icons' attribute is defined. See + http://groups.google.com/group/asciidoc/browse_frm/thread/8eda3ea812968854 +- Document attribute names are case insensitive everywhere, this makes using +attribute entries more consistent e.g. previously :VERS: had to be referred to +with {vers} ({VERS} did not work). +- Hungarian translation of footer-text (submitted by Miklos Vajna). + See + http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72# +- asciidocapi.py 0.1.2: Can now load AsciiDoc script named asciidoc. + See + http://groups.google.com/group/asciidoc/browse_frm/thread/66e7b59d12cd2f91 + Based on patch submitted by Phillip Lord. +- German translation of footer-text (submitted by Simon Ruderich). See + http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 +- Pushed HTML footer text into language conf files with the + introduction of a [footer-text] configuration file template section. + See + http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 + +.Bug fixes +- *FIXED*: Sometimes multiple double quoted text elements in the same + paragraph were mistakenly seen as starting with an inline literal. + See + http://groups.google.com/group/asciidoc/browse_frm/thread/219c86ae25b79a21 +- *FIXED*: 'localtime' and 'doctime' attributes calculated incorrect + daylight saving / non daylight saving timezones and consequently so + did HTML footers. Patch submitted by Slawomir Testowy. See + http://groups.google.com/group/asciidoc/browse_frm/thread/af652507caf6cec9 +- *FIXED*: Missing selector for 'List of examples' title in DocBook + CSS file. Patch submitted by Laurent Laville. See + http://groups.google.com/group/asciidoc/browse_frm/thread/3f96900f7fbf5620 +- *FIXED*: Broken accents in lang-hu.conf. See: + http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 +- *FIXED*: DocBook XSL generated HTML callout lists are properly + aligned. Submitted by Lionel Orry. See + http://groups.google.com/group/asciidoc/browse_frm/thread/2ff802547b6a75ea +- *FIXED*: Filter execution now occurs prior to filter markup template + substitution to ensure image data URI encoding happens after image + generation (see + http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b). +- *FIXED*: The section numbers no longer increment when the 'numbered' + attribute is undefined (see + http://groups.google.com/group/asciidoc/browse_thread/thread/faa36e9e5c7da019/d24cab3fe363e58d). + + +Version 8.5.3 (2010-01-18) +-------------------------- +.Additions and changes +- a2x: Added a2x configuration file options ASCIIDOC_OPTS, + DBLATEX_OPTS, FOP_OPTS, XSLTPROC_OPTS (appended to same-named + command-line options). See + http://groups.google.com/group/asciidoc/browse_frm/thread/ac4b9bfa2116db28 +- Dropped `.hgignore` from the repository. See + http://groups.google.com/group/asciidoc/browse_frm/thread/c17abd175778f5ea +- Don't pass verbose options to asciidoc table filter so that + asciidocapi messages are not discarded. See: + http://groups.google.com/group/asciidoc/browse_frm/thread/c17abd175778f5ea +- Added `./tests/data/lang-pt-BR-test.txt` file to the repository. +- xhtml11: Verse block and verse paragraph content enveloped in a + 'pre' tag (instead of a 'div') so it renders better in text-only + browsers. See: + http://groups.google.com/group/asciidoc/browse_frm/thread/1b6b66adb24e710 +- User Guide: Clarified Passthrough Blocks (suggested by Simon + Ruderich). +- FAQ: 'How can I include lines of dashes inside a listing block?' +- FAQ errata and updates (submitted by Simon Ruderich). +- User Guide errata. +- Simplified 'asciidoc-toc' processing instruction and included lists + of figures, tables, examples and equations in books (i.e. revert to + pre-8.5.0 behavior). +- Attempted to have dblatex recognise the 'asciidoc-toc' processing + instruction but couldn't get it to work. +- Added 'notitle' attribute to allow the document title to be hidden. + + +.Bug fixes +- *FIXED*: Regression: system attribute escaping did not work. +- *FIXED*: Website: broken image links in chunked User Guide. + + +Version 8.5.2 (2009-12-07) +-------------------------- +.Additions and changes +- Updated example article and book documents with the recommended + explicit section name syntax (see the 'Special section titles + vs. explicit template names' sidebar in the AsciiDoc 'User Guide'). +- Added Italian language configuration file (contributed by Fabio + Inguaggiato). +- Added 'header' table style. See: + http://groups.google.com/group/asciidoc/browse_frm/thread/a23fea28394c8ca9 +- Pass 'icons', 'data-uri', 'imagesdir', 'iconsdir' attributes to + 'asciidoc' table style filter so that images are rendered in table + cells. +- Pass 'trace' and 'verbose' attributes to 'asciidoc' table style + filter so diagnostic information is printed from table cell source. +- The 'eval' system attribute can be nested inside other system + attributes. +- HTML outputs: Table and figure caption punctuation set to more usual + syntax. +- docbook backend: footnotes can now contain embedded images. See + http://groups.google.com/group/asciidoc/browse_frm/thread/50b28f6941de111a +- CSS tweaks so that tables processed by DocBook XSL Stylesheets have + the default asciidoc xhtml11 backend styling. See + http://groups.google.com/group/asciidoc/browse_frm/thread/dfe5204d5b2c9685 +- Block titles take precedence over section titles to avoid titled + delimited blocks being mistaken for two line section titles (see + http://groups.google.com/group/asciidoc/browse_frm/thread/f0b6f9989f828c3). +- Section title trace displays level and title text. +- FAQ additions. +- Added `{zwsp}` (zero width space) attribute. +- Undefined paragraph styles are reported (previously threw a runtime + error). +- Eliminated empty preamble generation. +- Floating titles now processed in all contexts. +- Implemented auto-lettered appendix names and updated example + documents. +- Section numbering can be disabled in HTML outputs with a + ':numbered!:' AttributeEntry. +- xhtml11: Nicer default quote block styling. +- Exclude floating titles from xhtml11 table of contents. Patch + submitted by Mark Burton (see + http://groups.google.com/group/asciidoc/browse_frm/thread/14aefc1cb6bd85f5). +- Enhanced `doc/article-docinfo.xml` example docinfo file. +- Vim syntax highlighter improvements. + +.Bug fixes +- *FIXED*: Absolute 'imagesdir' and 'iconsdir' attribute path names + do not work with the xhtml11 data-uri encoding. See + http://groups.google.com/group/asciidoc/browse_frm/thread/cb8b7694bbc82a6 +- *FIXED*: Regression issue with inline data-uri images. See + http://groups.google.com/group/asciidoc/browse_frm/thread/cb8b7694bbc82a6 +- *FIXED*: An unexpected error occurred when processing a table + containing CSV data if the 'cols' attribute was not explicitly + specified. See + http://groups.google.com/group/asciidoc/browse_frm/thread/4b0f364b477ec165 + + +Version 8.5.1 (2009-10-31) +-------------------------- +.Additions and changes +- If an AsciiDoc document file begins with a UTF-8 BOM (byte order + mark) then it is passed transparently through to the output file. + The BOM is stripped from included files. See + http://groups.google.com/group/asciidoc/browse_frm/thread/e5e61823ff4203cd +- Added AsciiDoc 'role' attribute to quoted text. Sets 'class' + attribute in HTML outputs; 'role' attribute in DocBook outputs. See: + http://groups.google.com/group/asciidoc/browse_frm/thread/2aa3e5711d243045 +- Conditional attribute syntax extended: they now accept multiple ORed + or ANDed attribute names. +- The 'xhtml11' backend dynamically processes footnotes using + JavaScript. +- Tidied up and namespaced 'xhtml11' JavaScript. +- Superseded `javascripts/toc.js` with `javascripts/asciidoc-xhtml11.js`. +- Added 'disable-javascript' attribute ('xhtml11' backend). +- Styled HTML footnotes. +- Added links to HTML footnote refs. +- Added title attribute to inline image macros to display popup + ``tooltip'' (HTML outputs only). +- Single-quoted attribute values are substituted in block macros (just + like the AttributeList element). +- For consistency changed underscores to dashes in attribute names. + Public attributes with underscores retained for compatibility. +- Added Brazilian Portuguese language configuration file (contributed + by Thiago Farina). +- Added 'leveloffset' attribute to make it easier to combine + documents. + +.Bug fixes +- *FIXED:* a2x: `--dblatex-opts` is now processed last so + `asciidoc-dblatex.xsl` params can be overridden. Patch submitted by + Mark Fernandes (see + http://groups.google.com/group/asciidoc/browse_frm/thread/5215c99dcc865e7d). +- *FIXED:* An error occurred if a directory in current path with same + name as executable. + +Regression issues +~~~~~~~~~~~~~~~~~ +There's been quite a bit of tiding up to the xhtml11 JavaScript. The +most obvious change is that the toc.js script has been superseded by +asciidoc-xhtml11.js so if you're linking you'll need get a copy of +the new file from the distribution javascripts directory. + +If you use customised xhtml11 configuration file `[header]` and +`[footer]` sections and you want them to use the new footnotes feature +then you've got a bit more work to do: + +. The onload event expression changed. +. The new `<div id="content">...</div>` div envelopes document + content. +. You need to add `<div id="footnotes">...</div>` div to the + `[footnotes]` section for footnotes to work. +. Drop the `ifdef::toc[]` macro that surround JavaScript inclusion. + +Take a look at the [header] and [footer] changes in the xhtml11.conf +diff to see what's going on: +http://hg.sharesource.org/asciidoc/diff/55a5999bfd04/xhtml11.conf + + +Version 8.5.0 (2009-10-04) +-------------------------- +.Additions and changes +- Implemented a 'float' attribute for tables and block images (HTML + outputs only). +- Added `unfloat::[]` block macro to cancel floating. +- Added table 'align' attribute to (HTML outputs only). +- The image 'align' attribute now works with HTML backends. +- Renamed table cell 'align' attribute to 'halign' so it doesn't clash + with the new table 'align' attribute. +- Added 'breakable' and 'unbreakable' options to AsciiDoc example and + block image elements. +- `[miscellaneous]` section entries now update properly when set from + a document 'AttributeEntry'. +- `[miscellaneous]` section `pagewidth` entry accepts fractional + values. +- Fractional column widths are now calculated correctly when using + fractional 'pageunits' (DocBook tables). +- Use DocBook XSL table width processing instructions. +- asciidoc 'KeyboardInterrupt' exits with error code 1. +- Added 'set' system attribute to allow attributes to be set from + configuration file templates. +- Allow constrained quotes to be bounded on the left by a colons and + semicolons, see + http://groups.google.com/group/asciidoc/browse_frm/thread/b276a927fdc87995 +- Titled listing and literal blocks (DocBook outputs) no longer default + to examples. See + http://groups.google.com/group/asciidoc/browse_frm/thread/f4df7c9eec01a9bd +- Updated language file table, figure and example captions to + accommodate new auto-numbering in html4 and xhtml11 backends. +- Titled source highlight filter listings generated by docbook backend + are now rendered as examples. See + http://groups.google.com/group/asciidoc/browse_frm/thread/f4df7c9eec01a9bd +- Implemented 'counter' system attribute. +- Use 'counter' system attributes to number titled tables and block + images in HTML backends. +- Added program name suffix to console messages. +- Added substitution to the 'AttributeEntry' passthrough syntax, this + replaces the now unnecessary 'attributeentry-subs' attribute. +- Allow passthrough inline macro syntax to be used in + 'AttributeEntrys'. +- Reinstated 8.4.4 default 'lang' attribute behavior. See + http://groups.google.com/group/asciidoc/browse_frm/thread/d29924043e21cb6a. +- Added 'max-width' attribute to the 'xhtml11' backend to set maximum + display width. See + http://groups.google.com/group/asciidoc/browse_frm/thread/74d9a542b79ccd50. +- Added 'a2x.py', a rewritten and much enhanced version of the old + 'a2x' bash script. +- The new 'a2x' can output EPUB formatted documents. +- Added `--safe` option and deprecated `--unsafe` option. Patch + submitted by Todd Zullinger. See + http://groups.google.com/group/asciidoc/browse_frm/thread/ea3a8ea399ae5d2a + and + http://groups.google.com/group/asciidoc/browse_frm/thread/69b3183fdab7c6a5 +- Added 'CHECK' and 'TEST' todo highlight words to Vim syntax + highlighter. +- Line breaks, page breaks, and horizontal rulers are now processed by + dblatex, thanks to a patch submitted by Mark Fernandes + (http://groups.google.com/group/asciidoc/browse_frm/thread/a254cf949ea7c6c5). +- Allow footnote macros hard up against the preceding word so the + rendered footnote mark can be placed against the noted text without + an intervening space (patch submitted by Stas Bushuev, + http://groups.google.com/group/asciidoc/browse_frm/thread/e1dcb7ee0efc17b5). +- Normalized path in `safe_filename` function (submitted by Todd + Zullinger, + http://groups.google.com/group/asciidoc/browse_frm/thread/69b3183fdab7c6a5). +- The Asciidoc 'numbered' and 'toc' attributes cause DocBook outputs + to include `asciidoc-numbered` and `asciidoc-toc` processing + instructions, these are used by DocBook XSL to include section + numbering and table of contents (like Asciidoc HTML backends). For + backward compatibility both 'numbered' and 'toc' attributes are + defined by default when the 'docbook' backend is used. See + http://groups.google.com/group/asciidoc/browse_frm/thread/1badad21ff9447ac. +- 'data-uri' attribute is now evaluated dynamically and can be set in + document body (previously could only be set from command-line). +- Added 'sys3' and 'eval3' system attributes to passthrough generated + output, this fixes the data-uri inline image problem: + http://groups.google.com/group/asciidoc/browse_frm/thread/a42db6bc54c2c537. +- Missing language file generates a warning instead of an error. +- Updated Spanish language file (updates contributed by Gustavo Andrés + Gómez Farhat). + +.Bug fixes +- *FIXED:* Options in an 'AttributeList' option attribute are merged + with (rather than replace) configuration file options. +- *FIXED:* Comment blocks and comment block macros no longer consume + preceding block titles and attribute lists. +- *FIXED:* `examples/website/layout1.conf` and + `examples/website/layout2.conf` TOC problem. Submitted by Mark + (burtoogle). See + http://groups.google.com/group/asciidoc/browse_frm/thread/b9c63be67dd1d11c +- *FIXED:* Only the first occurrence of passthrough macro was + substituted. Patch submitted by Peter Johnson. See + http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c +- *FIXED:* asciidoc now runs on Jython 2.5.0. +- *FIXED:* Wordpress margins and pads in a number of block + elements + (http://groups.google.com/group/asciidoc/browse_frm/thread/36ff073c79cbc20a). + +Regression issues +~~~~~~~~~~~~~~~~~ +- Tables generated by 'dblatex' occupy 100% of the available space + regardless of the 'width' attribute setting. To restore width + behavior change the 'pageunits' miscellaneous parameter to 'pt'. You + can do this from the command-line with the `-a pageunits=pt` option. + See {website}userguide.html#X89[DocBook table widths]. + + +Version 8.4.5 (2009-05-24) +-------------------------- +.Additions and changes +- Added manpage 'Name' and 'Synopsis' section title customization to languages + configuration files. +- Synopsis manpage section no longer mandatory. +- Section markup templates can be specified by setting the title's + first positional attribute or 'template' attribute. +- The article and book document header can now include a revision + remark. +- A 'role' attribute can now be applied to block elements. This adds + the 'role' attribute to DocBook elements. Patch submitted by + http://groups.google.com/group/asciidoc/browse_thread/thread/62278a054188a038[Noah + Slater]). +- Renamed 'revision' and 'date' attributes to more sensible and consistent + 'revnumber' and 'revdate' (old names deprecated but still + recognized). +- Moved backend specific attributes to Appendix H in User Guide. +- Renamed and generalized the docbook backend revision history + inclusion mechanism to 'docinfo' to reflect the use of all article + or book information elements. The old revision history names still + work but have been deprecated. +- Refactored docbook.conf headers. +- Moved line break replacement from `[replacements]` to + `[replacements2]` so the replacement occurs after the mailto macro. + This fixes bug + http://groups.google.com/group/asciidoc/browse_thread/thread/4bdcdfb0af773e2 +- The typewriter to punctuation apostrophe replacement can be escaped + with a backslash. +- Graphviz filter outputs images to 'imagesdir' if it is defined. +- Made the block image macro generic so that it can be used for filter + outputs. As a result Music and Graphviz filters: + * Have been greatly simplified. + * Honor the 'data-uri' attribute. + * 'html4' outputs no longer generate W3C validation warning. +- The 'iconsdir' attribute no longer requires a trailing directory + separator character. +- Removed borders around linked html4 images. +- Added 'html4' specific HTML output for music filter. +- 'a2x': Added `--unsafe` option (shortcut for + `--asciidoc-opts=--unsafe`). +- 'a2x': The FOP executable can now be named `fop` (this is the + default name in some distributions). +- Attributes are now substituted in the system macro attribute list. +- If the output is set to stdout (i.e. no output directory is defined) + then Music and Graphviz filters will output included images to the + source file directory. +- Added 'name' directive to 'testasciidoc'. +- Added lots of 'testasciidoc' new tests. +- Moved language specific configuration parameters into `lang-en.conf` + file. +- 'lang' attribute entry can be specified in the AsciiDoc source file + (preceding the header). +- Removed cruft from A-A-P scripts and documented them. +- Added German language config file (`lang-de.conf`) contributed by + Michael Wild. +- Added French language config file (`lang-fr.conf`) contributed by + Yves-Alexis Perez. +- Added Russian language config file (`lang-ru.conf`) contributed by + Artem Zolochevskiy. +- Added Hungarian language config file (`lang-hu.conf`) contributed by + Miklos Vajna. + +.Bug fixes +- *FIXED:* Multiple manpage names are now handled correctly when + generating DocBook output, each name now generates a separate + DocBook `<refname>` element. See + http://groups.google.com/group/asciidoc/browse_thread/thread/c93bb4db025225d8 +- *FIXED:* A problem that caused AttributeEntries preceding the header + to be overwritten when the language conf file loaded. +- *FIXED:* Possible inline macro name ambiguity e.g. link matches olink. +- *FIXED:* The documented macro definition deletion behavior had been + broken for a long time. +- *FIXED:* Email addresses not recognized when followed by a period + character. +- *FIXED:* Hyphens in mailto macros can delimit nested addresses e.g. + \bloggs@mail was processed inside + \mailto:joe-bloggs@mail-server.com[Mail]. +- *FIXED:* User name in FTP URI generated incorrect FTP link. See + http://groups.google.com/group/asciidoc/browse_thread/thread/1d796a9c9ddb2855 +- *FIXED:* Source highlighter now works with Wordpress backend (see + http://groups.google.com/group/asciidoc/browse_thread/thread/6d8c716748b109e3). + +[[X2]] +Regression issues +~~~~~~~~~~~~~~~~~ +. A colon following the date in the AsciiDoc header is treated as a + revision remark delimiter -- this could be an issue if you have used + a colon in the header date. + + +Version 8.4.4 (2009-04-26) +-------------------------- +.Additions and changes +- Added table column and row spanning. +- Table styles can now be applied per cell. +- Vertical cell alignment can be applied to columns and individual + cells. +- Added table 'align' attribute to set horizontal alignment for entire + table. +- Included Geoff Eddy's update of the experimental LaTeX backend. +- A new attribute named 'trace' controls the output of diagnostic + information. If the 'trace' attribute is defined then + element-by-element diagnostic messages detailing output markup + generation are printed to stderr. +- Added 'literal' paragraph style (allows 'literal' style to be + applied to normal paragraphs). +- Deleted unused `replacements2` from `xhtml11.conf`. +- Added `replacements2` to default substitutions. +- 'testasciidoc.py': messages to 'stdout', only diffs to 'stderr'. +- Added transparency to `smallnew.png` image. + +.Bug fixes +- All combinations of leading comments and attribute entries at the + start of a document are now skipped correctly. +- *FIXED:* `./configure` doesn't support `--docdir` as expected (patch + submitted by Artem Zolochevskiy) +- *FIXED:* Constrained quotes were incorrectly matched across line + boundaries e.g. the string `+\nabc+` incorrectly matched a monospace + quote. + + +Version 8.4.3 (2009-04-13) +-------------------------- +.Additions and changes +- DocBook outputs default to DocBook version 4.5 doctype (previously + 4.2). +- Configuration file `[specialsections]` definitions can be undefined + by setting their configuration entry values blank. +- The Makefile 'install' target depends on the 'all' target to ensure + pre-install patches are applied. +- 'testasciidoc.py' now emits user friendly messages if: + . the configuration file is missing. + . an illegal backend is specified. + . an illegal test number is specified. + +.Bug fixes +- Fixed + http://groups.google.com/group/asciidoc/browse_thread/thread/fd27add515597c06[missing + template section] error. +- The 'testasciidoc.py' `--force` option no longer deletes test data + files that were not specified. +- Dropped second quotes substitution in table cells -- it had + effectively disabled quote escaping in table cells. + + +Version 8.4.2 (2009-03-19) +-------------------------- +.Additions and changes +- Added {website}testasciidoc.html[testasciidoc], a tool to verify + AsciiDoc conformance. +- A warning is issued if nested inline passthroughs are encountered. +- 'asciidocapi': setting an attribute value to `None` will undefine + (delete) the attribute (this in addition to the `name!` attribute + name format that the `asciidoc(1)` command uses). + +.Bug fixes + + +Version 8.4.1 (2009-03-10) +-------------------------- +.Additions and changes +- AsciiDoc now has a {website}asciidocapi.html[Python API]. The + following minimal example compiles `mydoc.txt` to `mydoc.html`: ++ +[source,python] +------------------------------------------------------------------------------- +from asciidocapi import AsciiDocAPI asciidoc = AsciiDocAPI() +asciidoc.execute('mydoc.txt') +------------------------------------------------------------------------------- + +- Backtick quoting for monospaced text is now implemented as an + 'inline literal' passthrough. This makes more sense since monospace + text is usually intended to be rendered literally. See + <<X2,Regression issues>> below for the impact this may have on + existing documents. Here are some examples that would previously + have had to be escaped: + + The `++i` and `++j` auto-increments. + Paths `~/.vim` and `~/docs`. + The `__init__` method. + The `{id}` attribute. + +- Added `--doctest` option to `asciidoc(1)` command. +- Added an optional second argument to 'BlockId' element, this sets + the `{reftext}` attribute which in turn is used to set the `xreflabel` + attribute in DocBook elements. +- Added lists to `--help` syntax summary. +- `{infile}` and `{indir}` attributes reflect the current input file + (previously always referred to the root document). +- `{docfile}` (new) and `{docdir}` (previously deprecated) attributes + refer to the root document specified on the `asciidoc(1)` + command-line. +- Vim syntax highlighter improvements. +- Syntax summary command (`asciidoc -h syntax`) additions. +- Admonition icons now have transparent backgrounds. +- Changed yellow W3C badges to blue ones in page footers. + +.Bug fixes +- Dropped `asciidoc(1)` broken undocumented `--profile` option. +- Em dash replacement now recognized at start of block. + +Regression issues +~~~~~~~~~~~~~~~~~ +Replacing backtick quoting with the 'inline literal' passthrough +raises two regression scenarios for existing documents: + +1. You have escaped the expansion of enclosed inline elements, for + example: `\{id}`. You would need to delete the backslashes: `{id}` + (if you don't the backslashes will be printed). Mostly it's just a + case of interactively finding and replacing of all occurrences of + `\. + +2. There are enclosed inline elements, for example: `some *bold* + monospaced`. You would need to switch to plus character monospace + quoting: `+some *bold* monospaced+` (if you don't the enclosed + elements won't be expanded). + +If your existing documents include these cases and you don't want to +upgrade then use the `-a no-inline-literal` command-line option, +alternatively put this in `~/.asciidoc/asciidoc.conf`: + + [attributes] + no-inline-literal= + + +Version 8.3.5 (2009-02-02) +-------------------------- +.Additions and changes +- Cached compiled regular expression delimiters (speed up 'User + Manual' compilation by 250%). +- Created distinct list definitions for each numbered list style to + allow nesting of all styles. +- Roman numbers in numbered lists are followed by a closing + parenthesis instead of a period to eliminate 'i', 'v', 'x' item + ambiguity with respect to alpha numbered list items. +- Added `**`, `***`, `****`, `*****` + bulleted lists. +- Added `...`, `....`, `.....` implicit numbered + lists. +- Added `:::`, `::::` labeled lists. +- Updated User Guide for new list syntaxes. +- Optimized paragraph and list termination detection with separate + precompiled regular expressions for performance and to prevent + reaching Python 100 named group limit. +- Updated Vim syntax highlighter for new list syntaxes. +- Allow `template::[]` macros in conf file entries sections (not just + in template sections). +- Dropped unused `[listdef-numbered2]` conf file sections. +- Renamed 'ListBlock' to more appropriate 'OpenBlock'. +- Implemented single-line versions of `ifdef::[]` and `ifndef::[]` + macros. +- 'html4' backend styling: + * Underlined admonition captions. + * Added side border to Example Blocks. +- 'xhtml11' backend styling: + * Dropped right hand margin from all but quote and verse blocks. + * html4 backend: corrected over-sized width of caption in admonition + block. + +.Bug fixes +- Fixed broken numbered list nesting. + +Compatibility issues +~~~~~~~~~~~~~~~~~~~~ +The roman numbered list parenthesis syntax is incompatible with the +potentially ambiguous roman period syntax introduced in 8.3.2. + + +Version 8.3.4 (2009-01-20) +-------------------------- +.Additions and changes +- Implemented a title 'float' style. A floating title (or bridgehead) + is rendered just like a normal section but is not formally + associated with a text body and is not part of the regular section + hierarchy so the normal ordering rules do not apply. +- Implemented inline comment macro so comment lines can now appear + inside block elements. +- Comment lines are sent to the output if the 'showcomments' attribute + is defined (comment blocks are never sent to the output). +- Single quoting attribute values in 'AttributeList' elements causes + them to be substituted like normal inline text (without single + quoting only attribute substitution is performed). +- Rewrote list item processing (was very crufty). List continuation + and list blocks now work as expected. Updated and clarified list + documentation in User Guide. +- The 'revision' attribute now recognizes the RCS $Id$ marker format. +- An RCS $Id$ marker formatted revision line in the header does not + need to be preceded by an author line. +- If an RCS $Id$ formatted revision is specified and the author name + has not already been set then the author name in the $Id$ marker + will be used. +- Updated Gouichi Iisaka's Graphviz filter to version 1.1.3. +- Added 'autowidth' table attribute option for (X)HTML outputs. +- DocBook backend now puts 'orgname' optional attribute in DocBook + header. +- Deprecated undocumented 'companyname' attribute in favor of + DocBook's 'corpname'. +- Removed explicit closing backslash from HTML4 self-closing tags to + comply with WC3 recommendation. + +.Bug fixes +- Fixed 8.3.3 regression whereby adjacent lists with the same syntax + but different list styles were incorrectly treated as a single list. + + +Version 8.3.3 (2009-01-02) +-------------------------- +This release supersedes 8.3.2. + +.Bug fixes +- The broken and confusing numeration and numeration2 numbered list + attributes have been dropped, use the style attribute instead. + + +Version 8.3.2 (2009-01-01) +-------------------------- +.Additions and changes +- Added Gouichi Iisaka's Graphviz filter to distribution. +- The 'SidebarBlock' element can now be rendered with an 'abstract' + style. +- Reorganized filters into a separate subdirectory for each filter. +- Updated `Makefile.in` and `MANIFEST` files to reflect new filters + organization. +- Added 'listing' style to 'LiteralBlock' element so listings with + nested listing blocks can be rendered as a listing block. +- Changed example 'code' filter to use preferred 'ListingBlock' syntax + (the old `~` delimited filter syntax is no longer used). +- Implemented 'enumeration' and 'enumeration2' numbered list + attributes for specifying the list numbering style ('arabic', + 'loweralpha', 'upperalpha', 'lowerroman' and 'upperroman'). +- AsciiDoc now recognizes 'upperalpha', 'lowerroman' and 'upperroman' + numbers in `listdef-numbered2` numbered lists and sets the number + style based on the style of the first numbered list item + (alternative to setting 'enumeration2' attribute). +- Updated `formatlistpat` definition in `.vimrc` example in User + Guide. +- You can now backslash escape system block macros. +- Added 'Pychart' FAQ. +- Drop paragraph 'text' and list 'text', 'index' and 'label' match + groups from attributes -- they are included in the element's text + and we don't want them processed a second time as attributes. +- Changed comment line block macro to a passthrough block macro to + ensure no substitutions. +- A 'subslist' no longer has to be appended to a 'PassthroughBlock' + macro definition, if omitted no substitutions are performed. +- Code tidy up: replaced deprecated `<>` operator with `!=`. +- Removed unused linuxdoc code. +- Code tidy ups: dropped old types module reference; replaced + `has_key()` with preferred `in` operator. + +.Bug fixes +- Old syntax source highlight filter regression: special characters + where not escaped in DocBook outputs. + + +Version 8.3.1 (2008-12-14) +-------------------------- +.Additions and changes +- Replaced the `install.sh` script with Ben Walton's updated autoconf + scripts -- see {website}INSTALL.html[INSTALL] for details. +- Added a generalized 'AttributeEntry' syntax to allow arbitrary + configuration file entries to be set from within an AsciiDoc + document (suggested by Henrik Maier). +- Listing delimited blocks in DocBook outputs now support IDs; IDs of + titled Listing and Literal delimited blocks have been moved to the + enclosing DocBook example tag (thanks to Vijay Kumar for this + patch). +- Replaced vertical typewriter apostrophe with punctuation apostrophe + (thanks to Noah Slater). + +.Bug fixes +- Regression: Excluding double-quotes from unquoted attribute values + resulted in backward incompatibility, double-quotes in unquoted + attribute values has been reinstated. +- Regression: Text like `&...;` was sometimes mistaken for an entity + reference -- tightened up entity reference matching. + + +Version 8.3.0 (2008-11-29) +-------------------------- +.Additions and changes +- {website}newtables.html[AsciiDoc new tables] is a complete redesign + of the tables syntax and generation. The new syntax and features are + a huge improvement over the old tables. The old tables syntax has + been deprecated but is currently still processed. +- {website}newlists.html[Lists can now be styled] like other block + elements. This allows a single list syntax for 'glossary', 'qanda' + (Question and Answer) and 'bibliography' lists instead of having to + remember a different syntax for each type. +- Inline passthroughs macros have been improved and block passthrough + macros added. Attribute substitution can be optionally specified + when the macro is called. +- The passthrough block has a fully transparent passthrough delimited + block block style called 'pass'. +- The 'asciimath' and 'latexmath' + {website}userguide.html#X77[passthrough macros] along with + 'asciimath' and 'latexmath' {website}userguide.html#X76[passthrough + blocks] provide a (backend dependent) mechanism for rendering + mathematical formulas. There are {website}latexmath.pdf[LaTeX Math], + {website}asciimathml.html[AsciiMathML] and + {website}latexmathml.html[LaTeXMathML] examples on the AsciiDoc + website. +- Reimplemented and cleaned up filter processing based on a patch + submitted by Kelly Anderson. Uses the newer subprocess module + instead of the deprecated popen2 module. Now works in Win32 command + shell. +- Addition FAQs, more documentation updates. +- Arbitrary HTML/XML entities can be entered in AsciiDoc source. +- Did away with the need for the `shaded-literallayout.patch` (thanks + to Henrik Maier for this patch). +- Implemented 'page break' block macro. +- Added 'line breaks' and 'ruler' processing instructions to DocBook + outputs (thanks to Henrik Maier for this patch). +- Added 'deg' (degree) and 'wj' (word joiner) entity attributes + (thanks to Henrik Maier). +- Tweaked DocBook 'indexterm2' macro to avoid white space preceding + the term when used in table cells (thanks to Henrik Maier for this + patch). +- Title elements now process the 'options' attribute like other block + elements. +- Added `single quoted' element. +- Spaces on both sides of a -- em-dash are translated to thin space + characters. +- Improved detection and reporting of malformed attribute lists. +- The list 'compact' style is now a list option. +- Added 'strong' labeled list option which makes the labels bold (HTML + outputs only). +- Dropped unsupported 'linuxdoc' backend. +- Dropped deprecated 'xhtml-deprecated' (version 6) backend. +- Added 'breakable' and 'unbreakable' attribute options to tables to + control table breaking across page boundaries (DocBook XSL/FO + outputs). By and in collaboration with Henrik Maier. +- Added 'pgwide' attribute option to tables to table, block image, + horizontal labeled lists. Specifies that the element should be + rendered across the full text width of the page irrespective of the + current indentation (DocBook XSL/FO outputs). Thanks to Henrik Maier + for this patch. +- Vim syntax highlighter: spaces before/after bullets no longer + highlighted (which is ugly if using a theme that highlights with + underlines). Thanks to Donald Chai for this patch. +- Added `a2x(1)` `--fop` option. +- Added `a2x(1)` `--no-xmllint` option. +- Highlighted labelled list terms with the navy color in XHTML + outputs. +- Use `w3m(1)` as default `a2x(1)` text format generator (fallback to + `lynx(1)`). +- Changed callout formats in html4 and xhtml11 outputs to angle + brackets to match source highlighter rendering. +- Macros now inject user defined `<optionname>-option` attributes into + markup. +- Added IRC URLs to AsciiDoc inline macros. +- Added `depth` attribute to `include::[]` system macro. +- Added 'footnoteref' inline macro. +- Added 'stylesheet' XHTML attribute to specify additional custom CSS + stylesheet. +- If a paragraph style is specified it will be added to the XHTML + 'class' attribute and DocBook 'role' attribute. +- Replacements can be set in a document using the reserved + AttributeEntry name 'replacement'. +- The prefix for auto-generated section name IDs can be set with the + 'idprefix' attribute. + +.Bug fixes +- Escaped quote skipped over leading and trailing quote instead of + just the leading quote. +- Fixed bug that was causing false negative safe mode warnings (patch + submitted by Julien Palmas). +- Placed priority of AttributeEntry, AttributeList and BlockTitle + above Title. This ensures an AttributeEntry, AttributeList or + BlockTitle followed by a same length leading ListingBlock delimiter + is not mistaken for a two-line title. +- Vim syntax highlighter: fixed multi-line quoted text. +- Contstrained quote termination after non-space character enforced. +- Vim syntax highlighter: unterminated quoted text is no longer + highlighted. +- Vim syntax highlighter: passthroughs now exactly match AsciiDoc + semantics. +- Vim syntax highlighter: escaped quoted text, attribute references + and inline macros are not highlighted. +- Vim syntax highlighter: TODO's highlighted in CommentBlocks (thanks + to Scott Wall); non-greedy pass:[$$...$$]. +- Vim syntax highlighter: Comment lines mistaken for vertical list + labels (thanks to Scott Wall). +- Vim syntax highlighter: Single unmatched $$ mistakenly highlighted + remaining text (patch contributed by Scott Wall). +- Callouts now work in source highlighted listing generated by + dblatex. +- Fixed exception that occurred if undefined attribute was present in + filter command. +- AttributeList block can now follow a paragraph without intervening + blank line. +- The include macro tabsize attribute is no longer propagated to + nested includes. + +.Omissions +The following features were implemented but then but removed from this +release: + +- 'pi', 'cdata' and 'comment' passthrough macros and passthrough block + styles (creeping featurism, use 'pass' macros instead). +- Generic 'tag' inline macro (creeping featurism, use 'pass' macros + instead). + + +[[X1]] +Compatibility issues +~~~~~~~~~~~~~~~~~~~~ +Version 8.3.0 has a number of backward incompatibilities with respect +to the previous 8.2.7 release: + +- The old table syntax is still processed but a 'DEPRECATED' warning + is issued. +- Entity references have to be escaped with a backslash. +- You have to explicitly precede horizontal style labeled lists with + the `[horizontal]` style attribute -- by default all labeled lists + are rendered vertically. +- The list 'compact' style has been dropped and is now a list option + (use `options="compact"` in attribute lists). +- AsciiDoc version 6 syntax no longer supported. +- Linuxdoc been removed from the distribution. +- The unsupported experimental 'latex' backend has not been tested on + this release. +- The introduction of single-quote quoting requires that double-quote + quoting is escaped with two backslashes. + + +Version 8.2.7 (2008-07-04) +-------------------------- +.Additions and changes +- Added `dvi`, `ps` and `tex` output format options to a2x(1). +- Added `--dblatex` option to a2x(1) so `dblatex(1)` can be used to + generate PDFs. +- Added custom `dblatex(1)` configuration files (in distribution + `./dblatex` directory) that are used by a2x(1). +- `dblatex(1)` is now used to generate the distributed PDF version of + the AsciiDoc User Guide. +- If you don't need a customized the link caption you can enter the + 'http', 'https', 'ftp', 'file' URLs and email addresses without any + special macro syntax -- you get the links by just cutting and + pasting URLs and emails addresses. This also makes it easier to open + links directly form AsciiDoc source ( most editors allow you to open + URLs directly). The Vim syntax highlighter has been updated to + reflect these changes. +- Highlighted source code paragraphs have been implemented -- it's a + much more convenient way to enter short code examples (see + http://asciidoc.org/source-highlight-filter.html[the + online docs]). +- The source highlighter and music filter syntax has changed -- they + now used the ListingBlock syntax customized with 'source' and + 'music' style attribute values. This follows the Paragraph styling + convention introduced by the source paragraph (previous item) and is + easier to read. The old syntax still works but has been deprecated. +- QuoteBlocks now have a 'verse' style -- you no longer have to nest a + 'verse' LiteralBlock inside a QuoteBlock for verses. The 'verse' + style on the LiteralBlock has been deprecated (still works though) + and the 'style' attribute is positional attribute 1, pushing + 'attribution' and 'citetitle' attributes to the right (you'll need + to insert a 'quote' attribute into your existing QuoteBlocks). +- It is no up to the DocBook processor to highlight source code syntax + in `<programlisting>` elements rather than GNU Highlighter -- this + is the correct way to handle it, plus `dblatex(1)` makes a much + better job. +- 'scaledwidth' and 'align' attributes have been added to the 'image' + macro. They apply to DocBook outputs (specifically for PDF + documents). 'scaledwidth' sets the image size as a percent of the + available page width; 'align' applies 'left', 'center' or 'right' + horizontal image justification. +- Added a2x(1) `--fop-opts=FOP_OPTS` option (patch submitted by Miklos + Vajna). +- Added a2x(1) `--dblatex-opts=DBLATEX_OPTS` option. +- Added Mikhail Yakshin's FOP 0.95 patch which fixes a long-standing + `fo.xsl` problem and allows PDF's to be generated with FOP 0.95 + (previously had to use FOP 0.20.5). +- The User Guide has been updated and outdated FOP configuration and + installation sections removed. + +.Bug fixes +- Fixed `stylesheets/xhtml11-manpage.css` not being included when + 'linkcss' attribute was used. +- Configuration file `*-style` attributes are now dumped correctly. +- Fixed 'FAILED: malformed section entry' LaTeX backend error. + +See the also the https://sharesource.org/hg/asciidoc/[AsciiDoc +repository changelog]. + + +Version 8.2.6 (2008-04-29) +-------------------------- +.Additions and changes +- Enhancements to the Vim AsciiDoc syntax highlighter, for example, + quoted text is now highlighted in titles and macro captions. +- If you define the `data-uri` intrinsic attribute images referenced + by 'image' macros will be embedded in XHTML using the + http://en.wikipedia.org/wiki/Data:_URI_scheme[data: URI scheme]. + *NOTE*: Microsoft browser support for the 'data: URI scheme' is + currently limited to MSIE 8 beta 1. +- Added `toc-title` attribute to allow custom table of contents + titles. +- Added references to Alex Efros's AsciiDoc Cheatsheet to AsciiDoc + website. +- `asciidoc(1)` and `a2x(1)` man pages formatted to conform to + `man-pages(7)` recommendations. +- Old code-filter syntax (pre-8.1.0) is no longer recognized so that + malformed two-line level 2 titles are no longer confused with + 'code-filter' block delimiters. +- Added -> <- => <= arrow replacements from the Arrows block of + Unicode. +- Added DocBook refentry lang attribute -- patch contributed by + VMiklos. +- AttributeEntry names can now be numeric (``named macro targets''). +- Hide Table of Contents title if Table of Contents empty -- patch + contributed by Alex Efros. +- Various XHTML CSS tweaks. +- Code cleanup: + * Replaced `realpath()` with Python 2.2 `os.path.realpath()` library + function. + * Replaced old string library functions with string methods. + * Use file generators instead of `readlines()`. + * Renamed entities that shadowed builtins. + * Standardized string quoting. + * Dropped `readlines()` function. + +.Bug fixes +- Fixed broken CSS for decimal ordered lists nested in alpha ordered + list, thanks to Alex Efros. +- A missing closing block delimiter now reports the opening delimiter + line number instead of the end of file line number. +- Fixed an error generated by the asciidoc `-e` option when there are + no block definitions -- patch contributed by Alejandro Mery. +- Handle both `\r\n` (as well as `\n`) line separators that may be + returned by `{sys}` attribute evaluation. +- Numbered attribute names no longer interfere with positional + attribute list values. + + +Version 8.2.5 (2007-11-18) +-------------------------- +.Additions and changes + +.Bug fixes +- Fixed exception thrown by illegal command-line arguments. +- Rolled back the 'with' warning bug fix introduced in 8.2.4 -- it was + incompatible with Python <2.5. + + +Version 8.2.4 (2007-11-10) +-------------------------- +.Additions and changes +- You can now use the `lang` attribute to set the DocBook language + attribute. +- Attribute values can now contain attribute references. +- If the `lang` attribute is defined then configuration files named + like `lang-<lang>.conf` will be loaded automatically. +- The help file name `help-<lang>.conf` is based on the AsciiDoc + `lang` attribute, defaults to `help.conf` (English). +- Admonition, figure and table captions have been factored into a + predefined set of `caption_*` attributes. They only apply to + directly generated (X)HTML outputs (DocBook stylesheets generate + their own language specific captions based on the `lang` attribute). +- Dropped platform dependent `doc/asciidoc.chm` file from + distribution documentation formats. + +.Bug fixes +- The spurious warning 'with will become a reserved keyword + in Python 2.6' has been suppressed. + + +Version 8.2.3 (2007-09-12) +-------------------------- +.Additions and changes +- Added VMiklos's 'permalink' patch for auto-generated section IDs + (enabled by default by the `sectids` attribute). +- Added http://asciidoc.org/faq.html[FAQ] to website. +- Changed format of \{localdate} attribute to ISO 8601 (`%Y-%m-%d`). +- Added `abc2ly --beams=None` option to make `music2png.py` conform to + ABC's notion of beams. +- XHTML level 2 section headings are now styled with an underlining + border. +- XHTML links to AsciiDoc title elements are now implemented with + title ID attributes (previously separate `<a>` element targets were + generated. +- Multi-word first, middle and last names can be entered in the header + author line using the underscore as a word separator. +- The nested inline macros restriction has now been lifted, for + example you can now include links and inline images inside + footnotes. +- Help topic names can be shortened (so long as they are not + ambiguous). For example `asciidoc -hm` will print the AsciiDoc man + page. +- Added `{two_colons}` and `{two_semicolons}` attributes for + escaping labeled list ambiguity. +- If quirks mode is disabled the XHTML Mime Type is set to the + recommended `application/xhtml+xml` (rather than `text/html`). + +.Bug fixes +- Author information is now correctly set when using attribute entries + in the header instead of an author line (previously the 'author' + attribute was not being calculated correctly and there were + attribute substitution problems). + + +Version 8.2.2 (2007-07-22) +-------------------------- +.Additions and changes +- http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML] + capability has been added for users who are more familiar with or + prefer LaTeX math formulas to the + http://asciidoc.org/asciimathml.html[ASCIIMathML] + notation (thanks to Arthur Sakellariou for the patch). +- The 'source highlight' and 'code' filters now process embedded + callouts. +- Added an `--attribute=ATTRIBUTE` option to `a2x(1)` for passing + attribute values to asciidoc(1) (a shortcut for `--asciidoc-opts="-a + ATTRIBUTE"`). +- Image block and inline macros prepend optional `{imagesdir}` + attribute to image link targets. + + +.Bug fixes +- Fixed an assertion error that occurred when a configuration file + containing an `include::[]` macro was loaded using the + `--conf-file` option and the configuration file name did not + include an explicit directory path -- patch submitted by Dmitry + Potapov. +- Asciidoc titles are only converted to lower case if all characters + are upper case otherwise case is left unchanged -- patch submitted + by Dmitry Potapov. +- Added a missing check that input is not stdin before loading + configuration files from the document directory -- patch submitted + by Dmitry Potapov. +- Attribute list items must evaluate to strings, numbers or None + (previously it was possible to evaluate to other object types which + resulted in surprising attribute values). +- If an AsciiDoc document has no title an empty XHTML 1.1 'title' + element is created -- previously the 'title' element was dropped + which resulted in invalid XHTML 1.1. +- The Vim syntax file no longer highlights escaped callouts. +- The Vim syntax highlighter now correctly highlights Double-dollar + passthroughs when they enclose dollar delimited ASCIIMathML and + LaTeXMathML formulas. + + +Version 8.2.1 (2007-04-06) +-------------------------- +.Additions and changes +- A number of improvements have been made to the Vim syntax + highlighter, for example the word C++ is no longer mistaken for the + start of an unconstrained monospace quote. +- Labeled list definitions have been tightened -- a list label can no + longer containing trailing spaces. The following example is no + longer recognized as a valid list label: + + Lorum ipsum :: ++ +This change implements the originally intended behavior (as per the +AsciiDoc documentation and examples) so there should be very few +compatibility issues. + +.Bug fixes + + +Version 8.2.0 (2007-04-04) +-------------------------- +.Additions and changes +- A Vim syntax file is now included in the AsciiDoc distribution + (inspired by Felix Obenhuber's `asciidoc.vim` script). You can find + it (along with a Vim filetype detection script in the distribution + `./vim/` directory (the scripts are installed automatically by the + AsciiDoc installer `./install.sh`). See 'Appendix J' of the + 'AsciiDoc User Guide' for details. +- Added 'toclevel' attribute (1..4) which sets the number of title + levels reported in the table of contents. Defaults to 2 and must be + used with the 'toc' attribute. Example usage: + + $ asciidoc -a toc -a toclevels=3 doc/asciidoc.txt + +- Added a `listindex` attribute which is the current list item index + (1..). If this attribute appears outside a list its value is the + number of items in the most recently closed list. +- The single line titles syntax now accepts trailing suffixes -- this + syntax matches the title line syntax of a number of popular Wiki + markups. +- If a QuoteBlock has no attribution or citetitle then the DocBook + `<attribution>` element is not generated (previously generated empty + `<attribution>` element). +- If the text of a labeled list item is blank then no `texttag` is + written. +- An end of line backslash performs line continuation for horizontal + labeled list items. +- The Revision line now accommodates Subversion `$Id` markers (in + addition to CVS and RCS markers). Thanks to Tiago Sturmer Daitx for + this patch. +- Implemented `a2x(1)` option `--skip-asciidoc` which allows `a2x(1)` + to convert DocBook XML files not derived from AsciiDoc sources. +- If `a2x(1) --doctype` option is not specified it defaults to + `manpage` if `--format=manpage` else defaults to `article` + (previously `--doctype` always defaulted to `article`). +- Added an 'External Resources' section to the + http://asciidoc.org/index.html[AsciiDoc home page]. + +.Bug fixes + + +Version 8.1.0 (2006-10-22) +-------------------------- +.Additions and changes +- AsciiDoc generated XHTML documents now display a table of contents + if the 'toc' attribute is defined (JavaScript needs to be enabled + for this to work). Thanks to Troy Hanson who contributed this + feature based on a JavaScript by Mihai Bazon. I've simplified things + somewhat to match Docbook XSL Stylesheets style, see Troy's + http://tpl.sourceforge.net/userguide.html[tpl User Guide] for a + fancier layout. Use the `-a toc -a numbered` command-line options to + produce a number table of contents. +- A http://asciidoc.org/music-filter.html[music filter] + is included in the distribution `./filters/` directory. It + translates music in http://lilypond.org/[LilyPond] or + http://abcnotation.org.uk/[ABC] notation to standard classical + notation in the form of a trimmed PNG image which is inserted into + the AsciiDoc output document. +- Incorporated Paul Melis's Win32 filter patch. This workaround + allows AsciiDoc to run filters under Windows. +- Added `uninstall.sh` script. +- Rather than proliferate a confusing number of filter block + delimiters the following convention has been adopted: delimiters + belonging to DelimitedBlock filters distributed with AsciiDoc will + consist of a word (normally a noun identifying the block content) + followed by four or more tilde characters. This has necessitated + changing existing filter delimiters (the old delimiters still work + but may be deprecated in future versions): + + * The example code filter block delimiter is now the word `code` + followed by four or more tilde characters. + * The source highlight filter block delimiter is now the word + `source` followed by four or more tilde characters. + +- Conditionally redefined subscript and superscripting so they use the + old replacements mechanism when asciidoc7compatible is defined + rather than the asciidoc 8 default unconstrained quoting (patch for + affected files attached). +- Moved the source highlight filter from `./examples/` to `./filter/`. +- Added `{verbose}` intrinsic attribute (useful for passing verbose + flag to filters). +- Added `{outdir}` intrinsic attribute. +- Renamed `{docdir}` intrinsic attribute to unambiguous `{indir}` + (`{docdir}` still works but may be removed in future release). +- If `asciidoc(1)` outputs to stdout then intrinsic attribute + `{docname}` is extracted from the input file name. + + +Version 8.0.0 (2006-08-27) +-------------------------- +********************************************************************* +This is a major release because changes to quoting and index entry +handling may break existing documents (see 'Additions and changes' +below and 'Appendix A: Migration Notes' in the AsciiDoc User Guide). + +Please report any problems you encounter. + +mailto:srackham@gmail.com['Stuart Rackham'] +********************************************************************* + +.Additions and changes +- Quoting can can occur within words (based on patch submitted by + Benjamin Klum). See the 'Unconstrained Quotes' sub-section in the + User Guide. + +- The underline and plus characters can be used as alternatives to the + existing apostrophe and backtick quote characters. They are arguably + better choices than the apostrophe and backtick as they are not + confused with punctuation. + +- The syntax for index entry macros have have been deprecated from + `+...+` and `++...++` to `((...))` and `(((...)))` respectively. + Rationale: + * Bracketing is consistent other with `[[...]]` and `<<...>>` + reference macros. + * To easily confused with triple plus passthroughs. + * To make way for the new monospace quoting. + +- Superscripts and subscripts are implemented as constrained quotes so + they can now be escaped with a leading backslash and prefixed with + with an attribute list. + +- An experimental LaTeX backend has been written by Benjamin Klum (a + number additions in this release are to accommodate the LaTeX + backend). +- `include` macro file names now expand environment variables and + tilde expansions. +- A configuration file `[quotes]` entry can be undefined by setting to + a blank value. +- Added `callto` inline macro for Skype 'callto' links. +- Added `colnumber` attribute for table data markup. +- A leading comment block or comment lines are now skipped (previously + a document had to start with either attribute entries or a document + Title). +- Experimental `rows` attribute (number of source lines in table) + available in table markup templates (used by experimental LaTeX + backend). +- Included install shell script written by mailto:jlm@ofb.net[Jacob + Mandelson] for installing the tarball distribution. +- Added INSTALL documentation file. +- Added 'replacements2' substitution options -- a second replacements + section. +- Added the ability to redefine 'normal' and 'verbatim' substitutions + with `subsnormal` and `subsverbatim` entries in configuration file + `[miscellaneous]` section. +- By default `AttributeEntry` values are substituted for + `specialcharacters` and `attributes`, if you want a different + AttributeEntry substitution set the `attributeentry-subs` attribute. +- The `name` in `name=value` configuration file entries can now end + with a backslash, just escape the trailing backslash with a + backslash. For example: + + abc\\=xyz ++ +Results in `name=abc\` and `value=xyz` -- previously this would have +escaped the `=` character. + +- A blank configuration file section deletes any preceding section + with the same name (applies to non-markup template sections). +- A command-line attribute value with a `@` suffix does not override + existing document and configuration file attributes (normally + command-line attributes have precedence over document and + configuration file attributes). +- `localtime` attribute is now encoded from the native system encoding + to the output encoding. Patch submitted by + mailto:m_pupil@yahoo.com.cn[FKtPp] -- here's his description of the + problem: ++ +``I am a Chinese user of AsciiDoc and I find that when I use UTF-8 +(the default encoding) to write asciidoc documents in Windows platform +the resulting html footer line will get screwed. It was caused by a +localized tzname that was always encoded in the windows native +encoding, which in my case is 'cp936'.'' + +- a2x(1) can generate Open Document Text files using + http://open.comsultia.com/docbook2odf/[docbook2odf]. Currently + `docbook2odf(1)` only processes a subset of DocBook, unimplemented + elements are skipped. +- The a2x(1) format option defaults to `xhtml` (previously a format + had to be specified explicitly). +- The `-d, \--doctype=DOCTYPE` option has been added to a2x(1) which + is a shortcut for `--asciidoc-options="--doctype=DOCTYPE"`. +- Replaced a2x(1) `--no-icons` and `--no-copy` options with their + negated equivalents: `--icons` and `--copy` respectively. The + default behavior has also changed: copying and use of icons is + disabled by default. Rationale: + * To make the default behavior more consistent since use of icons + and CSS stylesheets does not apply to all formats. + * To make the default behavior less surprising (the creation of icon + and stylesheet output files must now be explicit). + +- a2x(1) has been bumped from version 0.1.1 to version 1.0.0. + + +.Bug fixes +- Removed duplicate `./doc/a2x.1.txt` from distribution tarball. +- Documentation errata. +- Attribute replacement is no longer performed twice in Titles and + AttributeEntrys. +- a2x(1) skipped asciidoc(1) execution when rerun with different + `--asciidoc-options` options, it now always executes asciidoc(1). + The problem was that previously asciidoc(1) was executed only if the + output file was missing or older than the source file. + + +Version 7.1.2 (2006-03-07) +-------------------------- +.Additions and changes +- Support for + http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] + has been added. See 'Appendix I: ASCIIMathML Support' in the User + Guide and the examples at + http://asciidoc.org/asciimath.html. +- You can now prefix quoted text with inline attributes lists. You + can use this to set font size and color (XHTML and HTML outputs). +- Added `##...##` quoting -- it does nothing -- it's purpose is to + allow inline attributes to be applied to normal text. +- An 'inline passthrough' mechanism has been implemented. +- Configuration file comment lines can be escaped with a backslash -- + this is to allows the inclusion of configuration lines that start + with a hash character. +- The `scriptsdir` attribute can be used to specify the name of the + directory containing linked JavaScripts (see the + link:userguide.html#X33[User Guide] for details. +- The BackendBlock has been renamed PassthroughBlock for consistency + with the new inline passthrough naming. +- `a2x(1)` now works with the older `bash(1)` version 2.05b. Patch + submitted by mailto:francis@daoine.org[Francis Daly]. +- Content included by the `include1::[]` system macro is no longer + subject to attribute substitution so that ambiguities no longer + arise when used to include CSS or JavaScript files. + + +Version 7.1.1 (2006-02-24) +-------------------------- +.Additions and changes +- The `caption` attribute can be used to customize admonition captions + as well as image, table and example block element title prefixes + (`xhtml11` and `html4` backends). +- You can now override the default icon image using the `icon` + attribute to specify the path of the linked image (xhtml11 and html4 + backends only). +- The deprecated `imagesdir` attribute is no longer recognized (use + `iconsdir` instead). +- Added 'Appendix H: Using AsciiDoc with non-English Languages' to the + AsciiDoc User Guide. +- Added 'Admonition Icons and Captions' subsection to the User Guide + explaining how to customize Admonition elements. + +.Bug fixes +- `a2x(1)` failed when configuration files were installed in the + global `/etc/asciidoc/` directory -- it was only searching the + directory containing the asciidoc executable (thanks to Christian + Wiese for finding and submitting a patch this bug). +- The html4 backend admonition caption now correctly displays the + admonition `caption` attribute (previously displayed the `style` + attribute). + + +Version 7.1.0 (2006-01-13) +-------------------------- +.Additions and changes +- `a2x(1)` toolchain wrapper utility. This overcomes the biggest + hurdle for new users which seems to be assembling and using a + working DocBook XML toolchain. With `a2x(1)` you can generate XHTML + (chunked and unchunked), PDF, man page, HTML Help and text file + outputs from an AsciiDoc input file with a single command. All you + need to install (in addition to AsciiDoc) is xsltproc(1), DocBook XSL + Stylesheets and optionally FOP (if you want PDF) or lynx(1) (if you + want text). +- Block titles can now start with any non-space character (previously + where not allowed to start with `.~-_` characters). +- `./stylesheets/docbook.css` renamed to + `./stylesheets/docbook-xsl.css` to clarify its function. +- Renamed `./docbook-xsl/manpages.xsl` to `./docbook-xsl/manpage.xsl` + for consistency. +- Admonition and navigation icons moved to `./images/icons/` to + clarify usage and conform with a2x(1) usage. +- Renamed xhtml11 intrinsic attribute `imagesdir` to `iconsdir` to + keep vocab consistent and changed default value to `./images/icons` + (previously `./images`). `imagesdir` attribute still accepted but + deprecated. +- Unused image files have been weeded out of the distribution. +- Packager notes (appendix B) have been updated to reflect the needs + of `a2x(1)`. + +IMPORTANT: The renaming of the xhtml11 backend `imagesdir` intrinsic +attribute and it's new default value introduces a backward +compatibility issue: if you use the `icons` attribute you will need to +either move your icons to the new default `./images/icons` location or +include an `--attribute{nbsp}iconsdir="your_icons_path"` option in +your asciidoc commands. + +.Bug fixes +- Backslash line continuation is now observed in verbatim paragraphs. +- Fixed errors generated by example + `./examples/website/build-website.sh` script. + + +Version 7.0.4 (2005-12-08) +-------------------------- +.Additions and changes +- Added ternary conditional attributes + `{<name>@<regexp>:<value1>[:<value2>]}` and + `{<name>$<regexp>:<value1>[:<value2>]}`. +- Safety violations now generate errors (they previously generated + warnings). +- asciidoc(1) now defaults to safe mode, consequently the + `[miscellaneous]` safe mode entry and `--safe` command-line option + are no longer necessary (though for backward compatibility + asciidoc(1) still accepts the `--safe` option). +- Backend Blocks are now flagged unsafe (they could be used to include + arbitrary and hence potentially unsafe output content). +- Filters are no longer considered unsafe. There's not much point in + insisting on filter safety since the installation of an unsafe + filter would require the introduction of new or modified + configuration files -- if your application configurations can be + compromised you're in all sorts of trouble (safe mode protects + against unsafe input files not unsafe configuration). As with all + filters, before installing, you should verify that they can't be + coerced into generating malicious output or exposing sensitive + information. + +.Bug fixes +- Fixed a lot of glaring grammatical and factual errors in the User + Guide. + + +Version 7.0.3 (2005-12-01) +-------------------------- +.Additions and changes +- Added `--safe` and `--unsafe` command-line options -- AsciiDoc can + now be executed in a 'safe mode' which disallows the execution of + arbitrary code or the inclusion of arbitrary files (see + link:userguide.html#X39[Appendix C in the AsciiDoc User Guide]). +- Included link:source-highlight-filter.html[source-highlight filter] + in the distribution `./examples/source-highlight-filter/` directory + (based on filter submitted by mailto:trolocsis@gmail.com[Ryan + Phillips]). +- Included the DocBook XSL Stylesheets 1.69.1 customizations used to + generate the distributed AsciiDoc documentation (read the + `asciidoc-docbook-xsl.txt` file in the distribution `./docbook-xsl/` + directory). +- AsciiDoc DocBook XSL Stylesheet drivers moved from `./doc/` to + `./docbook-xsl/`. +- Modified `./doc/manpages.xsl` so only URL content is displayed in + manpages. + +.Bug fixes +- Explicitly set table CSS border style (`xhtml11` backend) to `solid` + because default border styles vary from browser to browser. + + +Version 7.0.2 (2005-08-28) +-------------------------- +.Additions and changes +- There are now long versions of all AsciiDoc options. +- If the `--backend` is not specified it defaults to `xhtml11`. +- Added CSS simulated frames layout to the examples website (see + `./examples/website/layout2/README-website.txt`). This layout does + not work with IE6 and the original tables based layout is still the + default. +- Support page added to AsciiDoc website. + +.Bug fixes +- Invalid options are now trapped gracefully. +- Documentation errata. + + +Version 7.0.1 (2005-06-24) +-------------------------- +.Additions and changes +- Reverted to use of `strong`, `em`, `tt` XHTML tags -- they're more + obvious and no less correct than `span` tags, besides, the generated + file sizes are smaller (the 'User Guide' was 11% smaller). +- Table title rendered with `caption` tag rather than a separate + `div`. +- The AsciiDoc 'stylesdir' attribute (if specified) is now recognized + when searching for embedded stylesheets (previously only searched + default `./stylesheets` directory). +- Default charset encoding changed from ISO-8859-1 to UTF-8 -- it's + less language specific and displays most common languages. +- `template::[]` macros now expand in all configuration file sections + previously only in markup template sections. +- Cleaned up example website layout CSS and configuration + (presentation has not been changed). +- Refactored `xhtml11.conf` configuration file. +- Set consistent and sensible permissions on distributed files. +- White space is now stripped from DSV formatted table cell data. +- `class="tableblock"` attribute added to tables generated by + `xhtml-deprecated-css.conf` to assist CSS. + +.Bug fixes +- Illegal character set encoder (specified by the AsciiDoc `encoding` + attribute) and character data are trapped gracefully. +- AsciiDoc table 'format' attribute in table attribute lists were not + recognized. +- The nested horizontal labeled list example in the 'AsciiDoc User + Guide' has been dropped -- it generated invalid DocBook markup. + + +Version 7.0.0 (2005-06-06) +-------------------------- +*************************************************** +This is a major release with many code and +documentation changes. +Please report any problems you encounter. + +mailto:srackham@gmail.com['Stuart Rackham'] +*************************************************** + +.Additions and changes +- A new 'xhtml11' backend generates XHTML 1.1 with integrated CSS2 + replacing the previous 'xhtml', 'css', and 'css-embedded' backends. +- The CSS stylesheets have finally been rewritten. +- The asciidoc(1) command help now includes user + link:userguide.html#X36[customizable help] topics. When asciidoc is + invoked with the `--help` option the command argument is + interpreted as a help topic. +- The previous example website has been replaced by the actual + AsciiDoc website (see `./examples/website/`. +- XHTML generation options now controlled by the following attributes: + 'badges', 'linkcss', 'icons', 'numbered', 'quirks', 'theme', + 'stylesdir', 'imagesdir' (see the link:userguide.html#X33[User + Guide] for details. +- By default HTML and XHTML are output as stand-alone documents (no + embedded CSS and no linked admonition icon images). +- Documents encoded with the UTF-8 Unicode character set are now + processed thanks to a patch supplied by + mailto:viktor@rbg.informatik.tu-darmstadt.de[Viktor Vasilev]. +- The `-a ^name` command-line syntax to undefine an attribute has been + deprecated in favor of the `-a name!` syntax. +- AttributeEntry syntax addition: `:name!:` to undefine `name` attribute. +- Added `template` system block macro to allow the inclusion of one + configuration file template section within another. +- A 'verse' style attribute can now be applied to literal paragraphs + and blocks to reproduce line breaks and white space from the source + document. +- Replacements and Special Words can now be escaped with leading + backslashes. +- Replacements are now processed in configuration file order (previous + ordering was indeterminate). +- System macros can now be used in the base `asciidoc.conf` + configuration file. +- Deprecated features that emitted warnings in prior versions are no + longer tolerated. +- The `eval` system attribute expression evaluates to `False` the + attribute is undefined, if it evaluates to `True` the result is an + empty string. +- The Paragraph and DelimitedBlock 'presubs' parameter can be aliased + as 'subs'. +- Added 'verbatim' substitutions option. +- Renamed 'List Continuation Block' to 'List Block' and renamed the + 'listcontinuation' option to 'list'. +- Deprecated 'default' substitutions option (use 'normal' instead). +- The 'section-numbers' section numbering attribute has be renamed + 'numbered'. +- Dropped the '\#UNDER CONSTRUCTION#' block macro. +- Rewrote Paragraph and DelimitedBlock handlers adding a + link:userguide.html#X23[styles] configuration entry. + +.Bug fixes +- Included files are no longer read inside conditionally excluded + content. +- Manpage command names containing dashes (in the manpage NAME + section) were misinterpreted as the spaced dash command name/purpose + separator. Bug report and patch supplied by + mailto:david@dgreaves.com[David Greaves]. +- Unexpected error following malformed author line error. + + +Version 6.0.3 (2005-04-20) +-------------------------- +.Additions and changes +- Special characters are now substituted in AttributeEntry element + values. +- Spaced and unspaced em dashes are now recognized (previously only + spaced em dashes were recognized). +- Replaced the table 'noborders' option with richer 'frame' and 'grid' + attributes. +- The `duplicate macro` warning message now only occurs when the + verbose (`-v`) option is enabled. +- Single lines starting with two forward slashes hard up against the + left margin are treated as comments and are not processed. +- Renamed 'section' delimited block option to 'sectionbody' to more + accurately reflect it's role. +- Added a List Continuation block -- a specialized delimited block + that is functionally equivalent to the List Item Continuation + feature except that the list contained within the block does not + require explicit '+' list item continuation lines. +- Dropped deprecated `<u>` tags from generated HTML. +- Literal Block delimiters must now consist of at least four points + (previously three) to avoid lone ellipsis ambiguity. + +.Bug fixes +- Some system attribute evaluation failures caused unexpected + exceptions to occur. + + +Version 6.0.2 (2005-03-30) +-------------------------- +.Additions and changes +- Three new 'system' block macros have been added -- `eval`, `sys` and + `sys2` which are the block macro equivalents to the same named + system attributes. +- 'Intrinsic' macros have been renamed 'system' macros along with + 'action' attributes which have been renamed 'system' attributes: + * To reflect their common (though contextually different) behavior. + * To avoid confusion with 'intrinsic attributes'. + +.Bug fixes +- Asciidoc now searches in `/etc/asciidoc/filters` for filters. + + +Version 6.0.1 (2005-03-06) +-------------------------- +.Additions and changes +- A global configuration file location `/etc/asciidoc` has been added + and is now processed before all other locations (patch supplied by + mailto:stone@debian.org[Fredrik Steen]). +- Recoded `tempfile.mktemp()` and other artifacts that are no longer + necessary or desirable (patches supplied by + mailto:stone@debian.org[Fredrik Steen]). +- Added BUGS file to the distribution. + +.Bug fixes +- Illegal comment syntax in `css-embedded-stylesheet.conf` resulted in + illegal CSS in files generated by the `css-embedded` backend. + + +Version 6.0.0 (2005-01-28) +-------------------------- +*************************************************** +This release has had some fairly major code and +documentation changes. Please report any problems +you encounter. + +mailto:srackham@gmail.com['Stuart Rackham'] +*************************************************** + +A lot of new stuff. A new major version number -- some regression +incompatibility (hopefully mitigated by 'deprecated' warnings). + +Went mad trying to rein in the current feature anarchy -- established +a unified notion of document attributes. Attempted to introduce a +consistent vocabulary -- renamed many poorly or inconsistently named +entities. + +Actually, deprecated syntax is still processed correctly in almost all +cases. One source of incompatibility that may arise if you have +customized CSS stylesheets is the change of AsciiDoc CSS class names +(see below). I guess the moral is if you've done a lot of +configuration file customization and are happy with version 5 then you +may want to stay put. + +NOTE: This version requires Python 2.3 or better to run. + +.Additions and changes +- 'Glossary entries' have been renamed 'attributes'. This eliminates + confusion with the accepted meaning of glossary. +- An `AttributeEntry` block element has been added so that document + attributes can be assigned from within an AsciiDoc document. +- The `AttributeList` block element has been added which is a more + general solution than the (now deprecated) DelimitedBlock arguments. +- An BlockId element has been added for setting block element anchor + (link target) IDs. +- Quoted text can now span multiple lines (thanks to James Bowlin for + this patch). +- Inline macros can now span multiple lines. +- \``double backtick / apostrophe'' quotes generate ``curly quotes''. +- A warning is now emitted for out of order list item (applies to + explicitly enumerated numbered list items). +- Added `include` action attribute. +- A line of three or more apostrophes generates an HTML horizontal + ruler (`<hr/>` tag). You will get a warning if processed with + non-HTML backend. +- An `{imagesdir}` attribute specifies image file location for images + referenced in configuration files when generating HTML (the default + location is `images`). +- An `{stylesdir}` attribute specifies the location of CSS + stylesheets when generating styled HTML (the default location for + configured markup is `.`). +- The use of the (often inappropriately named) `{caption}` attribute + list entry has been deprecated, use `{0}` instead. +- New 'ExampleBlock' delimited block along with associated variants + Note, Tip, Warning, Caution and Important. +- The `docbook.conf` file now facilitates the optional inclusion of a + DocBook revision history file. +- To better reflect their purpose the following block elements have + been renamed: `VerbatimBlock` to `ListingBlock`; `IndentedBlock` to + `LiteralBlock`; `IndentedParagraph` to `LiteralParagraph`; + `CustomBlock` to `BackendBlock`; `SimpleSection` to `SectionBody`. + Any corresponding CSS class names have also been changed which could + result in backward incompatibility in customized stylesheets. +- Swapped plain DocBook admonition icons for Jimmac's DocBook icons + (http://jimmac.musichall.cz/ikony.php3). The original plain icons + have been moved to `./images/plain`. +- Renamed `html` backend to `xhtml` to better reflect it's function + (former `html-4` backend renamed to `html`). +- A new inline anchor macro syntax `[[[<id>]]]` is available, it + displays `[<id>]` at the anchor location and is for anchoring + bibliography list entries. +- An optional 'single-line titles' syntax can be used. +- Tweaks to distributed CSS stylesheets and FOP `fo.xsl` customization + file. +- 'List Item Continuation' has been implemented which allows + additional block elements to be included in list items by separating + them from the preceding list item element with a line containing a + single plus character. +- A new 'Horizontal Labeled List' list type has been added. Generates + two column list -- the first column contains the list element + labels, the second contains the element text. Same syntax as + `Vertical Labeled Lists` except the double colon label suffix is + followed by the start of the list item text. + +.Bug fixes +- Fixed broken backslash line continuation. +- Labeled list end tags were not undergoing attribute substitution. +- Documents without any author information now generate legitimate + DocBook (previously if the author line was not included in the + document header then an empty (illegal) DocBook `author` element was + generated). +- Multiple spaces in filter command arguments were replaced by a + single space. The `./examples/asciidoc2text/asciidoc2text.sh` script + now indents text correctly. + + +Version 5.1.1 (2004-10-10) +-------------------------- +*15-December-2004: Interim update:* Updated `asciidoc.py` to fix +broken `join_lines` function -- no other changes. + +- PDF documentation is now produced from DocBook XML using XSLTLib and + FOP. Previously we processed DocBook SGML with `jw(1)` (which used + Dvips to convert DVI files to PDF). FOP has come a long way in the + last 12 months and produces very acceptable PDF under both Linux and + Windows. +- Sections detailing how to install and use the DocBook XSL + Stylesheets, xsltproc, FOP toolchain and the AsciiDoc XSLT drivers + have been added to the User Guide. +- The PDF output from the he example article template has been + included in the distribution (`./doc/article.pdf`). +- Special characters are emitted using decimal Unicode character codes + (previously used named character entities which cannot be assumed + included in non-HTML documents). +- Added registered trademark (R) to `[replacements]`. +- CSS stylesheet tweaks. +- Admonitions (Note, Tip, Important, Warning, Caution) include icons + when generating css output. + + +Version 5.1.0 (2004-09-18) +-------------------------- +- Callouts have been implemented (see the 'Callouts' section of the + AsciiDoc User Guide for details). +- Added XSL drivers for generating XHTML, chunked XHTML and HTML Help + from DocBook XML using XSL stylesheets and xsltproc(1). +- Added CSS stylesheet for HTML generated from DocBook XML using XSL + stylesheets. +- Distribution contains HTML Help formatted User Guide + (`./doc/asciidoc.chm`), the User Guide tells you how it's generated. +- Images referred to by distributed stylesheets are now located in the + `./images` subdirectory (previously located in `.`). +- Filters path names are now handled properly under Cygwin. +- The usual documentation and examples additions, updates and + polishing. + + +Version 5.0.9 (2004-09-09) +-------------------------- +- The convention of using a `.asc` file extension for AsciiDoc files + has been dropped in favor of the familiar `.txt` extension. It makes + more sense in that AsciiDoc is a text presentation format and + because `.asc` clashed with the same extension used by other + applications. It's only a naming convention -- you don't have to + switch if you don't want to. +- Changed the subscript formatting character from underline to tilde + since underscores in file names are reasonably common (especially in + link and image macros). +- An alternative syntax for the index term inline macro has been + added: `++<primary>,<secondary>,<tertiary>++`. +- Index terms that have secondary and tertiary entries now + additionally generate separate index terms for the secondary and + tertiary entries. +- A `+<primary>+` index term inline macro has been added which + displays the term in the primary text flow. +- Added alternative variable list definition using double semi-colon + terminator as opposed to the standard double colon terminator so + variable lists can be nested to two levels. +- Footnotes now appear on a separate line in HTML and Linuxdoc + outputs. +- Python version compatibility is checked at startup. +- Preface and appendix section titles in multi-part Book documents are + meant to be out of sequence -- warnings are no longer emitted when + outputting HTML. +- Empty section warnings have been replaced by error messages and are + emitted only if invalid markup would result. +- Missing macro sections or invalid macro name warnings are only + generated at startup if the `-v` (verbose) option is set. Otherwise + they are deferred until a matching macro is encountered in the input + file. +- Missing or invalid table definition warnings are only generated at + startup if the `-v` (verbose) option is set. Otherwise they are + deferred until a matching table is encountered in the input file. +- AsciiDoc now makes more of an effort to continue in the face of + errors. +- Fixed broken `./examples/website/main.aap` script. +- Converted distribution text files DOS text format as a sop to + Windows users with challenged text editors. +- Documentation additions and corrections. + + +Version 5.0.8 (2004-05-15) +-------------------------- +- Spurious 'out of sequence' level 2 warnings no longer appear when + processing 'book' document multi-part book top level Preface and + Appendix sub-sections since they are (correctly) out of sequence. +- A warning is no longer emitted for empty Index sections since this + is normal when generating DocBook outputs. +- Fixed: `[quotes]` configuration file entries where not being + overridden by downstream configuration file entries. +- Footnote text is now output enclosed in square brackets in HTML + documents. +- Added superscripts and subscripts to the standard PRS configuration + files. +- Adjusted CSS stylesheets so list titles don't have so much space + between title and first list item (broken in IE6 due to poor CSS + compliance). Lessened sidebar title top margin. + + +Version 5.0.7 (2004-04-22) +-------------------------- +- The version 5.0.6 README incorrectly stated that AsciiDoc would run + under Python 2.0, in fact it requires Python 2.1 or better. The + README has been corrected. +- Documented techniques for combining and splitting AsciiDoc documents + and processing the combined and split parts (see the 'Tips and + Tricks' section of the User Guide). +- An example of marking up superscripts and subscripts is documented + in the 'Tips and Tricks' section of the User Guide (the example + configuration file is in the AsciiDoc `examples` directory). +- Added ellipsis to shipped `[replacements]`; three periods output an + ellipsis entity. +- Removed unused 'SectionClose' class. +- The AsciiDoc 'Preamble' element is output as a DocBook 'Preface' + when processed as a 'book' document type (in older AsciiDoc versions + a warning was issued and processing stopped). +- Fixed a quoting anomaly: quoted text can no longer begin or end with + with white space. + + +Version 5.0.6 (2004-03-07) +-------------------------- +- New 'image' macro implements optional image scaling and linking and + works in both inline and block contexts. The 'image' macro obsolesces + the existing 'graphic' block macro and 'icon' inline macro. +- Macro substitution section names now have `-inlinemacro` and + `-blockmacro` suffixes to resolve context ambiguity, make their + purpose clearer and relieve section namespace congestion. +- Header derived glossary entries can now be overridden from the + command-line. +- Special character substitution is now performed on AuthorLine + derived author names. +- A macro or block argument called 'options' can be used as a shortcut + for a list named arguments with zero length string values. +- Tables can be output without borders using the `options="noborders"` + argument. +- Table data lines that do not immediately follow a table section + underline can now be blank. This allows CSV data with embedded blank + lines to be processed correctly. +- Blank DSV format table data lines are silently skipped. +- Tightened up on enforcement of configuration file section names to + reduce the possibility of section content being seen as a section + header line. +- Section titles can be optionally suffixed with title arguments + enclosed in double square brackets. +- A replacement has been added to `asciidoc.conf` to replace inline + double dashes with the `—` entity. +- Changed the `.UNDER-CONSTRUCTION.` macro syntax to + `#UNDER-CONSTRUCTION#` so it is not mistaken for a BlockTitle. + Similarly changed the `.NEW.` replacement with + `#NEW#`. +- `#NEW#` and `#UNDER-CONSTRUCTION#` macros are now + included in the DocBook backend. +- Replaced shipped `smallnew.gif` with `smallnew.png`. +- Documentation tidy ups. + + +Version 5.0.5 (2004-02-25) +-------------------------- +- Fixed the disappearing paragraph titles problem that was caused by + Inline macros (incorrectly) processing BlockTitles. +- Tightened AuthorLine validation. Previously invalid email addresses + and embedded special characters in the AuthorLine resulted in + invalid output markup. + + +Version 5.0.4 (2004-02-09) +-------------------------- +- Reinstated missing `infile`, `outfile`, `filetype` and + `filetype-<filetype>` glossary entries. +- As of version 5.0.3 asciidoc(1) now requires Python 2.0 or greater, + this has now been documented. + + +Version 5.0.3 (2004-01-23) +-------------------------- +- Fixed problem that caused any filters directory file containing + `.conf` (not just those with the `.conf` extension) from being + loaded. +- All `[miscellaneous]` configuration file entries can now be + referenced like glossary entries (they are now processed internally + as glossary entries). +- The output file line terminator (previously hardwired to `\r\n` is + now set using the `newline` entry in the configuration file + `[miscellaneous]` section. +- The misspelt `blocktitles` configuration file entry name has been + corrected (to `blocktitle`). +- An `{empty}` glossary entry has been added to the default + configuration which is useful for outputting trailing blank lines + from configuration file substitution sections. + + +Version 5.0.2 (2003-12-18) +-------------------------- +- New (alternative) 'anchor' and 'xref' macro syntax (old syntax still + valid). +- DocBook `mediaobject` and `inlinemediaobject` tags are generated in + place of `graphic` and `inlinegraphic` tags by the AsciiDoc + `graphic` and `icon` macros. If a macro argument is specified it is + the alternative text output if the target document format does not + support the specified graphic file format. +- Dropped the LinuxDoc left and right square bracket special character + substitutions as they interfered with macro substitution. +- Documentation updates and corrections. + + +Version 5.0.1 (2003-12-09) +-------------------------- +- Fixed problem with anchor tag when generating CSS styled HTML. + + +Version 5.0 (2003-12-08) +------------------------ +*************************************************** +This release has had some fairly major code and +documentation changes. Please report any problems +you encounter. + +mailto:srackham@gmail.com['Stuart Rackham'] +*************************************************** + +- AsciiDoc can now produce a full-blown multi-part DocBook book + including dedication, abstract, preface, colophon, glossary, + appendix, bibliography and book part elements using the new + `specialsections` configuration file section. +- All Section element children (Paragraph, DelimitedBlock, List, + Table, BlockMacro) can now be titled using the BlockTitle element. + A BlockTitle element is a single line containing a title and + beginning with a period. +- The `index` and `backmatter` macros have been dropped, superseded by + `specialsections`. +- The AsciiDoc 'Preface' element has been renamed 'Preamble' (to avoid + confusion with the DocBook book preface element). +- Out of sequence titles are now tolerated with a warning. This allows + book document level 0 sections to be processed. +- An 'anchor' inline macro has been added for document link target + creation. +- 'Note', 'Tip', 'Important' and 'Warning' paragraph types have been + added to support the corresponding DocBook elements. +- Title substitution is now performed in SidebarBlock titles. +- DocBook graphics now output as `figure` and `informalfigure` + elements rather than `mediaobjects`. This ensures numbered figures + and a lists of figures are produced by the DocBook toolchain. +- You can now escape block argument lines by appending a backslash. + Alternatively, if you embed arguments in the delimiter line AsciiDoc + does not check for an arguments line. +- The default DocBook backend file extension has been changed from + `.docbook` to `.xml` (`.sgml` for the 'docbook-sgml' backend). +- Warnings are output by default (previously they only printed when + verbose option enabled). +- A Question and Answer variable list definition has been added to the + shipped configuration files, primarily to create DocBook `qanda` + DocBook elements. +- Fixed broken code-filter `-b linuxdoc` option. The asciidoc.asc User + Guide can now be processed by linuxdoc(1) (although tables are + dropped because LinuxDoc does not implement tables). + +.Compatibility issues: +1. Table titles are no longer in the arguments line, use the new + BlockTitles. +2. Graphic titles are no longer in the 'graphic' block macro caption, + use the new BlockTitles. +3. The code-filter title must be placed in a preceding BlockTitle. +4. SidebarBlock titles must be placed in a preceding BlockTitle. +5. The DelimitedBlock option 'sidebar' has been renamed to 'section'. +6. The default DocBook backend file extension has been changed from +`.docbook` to `.xml` (`.sgml` for the 'docbook-sgml' backend). + + +Version 4.2 (2003-11-26) +------------------------ +- The default HTML output is now XHTML 1.0 markup. To output the + former HTML 4 markup specify the `html-4` backend. +- The default DocBook output is now DocBook XML. To output the former + DocBook SGML specify the `docbook-sgml` backend. The associated + `docbook-sgml.conf` file illustrates how to support minor DTD + variations. Examples of using the `xmlto(1)` command for DocBook + conversion have been added to the User Guide. +- Glossary entries set using the command-line -g option can now be + referenced in configuration files. +- Configuration dumps (`-c` command-line option) no longer output + redundant undefined glossary entries. +- DelimitedBlock arguments can now be specified in a separate arguments + line immediately following the leading delimiter line, This is in + preference to the existing delimiter embedded arguments. Reasons: + * The syntax is in keeping with the Tables arguments syntax. + * It's easier to enter and implements line continuation. +- A new QuoteBlock DelimitedBlock definition has been added to the + distribution configuration files. +- The table arguments lines can be continued using the backslash line + continuation character. +- Added new calculated glossary reference type `{<name>%<value>}`. +- Double-quote characters can now appear in unquoted positional + arguments. + + +Version 4.1 (2003-11-13) +------------------------ +- Added DSV (Delimiter Separated Values) tables format. +- `{eval:<expr>}` glossary references drop the containing line if + `<expr>` evaluates to `None`. +- Block, Table and Macro arguments can now be positional (quoted or + unquoted). +- Vocabulary change: DelimitedBlock, Table and Macro 'attributes' are + now referred to as 'arguments'. This makes more sense in light of the + extended syntax and avoids confusion with backend markup tag + attributes. +- 'tablewidth' table ruler parameter can now be expressed in percent + units (0..100). If between 0 and 1 then the original fractional unit + measure is applied. +- The use of quoting for generating footnotes and index entries has + been dropped in favor of 'footnote' and 'indexterm' inline macros. +- 'backmatter' inline macro included in distribution. +- Fixed: CSS styled HTML tables are now fully XHTML 1.0 conformant. +- Fixed: 'tablewidth' was processed incorrectly when passed as table + argument. +- Fixed: Glossary references like `{x=\{y}}` were one character off + if \{x] was defined and `{y}` was not. + + +Version 4.0 (2003-11-08) +------------------------ +*************************************************** +This release has had some fairly major code and +documentation changes. Please report any problems +you encounter. + +'Stuart Rackham' +*************************************************** + +- Added tables to AsciiDoc. +- Added two special 'subs' options: 'default' specifies the default + substitution options and 'none' specifies no substitution. These + options can only appear singly. +- Line continuation using a trailing backslash character is available + in Paragraphs, ListItems, Tables. +- The left and right quotes for quoted text can now be specified + separately. +- Shipped configuration files implement footnotes (only useful for + DocBook output) using \[[]] quoting. +- Shipped configuration files implement index terms (only useful for + DocBook and LinuxDoc output) using \(()) quoting. +- The shipped 'html' backend configuration now emits valid 'HTML 4.01 + Transitional'. +- Added new calculated glossary reference types `{<name>!<value>}` + and `{<name>#<value>}`. +- The DelimitedBlock 'params' option has been dropped in favor of the + new 'block attributes' mechanism. If you have customized block + params options you may need to adjust source files to use the + 'block attributes' syntax. The example code filter has been updated + to reflect these changes. +- The code filter now has a `-t tabsize` option. +- Replaced `-w` option with `-v` (verbose) option. The warnings option + was just to confusing. +- Named attributes can now be specified in macro calls. +- The 'tabsize' attribute is recognized in the built-in `include` + macros. A tabsize of zero suppresses tab expansion. +- The configuration file `[options]` section has been split into + `[miscellaneous]` and `[titles]`. If you have customized any of + these settings you will need to adjust the affected configuration + files. +- Configuration file `[miscellaneous]` entries can now also be set + using the command-line `-g` option. +- Fixed: error that occurred when attempting to use zero length + configuration and source files. +- Fixed: blocking filter halt problem. +- Fixed: inline macro escape prefix problem. +- Fixed: missing macros from configuration dump problem. +- Fixed: named macros were dumped incorrectly. +- Many documentation changes/additions/corrections. + + +Version 3.2.2 (2003-10-26) +-------------------------- +- Added `-n` option (synonym for `-g section-numbers`). +- Dropped the processing commentary (hey, this is Unix). +- Added new calculated glossary reference type `{<name>?<value>}`. + `<name>` is the glossary entry name and `<value>` is the text + substituted if the glossary entry is defined. `<value>` can only + contain literal text (no glossary references allowed). +- Added `asciidoc2text` to distribution `examples/asciidoc2text` + directory (converts AsciiDoc source to text file with section + numbering). +- Fixed incorrect nesting of Simple lists inside Variable lists. +- List definitions have been modified so that list items can be + indented. This allows a more intuitive indentation of nested lists + in AsciiDoc source. +- Lists must be separated from preceding paragraphs by a blank line. + This is to avoid paragraph lines being mistaken for list items. +- Corrected asciidoc man page documentation error: the`-f` option does + *not* search relative to source document directory for the + configuration file. +- Minor updates to various distribution `.conf` files. +- Included `badges.conf` in `examples` directory. +- `css-embedded-stylesheet.conf` now supports footer badges. +- The default in-line element processing order has been changed: + Glossary References are now processed before Inline Macros. This + allows glossary expansions to occur inside macro references. +- Glossary entries are now allowed in Author and Revision lines. +- Default List `subs` options and Paragraph `presubs` options are + assigned the following default value if not specified: + + specialcharacters,quotes,specialwords,replacements,glossary,macros + +- Documentation changes/additions/corrections. + + +Version 3.2 (2003-05-26) +------------------------ +- Added a `-s` command-line option to suppress the output of + `[header]` and `[footer]` sections. +- Article document headers are no longer mandatory: this allows + AsciiDoc to process arbitrary chunks of text. When used in + conjunction with the new `-s` command-line option corresponding + chunks of backend markup can be generated. +- AsciiDoc now emits a warning message and continues when an out of + sequence section title is detected (previously it failed and + halted). This allows document sections to be processed separately. +- Optional 'presubs' and 'postsubs' entries have been added to + 'DelimitedBlock' and 'Paragraph' definitions. As a consequence + substitution options are no longer legal in 'options' entries. +- 'presubs' and 'postsubs' substitutions are processed in the order + the options are specified (rather than the fixed 'options' order of + previous versions). +- ./filters subdirectories are automatically searched for filter + commands. +- A 'title-subs' configuration option specifies the substitutions + performed on document Header and Section titles. +- A 'subs' entry in now included in List configuration file + definitions that specified substitutions performed on list entry + text. +- Configuration files are auto-loaded from ./filters subdirectories. +- Added example code filter (see ./examples/filters). +- Bug fix: if section was empty you may have got erroneous 'missing + tag "paragraph"' error. +- Internal code tidy up. + + +Version 3.1 (2003-05-18) +------------------------ +- In version 3.0 a `[macros]` section entry of the form 'name' was + equivalent to 'name='. An entry of the form 'name' now undefines the + entry (to bring it in line with the behavior of other special + sections). +- Paragraphs have now been generalized (in the same way as Lists and + DelimitedBlocks). +- The 'indentsize' option has been dropped as as consequence of + paragraph generalization. +- Pipe | characters can be included in substituted tag and + substitution section text using the \{brvbar} (broken vertical bar) + glossary reference. +- Removed the restriction requiring substitution section text + placeholders | to be on a separate line. +- Added an `-e` asciidoc(1) command option that excludes implicit + configuration files (used in conjunction with `-c` generated + configuration files). +- Version 3.0 documentation has undergone a considerable cleanup. +- The dumping of quoted section entries (see `-c` option) now works + correctly. +- The format of special section entries has been made consistent: + `name` undefines the entry; `name=` sets the entry value to a blank + string; `name=value` sets the entry value to `value`. +- As a consequence of the previous change the caret prefix is no + longer used in glossary configuration file entries (although it is + still used when undefining an entry using the `-g` command-line + option). + + +Version 3.0 (2003-05-13) +------------------------ +This version is the culmination of work begun in the 2.x releases +whereby fixed policy has been replaced by extensible mechanisms. + +- Added `-c` command-line option to dump a composite asciidoc(1) + configuration file to stdout. +- Lists and Delimited Blocks are now defined by a set of configuration + file parameter sections. The user can modify the default + definitions or add new ones. +- Block content can now be processed through external filters. +- The default behavior for Custom Blocks is to perform glossary + substitution (previously there was no substitution inside Custom + Blocks). +- The old 2.x style macros have been reimplemented; as with Lists and + Delimited Blocks there syntax and behavior can be configured by the + user. The default macro syntax remains the same but the semantics + are now (hopefully) a bit more intelligible. +- Block and Builtin macros use :: delimiter instead of the 2.x single + colon delimit (to distinguish them from inline macros). The 2.x + syntax is still supported for backward compatibility. +- Nested lists are now supported and IndentedParagraphs can be + included in list items. +- Conditional source inclusion can be specified using built in `ifdef`, + `ifndef` and `endif` macros. +- The new conditional source inclusion feature has been used to reduce + the number of default configuration files down to one per backend. +- A change of name: 2.x 'Substitutions' are now called 'Replacements' + and the 2.x `[substitutions]` configuration file section is now + called `[replacements]` (the old name is still recognized for + backward compatibility). +- The line break is now implemented as a 'Replacements' substitution. +- Inline 'icon' macro for inline images has been added to default + configuration files. + +Version 2.2 (2003-04-07) +------------------------ +- The `master.conf` configuration file name has been deprecated in + favor of `asciidoc.conf`. +- The standard configuration files set is now loaded from the + `.asciidoc` folder in the users home directory (if it exists) and + then from the source document directory. Configuration files that + don't exist are silently skipped. +- Configuration files named like the source file will be automatically + loaded if they are found in the source file directory. For example + if the source file is `mydoc.asc` and the `-b html` option is used + then asciidoc(1) will look for `mydoc.conf` and `mydoc-html.conf` in + that order. +- The characters used to quote formatted text can be configured and + extended by the user (see the master.conf [quotes] section). +- Quoted text can now be escaped by prefixing a backslash character to + the leading quote. +- The double single-quote '' strong text quote has been deprecated in + favor of an asterisk * character. +- Added \{eval:expression}, \{sys:command} and \{sys2:command} + glossary reference actions. +- Trailing brace characters `}` are now allowed inside glossary + references provided they are escaped with a backslash character. +- Glossary entries can now be escaped by prefixing a backslash + character to the leading brace character (use this in preference to + placing the backslash inside the brace). +- The output macro has been deprecated (use the new include1 macro + inside a CustomBlock). +- The default document type is `article` (asciidoc no longer attempts + to guess). +- Files included within DelimitedBlocks are not searched for block + termination underlines. This ensures the entire file is part of the + DelimitedBlock. +- `include` macros can now be used in configuration files. +- Corrected \{infile} and \{outfile} glossary entry documentation. +- File inclusion is now limited to a depth of 5 to catch recursion + loops. +- Inline tags have been deprecated, they're not necessary and they + immediately make the source document backend specific. Use + CustomBlocks or Substitutions instead. + +Version 2.1 (2003-03-17) +------------------------ +- Added section auto numbering `{sectnum}` glossary entry + (auto-numbering function contributed by Ludovico Magnocavallo). +- asciidoc(1) now correctly returns non-zero exit status if an error + occurs. +- An AsciiDoc example website has been included in the AsciiDoc + distribution `examples/website` directory. +- NOTE: The `asciidoc` wrapper script included in the 2.0 distribution + has been dropped, if you've symlinked or aliased to `asciidoc` you'll + need to change them to point directly to `asciidoc.py` instead. +- An RCS $Id$ marker can be used as the document header revision line + (based on a patch submitted by Ludovico Magnocavallo). +- In addition to the `name=value` glossary entry format two new ones + have been introduced: `name` (the default value is set to an empty + string) and `^name` (the glossary entry is undefined). +- The `-q` command-line option has been deprecated and the `-w level` + command-line option added. + + NOTE: By default skipped substitution warnings are now suppressed. +- If a configuration file specified with the `-f` command-line option + is not found relative to the current working directory then the + search is repeated relative to the asciidoc(1) directory. This + allows global configuration files to be used. +- Added `{infile}`, `{outfile}` predefined glossary entries. +- Added `under-construction` macro to HTML article configuration + files. +- Deprecated `{asciidoc_version}` glossary entry in favor of + `{asciidoc-version}` (to it consistent with other entries). + +Version 2.0 (2003-02-24) +------------------------ +- The emphasized, strong and monospaced words options have been + generalized with the introduction of macro based 'special words' + lists. +- Glossary references can now appear in both the document and macro + bodies. +- All output files use `crlf` line termination (previously used UNIX + `lf` (newline) termination). +- Added [substitutions] section which implements arbitrary regular + expression based substitutions. +- An optional `master.conf` configuration file can be used for entries + that are not backend or document type specific. +- Special character definitions moved from the code to the new + [special_characters] configuration file section. +- Configuration file glossary added. +- Command-line -g glossary entry added. +- A new 'book' document type has been implemented for the 'docbook' + backend. It outputs DocBook 'book' documents. +- A major internal change has been the implementation of parametrized + user definable 'macros'. Internally most document elements are now + processed as macros. +- Configuration file macro variables can be specified with default + values (literals or other macro variables). +- An attempt has been made to tighten up the vocabulary used to + describe the AsciiDoc document syntax. +- The term abstract has been replaced by the more general term + 'preface' and a new preface section introduced into article + configuration files (replacing the synopsis sections). +- Any section elements can now be put in the document preface + (previous versions only allowed paragraphs). +- AsciiDoc Blocks have been unified and their behavior can be user + defined and parametrized. +- An 'output' inclusion allows an external file to be written directly + to the backend output file. +- A new CustomBlock has been added. Default behavior is to insert the + enveloped AsciiDoc source lines directly into the output file. +- A 'line break' tag can be inserted by terminating a line with a '+' + character (only really useful for HTML backends). +- An fourth section level has been introduced. +- The SidebarBlock delimiter line characters have been changed. The + deprecated underline is still accepted. +- Levels 2 and 3 title underline characters have been changed. The + deprecated underlines are still accepted. +- Lines with backend specific inline tags can be inserted into + AsciiDoc source files. +- Single words enveloped by underscores are no longer emphasized. This + feature was deprecated as it is redundant (use single quotes + instead) and was being applied to file names with underscores. +- A `-q` quiet option has been added to suppress warning messages. +- Badge images sourced locally. +- Added 'author' and 'author-mail' meta tags to HTML configuration + files. + +Version 1.5 (2003-01-08) +------------------------ +- Implemented sidebar document elements. +- Explicit checks for user specified configuration files and input + file (rather than throwing exception). + +Version 1.4 (2003-01-04) +------------------------ +- New configuration file options 'emphasizedwords' and 'strongwords'. + These allow the definition of words that will always be emphasized + or rendered in a strong font without inline formatting. +- Document and section titles are no long subject to inline + formatting. +- Multiple configuration files can be overlaid in a single command. +- Configuration file tags and options entries can now be overridden on + an entry by entry basis (previously the entire section was + overloaded). +- Configuration file tags and options entries are now cached this has + resulted in around 37% performance improvement over version 1.3. +- Variable lists can now contain multiple terms per list item. +- Placeholder paragraph eliminated from empty sections that contain + subsections. +- Added \{asciidoc_version} substitution variable. +- More documentation additions and tidy ups. + +Version 1.3 (2003-01-01) +------------------------ +- A new 'strong' text formatting convention has been implemented: + Word phrases enclosed in pairs of single quote characters (acute + accents) are rendered in a strong font (usually bold). +- Paragraphs can now be followed immediately by Simple lists and + Ordered lists without an intervening blank line. +- A user specified configuration file (`asciidoc(1)` -f option) + overlays the default configuration file rather than replacing it. + Custom configuration files need only contain those sections + that have been customized. +- Comment Block delimiters have been relaxed slightly. They must start + with three forward slashes /// but the remainder can contain any + characters, this allows comments to be embedded in the delimiter line. +- Leading non-digit characters preceding revision number are now + ignored. +- Set default indentsize [option] from 2 to documented default value + of zero in HTML backend html-article.conf and html-manpage.conf + files. +- Fixed error that occurred when taking input from stdin without + explicitly specifying a document type. +- Restored file name and line number error message information. +- Changed deprecated -t option to -d in asciidoc --help and usage + command output. +- CSS styles tweaking. +- Code, configuration file and documentation tidy ups. + +Version 1.2 (2002-12-28) +------------------------ +- Implemented 'include' URL to allow file inclusion. +- `fileextension` configuration file [option] renamed to more sensible + `outfilesuffix` (`fileextension` still accepted by this version but + will be dropped in future). +- Improved error reporting. +- CSS backends generate valid XHTML. +- New `css-embedded` backend generates HTML with embedded stylesheets + (use the `css` backend for linked stylesheets). The css-embedded + backend output contains no linked images so the generated html files + are completely self contained. +- Bug fixes. + +Version 1.1 (2002-12-03) +------------------------ +- Added css (cascading style sheets) backend +- Implemented IndentedBlock document element. +- Tabsize command-line option has been deprecated in + favor of configuration file. +- Default indent width changed to zero. +- Added \{localdate} and \{localtime} substitution variables. +- Added optional [options] configuration file section with + fileextension, tabsize and indentsize options. +- Implemented \{authorinitials} substitution variable. +- Added https link type. +- Corrected [graphic] substitution from \{title} to \{caption} + in linuxdoc-article.conf configuration file. +- Fixed error that occurred when '==' title underline was + used. + +Version 1.0 (2002-11-25) +------------------------ +First AsciiDoc public release along with AsciiDoc web site +(http://asciidoc.org/) and SourceForge.net project registration +(https://sourceforge.net/projects/asciidoc/[]). + +// vim: set syntax=asciidoc: diff -Nru asciidoc-8.6.10/CHANGELOG.txt asciidoc-10.1.2/CHANGELOG.txt --- asciidoc-8.6.10/CHANGELOG.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/CHANGELOG.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,3213 +0,0 @@ -AsciiDoc ChangeLog -================== - -:website: http://asciidoc.org/ - - -Version 8.6.10 (2017-09-22) ---------------------------- -.Additions and changes -- Improve reproducibility of builds (e.g. support SOURCE_DATE_EPOCH) -- Add SVG output support -- Improve documentation -- Update translations -- Full list of changes is at https://github.com/asciidoc/asciidoc/compare/asciidoc:8.6.9...asciidoc:8.6.10 - -Version 8.6.9 (2013-11-09) --------------------------- -.Additions and changes -- 'html5', 'xhtml11' and 'slidy' outputs now wrap 'pre' element - contents at right margin (see -https://groups.google.com/group/asciidoc/browse_thread/thread/9877a316b7a47309). -- Vim syntax file: highlight line breaks in lists (patch submitted by - Alex Efros). See - https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a). -- Vim syntax file: fixed highlighting of lines with spaces preceding - an indented paragraph. See - https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a -- Vim syntax file: dropped ')' from list of illegal characters - following opening quote. See - https://groups.google.com/group/asciidoc/browse_thread/thread/1a60eb4507a0555f/264c39c6a89fc7a0 -- Added {plus} intrinsic attribute. See - http://code.google.com/p/asciidoc/issues/detail?id=14 -- Allow `tabsize=0 in` configuration file. See - https://groups.google.com/group/asciidoc/browse_thread/thread/c88457020288ce1d -- Removed 'wordpress' backend into the blogpost project (where it - belongs) as an AsciiDoc backend plugin. -- Added HTML5 footer badges. -- Added favicon to AsciiDoc website. -- Changed AsciiDoc website domain to 'asciidoc.org'. -- Vim syntax file: closing quote character cannot be immediately - followed by same closing quote character. -- Documentation updates. -- If admonition icons are embedded using the Data URI Scheme and the - icons directory is undefined or does not exist then the 'iconsdir' - attribute is set to the location of the icons installed in the - AsciiDoc configuration directory. -- Updated `./stylesheets/pygments.css` from pygments 1.4. -- HTML backends: Align inline images to text-bottom. -- html4 backend: Added 'hr' attribute to make the inter-section - horizontal ruler element optional. -- Documented 'Callout lists cannot be used within tables'. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/268f9b46ebc192d3 -- Removed Vim related stuff from the installer makefile. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 - and - https://groups.google.com/group/asciidoc/browse_thread/thread/cd07629fa7a53fb3 -- Dropped `vim/ftdetect/asciidoc_filetype.vim` from distribution, the - file detection was broken and the default settings satisfied noone. -- Vim syntax highlighter: increase sync backtracking to catch changes - to large block elements. -- Added Romanian language configuration file. Contributed by Vitalie - Lazu. See - https://groups.google.com/group/asciidoc/browse_thread/thread/2fe14a10dbf20d20/27726e7e13f7bfc7?lnk=gst&q=romanian#27726e7e13f7bfc7 -- Added ruler and line-break outputs to HTML Help outputs. Patch - submitted by DonM. See - https://groups.google.com/group/asciidoc/browse_thread/thread/b131d0155eccd73e -- Added Czech language configuration file. Contributed by Petr Klíma. -- html4 backend: allow embedded images and icons (data-uri - attribute). -- html4 backend: table and example block caption place at bottom for - consistency. -- html4 backend: dropped border around example block. -- html4 backend: cellpaddings made equal to 4 for consistency. -- Vim syntax highligher: Highlight closing OpenBlock delimiter when it - immediately follows a list. -- Updated html5 backend (previous commit was xhtml11 only). See: - https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 -- Embedded data-uri images now figure file mimetype from file contents - rather than the file extension. Patch submitted by Lex Trotman. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 - -.Bug fixes -- `indexterm2:[]` macro syntax now recognized. See - https://groups.google.com/group/asciidoc/browse_thread/thread/1b3f1a0f0a21425e -- Synthesised `*-option` attributes for options set in table conf file - style entries. See - https://groups.google.com/group/asciidoc/browse_thread/thread/8aa340a3069ef5f1/a727a8a564eea76c -- Makefile: Fixed sh compatibility issue. See - https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 - - -Version 8.6.8 (2012-07-17) --------------------------- -.Release highlights -Added full complement of styles to 'Open Blocks' and 'Normal -Paragraphs' -- those with a minimalist bent could construct virtually -any document using just Title, Normal Paragraph and Open Block -syntaxes. - -.Other additions and changes -- Increased default maximum include depth from 5 to 10. -- Emit warning if maximum include depth is exceeded. -- Suppress repeated console messages. -- Music filter: removed '--beams=None' option from abc2ly invocation - because it is broken on LilyPond 2.14 (Ubuntu 12.04). -- Replaced obsolete '<tt>' tag with '<code>' in HTML backends. -- Allow configuration attribute entries to create a new section - (previously you could only modify existing sections). See: - https://groups.google.com/group/asciidoc/browse_thread/thread/7be28e9714f249c7[discussion - list]. -- Documented `{wj}` (word-joiner) attribute and updated FAQ. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/961a957ab5872ebf[discussion - list]. -- FAQ: Added 'How can I place a footnote immediately following quoted - text?' See - https://groups.google.com/group/asciidoc/browse_thread/thread/961a957ab5872ebf[discussion - list]. -- Added Greek language configuration file. Contributed by Michael - Dourmousoglou. See - https://groups.google.com/group/asciidoc/browse_thread/thread/9e79d8494ef8d870[discussion - list]. -- FAQ: Added 'Using roles to select fonts for PDF'. Submitted by Lex - Trotman and based on solution by Antonio Borneo. See: - https://groups.google.com/group/asciidoc/browse_frm/thread/64b071bb21de9cf0[discussion - list]. -- Apply same monospaced font size to all monospaced text. -- Changed '0' number padding to spaces in numbered GNU - source-highlight outputs. -- Allow 'highlight' source highlighter to use 'python' for Python - `{language}` name. r1142: Update the AsciiDoc 'source' filter to - allow the use of the 'highlight' source code highlighter. See - https://groups.google.com/group/asciidoc/browse_frm/thread/e045c9986c71d72a[discussion - list]. -+ -NOTE: The 'pygments' attribute has been deprecated in favor of the new -'source-highlighter' attribute. - -- Vim syntax highlighter: Don't confuse trailing open block delimiter - with section underline. -- Added 'skip' option to paragraphs (c.f. Delimited Block 'skip' - option). - -.Bug fixes -- *FIXED*: latex, music and graphviz filters: When the filter output - image is data-uri encoded write it to the indir (instead of the - outdir) so that encoder can find it. See - https://groups.google.com/group/asciidoc/browse_thread/thread/f5174f450a61f14b[discussion - list]. -- *FIXED*: Escape the ']' character inside inline macros. See - https://groups.google.com/group/asciidoc/browse_thread/thread/db3b734a6931cb74[discussion - list]. -- *FIXED*: source highlighter filter: Pass 'role' attribute to HTML - backends. -- *FIXED*: source highlight filter: docbook backend: 'role' attribute - was not passed to listings without a title. Patch submitted by Lex - Trotman. See - https://groups.google.com/group/asciidoc/browse_thread/thread/13c9ee97930342b3[discussion - list]. -- *FIXED*: music2png.py: 'FOPException: Raster ByteInterleavedRaster' - error (FOP 1.0, ImageMagick 6.6.9-7). - - - -Version 8.6.7 (2012-03-17) --------------------------- -.Release highlights -No major enhancements but quite a few bug fixes which, among other -things, fixes Jython compatibility and improves Windows compatibility. - -.All additions and changes -- Vim syntax highlighter: highlight entity refs in macro arguments. -- Added files with `.asciidoc` extension to Vim file type detection. - http://groups.google.com/group/asciidoc/browse_thread/thread/a9762e21ec0cc244/5d3a4ebf20e6847e[Patch] - submitted by Dag Wiers. -- Added 'replacement3' substitution to enable - http://groups.google.com/group/asciidoc/browse_thread/thread/843d7d3d671006fb/25628e14c829db3f[ODT - whitespace processing]. -- Added 'unbreakable' option to XHTML and HTML 5 backends. -- Implemented toc::[] block macro and 'toc-placement' attribute for - HTML backends to allow the Table of Contents placement to be set - manually by the author. -- Added FAQs: 'How can I control page breaks when printing HTML - outputs?' and 'Is it possible to reposition the Table of Contents - in HTML outputs?'. -- Added `--backend` and `--backend-opts` options to the 'a2x' command - to allow 'a2x' to use backend plugin code extensions. - http://groups.google.com/group/asciidoc/browse_thread/thread/b8e93740b7cd0e1d/b5e0b83fe37ae31a[Patch] - submitted by Lex Trotman. -- Added - http://groups.google.com/group/asciidoc/browse_thread/thread/3d06b0105dfbb780/8c60eb7a62f522e4[args - block attribute] to source highlight blocks to allow arbitrary - parameters to be passed to the source highlighters. -- If the 'ascii-ids' attribute is defined then non-ascii characters in - auto-generated IDs - http://groups.google.com/group/asciidoc/browse_thread/thread/33e99b78e2472122[are - replaced] by their nearest ascii equivalents (to work around DocBook - processor limitations). -- Added global 'blockname' attribute which is dynamically updated to - identify the current block. See - http://groups.google.com/group/asciidoc/browse_thread/thread/8200e29815c40f72[discussion - list]. -- 'xhtml11', 'html5' backends: Include book part TOC entries for - multi-part books. Patch submitted by Loïc Paillotin. -- Removed code filter example from the AsciiDoc User Guide so that - backends implemented as external plugins can compile the manual. See - http://groups.google.com/group/asciidoc/browse_thread/thread/849e5ea91f43adf2[discussion - list]. -- If the delimited block 'skip' option is set then do not consume - block title and attributes. This makes it possible for the comment - delimited blocks to use an attribute list (previously the comment - delimited block was hardwired to skip preceding attributes and - titles). See - http://groups.google.com/group/asciidoc/browse_thread/thread/e92a75abcc382701[discussion - list]. -- Added `backend-confdir` intrinsic attribute. - -.Bug fixes -- *FIXED*: slidy backend: broken 'stylesheet' attribute. - http://groups.google.com/group/asciidoc/browse_thread/thread/58d0843ae4345afd[Patch] - submitted by Micheal Hackett. -- *FIXED*: Restored - http://groups.google.com/group/asciidoc/browse_thread/thread/b0e69e393b6f9f20/47a2c7586f9e40c6?lnk=gst&q=themes+tarball#47a2c7586f9e40c6[missing - themes] to zip file distribution archive. -- *FIXED*: Grammatical error in error messages. - http://groups.google.com/group/asciidoc/browse_thread/thread/b9d705c6b6b39f59/1e120483dafca109[Patch] - submitted by Dag Wieers. -- *FIXED*: Use configured normal substitution in preference to the - default one. -- *FIXED*: The 'eval' block macro would execute multiple times if it - evaluated to 'None'. -- *FIXED*: Duplicated entries in TOC of large document. - http://groups.google.com/group/asciidoc/browse_thread/thread/103445ab9d95cb0c[Patch] - submitted by Sebastien Helleu. -- *FIXED*: Python 2.4 backward - http://code.google.com/p/asciidoc/issues/detail?id=9[incompatibility]. -- *FIXED*: 8.6.6 regression broke Jython compatibility. See - http://groups.google.com/group/asciidoc/browse_thread/thread/4608b77ec289f6c4[discussion - list]. -- *FIXED*: Leaky file handles in a2x and music and latex filters which - created incompatibility problems for Jython. -- *FIXED*: All Python filters are executed with the same Python - interpreter that executes the asciidoc parent (previously filters - were hardwired to execute the 'python' interpreter). This prevents - http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b/3af3b4e57b827c78?lnk=gst&q=archlinux#3af3b4e57b827c78[Python - mix-ups]. -- *FIXED*: Microsoft Windows shelled command-line truncation that - caused shelled commands to fail e.g. the 'data-uri' attribute - failure. - - -Version 8.6.6 (2011-09-04) --------------------------- -.Release highlights -- The AsciiDoc plugin architecture has been enhanced, unified and - extended: - * Plugin commands have been added to the asciidoc(1) `--backend` - option. - * An asciidoc(1) `--theme` option has been implemented to specify a - theme and to manage theme plugins. - * A plugin 'build' command (for creating plugins) added. - * 'build', 'install', 'list' and 'remove' plugin commands are all - recognized by asciidoc(1) `--backend`, `--filter` and `--theme` - options. -- A security update by Kenny MacDermid removes the use of `eval()` on - untrusted input (to disallow code malicious execution). - -.All additions and changes -- 'xhtml11', 'html5': Made verse and quote block text darker to print - legibly in Google Chrome browser. -- Added plugin 'build' command for plugin file creation. -- Merged `--help plugins` back to `--help manpage` so it matches the - asciidoc(1) manpage. -- The `--filter` command-line option can specify the name of filters - that will be unconditionally loaded. -- If a filter directory contains a file named `__noautoload__` then - the filter is not automatically loaded (you can used the `--filter` - command-line option to override this behavior). -- tests: Add Italian language tests. Patch submitted by Simon - Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a -- tests: Add tests for localized man pages. Patch submitted by Simon - Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a -- If the section name is prefixed with a '+' character then the - section contents is appended to the contents of an already existing - same-named section (the default behavior is to replace the the - section). -- If a configuration file section named 'docinfo' is loaded then it - will be included in the document header. Typically the 'docinfo' - section name will be prefixed with a '+' character so that it is - appended to (rather than replace) other 'docinfo' sections. -- Added `{sp}` intrinsic attribute for single space character. See - http://groups.google.com/group/asciidoc/browse_thread/thread/a839aa01db0765d2 -- Fixed TOC and footnotes generator. Patch submitted by Will. See - http://groups.google.com/group/asciidoc/browse_thread/thread/734ac5afed736987 -- The `asciidoc-confdir` attribute is set to the asciidoc executable - directory if it contains global configuration files i.e. a local - asciidoc installation. -- asciidoc now throws an error instead of just a warning of the - backend configuration file is not found. -- latex filter: write MD5 file after successful PNG file generation. - Always delete temp files irrespective of outcome. -- Added truecolor option to LaTeX filter. Patch submitted by Michel - Krämer. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851 -- Unit test for table column specifiers with merged cells. Patch - submitted by Simon Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a -- Added verbose message for `ifeval::[]` macro evaluation. -- Added test case for `ifeval::[]` evaluation. -- Security update to remove the use of `eval()` on untrusted input (to - disallow code malicious execution). Patch submitted by Kenny - MacDermid. -- Changed web site layout from table to CSS based. See - http://groups.google.com/group/asciidoc/browse_thread/thread/ec8e8481eb0e27b0/d1c035092b5bb7a4?lnk=gst&q=caption+option#d1c035092b5bb7a4 -- a2x: Pass `--format` option value to asciidoc as 'a2x-format' - attribute. Patch submitted by Lex Trotman - (http://groups.google.com/group/asciidoc/browse_thread/thread/3e177b84bc133ca9/659796dfadad30ea?lnk=gst&q=a2x+format#659796dfadad30ea). -- Added two FAQs submitted by Lex Trotman. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/16d3fb9672a408e7 -- html5,xhtml11: Implemented themes directory structure. -- html5,xhtml11: Implemented asciidoc `--theme` management option - (install, list, build and remove commands). -- html5,xhtml11: A theme can now optionally include a JavaScript file - `<theme>.js` -- html5,xhtml11: If the 'data-uri' attribute is defined then icons - from the theme icons directory (if they exist) will be embedded in - the generated document. -- Added optional 'warnings' argument to include macros. -- The asciidoc `--verbose` option now prints file inclusion messages. -- xhtml11, html5: Remove necessity for separate manpage CSS files. -- Added 'css-signature' attribute to tests. -- Add 'css-signature' attribute to set a CSS signature for the - document. Patch submitted by Peg Russell, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/bacbf8aeb8ad6a3a -- White background for toc2 TOC viewport so that horizontally scrolled - content does not obscure the the TOC. Patch submitted by Lionel - Orry, see: http://code.google.com/p/asciidoc/issues/detail?id=8 - -.Bug fixes -- *FIXED*: Plugin install command: Delete backend directory is install - fails. -- *FIXED*: Plugin install command: Fixed bug extracting binary files - on Windows (reported by Jean-Michel Inglebert). -- *FIXED*: tests: Skip blank sections in testasciidoc.conf test - configuration file instead of throwing an exception (reported by - Jean-Michel Inglebert). -- *FIXED*: If a plugin Zip file does not contain file permissions - (probably because it was created under Windows) then install it - using the default permissions. -- *FIXED*: Fixed missing quote in preceding LaTeX filter patch. Fix - submitted by Simon Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851 -- *FIXED*: Some path attributes were processed as escaped Python - strings which could result in corrupted path names with backslash - separated Windows path names. Reported by Will. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/e8f3938bcb4c8bb4/44d13113a35738ef -- *FIXED*: Vertically spanned table cells resulted in incorrect column - styles being applied to some cells. Reported by Will: - http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a/9afc4559d51e1dbd -- *FIXED*: LaTeX backend: fixed bad escapes. Patch submitted by Mark - McCurry: - http://groups.google.com/group/asciidoc/browse_thread/thread/8c111f1046b33691/158a944cf4d5ff0d?lnk=gst&q=latex+escapes#158a944cf4d5ff0d -- *FIXED*: When using slidy backend, display of characters with - accents is wrong because of 'meta http-equiv' line missing. Reported - by Fabrice Flore-Thebault. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/eaf25f21d1da180a - - -Version 8.6.5 (2011-05-20) --------------------------- -.Release highlights -- The addition of an 'html5' backend to generate HTML 5 output. Apart - from the inclusion of 'audio' and 'video' block macros the 'html5' - backend is functionally identical to the 'xhtml11' backend. - -- A new 'flask' theme for 'xhtml11' and 'html5' backends inspired by - the http://flask.pocoo.org/docs/[Flask website] styling (see 'toc2' - example in the next item below). - -- The new 'toc2' attribute generates a table of contents in - the left hand margin ('xhtml11' and 'html5' backends). - link:article-html5-toc2.html[This example] was generated using - the following command: - - asciidoc -b html5 -a icons -a toc2 -a theme=flask article.txt - -- `a2x(1)` now has a flexible mechanism for copying arbitrary - resource files to HTML based outputs -- this is very handy for - generating EPUB files with embedded fonts and other resources. - - * The `a2x(1)` `--resource` option can be used to inject any file - into EPUB output documents e.g. CSS resources such as fonts and - background images. - * Explicitly specified resources are added to the EPUB OPF manifest - automatically. - * You can explicitly specify file extension MIME types. - * The enhanced resource processing works around a couple of DocBook - XSL bugs (see link:epub-notes.html[EPUB Notes]). - -.All additions and changes -- A new 'flask' theme for 'xhtml11' and 'html5' backends. A shameless - knock-off of the http://flask.pocoo.org/docs/[Flask website] - styling. -- Added HTML 5 article with 'toc2' table of contents to the example on - the AsciiDoc website home page. -- Added 'filters' and 'topics' help topics. Fixed documentation - errors in help text. Patch submitted by Lionel Orry, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/9da9d48a6461ff14 -- Pass parent configuration files, command-line attributes and header - attributes to table asciidoc filters. Based on patch submitted by - Simon Ruderich, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/5c792cbb395b753b -- Allow a 'title' attribute entry in the document header so that HTML - backends can set the 'title' element separately from the displayed - document title (the 'doctitle' attribute). -- Pass 'lang' attribute to 'asciidoc' table style filter. Patch - submitted by Simon Ruderich, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/e2100b7cb29283ce -- xhtml11,html5: Added 'toc2' attribute which generates a scrollable - table of contents in the left hand margin. Based on customized CSS - written by Suraj Kurapati, see - http://groups.google.com/group/asciidoc/browse_thread/thread/c5e30ee5555877f5 -- Added 'asciidoc-confdir' intrinsic attribute which expands to the - global conf directory. -- Documented that you can specify multiple CSS files with the a2x(1) - `--stylesheet` command option. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/baf3218551d05a05 -- Improved xhtml11 backend's table of contents generation latency. - Patch submitted by Hongli Lai. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/5a7fe64fbfd65ad -- Added html5 backend. -- For consistency converted all DOS formatted configuration and text - files to UNIX format. -- html4: Added ability to use 'role' attribute with most block - elements. Patch contributed by Simon Ruderich. See - http://groups.google.com/group/asciidoc/browse_thread/thread/5620ba634fdb030a -- Added Dutch language configuration file and accompanying test file - (contributed by Dag Wieers, see - http://groups.google.com/group/asciidoc/browse_thread/thread/f969b9ce987d7f5d). -- Configuration files are loaded in two passes when the -e - command-line option is used (the same behavior as when the -e option - is not used). Patch submitted by haad. See - http://groups.google.com/group/asciidoc/browse_thread/thread/cd0f47495fd04181 - and - http://code.google.com/p/asciidoc/issues/detail?id=6&q=label%3APriority-Medium -- Documented how to include embedded fonts in an EPUB document. -- a2x: Added `.<ext>=<mimetype>` resource specifier syntax. -- a2x: Enable admonition icons in example EPUBs. -- a2x: allow environment variables and tilde home directories in - resource manifest files. -- a2x: don't process non-existent resource directories. -- a2x: assume resource option is a directory if the name ends with a - directory separator. -- a2x: Added a new syntax to the `--resource` option specifier which - allows the destination path to be specified. -- a2x: Copy resources referenced in the OPF and resources referenced - by the generated HTML (in theory DocBook XSL should ensure they are - identical but this is not always the case e.g. - http://sourceforge.net/tracker/?func=detail&atid=373747&aid=2854075&group_id=21935). -- Drop border from callout list image links. -- html4: Moved manpage NAME section out of header so that the name - section is rendered when the asciidoc(1) `--no-header-footer` option - is specified (so that manpages processed blogpost include the NAME - section). -- Vim syntax highlighter: TODO markers now appear in list items and - literal paragraphs and blocks. -- Constrained quotes can now be bounded on the left by a } character. - See: - http://groups.google.com/group/asciidoc/browse_thread/thread/b24cc3362f35b801 -- Added text-decoration roles (underline, overline, line-through, - blink) for xhtml11 and html5 outputs. - -.Bug fixes -- *FIXED*: epubcheck 1.1 previously issued a warning for files not - registered in the manifest (epubcheck 1.0.5 did not). This resulted - in a problem compiling the adventures-of-sherlock-holmes.txt example - (the `underline.png` resource was not in the manifest). - - -Version 8.6.4 (2011-02-20) --------------------------- -.Additions and changes -- Added text foreground and background color along with text size CSS - styles for XHTML outputs, see {website}userguide.html#X96[]. -- Vim syntax highlighter: highlight macros that start with an - attribute reference (a common idiom). -- Vim syntax highlighter: highlight attribute references in macro - attribute lists. -- Attribute entries can be used to set configuration markup templates. -- Double-width East Asian characters in titles now correctly match the - title underline widths. Submitted by Changjian Gao (see - http://groups.google.com/group/asciidoc/browse_thread/thread/77f28b0dfe60d262). -- Implemented {website}manpage.html[asciidoc(1)] filter commands, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/40c64cd33ee1905c -- User's home directory now calculated in a platform independent - manner. -- Added double-quote characters to French language file. Patch - contributed Yves-Alexis Perez, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 -- Vim Syntax highlighter: Highlight closing OpenBlocks which - immediately follow a literal paragraph. -- Changed UNIX `/dev/null` to OS independent `os.devnull` in filters - code. Suggested by Henrik Maier: - http://groups.google.com/group/asciidoc/browse_thread/thread/5ac8e8ea895147e9 -- Vim syntax highlighter: Single and double quoted text now highlights - correctly when preceded by an attributes list. -- Added Ukrainian language file (`lang-uk.conf`). Added double-quote - characters to Russian language file.conf). Patches contributed by - Lavruschenko Oleksandr, see - http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 -- Single and double quote characters are now set using the `{lsquo}`, - `{rsquo}`, `{ldquo}` and `{rdquo}` attributes. This makes is easy to - customise language specific quotes. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 -- Implemented 'conf-files' attribute to allow configuration files to - be specified in the source document. Suggested by Lex Trotman, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/b11066a828ab45b9 - -.Bug fixes -- *FIXED*: Auto-generated section title ids are now Unicode aware. -- *FIXED*: Setting 'quotes' configuration entries using document - attribute entries failed if the attribute entry was not in the - document header. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/a1dd0562dee8b939 -- *FIXED*: If the input and output file names were different then the - output file name was incorrectly used to synthesize 'docinfo' file - names. Reported by Christian Zuckschwerdt. -- *FIXED*: An error can occur when more than one consecutive quotes - are defined as a blank string. Reported by Peggy Russell. -- *FIXED*: Encoding error in automatically generated author initials. - Patch submitted by Xin Wang. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/f44615dca0b834e9 - - -Version 8.6.3 (2010-11-14) --------------------------- -.Additions and changes -- Added and 'unbreakable' option to bulleted and numbered lists - (thanks to Henrik Maier for this patch). -- Added `ifeval::[]` system macro (thanks to Henrik Maier for - suggesting this feature). -- The image 'scale' attribute sets the DocBook 'imagedata' element - 'scale' attribute. Patch submitted by Henrik Maier. -- DocBook 'preface', 'colophon' and 'dedication' style section titles - now work. Based on patch submitted by Henrik Maier. -- 'a2x': Do not inject xsltproc parameters if they were specified on - the command-line (parameter double-ups generate xsltproc 'Global - parameter already defined' errors). -- 'a2x': Refactored xsltproc parameter injection. -- 'a2x': articles chunked at section level by default. -- 'attributes', 'titles' and 'specialcharacters' sections are now read - from the local `asciidoc.conf` file before the header is parsed. - This fixes a regression problem. See - http://groups.google.com/group/asciidoc/browse_thread/thread/1b3f88f1f8118ab3 -- Document header attributes take precedence over configuration file - attributes. -- Refactored 'music', 'graphviz' and 'latex' filter configurations. -- Refactored source filter configuration and added literal paragraph - source style. -- Separated paragraph styles from paragraph syntax -- any style can be - applied to any syntax. -- Added 'listing' and 'quote' paragraph styles. -- Renamed paragraph 'default' style to 'normal'. -- Updated `--help` option text. -- 'a2x': The `asciidoc_opts`, `dblatex_opts`, `fop_opts` and - `xsltproc_opts` command-line options can be specified multiple - times. This makes embedding multiple 'a2x' options in document - headers easier to manage and less error prone. -- Added ASCIIMathML and LaTeXMathML support to slidy backend. -- Pass the 'encoding' attribute to the Pygments source highlight - filter command. -- 'a2x': HTML Help `.hhk` file named after AsciiDoc source file. -- 'a2x': Added `--xsl-file` option to allow custom XSL stylesheets to - be specified. -- Make builds the man pages. Patch submitted by Sebastian Pipping. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c21c2902c29bae64 - -.Bug fixes -- *FIXED*: Sometimes double backquotes were misinterpreted as inline - literal macros. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/f510ea82a88aaee8 -- *FIXED*: Regression in 8.6.2: command-line attributes were not - available to the global asciidoc.conf. -- *FIXED*: Postponed document title substitutions until backend conf - files have been loaded (8.6.2 regression). See - http://groups.google.com/group/asciidoc/browse_thread/thread/42b63ce90c2563b8 -- *FIXED*: The XSL Stylesheets customizations were preventing chapter - and section level TOCs from being generated when using XSL - Stylesheets via 'a2x'. See - http://groups.google.com/group/asciidoc/browse_thread/thread/42b63ce90c2563b8 -- *FIXED*: ``UnicodeDecodeError: \'ascii' codec can't decode byte'' - error. This error is due to a limitation in the Python HTMLParser - module, see: http://bugs.python.org/issue3932 -- *FIXED*: Broken `--no-conf` option (8.6.2 regression). -- *FIXED*: Regression in 8.6.2: configuration attribute entries set in - the document header may cause a 'FAILED: incomplete configuration - files' error. -- *FIXED*: 'html4': corrected self closed meta tags. -- *FIXED*: 'a2x' regression in 8.6.2: HTML Help `.hhp` file name had - reverted to default name instead of the AsciiDoc source file name. - See: - http://groups.google.com/group/asciidoc/browse_thread/thread/dedc961b23e9ac56 -- *FIXED*: Attributes in man page title caused it to be dropped - resulting in invalid DocBook output. -- *FIXED*: `make uninstall` now deletes the `asciidoc.1` and `a2x.1` - man pages. - - -Version 8.6.2 (2010-10-03) --------------------------- -.Additions and changes -- 'docbook45': Enclosed bibliographic lists in a 'bibliodiv' -- you - can now include block titles with bibliographic lists. -- Added optional 'keywords', 'description' and 'title' document header - meta-data attributes to HTML backends for SEO. -- AttributeEntry values can span multiple lines with a ' +' line - continuation. -- Added 'slidy' backend (based on Phillip Lord's slidy backend - https://phillordbio-asciidoc-fixes.googlecode.com/hg/). -- Implemented 'OpenBlock' 'partintro' style for book part - introductions. -- Comment lines substitute special characters only. -- Backend specific global configuration files (all except - `asciidoc.conf`) are loaded *after* the header has been parsed -- - virtually any attribute can now be specified in the document header. -- 'xhtml11': Volnitsky theme: allow bulleted lists to have intervening - children. -- 'xhtml11': refactored CSS font-family rules to start of file. -- 'xhtml11': list bullets colored gray. -- 'ifdef' and 'ifndef' system block macros accept multiple attribute - names: multiple names separated by commas are 'ored'; multiple - attribute names separated by pluses are 'anded'. -- 'xhtml11': Volnitsky theme: set max-width on labeled lists. -- Vim syntax highlighter: Entities inside quoted text are now - highlighted. -- Added 'role' and 'id' attributes to HTML outputs generated by - 'OpenBlocks'. -- Allow floating titles to generate 'h1' (level 0) titles in HTML - outputs. -- Added a 'start' attribute to numbered lists to set the start number. - See: - http://groups.google.com/group/asciidoc/browse_thread/thread/c14a4c3b1e4f6dc5 -- Added two more docinfo attributes 'docinfo1' and 'docinfo2' to allow - and control inclusion of a shared docinfo file. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c948697943432e24 -- Vim syntax highlighter highlights multi-name conditional attributes. -- LaTeX backend patch submitted by Andreas Hermann Braml (see - http://groups.google.com/group/asciidoc/browse_thread/thread/1c415fc4540ce5e5). -- Implemented 'backend aliases'; renamed `docbook.conf` to - `docbook45.conf` and aliased 'docbook45' backend to 'docbook'; - aliased 'xhtml11' to 'html'. - -.Bug fixes -- *FIXED*: Filter commands located in filter directories local to the - source document that where not in the search 'PATH' where not found. -- *FIXED*: Volnitsky theme: Verseblock font set normal instead of - monospaced. -- *FIXED*: 'xhtml11': Callout icons were not rendered as Data URIs - when 'icons' and 'data-uri' attributes were specified. -- *FIXED*: Long standing bug: nested include macros did not restore - the parent document 'infile' and 'indir' attributes. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/8712a95e95a292a7 -- *FIXED*: 'html4': set preamble ID anchor. -- *FIXED*: 'xhtml11': dropped unusable 'id' and 'role' attributes from - preamble template. -- *FIXED*: Bug in multi-name conditional attributes e.g. `{x,y#}` - fails if x or y is undefined. -- *FIXED*: latex filter not being installed by Makefile. Thanks to - Grant Edwards for this patch. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c4427a3902d130a8 -- *FIXED*: 'a2x': Long-standing bug in a2x which always passes - `--string-param navig.graphics 0` to 'xsltproc', regardless of - whether icons are enabled or not. Reported by Michael Wild: - http://groups.google.com/group/asciidoc/browse_thread/thread/59a610068e4acb58 - - -Version 8.6.1 (2010-08-22) --------------------------- -.Additions and changes -- 'a2x': `--resource-dir` option renamed to `--resource`. -- 'a2x': `--resource` option accepts both file and directory names. -- 'a2x': Added `-m,--resource-manifest` option. -- Added Vim syntax highlighting for quote attribute lists. -- Load 'asciidoc.conf' from all configuration directories before any - other configuration files. This ensures that attributes used for - conditional inclusion are set before backend configuration files are - processed. Previously if you wanted to control global conf file - inclusion your only choice was to modify the global 'asciidoc.conf' - file. -- AsciiDoc 'Quote element' attributes have been simplified and - generalized -- positional color and size attributes and named 'role' - attribute have been replaced by a single positional attribute. - -.Bug fixes -- *FIXED*: 'testasciidoc.py': `BACKEND` command argument was being - ignored. -- *FIXED*: Broken 'docinfo' file functionality in 'html4' and - 'xhtml11' backends (previously the docinfo file was included in - the 'body' instead of the 'header'). - -Regression issues -~~~~~~~~~~~~~~~~~ -This release breaks compatibility with quoted element positional color -and size attributes (HTML backends). To revert to the deprecated quote -behavior define the 'deprecated-quotes' attribute in the global -`asciidoc.conf` file or on the command-line. For a more detailed -explanation of the rationale behind this change see -http://groups.google.com/group/asciidoc/browse_thread/thread/b22603bfb879418c. - - -Version 8.6.0 (2010-08-16) --------------------------- -.Additions and changes -- The AsciiDoc distribution can now be built ``out of the box'' - from the distribution tarball or the Mercurial repository - (provided you have the requisite build applications installed). -- The global configuration files directory is ignored by both - 'asciidoc' and 'a2x' if AsciiDoc configuration files are installed - in the same directory as the asciidoc executable. This change - allows both a system wide copy and multiple local copies of AsciiDoc - to coexist on the same host PC. -- CSS 'quirks' mode is no longer the default 'xhtml11' output - (http://groups.google.com/group/asciidoc/browse_thread/thread/1c02d27d49221aa2). -- Relaxed anchor ID name syntax - (http://groups.google.com/group/asciidoc/browse_thread/thread/5f3e825c74ed30c). -- Added document files: `doc/epub-notes.txt`, - `doc/publishing-ebooks-with-asciidoc.txt`. -- 'a2x': If all other resource locations are exhausted then recursively - search directories named 'images' and 'stylesheets' in the - 'asciidoc' configuration files directory. -- 'a2x': options can also be set in the AsciiDoc source file. If the - source file contains a line beginning with '// a2x:' then the - remainder of the line will be treated as a2x command-line options. -- Added dblatex table-width processing instruction -- tables generated - by dblatex now observe the AsciiDoc table width as a percentage - (thanks to Gustav Broberg for suggesting this enhancement). -- 'a2x': Don't exit if the `--epubcheck` option is set and 'epubcheck' - is missing, issue warning and continue. -- Added a global 'plaintext' attribute for dealing with large amounts - of imported text. -- The author name format has been relaxed, if the the author does not - match the formal specification then it is assigned to the - 'firstname' attribute (previously asciidoc exited with an error - message). -- FAQ and documentation updates. -- Refactored chunked.xsl and epub.xsl files. -- Exchanged article.epub for more relevant book.epub on website. -- Put asciidoc.epub User Guide on website. -- 'a2x': Chunking EPUB and HTML outputs set to a per chapter basis and - the first chapter is separate from preceding contents. -- Changed dates format in example article and books to suppress EPUB - validation error. -- Added 'style' and 'role' CSS classes to xhtml11 section templates. -- Added the 'role' element to xhtml11 backend block templates. -- Suppressed md5 module deprecation warning from music and Graphviz filters. -- Pygments (http://pygments.org/) option added to source code - highlight filter. Based on Pygments source code filter written by - David Hajage - (http://groups.google.com/group/asciidoc/browse_thread/thread/d8d042f5a3021369/8934ebbb8cb7144b). -- xhtml11: Added a new theme (volnitsky). Written and contributed by - Leonid V. Volnitsky. -- xhtml11: Set body element class name to document type. -- Added refentryinfo element and contents (including revdate) to man - page DocBook output. Man pages are now dated using the revdate - attribute value if it has been defined. Based on patch supplied by - Rainer Muller - http://groups.google.com/group/asciidoc/browse_frm/thread/319e5cd94493e330/3fcb83fab067af42. -- Added `{template:...}` system attribute. -- Table of contents attribute 'toc' can now be specified in the - document header. -- Reimplemented music and latex filter -m option functionality when - the input is stdin using MD5 checksums. -- Added 'latex' filter. -- Added auto file name generation to image generating filters - (latex,music, graphviz). -- Added `counter2` and `set2` system attributes (to implement image - auto file name generation). -- Undefined attribute in filter command generates error but does not - exit. -- Attribute substitution proceeds from start line to end line - (previously was in reverse order which was really confusing). -- Tidied up music filter code: - * Format option is optional and default to 'abc' unless Lilypond - notation detected. - * The -m option does not apply to stdin input. -- Added paragraph styles to music and graphviz filters. -- Documented dynamic template names. 753: Graphviz filter can now - generate SVG format images. Patch submitted by Elmo Todurov, see: - http://groups.google.com/group/asciidoc/browse_frm/thread/fe9b33d8f5f1e0af - The xhtml11 SVG Graphviz template marked EXPERIMENTAL. No SVG - support for other backends. -- AsciiDoc template names can now contain embedded attribute - references. -- Added 'legalnotice' tag to `doc/article-docinfo.xml` example. -- xhtml11 backend: Callouts and callout lists display callout icons - when the 'icons' attribute is defined. See - http://groups.google.com/group/asciidoc/browse_frm/thread/8eda3ea812968854 -- Document attribute names are case insensitive everywhere, this makes using -attribute entries more consistent e.g. previously :VERS: had to be refered to -with {vers} ({VERS} did not work). -- Hungarian translation of footer-text (submitted by Miklos Vajna). - See - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72# -- asciidocapi.py 0.1.2: Can now load AsciiDoc script named asciidoc. - See - http://groups.google.com/group/asciidoc/browse_frm/thread/66e7b59d12cd2f91 - Based on patch submitted by Phillip Lord. -- German translation of footer-text (submitted by Simon Ruderich). See - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 -- Pushed HTML footer text into language conf files with the - introduction of a [footer-text] configuration file template section. - See - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 - -.Bug fixes -- *FIXED*: Sometimes multiple double quoted text elements in the same - paragraph were mistakenly seen as starting with an inline literal. - See - http://groups.google.com/group/asciidoc/browse_frm/thread/219c86ae25b79a21 -- *FIXED*: 'localtime' and 'doctime' attributes calculated incorrect - daylight saving / non daylight saving timezones and consequently so - did HTML footers. Patch submitted by Slawomir Testowy. See - http://groups.google.com/group/asciidoc/browse_frm/thread/af652507caf6cec9 -- *FIXED*: Missing selector for 'List of examples' title in DocBook - CSS file. Patch submitted by Laurent Laville. See - http://groups.google.com/group/asciidoc/browse_frm/thread/3f96900f7fbf5620 -- *FIXED*: Broken accents in lang-hu.conf. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 -- *FIXED*: DocBook XSL generated HTML callout lists are properly - aligned. Submitted by Lionel Orry. See - http://groups.google.com/group/asciidoc/browse_frm/thread/2ff802547b6a75ea -- *FIXED*: Filter execution now occurs prior to filter markup template - substitution to ensure image data URI encoding happens after image - generation (see - http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b). -- *FIXED*: The section numbers no longer increment when the 'numbered' - attribute is undefined (see - http://groups.google.com/group/asciidoc/browse_thread/thread/faa36e9e5c7da019/d24cab3fe363e58d). - - -Version 8.5.3 (2010-01-18) --------------------------- -.Additions and changes -- a2x: Added a2x configuration file options ASCIIDOC_OPTS, - DBLATEX_OPTS, FOP_OPTS, XSLTPROC_OPTS (appended to same-named - command-line options). See - http://groups.google.com/group/asciidoc/browse_frm/thread/ac4b9bfa2116db28 -- Dropped `.hgignore` from the repository. See - http://groups.google.com/group/asciidoc/browse_frm/thread/c17abd175778f5ea -- Don't pass verbose options to asciidoc table filter so that - asciidocapi messages are not discarded. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/c17abd175778f5ea -- Added `./tests/data/lang-pt-BR-test.txt` file to the repository. -- xhtml11: Verse block and verse paragraph content enveloped in a - 'pre' tag (instead of a 'div') so it renders better in text-only - browsers. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/1b6b66adb24e710 -- User Guide: Clarified Passthrough Blocks (suggested by Simon - Ruderich). -- FAQ: 'How can I include lines of dashes inside a listing block?' -- FAQ errata and updates (submitted by Simon Ruderich). -- User Guide errata. -- Simplified 'asciidoc-toc' processing instruction and included lists - of figures, tables, examples and equations in books (i.e. revert to - pre-8.5.0 behavior). -- Attempted to have dblatex recognise the 'asciidoc-toc' processing - instruction but couldn't get it to work. -- Added 'notitle' attribute to allow the document title to be hidden. - - -.Bug fixes -- *FIXED*: Regression: system attribute escaping did not work. -- *FIXED*: Website: broken image links in chunked User Guide. - - -Version 8.5.2 (2009-12-07) --------------------------- -.Additions and changes -- Updated example article and book documents with the recommended - explicit section name syntax (see the 'Special section titles - vs. explicit template names' sidebar in the AsciiDoc 'User Guide'). -- Added Italian language configuration file (contributed by Fabio - Inguaggiato). -- Added 'header' table style. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/a23fea28394c8ca9 -- Pass 'icons', 'data-uri', 'imagesdir', 'iconsdir' attributes to - 'asciidoc' table style filter so that images are rendered in table - cells. -- Pass 'trace' and 'verbose' attributes to 'asciidoc' table style - filter so diagnostic information is printed from table cell source. -- The 'eval' system attribute can be nested inside other system - attributes. -- HTML outputs: Table and figure caption punctuation set to more usual - syntax. -- docbook backend: footnotes can now contain embedded images. See - http://groups.google.com/group/asciidoc/browse_frm/thread/50b28f6941de111a -- CSS tweaks so that tables processed by DocBook XSL Stylesheets have - the default asciidoc xhtml11 backend styling. See - http://groups.google.com/group/asciidoc/browse_frm/thread/dfe5204d5b2c9685 -- Block titles take precedence over section titles to avoid titled - delimited blocks being mistaken for two line section titles (see - http://groups.google.com/group/asciidoc/browse_frm/thread/f0b6f9989f828c3). -- Section title trace displays level and title text. -- FAQ additions. -- Added `{zwsp}` (zero width space) attribute. -- Undefined paragraph styles are reported (previously threw a runtime - error). -- Eliminated empty preamble generation. -- Floating titles now processed in all contexts. -- Implemented auto-lettered appendix names and updated example - documents. -- Section numbering can be disabled in HTML outputs with a - ':numbered!:' AttributeEntry. -- xhtml11: Nicer default quote block styling. -- Exclude floating titles from xhtml11 table of contents. Patch - submitted by Mark Burton (see - http://groups.google.com/group/asciidoc/browse_frm/thread/14aefc1cb6bd85f5). -- Enhanced `doc/article-docinfo.xml` example docinfo file. -- Vim syntax highlighter improvements. - -.Bug fixes -- *FIXED*: Absolute 'imagesdir' and 'iconsdir' attribute path names - do not work with the xhtml11 data-uri encoding. See - http://groups.google.com/group/asciidoc/browse_frm/thread/cb8b7694bbc82a6 -- *FIXED*: Regression issue with inline data-uri images. See - http://groups.google.com/group/asciidoc/browse_frm/thread/cb8b7694bbc82a6 -- *FIXED*: An unexpected error occurred when processing a table - containing CSV data if the 'cols' attribute was not explicitly - specified. See - http://groups.google.com/group/asciidoc/browse_frm/thread/4b0f364b477ec165 - - -Version 8.5.1 (2009-10-31) --------------------------- -.Additions and changes -- If an AsciiDoc document file begins with a UTF-8 BOM (byte order - mark) then it is passed transparently through to the output file. - The BOM is stripped from included files. See - http://groups.google.com/group/asciidoc/browse_frm/thread/e5e61823ff4203cd -- Added AsciiDoc 'role' attribute to quoted text. Sets 'class' - attribute in HTML outputs; 'role' attribute in DocBook outputs. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/2aa3e5711d243045 -- Conditional attribute syntax extended: they now accept multiple ORed - or ANDed attribute names. -- The 'xhtml11' backend dynamically processes footnotes using - JavaScript. -- Tidied up and namespaced 'xhtml11' JavaScript. -- Superceded `javascripts/toc.js` with `javascripts/asciidoc-xhtml11.js`. -- Added 'disable-javascript' attribute ('xhtml11' backend). -- Styled HTML footnotes. -- Added links to HTML footnote refs. -- Added title attribute to inline image macros to display popup - ``tooltip'' (HTML outputs only). -- Single-quoted attribute values are substituted in block macros (just - like the AttributeList element). -- For consistency changed underscores to dashes in attribute names. - Public attributes with underscores retained for compatibility. -- Added Brazilian Portuguese language configuration file (contributed - by Thiago Farina). -- Added 'leveloffset' attribute to make it easier to combine - documents. - -.Bug fixes -- *FIXED:* a2x: `--dblatex-opts` is now processed last so - `asciidoc-dblatex.xsl` params can be overridden. Patch submitted by - Mark Fernandes (see - http://groups.google.com/group/asciidoc/browse_frm/thread/5215c99dcc865e7d). -- *FIXED:* An error occurred if a directory in current path with same - name as executable. - -Regression issues -~~~~~~~~~~~~~~~~~ -There's been quite a bit of tiding up to the xhtml11 JavaScript. The -most obvious change is that the toc.js script has been superceded by -asciidoc-xhtml11.js so if you're linking you'll need get a copy of -the new file from the distribution javascripts directory. - -If you use customised xhtml11 configuration file `[header]` and -`[footer]` sections and you want them to use the new footnotes feature -then you've got a bit more work to do: - -. The onload event expression changed. -. The new `<div id="content">...</div>` div envelopes document - content. -. You need to add `<div id="footnotes">...</div>` div to the - `[footnotes]` section for footnotes to work. -. Drop the `ifdef::toc[]` macro that surround JavaScript inclusion. - -Take a look at the [header] and [footer] changes in the xhtml11.conf -diff to see what's going on: -http://hg.sharesource.org/asciidoc/diff/55a5999bfd04/xhtml11.conf - - -Version 8.5.0 (2009-10-04) --------------------------- -.Additions and changes -- Implemented a 'float' attribute for tables and block images (HTML - outputs only). -- Added `unfloat::[]` block macro to cancel floating. -- Added table 'align' attribute to (HTML outputs only). -- The image 'align' attribute now works with HTML backends. -- Renamed table cell 'align' attribute to 'halign' so it doesn't clash - with the new table 'align' attribute. -- Added 'breakable' and 'unbreakable' options to AsciiDoc example and - block image elements. -- `[miscellaneous]` section entries now update properly when set from - a document 'AttributeEntry'. -- `[miscellaneous]` section `pagewidth` entry accepts fractional - values. -- Fractional column widths are now calculated correctly when using - fractional 'pageunits' (DocBook tables). -- Use DocBook XSL table width processing instructions. -- asciidoc 'KeyboardInterrupt' exits with error code 1. -- Added 'set' system attribute to allow attributes to be set from - configuration file templates. -- Allow constrained quotes to be bounded on the left by a colons and - semicolons, see - http://groups.google.com/group/asciidoc/browse_frm/thread/b276a927fdc87995 -- Titled listing and literal blocks (DocBook outputs) no longer default - to examples. See - http://groups.google.com/group/asciidoc/browse_frm/thread/f4df7c9eec01a9bd -- Updated language file table, figure and example captions to - accommodate new auto-numbering in html4 and xhtml11 backends. -- Titled source highlight filter listings generated by docbook backend - are now rendered as examples. See - http://groups.google.com/group/asciidoc/browse_frm/thread/f4df7c9eec01a9bd -- Implemented 'counter' system attribute. -- Use 'counter' system attributes to number titled tables and block - images in HTML backends. -- Added program name suffix to console messages. -- Added substitution to the 'AttributeEntry' passthrough syntax, this - replaces the now unnecessary 'attributeentry-subs' attribute. -- Allow passthrough inline macro syntax to be used in - 'AttributeEntrys'. -- Reinstated 8.4.4 default 'lang' attribute behavior. See - http://groups.google.com/group/asciidoc/browse_frm/thread/d29924043e21cb6a. -- Added 'max-width' attribute to the 'xhtml11' backend to set maximum - display width. See - http://groups.google.com/group/asciidoc/browse_frm/thread/74d9a542b79ccd50. -- Added 'a2x.py', a rewritten and much enhanced version of the old - 'a2x' bash script. -- The new 'a2x' can output EPUB formatted documents. -- Added `--safe` option and deprecated `--unsafe` option. Patch - submitted by Todd Zullinger. See - http://groups.google.com/group/asciidoc/browse_frm/thread/ea3a8ea399ae5d2a - and - http://groups.google.com/group/asciidoc/browse_frm/thread/69b3183fdab7c6a5 -- Added 'CHECK' and 'TEST' todo highlight words to Vim syntax - highlighter. -- Line breaks, page breaks, and horizontal rulers are now processed by - dblatex, thanks to a patch submitted by Mark Fernandes - (http://groups.google.com/group/asciidoc/browse_frm/thread/a254cf949ea7c6c5). -- Allow footnote macros hard up against the preceding word so the - rendered footnote mark can be placed against the noted text without - an intervening space (patch submitted by Stas Bushuev, - http://groups.google.com/group/asciidoc/browse_frm/thread/e1dcb7ee0efc17b5). -- Normalized path in `safe_filename` function (submitted by Todd - Zullinger, - http://groups.google.com/group/asciidoc/browse_frm/thread/69b3183fdab7c6a5). -- The Asciidoc 'numbered' and 'toc' attributes cause DocBook outputs - to include `asciidoc-numbered` and `asciidoc-toc` processing - instructions, these are used by DocBook XSL to include section - numbering and table of contents (like Asciidoc HTML backends). For - backward compatibility both 'numbered' and 'toc' attributes are - defined by default when the 'docbook' backend is used. See - http://groups.google.com/group/asciidoc/browse_frm/thread/1badad21ff9447ac. -- 'data-uri' attribute is now evaluated dynamically and can be set in - document body (previously could only be set from command-line). -- Added 'sys3' and 'eval3' system attributes to passthrough generated - output, this fixes the data-uri inline image problem: - http://groups.google.com/group/asciidoc/browse_frm/thread/a42db6bc54c2c537. -- Missing language file generates a warning instead of an error. -- Updated Spanish language file (updates contributed by Gustavo Andrés - Gómez Farhat). - -.Bug fixes -- *FIXED:* Options in an 'AttributeList' option attribute are merged - with (rather than replace) configuration file options. -- *FIXED:* Comment blocks and comment block macros no longer consume - preceding block titles and attribute lists. -- *FIXED:* `examples/website/layout1.conf` and - `examples/website/layout2.conf` TOC problem. Submitted by Mark - (burtoogle). See - http://groups.google.com/group/asciidoc/browse_frm/thread/b9c63be67dd1d11c -- *FIXED:* Only the first occurrence of passthrough macro was - substituted. Patch submitted by Peter Johnson. See - http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c -- *FIXED:* asciidoc now runs on Jython 2.5.0. -- *FIXED:* Wordpress margins and pads in a number of block - elements - (http://groups.google.com/group/asciidoc/browse_frm/thread/36ff073c79cbc20a). - -Regression issues -~~~~~~~~~~~~~~~~~ -- Tables generated by 'dblatex' occupy 100% of the available space - regardless of the 'width' attribute setting. To restore width - behavior change the 'pageunits' miscellaneous parameter to 'pt'. You - can do this from the command-line with the `-a pageunits=pt` option. - See {website}userguide.html#X89[DocBook table widths]. - - -Version 8.4.5 (2009-05-24) --------------------------- -.Additions and changes -- Added manpage 'Name' and 'Synopsis' section title customization to languages - configuration files. -- Synopsis manpage section no longer mandatory. -- Section markup templates can be specified by setting the title's - first positional attribute or 'template' attribute. -- The article and book document header can now include a revision - remark. -- A 'role' attribute can now be applied to block elements. This adds - the 'role' attribute to DocBook elements. Patch submitted by - http://groups.google.com/group/asciidoc/browse_thread/thread/62278a054188a038[Noah - Slater]). -- Renamed 'revision' and 'date' attributes to more sensible and consistent - 'revnumber' and 'revdate' (old names deprecated but still - recognized). -- Moved backend specific attributes to Appendix H in User Guide. -- Renamed and generalized the docbook backend revision history - inclusion mechanism to 'docinfo' to reflect the use of all article - or book information elements. The old revision history names still - work but have been deprecated. -- Refactored docbook.conf headers. -- Moved line break replacement from `[replacements]` to - `[replacements2]` so the replacement occurs after the mailto macro. - This fixes bug - http://groups.google.com/group/asciidoc/browse_thread/thread/4bdcdfb0af773e2 -- The typewriter to punctuation apostrophe replacement can be escaped - with a backslash. -- Graphviz filter outputs images to 'imagesdir' if it is defined. -- Made the block image macro generic so that it can be used for filter - outputs. As a result Music and Graphviz filters: - * Have been greatly simplified. - * Honor the 'data-uri' attribute. - * 'html4' outputs no longer generate W3C validation warning. -- The 'iconsdir' attribute no longer requires a trailing directory - separator character. -- Removed borders around linked html4 images. -- Added 'html4' specific HTML output for music filter. -- 'a2x': Added `--unsafe` option (shortcut for - `--asciidoc-opts=--unsafe`). -- 'a2x': The FOP executable can now be named `fop` (this is the - default name in some distributions). -- Attributes are now substituted in the system macro attribute list. -- If the output is set to stdout (i.e. no output directory is defined) - then Music and Graphviz filters will output included images to the - source file directory. -- Added 'name' directive to 'testasciidoc'. -- Added lots of 'testasciidoc' new tests. -- Moved language specific configuration parameters into `lang-en.conf` - file. -- 'lang' attribute entry can be specified in the AsciiDoc source file - (preceding the header). -- Removed cruft from A-A-P scripts and documented them. -- Added German language config file (`lang-de.conf`) contributed by - Michael Wild. -- Added French language config file (`lang-fr.conf`) contributed by - Yves-Alexis Perez. -- Added Russian language config file (`lang-ru.conf`) contributed by - Artem Zolochevskiy. -- Added Hungarian language config file (`lang-hu.conf`) contributed by - Miklos Vajna. - -.Bug fixes -- *FIXED:* Multiple manpage names are now handled correctly when - generating DocBook output, each name now generates a separate - DocBook `<refname>` element. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c93bb4db025225d8 -- *FIXED:* A problem that caused AttributeEntries preceding the header - to be overwritten when the language conf file loaded. -- *FIXED:* Possible inline macro name ambiguity e.g. link matches olink. -- *FIXED:* The documented macro definition deletion behavior had been - broken for a long time. -- *FIXED:* Email addresses not recognized when followed by a period - character. -- *FIXED:* Hyphens in mailto macros can delimit nested addresses e.g. - \bloggs@mail was processed inside - \mailto:joe-bloggs@mail-server.com[Mail]. -- *FIXED:* User name in FTP URI generated incorrect FTP link. See - http://groups.google.com/group/asciidoc/browse_thread/thread/1d796a9c9ddb2855 -- *FIXED:* Source highlighter now works with Wordpress backend (see - http://groups.google.com/group/asciidoc/browse_thread/thread/6d8c716748b109e3). - -[[X2]] -Regression issues -~~~~~~~~~~~~~~~~~ -. A colon following the date in the AsciiDoc header is treated as a - revision remark delimiter -- this could be an issue if you have used - a colon in the header date. - - -Version 8.4.4 (2009-04-26) --------------------------- -.Additions and changes -- Added table column and row spanning. -- Table styles can now be applied per cell. -- Vertical cell alignment can be applied to columns and individual - cells. -- Added table 'align' attribute to set horizontal alignment for entire - table. -- Included Geoff Eddy's update of the experimental LaTeX backend. -- A new attribute named 'trace' controls the output of diagnostic - information. If the 'trace' attribute is defined then - element-by-element diagnostic messages detailing output markup - generation are printed to stderr. -- Added 'literal' paragraph style (allows 'literal' style to be - applied to normal paragraphs). -- Deleted unused `replacements2` from `xhtml11.conf`. -- Added `replacements2` to default substitutions. -- 'testasciidoc.py': messages to 'stdout', only diffs to 'stderr'. -- Added transparency to `smallnew.png` image. - -.Bug fixes -- All combinations of leading comments and attribute entries at the - start of a document are now skipped correctly. -- *FIXED:* `./configure` doesn't support `--docdir` as expected (patch - submitted by Artem Zolochevskiy) -- *FIXED:* Constrained quotes were incorrectly matched across line - boundaries e.g. the string `+\nabc+` incorrectly matched a monospace - quote. - - -Version 8.4.3 (2009-04-13) --------------------------- -.Additions and changes -- DocBook outputs default to DocBook version 4.5 doctype (previously - 4.2). -- Configuration file `[specialsections]` definitions can be undefined - by setting their configuration entry values blank. -- The Makefile 'install' target depends on the 'all' target to ensure - pre-install patches are applied. -- 'testasciidoc.py' now emits user friendly messages if: - . the configuration file is missing. - . an illegal backend is specified. - . an illegal test number is specified. - -.Bug fixes -- Fixed - http://groups.google.com/group/asciidoc/browse_thread/thread/fd27add515597c06[missing - template section] error. -- The 'testasciidoc.py' `--force` option no longer deletes test data - files that were not specified. -- Dropped second quotes substitution in table cells -- it had - effectively disabled quote escaping in table cells. - - -Version 8.4.2 (2009-03-19) --------------------------- -.Additions and changes -- Added {website}testasciidoc.html[testasciidoc], a tool to verify - AsciiDoc conformance. -- A warning is issued if nested inline passthroughs are encountered. -- 'asciidocapi': setting an attribute value to `None` will undefine - (delete) the attribute (this in addition to the `name!` attribute - name format that the `asciidoc(1)` command uses). - -.Bug fixes - - -Version 8.4.1 (2009-03-10) --------------------------- -.Additions and changes -- AsciiDoc now has a {website}asciidocapi.html[Python API]. The - following minimal example compiles `mydoc.txt` to `mydoc.html`: -+ -[source,python] -------------------------------------------------------------------------------- -from asciidocapi import AsciiDocAPI asciidoc = AsciiDocAPI() -asciidoc.execute('mydoc.txt') -------------------------------------------------------------------------------- - -- Backtick quoting for monospaced text is now implemented as an - 'inline literal' passthrough. This makes more sense since monospace - text is usually intended to be rendered literally. See - <<X2,Regression issues>> below for the impact this may have on - existing documents. Here are some examples that would previously - have had to be escaped: - - The `++i` and `++j` auto-increments. - Paths `~/.vim` and `~/docs`. - The `__init__` method. - The `{id}` attribute. - -- Added `--doctest` option to `asciidoc(1)` command. -- Added an optional second argument to 'BlockId' element, this sets - the `{reftext}` attribute which in turn is used to set the `xreflabel` - attribute in DocBook elements. -- Added lists to `--help` syntax summary. -- `{infile}` and `{indir}` attributes reflect the current input file - (previously always referred to the root document). -- `{docfile}` (new) and `{docdir}` (previously deprecated) attributes - refer to the root document specified on the `asciidoc(1)` - command-line. -- Vim syntax highlighter improvements. -- Syntax summary command (`asciidoc -h syntax`) additions. -- Admonition icons now have transparent backgrounds. -- Changed yellow W3C badges to blue ones in page footers. - -.Bug fixes -- Dropped `asciidoc(1)` broken undocumented `--profile` option. -- Em dash replacement now recognized at start of block. - -Regression issues -~~~~~~~~~~~~~~~~~ -Replacing backtick quoting with the 'inline literal' passthrough -raises two regression scenarios for existing documents: - -1. You have escaped the expansion of enclosed inline elements, for - example: `\{id}`. You would need to delete the backslashes: `{id}` - (if you don't the backslashes will be printed). Mostly it's just a - case of interactively finding and replacing of all occurrences of - `\. - -2. There are enclosed inline elements, for example: `some *bold* - monospaced`. You would need to switch to plus character monospace - quoting: `+some *bold* monospaced+` (if you don't the enclosed - elements won't be expanded). - -If your existing documents include these cases and you don't want to -upgrade then use the `-a no-inline-literal` command-line option, -alternatively put this in `~/.asciidoc/asciidoc.conf`: - - [attributes] - no-inline-literal= - - -Version 8.3.5 (2009-02-02) --------------------------- -.Additions and changes -- Cached compiled regular expression delimiters (speed up 'User - Manual' compilation by 250%). -- Created distinct list definitions for each numbered list style to - allow nesting of all styles. -- Roman numbers in numbered lists are followed by a closing - parenthesis instead of a period to eliminate 'i', 'v', 'x' item - ambiguity with respect to alpha numbered list items. -- Added `**`, `***`, `****`, `*****` - bulleted lists. -- Added `...`, `....`, `.....` implicit numbered - lists. -- Added `:::`, `::::` labeled lists. -- Updated User Guide for new list syntaxes. -- Optimized paragraph and list termination detection with separate - precompiled regular expressions for performance and to prevent - reaching Python 100 named group limit. -- Updated Vim syntax highlighter for new list syntaxes. -- Allow `template::[]` macros in conf file entries sections (not just - in template sections). -- Dropped unused `[listdef-numbered2]` conf file sections. -- Renamed 'ListBlock' to more appropriate 'OpenBlock'. -- Implemented single-line versions of `ifdef::[]` and `ifndef::[]` - macros. -- 'html4' backend styling: - * Underlined admonition captions. - * Added side border to Example Blocks. -- 'xhtml11' backend styling: - * Dropped right hand margin from all but quote and verse blocks. - * html4 backend: corrected over-sized width of caption in admonition - block. - -.Bug fixes -- Fixed broken numbered list nesting. - -Compatibility issues -~~~~~~~~~~~~~~~~~~~~ -The roman numbered list parenthesis syntax is incompatible with the -potentially ambiguous roman period syntax introduced in 8.3.2. - - -Version 8.3.4 (2009-01-20) --------------------------- -.Additions and changes -- Implemented a title 'float' style. A floating title (or bridgehead) - is rendered just like a normal section but is not formally - associated with a text body and is not part of the regular section - hierarchy so the normal ordering rules do not apply. -- Implemented inline comment macro so comment lines can now appear - inside block elements. -- Comment lines are sent to the output if the 'showcomments' attribute - is defined (comment blocks are never sent to the output). -- Single quoting attribute values in 'AttributeList' elements causes - them to be substituted like normal inline text (without single - quoting only attribute substitution is performed). -- Rewrote list item processing (was very crufty). List continuation - and list blocks now work as expected. Updated and clarified list - documentation in User Guide. -- The 'revision' attribute now recognizes the RCS $Id$ marker format. -- An RCS $Id$ marker formatted revision line in the header does not - need to be preceded by an author line. -- If an RCS $Id$ formatted revision is specified and the author name - has not already been set then the author name in the $Id$ marker - will be used. -- Updated Gouichi Iisaka's Graphviz filter to version 1.1.3. -- Added 'autowidth' table attribute option for (X)HTML outputs. -- DocBook backend now puts 'orgname' optional attribute in DocBook - header. -- Deprecated undocumented 'companyname' attribute in favor of - DocBook's 'corpname'. -- Removed explicit closing backslash from HTML4 self-closing tags to - comply with WC3 recommendation. - -.Bug fixes -- Fixed 8.3.3 regression whereby adjacent lists with the same syntax - but different list styles were incorrectly treated as a single list. - - -Version 8.3.3 (2009-01-02) --------------------------- -This release supersedes 8.3.2. - -.Bug fixes -- The broken and confusing numeration and numeration2 numbered list - attributes have been dropped, use the style attribute instead. - - -Version 8.3.2 (2009-01-01) --------------------------- -.Additions and changes -- Added Gouichi Iisaka's Graphviz filter to distribution. -- The 'SidebarBlock' element can now be rendered with an 'abstract' - style. -- Reorganized filters into a separate subdirectory for each filter. -- Updated `Makefile.in` and `MANIFEST` files to reflect new filters - organization. -- Added 'listing' style to 'LiteralBlock' element so listings with - nested listing blocks can be rendered as a listing block. -- Changed example 'code' filter to use preferred 'ListingBlock' syntax - (the old `~` delimited filter syntax is no longer used). -- Implemented 'enumeration' and 'enumeration2' numbered list - attributes for specifying the list numbering style ('arabic', - 'loweralpha', 'upperalpha', 'lowerroman' and 'upperroman'). -- AsciiDoc now recognizes 'upperalpha', 'lowerroman' and 'upperroman' - numbers in `listdef-numbered2` numbered lists and sets the number - style based on the style of the first numbered list item - (alternative to setting 'enumeration2' attribute). -- Updated `formatlistpat` definition in `.vimrc` example in User - Guide. -- You can now backslash escape system block macros. -- Added 'Pychart' FAQ. -- Drop paragraph 'text' and list 'text', 'index' and 'label' match - groups from attributes -- they are included in the element's text - and we don't want them processed a second time as attributes. -- Changed comment line block macro to a passthrough block macro to - ensure no substitutions. -- A 'subslist' no longer has to be appended to a 'PassthroughBlock' - macro definition, if omitted no substitutions are performed. -- Code tidy up: replaced deprecated `<>` operator with `!=`. -- Removed unused linuxdoc code. -- Code tidy ups: dropped old types module reference; replaced - `has_key()` with preferred `in` operator. - -.Bug fixes -- Old syntax source highlight filter regression: special characters - where not escaped in DocBook outputs. - - -Version 8.3.1 (2008-12-14) --------------------------- -.Additions and changes -- Replaced the `install.sh` script with Ben Walton's updated autoconf - scripts -- see {website}INSTALL.html[INSTALL] for details. -- Added a generalized 'AttributeEntry' syntax to allow arbitrary - configuration file entries to be set from within an AsciiDoc - document (suggested by Henrik Maier). -- Listing delimited blocks in DocBook outputs now support IDs; IDs of - titled Listing and Literal delimited blocks have been moved to the - enclosing DocBook example tag (thanks to Vijay Kumar for this - patch). -- Replaced vertical typewriter apostrophe with punctuation apostrophe - (thanks to Noah Slater). - -.Bug fixes -- Regression: Excluding double-quotes from unquoted attribute values - resulted in backward incompatibility, double-quotes in unquoted - attribute values has been reinstated. -- Regression: Text like `&...;` was sometimes mistaken for an entity - reference -- tightened up entity reference matching. - - -Version 8.3.0 (2008-11-29) --------------------------- -.Additions and changes -- {website}newtables.html[AsciiDoc new tables] is a complete redesign - of the tables syntax and generation. The new syntax and features are - a huge improvement over the old tables. The old tables syntax has - been deprecated but is currently still processed. -- {website}newlists.html[Lists can now be styled] like other block - elements. This allows a single list syntax for 'glossary', 'qanda' - (Question and Answer) and 'bibliography' lists instead of having to - remember a different syntax for each type. -- Inline passthroughs macros have been improved and block passthrough - macros added. Attribute substitution can be optionally specified - when the macro is called. -- The passthrough block has a fully transparent passthrough delimited - block block style called 'pass'. -- The 'asciimath' and 'latexmath' - {website}userguide.html#X77[passthrough macros] along with - 'asciimath' and 'latexmath' {website}userguide.html#X76[passthrough - blocks] provide a (backend dependent) mechanism for rendering - mathematical formulas. There are {website}latexmath.pdf[LaTeX Math], - {website}asciimathml.html[AsciiMathML] and - {website}latexmathml.html[LaTeXMathML] examples on the AsciiDoc - website. -- Reimplemented and cleaned up filter processing based on a patch - submitted by Kelly Anderson. Uses the newer subprocess module - instead of the deprecated popen2 module. Now works in Win32 command - shell. -- Addition FAQs, more documentation updates. -- Arbitrary HTML/XML entities can be entered in AsciiDoc source. -- Did away with the need for the `shaded-literallayout.patch` (thanks - to Henrik Maier for this patch). -- Implemented 'page break' block macro. -- Added 'line breaks' and 'ruler' processing instructions to DocBook - outputs (thanks to Henrik Maier for this patch). -- Added 'deg' (degree) and 'wj' (word joiner) entity attributes - (thanks to Henrik Maier). -- Tweaked DocBook 'indexterm2' macro to avoid white space preceding - the term when used in table cells (thanks to Henrik Maier for this - patch). -- Title elements now process the 'options' attribute like other block - elements. -- Added `single quoted' element. -- Spaces on both sides of a -- em-dash are translated to thin space - characters. -- Improved detection and reporting of malformed attribute lists. -- The list 'compact' style is now a list option. -- Added 'strong' labeled list option which makes the labels bold (HTML - outputs only). -- Dropped unsupported 'linuxdoc' backend. -- Dropped deprecated 'xhtml-deprecated' (version 6) backend. -- Added 'breakable' and 'unbreakable' attribute options to tables to - control table breaking across page boundaries (DocBook XSL/FO - outputs). By and in collaboration with Henrik Maier. -- Added 'pgwide' attribute option to tables to table, block image, - horizontal labeled lists. Specifies that the element should be - rendered across the full text width of the page irrespective of the - current indentation (DocBook XSL/FO outputs). Thanks to Henrik Maier - for this patch. -- Vim syntax highlighter: spaces before/after bullets no longer - highlighted (which is ugly if using a theme that highlights with - underlines). Thanks to Donald Chai for this patch. -- Added `a2x(1)` `--fop` option. -- Added `a2x(1)` `--no-xmllint` option. -- Highlighted labelled list terms with the navy color in XHTML - outputs. -- Use `w3m(1)` as default `a2x(1)` text format generator (fallback to - `lynx(1)`). -- Changed callout formats in html4 and xhtml11 outputs to angle - brackets to match source highlighter rendering. -- Macros now inject user defined `<optionname>-option` attributes into - markup. -- Added IRC URLs to AsciiDoc inline macros. -- Added `depth` attribute to `include::[]` system macro. -- Added 'footnoteref' inline macro. -- Added 'stylesheet' XHTML attribute to specify additional custom CSS - stylesheet. -- If a paragraph style is specified it will be added to the XHTML - 'class' attribute and DocBook 'role' attribute. -- Replacements can be set in a document using the reserved - AttributeEntry name 'replacement'. -- The prefix for auto-generated section name IDs can be set with the - 'idprefix' attribute. - -.Bug fixes -- Escaped quote skipped over leading and trailing quote instead of - just the leading quote. -- Fixed bug that was causing false negative safe mode warnings (patch - submitted by Julien Palmas). -- Placed priority of AttributeEntry, AttributeList and BlockTitle - above Title. This ensures an AttributeEntry, AttributeList or - BlockTitle followed by a same length leading ListingBlock delimiter - is not mistaken for a two-line title. -- Vim syntax highlighter: fixed multi-line quoted text. -- Contstrained quote termination after non-space character enforced. -- Vim syntax highlighter: unterminated quoted text is no longer - highlighted. -- Vim syntax highlighter: passthroughs now exactly match AsciiDoc - semantics. -- Vim syntax highlighter: escaped quoted text, attribute references - and inline macros are not highlighted. -- Vim syntax highlighter: TODO's highlighted in CommentBlocks (thanks - to Scott Wall); non-greedy pass:[$$...$$]. -- Vim syntax highlighter: Comment lines mistaken for vertical list - labels (thanks to Scott Wall). -- Vim syntax highlighter: Single unmatched $$ mistakenly highlighted - remaining text (patch contributed by Scott Wall). -- Callouts now work in source highlighted listing generated by - dblatex. -- Fixed exception that occured if undefined attribute was present in - filter command. -- AttributeList block can now follow a paragraph without intervening - blank line. -- The include macro tabsize attribute is no longer propagated to - nested includes. - -.Omissions -The following features were implemented but then but removed from this -release: - -- 'pi', 'cdata' and 'comment' passthrough macros and passthrough block - styles (creeping featurism, use 'pass' macros instead). -- Generic 'tag' inline macro (creeping featurism, use 'pass' macros - instead). - - -[[X1]] -Compatibility issues -~~~~~~~~~~~~~~~~~~~~ -Version 8.3.0 has a number of backward incompatibilities with respect -to the previous 8.2.7 release: - -- The old table syntax is still processed but a 'DEPRECATED' warning - is issued. -- Entity references have to be escaped with a backslash. -- You have to explicitly precede horizontal style labeled lists with - the `[horizontal]` style attribute -- by default all labeled lists - are rendered vertically. -- The list 'compact' style has been dropped and is now a list option - (use `options="compact"` in attribute lists). -- AsciiDoc version 6 sytnax no longer supported. -- Linuxdoc been removed from the distribution. -- The unsupported experimental 'latex' backend has not been tested on - this release. -- The introduction of single-quote quoting requires that double-quote - quoting is escaped with two backslashes. - - -Version 8.2.7 (2008-07-04) --------------------------- -.Additions and changes -- Added `dvi`, `ps` and `tex` output format options to a2x(1). -- Added `--dblatex` option to a2x(1) so `dblatex(1)` can be used to - generate PDFs. -- Added custom `dblatex(1)` configuration files (in distribution - `./dblatex` directory) that are used by a2x(1). -- `dblatex(1)` is now used to generate the distributed PDF version of - the AsciiDoc User Guide. -- If you don't need a customized the link caption you can enter the - 'http', 'https', 'ftp', 'file' URLs and email addresses without any - special macro syntax -- you get the links by just cutting and - pasting URLs and emails addresses. This also makes it easier to open - links directly form AsciiDoc source ( most editors allow you to open - URLs directly). The Vim syntax highlighter has been updated to - reflect these changes. -- Highlighted source code paragraphs have been implemented -- it's a - much more convenient way to enter short code examples (see - http://asciidoc.org/source-highlight-filter.html[the - online docs]). -- The source highlighter and music filter syntax has changed -- they - now used the ListingBlock syntax customized with 'source' and - 'music' style attribute values. This follows the Paragraph styling - convention introduced by the source paragraph (previous item) and is - easier to read. The old syntax still works but has been deprecated. -- QuoteBlocks now have a 'verse' style -- you no longer have to nest a - 'verse' LiteralBlock inside a QuoteBlock for verses. The 'verse' - style on the LiteralBlock has been deprecated (still works though) - and the 'style' attribute is positional attribute 1, pushing - 'attribution' and 'citetitle' attributes to the right (you'll need - to insert a 'quote' attribute into your existing QuoteBlocks). -- It is no up to the DocBook processor to highlight source code syntax - in `<programlisting>` elements rather than GNU Highlighter -- this - is the correct way to handle it, plus `dblatex(1)` makes a much - better job. -- 'scaledwidth' and 'align' attributes have been added to the 'image' - macro. They apply to DocBook outputs (specifically for PDF - documents). 'scaledwidth' sets the image size as a percent of the - available page width; 'align' applies 'left', 'center' or 'right' - horizontal image justification. -- Added a2x(1) `--fop-opts=FOP_OPTS` option (patch submitted by Miklos - Vajna). -- Added a2x(1) `--dblatex-opts=DBLATEX_OPTS` option. -- Added Mikhail Yakshin's FOP 0.95 patch which fixes a long-standing - `fo.xsl` problem and allows PDF's to be generated with FOP 0.95 - (previously had to use FOP 0.20.5). -- The User Guide has been updated and outdated FOP configuration and - installation sections removed. - -.Bug fixes -- Fixed `stylesheets/xhtml11-manpage.css` not being included when - 'linkcss' attribute was used. -- Configuration file `*-style` attributes are now dumped correctly. -- Fixed 'FAILED: malformed section entry' LaTeX backend error. - -See the also the https://sharesource.org/hg/asciidoc/[AsciiDoc -repository changelog]. - - -Version 8.2.6 (2008-04-29) --------------------------- -.Additions and changes -- Enhancements to the Vim AsciiDoc syntax highlighter, for example, - quoted text is now highlighted in titles and macro captions. -- If you define the `data-uri` intrinsic attribute images referenced - by 'image' macros will be embedded in XHTML using the - http://en.wikipedia.org/wiki/Data:_URI_scheme[data: URI scheme]. - *NOTE*: Microsoft browser support for the 'data: URI scheme' is - currently limited to MSIE 8 beta 1. -- Added `toc-title` attribute to allow custom table of contents - titles. -- Added references to Alex Efros's AsciiDoc Cheatsheet to AsciiDoc - website. -- `asciidoc(1)` and `a2x(1)` man pages formatted to conform to - `man-pages(7)` recommendations. -- Old code-filter syntax (pre-8.1.0) is no longer recognized so that - malformed two-line level 2 titles are no longer confused with - 'code-filter' block delimiters. -- Added -> <- => <= arrow replacements from the Arrows block of - Unicode. -- Added DocBook refentry lang attribute -- patch contributed by - VMiklos. -- AttributeEntry names can now be numeric (``named macro targets''). -- Hide Table of Contents title if Table of Contents empty -- patch - contributed by Alex Efros. -- Various XHTML CSS tweaks. -- Code cleanup: - * Replaced `realpath()` with Python 2.2 `os.path.realpath()` library - function. - * Replaced old string library functions with string methods. - * Use file generators instead of `readlines()`. - * Renamed entities that shadowed builtins. - * Standardized string quoting. - * Dropped `readlines()` function. - -.Bug fixes -- Fixed broken CSS for decimal ordered lists nested in alpha ordered - list, thanks to Alex Efros. -- A missing closing block delimiter now reports the opening delimiter - line number instead of the end of file line number. -- Fixed an error generated by the asciidoc `-e` option when there are - no block definitions -- patch contributed by Alejandro Mery. -- Handle both `\r\n` (as well as `\n`) line separators that may be - returned by `{sys}` attribute evaluation. -- Numbered attribute names no longer interfere with positional - attribute list values. - - -Version 8.2.5 (2007-11-18) --------------------------- -.Additions and changes - -.Bug fixes -- Fixed exception thrown by illegal command-line arguments. -- Rolled back the 'with' warning bug fix introduced in 8.2.4 -- it was - incompatible with Python <2.5. - - -Version 8.2.4 (2007-11-10) --------------------------- -.Additions and changes -- You can now use the `lang` attribute to set the DocBook language - attribute. -- Attribute values can now contain attribute references. -- If the `lang` attribute is defined then configuration files named - like `lang-<lang>.conf` will be loaded automatically. -- The help file name `help-<lang>.conf` is based on the AsciiDoc - `lang` attribute, defaults to `help.conf` (English). -- Admonition, figure and table captions have been factored into a - predefined set of `caption_*` attributes. They only apply to - directly generated (X)HTML outputs (DocBook stylesheets generate - their own language specific captions based on the `lang` attribute). -- Dropped platform dependent `doc/asciidoc.chm` file from - distribution documentation formats. - -.Bug fixes -- The spurious warning 'with will become a reserved keyword - in Python 2.6' has been suppressed. - - -Version 8.2.3 (2007-09-12) --------------------------- -.Additions and changes -- Added VMiklos's 'permalink' patch for auto-generated section IDs - (enabled by default by the `sectids` attribute). -- Added http://asciidoc.org/faq.html[FAQ] to website. -- Changed format of \{localdate} attribute to ISO 8601 (`%Y-%m-%d`). -- Added `abc2ly --beams=None` option to make `music2png.py` conform to - ABC's notion of beams. -- XHTML level 2 section headings are now styled with an underlining - border. -- XHTML links to AsciiDoc title elements are now implemented with - title ID attributes (previously separate `<a>` element targets were - generated. -- Multi-word first, middle and last names can be entered in the header - author line using the underscore as a word separator. -- The nested inline macros restriction has now been lifted, for - example you can now include links and inline images inside - footnotes. -- Help topic names can be shortened (so long as they are not - ambiguous). For example `asciidoc -hm` will print the AsciiDoc man - page. -- Added `{two_colons}` and `{two_semicolons}` attributes for - escaping labeled list ambiguity. -- If quirks mode is disabled the XHTML Mime Type is set to the - recommended `application/xhtml+xml` (rather than `text/html`). - -.Bug fixes -- Author information is now correctly set when using attribute entries - in the header instead of an author line (previously the 'author' - attribute was not being calculated correctly and there were - attribute substitution problems). - - -Version 8.2.2 (2007-07-22) --------------------------- -.Additions and changes -- http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML] - capability has been added for users who are more familiar with or - prefer LaTeX math formulas to the - http://asciidoc.org/asciimathml.html[ASCIIMathML] - notation (thanks to Arthur Sakellariou for the patch). -- The 'source highlight' and 'code' filters now process embedded - callouts. -- Added an `--attribute=ATTRIBUTE` option to `a2x(1)` for passing - attribute values to asciidoc(1) (a shortcut for `--asciidoc-opts="-a - ATTRIBUTE"`). -- Image block and inline macros prepend optional `{imagesdir}` - attribute to image link targets. - - -.Bug fixes -- Fixed an assertion error that occurred when a configuration file - containing an `include::[]` macro was loaded using the - `--conf-file` option and the configuration file name did not - include an explicit directory path -- patch submitted by Dmitry - Potapov. -- Asciidoc titles are only converted to lower case if all characters - are upper case otherwise case is left unchanged -- patch submitted - by Dmitry Potapov. -- Added a missing check that input is not stdin before loading - configuration files from the document directory -- patch submitted - by Dmitry Potapov. -- Attribute list items must evaluate to strings, numbers or None - (previously it was possible to evaluate to other object types which - resulted in surprising attribute values). -- If an AsciiDoc document has no title an empty XHTML 1.1 'title' - element is created -- previously the 'title' element was dropped - which resulted in invalid XHTML 1.1. -- The Vim syntax file no longer highlights escaped callouts. -- The Vim syntax highlighter now correctly highlights Double-dollar - passthroughs when they enclose dollar delimited ASCIIMathML and - LaTeXMathML formulas. - - -Version 8.2.1 (2007-04-06) --------------------------- -.Additions and changes -- A number of improvements have been made to the Vim syntax - highlighter, for example the word C++ is no longer mistaken for the - start of an unconstrained monospace quote. -- Labeled list definitions have been tightened -- a list label can no - longer containing trailing spaces. The following example is no - longer recognized as a valid list label: - - Lorum ipsum :: -+ -This change implements the originally intended behavior (as per the -AsciiDoc documentation and examples) so there should be very few -compatibility issues. - -.Bug fixes - - -Version 8.2.0 (2007-04-04) --------------------------- -.Additions and changes -- A Vim syntax file is now included in the AsciiDoc distribution - (inspired by Felix Obenhuber's `asciidoc.vim` script). You can find - it (along with a Vim filetype detection script in the distribution - `./vim/` directory (the scripts are installed automatically by the - AsciiDoc installer `./install.sh`). See 'Appendix J' of the - 'AsciiDoc User Guide' for details. -- Added 'toclevel' attribute (1..4) which sets the number of title - levels reported in the table of contents. Defaults to 2 and must be - used with the 'toc' attribute. Example usage: - - $ asciidoc -a toc -a toclevels=3 doc/asciidoc.txt - -- Added a `listindex` attribute which is the current list item index - (1..). If this attribute appears outside a list its value is the - number of items in the most recently closed list. -- The single line titles syntax now accepts trailing suffixes -- this - syntax matches the title line syntax of a number of popular Wiki - markups. -- If a QuoteBlock has no attribution or citetitle then the DocBook - `<attribution>` element is not generated (previously generated empty - `<attribution>` element). -- If the text of a labeled list item is blank then no `texttag` is - written. -- An end of line backslash performs line continuation for horizontal - labeled list items. -- The Revision line now accommodates Subversion `$Id` markers (in - addition to CVS and RCS markers). Thanks to Tiago Sturmer Daitx for - this patch. -- Implemented `a2x(1)` option `--skip-asciidoc` which allows `a2x(1)` - to convert DocBook XML files not derived from AsciiDoc sources. -- If `a2x(1) --doctype` option is not specified it defaults to - `manpage` if `--format=manpage` else defaults to `article` - (previously `--doctype` always defaulted to `article`). -- Added an 'External Resources' section to the - http://asciidoc.org/index.html[AsciiDoc home page]. - -.Bug fixes - - -Version 8.1.0 (2006-10-22) --------------------------- -.Additions and changes -- AsciiDoc generated XHTML documents now display a table of contents - if the 'toc' attribute is defined (JavaScript needs to be enabled - for this to work). Thanks to Troy Hanson who contributed this - feature based on a JavaScript by Mihai Bazon. I've simplified things - somewhat to match Docbook XSL Stylesheets style, see Troy's - http://tpl.sourceforge.net/userguide.html[tpl User Guide] for a - fancier layout. Use the `-a toc -a numbered` command-line options to - produce a number table of contents. -- A http://asciidoc.org/music-filter.html[music filter] - is included in the distribution `./filters/` directory. It - translates music in http://lilypond.org/[LilyPond] or - http://abcnotation.org.uk/[ABC] notation to standard classical - notation in the form of a trimmed PNG image which is inserted into - the AsciiDoc output document. -- Incorporated Paul Melis's Win32 filter patch. This workaround - allows AsciiDoc to run filters under Windows. -- Added `uninstall.sh` script. -- Rather than proliferate a confusing number of filter block - delimiters the following convention has been adopted: delimiters - belonging to DelimitedBlock filters distributed with AsciiDoc will - consist of a word (normally a noun identifying the block content) - followed by four or more tilde characters. This has necessitated - changing existing filter delimiters (the old delimiters still work - but may be deprecated in future versions): - - * The example code filter block delimiter is now the word `code` - followed by four or more tilde characters. - * The source highlight filter block delimiter is now the word - `source` followed by four or more tilde characters. - -- Conditionally redefined subscript and superscripting so they use the - old replacements mechanism when asciidoc7compatible is defined - rather than the asciidoc 8 default unconstrained quoting (patch for - affected files attached). -- Moved the source highlight filter from `./examples/` to `./filter/`. -- Added `{verbose}` intrinsic attribute (useful for passing verbose - flag to filters). -- Added `{outdir}` intrinsic attribute. -- Renamed `{docdir}` intrinsic attribute to unambiguous `{indir}` - (`{docdir}` still works but may be removed in future release). -- If `asciidoc(1)` outputs to stdout then intrinsic attribute - `{docname}` is extracted from the input file name. - - -Version 8.0.0 (2006-08-27) --------------------------- -********************************************************************* -This is a major release because changes to quoting and index entry -handling may break existing documents (see 'Additions and changes' -below and 'Appendix A: Migration Notes' in the AsciiDoc User Guide). - -Please report any problems you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -********************************************************************* - -.Additions and changes -- Quoting can can occur within words (based on patch submitted by - Benjamin Klum). See the 'Unconstrained Quotes' sub-section in the - User Guide. - -- The underline and plus characters can be used as alternatives to the - existing apostrophe and backtick quote characters. They are arguably - better choices than the apostrophe and backtick as they are not - confused with punctuation. - -- The syntax for index entry macros have have been deprecated from - `+...+` and `++...++` to `((...))` and `(((...)))` respectively. - Rationale: - * Bracketing is consistent other with `[[...]]` and `<<...>>` - reference macros. - * To easily confused with triple plus passthroughs. - * To make way for the new monospace quoting. - -- Superscripts and subscripts are implemented as constrained quotes so - they can now be escaped with a leading backslash and prefixed with - with an attribute list. - -- An experimental LaTeX backend has been written by Benjamin Klum (a - number additions in this release are to accommodate the LaTeX - backend). -- `include` macro file names now expand environment variables and - tilde expansions. -- A configuration file `[quotes]` entry can be undefined by setting to - a blank value. -- Added `callto` inline macro for Skype 'callto' links. -- Added `colnumber` attribute for table data markup. -- A leading comment block or comment lines are now skipped (previously - a document had to start with either attribute entries or a document - Title). -- Experimental `rows` attribute (number of source lines in table) - available in table markup templates (used by experimental LaTeX - backend). -- Included install shell script written by mailto:jlm@ofb.net[Jacob - Mandelson] for installing the tarball distribution. -- Added INSTALL documentation file. -- Added 'replacements2' substitution options -- a second replacements - section. -- Added the ability to redefine 'normal' and 'verbatim' substitutions - with `subsnormal` and `subsverbatim` entries in configuration file - `[miscellaneous]` section. -- By default `AttributeEntry` values are substituted for - `specialcharacters` and `attributes`, if you want a different - AttributeEntry substitution set the `attributeentry-subs` attribute. -- The `name` in `name=value` configuration file entries can now end - with a backslash, just escape the trailing backslash with a - backslash. For example: - - abc\\=xyz -+ -Results in `name=abc\` and `value=xyz` -- previously this would have -escaped the `=` character. - -- A blank configuration file section deletes any preceding section - with the same name (applies to non-markup template sections). -- A command-line attribute value with a `@` suffix does not override - existing document and configuration file attributes (normally - command-line attributes have precedence over document and - configuration file attributes). -- `localtime` attribute is now encoded from the native system encoding - to the output encoding. Patch submitted by - mailto:m_pupil@yahoo.com.cn[FKtPp] -- here's his description of the - problem: -+ -``I am a Chinese user of AsciiDoc and I find that when I use UTF-8 -(the default encoding) to write asciidoc documents in Windows platform -the resulting html footer line will get screwed. It was caused by a -localized tzname that was always encoded in the windows native -encoding, which in my case is 'cp936'.'' - -- a2x(1) can generate Open Document Text files using - http://open.comsultia.com/docbook2odf/[docbook2odf]. Currently - `docbook2odf(1)` only processes a subset of DocBook, unimplemented - elements are skipped. -- The a2x(1) format option defaults to `xhtml` (previously a format - had to be specified explicitly). -- The `-d, \--doctype=DOCTYPE` option has been added to a2x(1) which - is a shortcut for `--asciidoc-options="--doctype=DOCTYPE"`. -- Replaced a2x(1) `--no-icons` and `--no-copy` options with their - negated equivalents: `--icons` and `--copy` respectively. The - default behavior has also changed: copying and use of icons is - disabled by default. Rationale: - * To make the default behavior more consistent since use of icons - and CSS stylesheets does not apply to all formats. - * To make the default behavior less surprising (the creation of icon - and stylesheet output files must now be explicit). - -- a2x(1) has been bumped from version 0.1.1 to version 1.0.0. - - -.Bug fixes -- Removed duplicate `./doc/a2x.1.txt` from distribution tarball. -- Documentation errata. -- Attribute replacement is no longer performed twice in Titles and - AttributeEntrys. -- a2x(1) skipped asciidoc(1) execution when rerun with different - `--asciidoc-options` options, it now always executes asciidoc(1). - The problem was that previously asciidoc(1) was executed only if the - output file was missing or older than the source file. - - -Version 7.1.2 (2006-03-07) --------------------------- -.Additions and changes -- Support for - http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] - has been added. See 'Appendix I: ASCIIMathML Support' in the User - Guide and the examples at - http://asciidoc.org/asciimath.html. -- You can now prefix quoted text with inline attributes lists. You - can use this to set font size and color (XHTML and HTML outputs). -- Added `##...##` quoting -- it does nothing -- it's purpose is to - allow inline attributes to be applied to normal text. -- An 'inline passthrough' mechanism has been implemented. -- Configuration file comment lines can be escaped with a backslash -- - this is to allows the inclusion of configuration lines that start - with a hash character. -- The `scriptsdir` attribute can be used to specify the name of the - directory containing linked JavaScripts (see the - link:userguide.html#X33[User Guide] for details. -- The BackendBlock has been renamed PassthroughBlock for consistency - with the new inline passthrough naming. -- `a2x(1)` now works with the older `bash(1)` version 2.05b. Patch - submitted by mailto:francis@daoine.org[Francis Daly]. -- Content included by the `include1::[]` system macro is no longer - subject to attribute substitution so that ambiguities no longer - arise when used to include CSS or JavaScript files. - - -Version 7.1.1 (2006-02-24) --------------------------- -.Additions and changes -- The `caption` attribute can be used to customize admonition captions - as well as image, table and example block element title prefixes - (`xhtml11` and `html4` backends). -- You can now override the default icon image using the `icon` - attribute to specify the path of the linked image (xhtml11 and html4 - backends only). -- The deprecated `imagesdir` attribute is no longer recognized (use - `iconsdir` instead). -- Added 'Appendix H: Using AsciiDoc with non-English Languages' to the - AsciiDoc User Guide. -- Added 'Admonition Icons and Captions' subsection to the User Guide - explaining how to customize Admonition elements. - -.Bug fixes -- `a2x(1)` failed when configuration files were installed in the - global `/etc/asciidoc/` directory -- it was only searching the - directory containing the asciidoc executable (thanks to Christian - Wiese for finding and submitting a patch this bug). -- The html4 backend admonition caption now correctly displays the - admonition `caption` attribute (previously displayed the `style` - attribute). - - -Version 7.1.0 (2006-01-13) --------------------------- -.Additions and changes -- `a2x(1)` toolchain wrapper utility. This overcomes the biggest - hurdle for new users which seems to be assembling and using a - working DocBook XML toolchain. With `a2x(1)` you can generate XHTML - (chunked and unchunked), PDF, man page, HTML Help and text file - outputs from an AsciiDoc input file with a single command. All you - need to install (in addition to AsciiDoc) is xsltproc(1), DocBook XSL - Stylesheets and optionally FOP (if you want PDF) or lynx(1) (if you - want text). -- Block titles can now start with any non-space character (previously - where not allowed to start with `.~-_` characters). -- `./stylesheets/docbook.css` renamed to - `./stylesheets/docbook-xsl.css` to clarify its function. -- Renamed `./docbook-xsl/manpages.xsl` to `./docbook-xsl/manpage.xsl` - for consistency. -- Admonition and navigation icons moved to `./images/icons/` to - clarify usage and conform with a2x(1) usage. -- Renamed xhtml11 intrinsic attribute `imagesdir` to `iconsdir` to - keep vocab consistent and changed default value to `./images/icons` - (previously `./images`). `imagesdir` attribute still accepted but - deprecated. -- Unused image files have been weeded out of the distribution. -- Packager notes (appendix B) have been updated to reflect the needs - of `a2x(1)`. - -IMPORTANT: The renaming of the xhtml11 backend `imagesdir` intrinsic -attribute and it's new default value introduces a backward -compatibility issue: if you use the `icons` attribute you will need to -either move your icons to the new default `./images/icons` location or -include an `--attribute{nbsp}iconsdir="your_icons_path"` option in -your asciidoc commands. - -.Bug fixes -- Backslash line continuation is now observed in verbatim paragraphs. -- Fixed errors generated by example - `./examples/website/build-website.sh` script. - - -Version 7.0.4 (2005-12-08) --------------------------- -.Additions and changes -- Added ternary conditional attributes - `{<name>@<regexp>:<value1>[:<value2>]}` and - `{<name>$<regexp>:<value1>[:<value2>]}`. -- Safety violations now generate errors (they previously generated - warnings). -- asciidoc(1) now defaults to safe mode, consequently the - `[miscellaneous]` safe mode entry and `--safe` command-line option - are no longer necessary (though for backward compatibility - asciidoc(1) still accepts the `--safe` option). -- Backend Blocks are now flagged unsafe (they could be used to include - arbitrary and hence potentially unsafe output content). -- Filters are no longer considered unsafe. There's not much point in - insisting on filter safety since the installation of an unsafe - filter would require the introduction of new or modified - configuration files -- if your application configurations can be - compromised you're in all sorts of trouble (safe mode protects - against unsafe input files not unsafe configuration). As with all - filters, before installing, you should verify that they can't be - coerced into generating malicious output or exposing sensitive - information. - -.Bug fixes -- Fixed a lot of glaring grammatical and factual errors in the User - Guide. - - -Version 7.0.3 (2005-12-01) --------------------------- -.Additions and changes -- Added `--safe` and `--unsafe` command-line options -- AsciiDoc can - now be executed in a 'safe mode' which disallows the execution of - arbitrary code or the inclusion of arbitrary files (see - link:userguide.html#X39[Appendix C in the AsciiDoc User Guide]). -- Included link:source-highlight-filter.html[source-highlight filter] - in the distribution `./examples/source-highlight-filter/` directory - (based on filter submitted by mailto:trolocsis@gmail.com[Ryan - Phillips]). -- Included the DocBook XSL Stylesheets 1.69.1 customizations used to - generate the distributed AsciiDoc documentation (read the - `asciidoc-docbook-xsl.txt` file in the distribution `./docbook-xsl/` - directory). -- AsciiDoc DocBook XSL Stylesheet drivers moved from `./doc/` to - `./docbook-xsl/`. -- Modified `./doc/manpages.xsl` so only URL content is displayed in - manpages. - -.Bug fixes -- Explicitly set table CSS border style (`xhtml11` backend) to `solid` - because default border styles vary from browser to browser. - - -Version 7.0.2 (2005-08-28) --------------------------- -.Additions and changes -- There are now long versions of all AsciiDoc options. -- If the `--backend` is not specified it defaults to `xhtml11`. -- Added CSS simulated frames layout to the examples website (see - `./examples/website/layout2/README-website.txt`). This layout does - not work with IE6 and the original tables based layout is still the - default. -- Support page added to AsciiDoc website. - -.Bug fixes -- Invalid options are now trapped gracefully. -- Documentation errata. - - -Version 7.0.1 (2005-06-24) --------------------------- -.Additions and changes -- Reverted to use of `strong`, `em`, `tt` XHTML tags -- they're more - obvious and no less correct than `span` tags, besides, the generated - file sizes are smaller (the 'User Guide' was 11% smaller). -- Table title rendered with `caption` tag rather than a separate - `div`. -- The AsciiDoc 'stylesdir' attribute (if specified) is now recognized - when searching for embedded stylesheets (previously only searched - default `./stylesheets` directory). -- Default charset encoding changed from ISO-8859-1 to UTF-8 -- it's - less language specific and displays most common languages. -- `template::[]` macros now expand in all configuration file sections - previously only in markup template sections. -- Cleaned up example website layout CSS and configuration - (presentation has not been changed). -- Refactored `xhtml11.conf` configuration file. -- Set consistent and sensible permissions on distributed files. -- White space is now stripped from DSV formatted table cell data. -- `class="tableblock"` attribute added to tables generated by - `xhtml-deprecated-css.conf` to assist CSS. - -.Bug fixes -- Illegal character set encoder (specified by the AsciiDoc `encoding` - attribute) and character data are trapped gracefully. -- AsciiDoc table 'format' attribute in table attribute lists were not - recognized. -- The nested horizontal labeled list example in the 'AsciiDoc User - Guide' has been dropped -- it generated invalid DocBook markup. - - -Version 7.0.0 (2005-06-06) --------------------------- -*************************************************** -This is a major release with many code and -documentation changes. -Please report any problems you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -*************************************************** - -.Additions and changes -- A new 'xhtml11' backend generates XHTML 1.1 with integrated CSS2 - replacing the previous 'xhtml', 'css', and 'css-embedded' backends. -- The CSS stylesheets have finally been rewritten. -- The asciidoc(1) command help now includes user - link:userguide.html#X36[customizable help] topics. When asciidoc is - invoked with the `--help` option the command argument is - interpreted as a help topic. -- The previous example website has been replaced by the actual - AsciiDoc website (see `./examples/website/`. -- XHTML generation options now controlled by the following attributes: - 'badges', 'linkcss', 'icons', 'numbered', 'quirks', 'theme', - 'stylesdir', 'imagesdir' (see the link:userguide.html#X33[User - Guide] for details. -- By default HTML and XHTML are output as stand-alone documents (no - embedded CSS and no linked admonition icon images). -- Documents encoded with the UTF-8 Unicode character set are now - processed thanks to a patch supplied by - mailto:viktor@rbg.informatik.tu-darmstadt.de[Viktor Vasilev]. -- The `-a ^name` command-line syntax to undefine an attribute has been - deprecated in favor of the `-a name!` syntax. -- AttributeEntry syntax addition: `:name!:` to undefine `name` attribute. -- Added `template` system block macro to allow the inclusion of one - configuration file template section within another. -- A 'verse' style attribute can now be applied to literal paragraphs - and blocks to reproduce line breaks and white space from the source - document. -- Replacements and Special Words can now be escaped with leading - backslashes. -- Replacements are now processed in configuration file order (previous - ordering was indeterminate). -- System macros can now be used in the base `asciidoc.conf` - configuration file. -- Deprecated features that emitted warnings in prior versions are no - longer tolerated. -- The `eval` system attribute expression evaluates to `False` the - attribute is undefined, if it evaluates to `True` the result is an - empty string. -- The Paragraph and DelimitedBlock 'presubs' parameter can be aliased - as 'subs'. -- Added 'verbatim' substitutions option. -- Renamed 'List Continuation Block' to 'List Block' and renamed the - 'listcontinuation' option to 'list'. -- Deprecated 'default' substitutions option (use 'normal' instead). -- The 'section-numbers' section numbering attribute has be renamed - 'numbered'. -- Dropped the '\#UNDER CONSTRUCTION#' block macro. -- Rewrote Paragraph and DelimitedBlock handlers adding a - link:userguide.html#X23[styles] configuration entry. - -.Bug fixes -- Included files are no longer read inside conditionally excluded - content. -- Manpage command names containing dashes (in the manpage NAME - section) were misinterpreted as the spaced dash command name/purpose - separator. Bug report and patch supplied by - mailto:david@dgreaves.com[David Greaves]. -- Unexpected error following malformed author line error. - - -Version 6.0.3 (2005-04-20) --------------------------- -.Additions and changes -- Special characters are now substituted in AttributeEntry element - values. -- Spaced and unspaced em dashes are now recognized (previously only - spaced em dashes were recognized). -- Replaced the table 'noborders' option with richer 'frame' and 'grid' - attributes. -- The `duplicate macro` warning message now only occurs when the - verbose (`-v`) option is enabled. -- Single lines starting with two forward slashes hard up against the - left margin are treated as comments and are not processed. -- Renamed 'section' delimited block option to 'sectionbody' to more - accurately reflect it's role. -- Added a List Continuation block -- a specialized delimited block - that is functionally equivalent to the List Item Continuation - feature except that the list contained within the block does not - require explicit '+' list item continuation lines. -- Dropped deprecated `<u>` tags from generated HTML. -- Literal Block delimiters must now consist of at least four points - (previously three) to avoid lone ellipsis ambiguity. - -.Bug fixes -- Some system attribute evaluation failures caused unexpected - exceptions to occur. - - -Version 6.0.2 (2005-03-30) --------------------------- -.Additions and changes -- Three new 'system' block macros have been added -- `eval`, `sys` and - `sys2` which are the block macro equivalents to the same named - system attributes. -- 'Intrinsic' macros have been renamed 'system' macros along with - 'action' attributes which have been renamed 'system' attributes: - * To reflect their common (though contextually different) behavior. - * To avoid confusion with 'intrinsic attributes'. - -.Bug fixes -- Asciidoc now searches in `/etc/asciidoc/filters` for filters. - - -Version 6.0.1 (2005-03-06) --------------------------- -.Additions and changes -- A global configuration file location `/etc/asciidoc` has been added - and is now processed before all other locations (patch supplied by - mailto:stone@debian.org[Fredrik Steen]). -- Recoded `tempfile.mktemp()` and other artifacts that are no longer - necessary or desirable (patches supplied by - mailto:stone@debian.org[Fredrik Steen]). -- Added BUGS file to the distribution. - -.Bug fixes -- Illegal comment syntax in `css-embedded-stylesheet.conf` resulted in - illegal CSS in files generated by the `css-embedded` backend. - - -Version 6.0.0 (2005-01-28) --------------------------- -*************************************************** -This release has had some fairly major code and -documentation changes. Please report any problems -you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -*************************************************** - -A lot of new stuff. A new major version number -- some regression -incompatibility (hopefully mitigated by 'deprecated' warnings). - -Went mad trying to rein in the current feature anarchy -- established -a unified notion of document attributes. Attempted to introduce a -consistent vocabulary -- renamed many poorly or inconsistently named -entities. - -Actually, deprecated syntax is still processed correctly in almost all -cases. One source of incompatibility that may arise if you have -customized CSS stylesheets is the change of AsciiDoc CSS class names -(see below). I guess the moral is if you've done a lot of -configuration file customization and are happy with version 5 then you -may want to stay put. - -NOTE: This version requires Python 2.3 or better to run. - -.Additions and changes -- 'Glossary entries' have been renamed 'attributes'. This eliminates - confusion with the accepted meaning of glossary. -- An `AttributeEntry` block element has been added so that document - attributes can be assigned from within an AsciiDoc document. -- The `AttributeList` block element has been added which is a more - general solution than the (now deprecated) DelimitedBlock arguments. -- An BlockId element has been added for setting block element anchor - (link target) IDs. -- Quoted text can now span multiple lines (thanks to James Bowlin for - this patch). -- Inline macros can now span multiple lines. -- \``double backtick / apostrophe'' quotes generate ``curly quotes''. -- A warning is now emitted for out of order list item (applies to - explicitly enumerated numbered list items). -- Added `include` action attribute. -- A line of three or more apostrophes generates an HTML horizontal - ruler (`<hr/>` tag). You will get a warning if processed with - non-HTML backend. -- An `{imagesdir}` attribute specifies image file location for images - referenced in configuration files when generating HTML (the default - location is `images`). -- An `{stylesdir}` attribute specifies the location of CSS - stylesheets when generating styled HTML (the default location for - configured markup is `.`). -- The use of the (often inappropriately named) `{caption}` attribute - list entry has been deprecated, use `{0}` instead. -- New 'ExampleBlock' delimited block along with associated variants - Note, Tip, Warning, Caution and Important. -- The `docbook.conf` file now facilitates the optional inclusion of a - DocBook revision history file. -- To better reflect their purpose the following block elements have - been renamed: `VerbatimBlock` to `ListingBlock`; `IndentedBlock` to - `LiteralBlock`; `IndentedParagraph` to `LiteralParagraph`; - `CustomBlock` to `BackendBlock`; `SimpleSection` to `SectionBody`. - Any corresponding CSS class names have also been changed which could - result in backward incompatibility in customized stylesheets. -- Swapped plain DocBook admonition icons for Jimmac's DocBook icons - (http://jimmac.musichall.cz/ikony.php3). The original plain icons - have been moved to `./images/plain`. -- Renamed `html` backend to `xhtml` to better reflect it's function - (former `html-4` backend renamed to `html`). -- A new inline anchor macro syntax `[[[<id>]]]` is available, it - displays `[<id>]` at the anchor location and is for anchoring - bibliography list entries. -- An optional 'single-line titles' syntax can be used. -- Tweaks to distributed CSS stylesheets and FOP `fo.xsl` customization - file. -- 'List Item Continuation' has been implemented which allows - additional block elements to be included in list items by separating - them from the preceding list item element with a line containing a - single plus character. -- A new 'Horizontal Labeled List' list type has been added. Generates - two column list -- the first column contains the list element - labels, the second contains the element text. Same syntax as - `Vertical Labeled Lists` except the double colon label suffix is - followed by the start of the list item text. - -.Bug fixes -- Fixed broken backslash line continuation. -- Labeled list end tags were not undergoing attribute substitution. -- Documents without any author information now generate legitimate - DocBook (previously if the author line was not included in the - document header then an empty (illegal) DocBook `author` element was - generated). -- Multiple spaces in filter command arguments were replaced by a - single space. The `./examples/asciidoc2text/asciidoc2text.sh` script - now indents text correctly. - - -Version 5.1.1 (2004-10-10) --------------------------- -*15-December-2004: Interim update:* Updated `asciidoc.py` to fix -broken `join_lines` function -- no other changes. - -- PDF documentation is now produced from DocBook XML using XSLTLib and - FOP. Previously we processed DocBook SGML with `jw(1)` (which used - Dvips to convert DVI files to PDF). FOP has come a long way in the - last 12 months and produces very acceptable PDF under both Linux and - Windows. -- Sections detailing how to install and use the DocBook XSL - Stylesheets, xsltproc, FOP toolchain and the AsciiDoc XSLT drivers - have been added to the User Guide. -- The PDF output from the he example article template has been - included in the distribution (`./doc/article.pdf`). -- Special characters are emitted using decimal Unicode character codes - (previously used named character entities which cannot be assumed - included in non-HTML documents). -- Added registered trademark (R) to `[replacements]`. -- CSS stylesheet tweaks. -- Admonitions (Note, Tip, Important, Warning, Caution) include icons - when generating css output. - - -Version 5.1.0 (2004-09-18) --------------------------- -- Callouts have been implemented (see the 'Callouts' section of the - AsciiDoc User Guide for details). -- Added XSL drivers for generating XHTML, chunked XHTML and HTML Help - from DocBook XML using XSL stylesheets and xsltproc(1). -- Added CSS stylesheet for HTML generated from DocBook XML using XSL - stylesheets. -- Distribution contains HTML Help formatted User Guide - (`./doc/asciidoc.chm`), the User Guide tells you how it's generated. -- Images referred to by distributed stylesheets are now located in the - `./images` subdirectory (previously located in `.`). -- Filters path names are now handled properly under Cygwin. -- The usual documentation and examples additions, updates and - polishing. - - -Version 5.0.9 (2004-09-09) --------------------------- -- The convention of using a `.asc` file extension for AsciiDoc files - has been dropped in favor of the familiar `.txt` extension. It makes - more sense in that AsciiDoc is a text presentation format and - because `.asc` clashed with the same extension used by other - applications. It's only a naming convention -- you don't have to - switch if you don't want to. -- Changed the subscript formatting character from underline to tilde - since underscores in file names are reasonably common (especially in - link and image macros). -- An alternative syntax for the index term inline macro has been - added: `++<primary>,<secondary>,<tertiary>++`. -- Index terms that have secondary and tertiary entries now - additionally generate separate index terms for the secondary and - tertiary entries. -- A `+<primary>+` index term inline macro has been added which - displays the term in the primary text flow. -- Added alternative variable list definition using double semi-colon - terminator as opposed to the standard double colon terminator so - variable lists can be nested to two levels. -- Footnotes now appear on a separate line in HTML and Linuxdoc - outputs. -- Python version compatibility is checked at startup. -- Preface and appendix section titles in multi-part Book documents are - meant to be out of sequence -- warnings are no longer emitted when - outputting HTML. -- Empty section warnings have been replaced by error messages and are - emitted only if invalid markup would result. -- Missing macro sections or invalid macro name warnings are only - generated at startup if the `-v` (verbose) option is set. Otherwise - they are deferred until a matching macro is encountered in the input - file. -- Missing or invalid table definition warnings are only generated at - startup if the `-v` (verbose) option is set. Otherwise they are - deferred until a matching table is encountered in the input file. -- AsciiDoc now makes more of an effort to continue in the face of - errors. -- Fixed broken `./examples/website/main.aap` script. -- Converted distribution text files DOS text format as a sop to - Windows users with challenged text editors. -- Documentation additions and corrections. - - -Version 5.0.8 (2004-05-15) --------------------------- -- Spurious 'out of sequence' level 2 warnings no longer appear when - processing 'book' document multi-part book top level Preface and - Appendix sub-sections since they are (correctly) out of sequence. -- A warning is no longer emitted for empty Index sections since this - is normal when generating DocBook outputs. -- Fixed: `[quotes]` configuration file entries where not being - overridden by downstream configuration file entries. -- Footnote text is now output enclosed in square brackets in HTML - documents. -- Added superscripts and subscripts to the standard PRS configuration - files. -- Adjusted CSS stylesheets so list titles don't have so much space - between title and first list item (broken in IE6 due to poor CSS - compliance). Lessened sidebar title top margin. - - -Version 5.0.7 (2004-04-22) --------------------------- -- The version 5.0.6 README incorrectly stated that AsciiDoc would run - under Python 2.0, in fact it requires Python 2.1 or better. The - README has been corrected. -- Documented techniques for combining and splitting AsciiDoc documents - and processing the combined and split parts (see the 'Tips and - Tricks' section of the User Guide). -- An example of marking up superscripts and subscripts is documented - in the 'Tips and Tricks' section of the User Guide (the example - configuration file is in the AsciiDoc `examples` directory). -- Added ellipsis to shipped `[replacements]`; three periods output an - ellipsis entity. -- Removed unused 'SectionClose' class. -- The AsciiDoc 'Preamble' element is output as a DocBook 'Preface' - when processed as a 'book' document type (in older AsciiDoc versions - a warning was issued and processing stopped). -- Fixed a quoting anomaly: quoted text can no longer begin or end with - with white space. - - -Version 5.0.6 (2004-03-07) --------------------------- -- New 'image' macro implements optional image scaling and linking and - works in both inline and block contexts. The 'image' macro obsolesces - the existing 'graphic' block macro and 'icon' inline macro. -- Macro substitution section names now have `-inlinemacro` and - `-blockmacro` suffixes to resolve context ambiguity, make their - purpose clearer and relieve section namespace congestion. -- Header derived glossary entries can now be overridden from the - command-line. -- Special character substitution is now performed on AuthorLine - derived author names. -- A macro or block argument called 'options' can be used as a shortcut - for a list named arguments with zero length string values. -- Tables can be output without borders using the `options="noborders"` - argument. -- Table data lines that do not immediately follow a table section - underline can now be blank. This allows CSV data with embedded blank - lines to be processed correctly. -- Blank DSV format table data lines are silently skipped. -- Tightened up on enforcement of configuration file section names to - reduce the possibility of section content being seen as a section - header line. -- Section titles can be optionally suffixed with title arguments - enclosed in double square brackets. -- A replacement has been added to `asciidoc.conf` to replace inline - double dashes with the `—` entity. -- Changed the `.UNDER-CONSTRUCTION.` macro syntax to - `#UNDER-CONSTRUCTION#` so it is not mistaken for a BlockTitle. - Similarly changed the `.NEW.` replacement with - `#NEW#`. -- `#NEW#` and `#UNDER-CONSTRUCTION#` macros are now - included in the DocBook backend. -- Replaced shipped `smallnew.gif` with `smallnew.png`. -- Documentation tidy ups. - - -Version 5.0.5 (2004-02-25) --------------------------- -- Fixed the disappearing paragraph titles problem that was caused by - Inline macros (incorrectly) processing BlockTitles. -- Tightened AuthorLine validation. Previously invalid email addresses - and embedded special characters in the AuthorLine resulted in - invalid output markup. - - -Version 5.0.4 (2004-02-09) --------------------------- -- Reinstated missing `infile`, `outfile`, `filetype` and - `filetype-<filetype>` glossary entries. -- As of version 5.0.3 asciidoc(1) now requires Python 2.0 or greater, - this has now been documented. - - -Version 5.0.3 (2004-01-23) --------------------------- -- Fixed problem that caused any filters directory file containing - `.conf` (not just those with the `.conf` extension) from being - loaded. -- All `[miscellaneous]` configuration file entries can now be - referenced like glossary entries (they are now processed internally - as glossary entries). -- The output file line terminator (previously hardwired to `\r\n` is - now set using the `newline` entry in the configuration file - `[miscellaneous]` section. -- The misspelt `blocktitles` configuration file entry name has been - corrected (to `blocktitle`). -- An `{empty}` glossary entry has been added to the default - configuration which is useful for outputting trailing blank lines - from configuration file substitution sections. - - -Version 5.0.2 (2003-12-18) --------------------------- -- New (alternative) 'anchor' and 'xref' macro syntax (old syntax still - valid). -- DocBook `mediaobject` and `inlinemediaobject` tags are generated in - place of `graphic` and `inlinegraphic` tags by the AsciiDoc - `graphic` and `icon` macros. If a macro argument is specified it is - the alternative text output if the target document format does not - support the specified graphic file format. -- Dropped the LinuxDoc left and right square bracket special character - substitutions as they interfered with macro substitution. -- Documentation updates and corrections. - - -Version 5.0.1 (2003-12-09) --------------------------- -- Fixed problem with anchor tag when generating CSS styled HTML. - - -Version 5.0 (2003-12-08) ------------------------- -*************************************************** -This release has had some fairly major code and -documentation changes. Please report any problems -you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -*************************************************** - -- AsciiDoc can now produce a full-blown multi-part DocBook book - including dedication, abstract, preface, colophon, glossary, - appendix, bibliography and book part elements using the new - `specialsections` configuration file section. -- All Section element children (Paragraph, DelimitedBlock, List, - Table, BlockMacro) can now be titled using the BlockTitle element. - A BlockTitle element is a single line containing a title and - beginning with a period. -- The `index` and `backmatter` macros have been dropped, superseded by - `specialsections`. -- The AsciiDoc 'Preface' element has been renamed 'Preamble' (to avoid - confusion with the DocBook book preface element). -- Out of sequence titles are now tolerated with a warning. This allows - book document level 0 sections to be processed. -- An 'anchor' inline macro has been added for document link target - creation. -- 'Note', 'Tip', 'Important' and 'Warning' paragraph types have been - added to support the corresponding DocBook elements. -- Title substitution is now performed in SidebarBlock titles. -- DocBook graphics now output as `figure` and `informalfigure` - elements rather than `mediaobjects`. This ensures numbered figures - and a lists of figures are produced by the DocBook toolchain. -- You can now escape block argument lines by appending a backslash. - Alternatively, if you embed arguments in the delimiter line AsciiDoc - does not check for an arguments line. -- The default DocBook backend file extension has been changed from - `.docbook` to `.xml` (`.sgml` for the 'docbook-sgml' backend). -- Warnings are output by default (previously they only printed when - verbose option enabled). -- A Question and Answer variable list definition has been added to the - shipped configuration files, primarily to create DocBook `qanda` - DocBook elements. -- Fixed broken code-filter `-b linuxdoc` option. The asciidoc.asc User - Guide can now be processed by linuxdoc(1) (although tables are - dropped because LinuxDoc does not implement tables). - -.Compatibility issues: -1. Table titles are no longer in the arguments line, use the new - BlockTitles. -2. Graphic titles are no longer in the 'graphic' block macro caption, - use the new BlockTitles. -3. The code-filter title must be placed in a preceding BlockTitle. -4. SidebarBlock titles must be placed in a preceding BlockTitle. -5. The DelimitedBlock option 'sidebar' has been renamed to 'section'. -6. The default DocBook backend file extension has been changed from -`.docbook` to `.xml` (`.sgml` for the 'docbook-sgml' backend). - - -Version 4.2 (2003-11-26) ------------------------- -- The default HTML output is now XHTML 1.0 markup. To output the - former HTML 4 markup specify the `html-4` backend. -- The default DocBook output is now DocBook XML. To output the former - DocBook SGML specify the `docbook-sgml` backend. The associated - `docbook-sgml.conf` file illustrates how to support minor DTD - variations. Examples of using the `xmlto(1)` command for DocBook - conversion have been added to the User Guide. -- Glossary entries set using the command-line -g option can now be - referenced in configuration files. -- Configuration dumps (`-c` command-line option) no longer output - redundant undefined glossary entries. -- DelimitedBlock arguments can now be specified in a separate arguments - line immediately following the leading delimiter line, This is in - preference to the existing delimiter embedded arguments. Reasons: - * The syntax is in keeping with the Tables arguments syntax. - * It's easier to enter and implements line continuation. -- A new QuoteBlock DelimitedBlock definition has been added to the - distribution configuration files. -- The table arguments lines can be continued using the backslash line - continuation character. -- Added new calculated glossary reference type `{<name>%<value>}`. -- Double-quote characters can now appear in unquoted positional - arguments. - - -Version 4.1 (2003-11-13) ------------------------- -- Added DSV (Delimiter Separated Values) tables format. -- `{eval:<expr>}` glossary references drop the containing line if - `<expr>` evaluates to `None`. -- Block, Table and Macro arguments can now be positional (quoted or - unquoted). -- Vocabulary change: DelimitedBlock, Table and Macro 'attributes' are - now referred to as 'arguments'. This makes more sense in light of the - extended syntax and avoids confusion with backend markup tag - attributes. -- 'tablewidth' table ruler parameter can now be expressed in percent - units (0..100). If between 0 and 1 then the original fractional unit - measure is applied. -- The use of quoting for generating footnotes and index entries has - been dropped in favor of 'footnote' and 'indexterm' inline macros. -- 'backmatter' inline macro included in distribution. -- Fixed: CSS styled HTML tables are now fully XHTML 1.0 conformant. -- Fixed: 'tablewidth' was processed incorrectly when passed as table - argument. -- Fixed: Glossary references like `{x=\{y}}` were one character off - if \{x] was defined and `{y}` was not. - - -Version 4.0 (2003-11-08) ------------------------- -*************************************************** -This release has had some fairly major code and -documentation changes. Please report any problems -you encounter. - -'Stuart Rackham' -*************************************************** - -- Added tables to AsciiDoc. -- Added two special 'subs' options: 'default' specifies the default - substitution options and 'none' specifies no substitution. These - options can only appear singly. -- Line continuation using a trailing backslash character is available - in Paragraphs, ListItems, Tables. -- The left and right quotes for quoted text can now be specified - separately. -- Shipped configuration files implement footnotes (only useful for - DocBook output) using \[[]] quoting. -- Shipped configuration files implement index terms (only useful for - DocBook and LinuxDoc output) using \(()) quoting. -- The shipped 'html' backend configuration now emits valid 'HTML 4.01 - Transitional'. -- Added new calculated glossary reference types `{<name>!<value>}` - and `{<name>#<value>}`. -- The DelimitedBlock 'params' option has been dropped in favor of the - new 'block attributes' mechanism. If you have customized block - params options you may need to adjust source files to use the - 'block attributes' syntax. The example code filter has been updated - to reflect these changes. -- The code filter now has a `-t tabsize` option. -- Replaced `-w` option with `-v` (verbose) option. The warnings option - was just to confusing. -- Named attributes can now be specified in macro calls. -- The 'tabsize' attribute is recognized in the built-in `include` - macros. A tabsize of zero suppresses tab expansion. -- The configuration file `[options]` section has been split into - `[miscellaneous]` and `[titles]`. If you have customized any of - these settings you will need to adjust the affected configuration - files. -- Configuration file `[miscellaneous]` entries can now also be set - using the command-line `-g` option. -- Fixed: error that occurred when attempting to use zero length - configuration and source files. -- Fixed: blocking filter halt problem. -- Fixed: inline macro escape prefix problem. -- Fixed: missing macros from configuration dump problem. -- Fixed: named macros were dumped incorrectly. -- Many documentation changes/additions/corrections. - - -Version 3.2.2 (2003-10-26) --------------------------- -- Added `-n` option (synonym for `-g section-numbers`). -- Dropped the processing commentary (hey, this is Unix). -- Added new calculated glossary reference type `{<name>?<value>}`. - `<name>` is the glossary entry name and `<value>` is the text - substituted if the glossary entry is defined. `<value>` can only - contain literal text (no glossary references allowed). -- Added `asciidoc2text` to distribution `examples/asciidoc2text` - directory (converts AsciiDoc source to text file with section - numbering). -- Fixed incorrect nesting of Simple lists inside Variable lists. -- List definitions have been modified so that list items can be - indented. This allows a more intuitive indentation of nested lists - in AsciiDoc source. -- Lists must be separated from preceding paragraphs by a blank line. - This is to avoid paragraph lines being mistaken for list items. -- Corrected asciidoc man page documentation error: the`-f` option does - *not* search relative to source document directory for the - configuration file. -- Minor updates to various distribution `.conf` files. -- Included `badges.conf` in `examples` directory. -- `css-embedded-stylesheet.conf` now supports footer badges. -- The default in-line element processing order has been changed: - Glossary References are now processed before Inline Macros. This - allows glossary expansions to occur inside macro references. -- Glossary entries are now allowed in Author and Revision lines. -- Default List `subs` options and Paragraph `presubs` options are - assigned the following default value if not specified: - - specialcharacters,quotes,specialwords,replacements,glossary,macros - -- Documentation changes/additions/corrections. - - -Version 3.2 (2003-05-26) ------------------------- -- Added a `-s` command-line option to suppress the output of - `[header]` and `[footer]` sections. -- Article document headers are no longer mandatory: this allows - AsciiDoc to process arbitrary chunks of text. When used in - conjunction with the new `-s` command-line option corresponding - chunks of backend markup can be generated. -- AsciiDoc now emits a warning message and continues when an out of - sequence section title is detected (previously it failed and - halted). This allows document sections to be processed separately. -- Optional 'presubs' and 'postsubs' entries have been added to - 'DelimitedBlock' and 'Paragraph' definitions. As a consequence - substitution options are no longer legal in 'options' entries. -- 'presubs' and 'postsubs' substitutions are processed in the order - the options are specified (rather than the fixed 'options' order of - previous versions). -- ./filters subdirectories are automatically searched for filter - commands. -- A 'title-subs' configuration option specifies the substitutions - performed on document Header and Section titles. -- A 'subs' entry in now included in List configuration file - definitions that specified substitutions performed on list entry - text. -- Configuration files are auto-loaded from ./filters subdirectories. -- Added example code filter (see ./examples/filters). -- Bug fix: if section was empty you may have got erroneous 'missing - tag "paragraph"' error. -- Internal code tidy up. - - -Version 3.1 (2003-05-18) ------------------------- -- In version 3.0 a `[macros]` section entry of the form 'name' was - equivalent to 'name='. An entry of the form 'name' now undefines the - entry (to bring it in line with the behavior of other special - sections). -- Paragraphs have now been generalized (in the same way as Lists and - DelimitedBlocks). -- The 'indentsize' option has been dropped as as consequence of - paragraph generalization. -- Pipe | characters can be included in substituted tag and - substitution section text using the \{brvbar} (broken vertical bar) - glossary reference. -- Removed the restriction requiring substitution section text - placeholders | to be on a separate line. -- Added an `-e` asciidoc(1) command option that excludes implicit - configuration files (used in conjunction with `-c` generated - configuration files). -- Version 3.0 documentation has undergone a considerable cleanup. -- The dumping of quoted section entries (see `-c` option) now works - correctly. -- The format of special section entries has been made consistent: - `name` undefines the entry; `name=` sets the entry value to a blank - string; `name=value` sets the entry value to `value`. -- As a consequence of the previous change the caret prefix is no - longer used in glossary configuration file entries (although it is - still used when undefining an entry using the `-g` command-line - option). - - -Version 3.0 (2003-05-13) ------------------------- -This version is the culmination of work begun in the 2.x releases -whereby fixed policy has been replaced by extensible mechanisms. - -- Added `-c` command-line option to dump a composite asciidoc(1) - configuration file to stdout. -- Lists and Delimited Blocks are now defined by a set of configuration - file parameter sections. The user can modify the default - definitions or add new ones. -- Block content can now be processed through external filters. -- The default behavior for Custom Blocks is to perform glossary - substitution (previously there was no substitution inside Custom - Blocks). -- The old 2.x style macros have been reimplemented; as with Lists and - Delimited Blocks there syntax and behavior can be configured by the - user. The default macro syntax remains the same but the semantics - are now (hopefully) a bit more intelligible. -- Block and Builtin macros use :: delimiter instead of the 2.x single - colon delimit (to distinguish them from inline macros). The 2.x - syntax is still supported for backward compatibility. -- Nested lists are now supported and IndentedParagraphs can be - included in list items. -- Conditional source inclusion can be specified using built in `ifdef`, - `ifndef` and `endif` macros. -- The new conditional source inclusion feature has been used to reduce - the number of default configuration files down to one per backend. -- A change of name: 2.x 'Substitutions' are now called 'Replacements' - and the 2.x `[substitutions]` configuration file section is now - called `[replacements]` (the old name is still recognized for - backward compatibility). -- The line break is now implemented as a 'Replacements' substitution. -- Inline 'icon' macro for inline images has been added to default - configuration files. - -Version 2.2 (2003-04-07) ------------------------- -- The `master.conf` configuration file name has been deprecated in - favor of `asciidoc.conf`. -- The standard configuration files set is now loaded from the - `.asciidoc` folder in the users home directory (if it exists) and - then from the source document directory. Configuration files that - don't exist are silently skipped. -- Configuration files named like the source file will be automatically - loaded if they are found in the source file directory. For example - if the source file is `mydoc.asc` and the `-b html` option is used - then asciidoc(1) will look for `mydoc.conf` and `mydoc-html.conf` in - that order. -- The characters used to quote formatted text can be configured and - extended by the user (see the master.conf [quotes] section). -- Quoted text can now be escaped by prefixing a backslash character to - the leading quote. -- The double single-quote '' strong text quote has been deprecated in - favor of an asterisk * character. -- Added \{eval:expression}, \{sys:command} and \{sys2:command} - glossary reference actions. -- Trailing brace characters `}` are now allowed inside glossary - references provided they are escaped with a backslash character. -- Glossary entries can now be escaped by prefixing a backslash - character to the leading brace character (use this in preference to - placing the backslash inside the brace). -- The output macro has been deprecated (use the new include1 macro - inside a CustomBlock). -- The default document type is `article` (asciidoc no longer attempts - to guess). -- Files included within DelimitedBlocks are not searched for block - termination underlines. This ensures the entire file is part of the - DelimitedBlock. -- `include` macros can now be used in configuration files. -- Corrected \{infile} and \{outfile} glossary entry documentation. -- File inclusion is now limited to a depth of 5 to catch recursion - loops. -- Inline tags have been deprecated, they're not necessary and they - immediately make the source document backend specific. Use - CustomBlocks or Substitutions instead. - -Version 2.1 (2003-03-17) ------------------------- -- Added section auto numbering `{sectnum}` glossary entry - (auto-numbering function contributed by Ludovico Magnocavallo). -- asciidoc(1) now correctly returns non-zero exit status if an error - occurs. -- An AsciiDoc example website has been included in the AsciiDoc - distribution `examples/website` directory. -- NOTE: The `asciidoc` wrapper script included in the 2.0 distribution - has been dropped, if you've symlinked or aliased to `asciidoc` you'll - need to change them to point directly to `asciidoc.py` instead. -- An RCS $Id$ marker can be used as the document header revision line - (based on a patch submitted by Ludovico Magnocavallo). -- In addition to the `name=value` glossary entry format two new ones - have been introduced: `name` (the default value is set to an empty - string) and `^name` (the glossary entry is undefined). -- The `-q` command-line option has been deprecated and the `-w level` - command-line option added. + - NOTE: By default skipped substitution warnings are now suppressed. -- If a configuration file specified with the `-f` command-line option - is not found relative to the current working directory then the - search is repeated relative to the asciidoc(1) directory. This - allows global configuration files to be used. -- Added `{infile}`, `{outfile}` predefined glossary entries. -- Added `under-construction` macro to HTML article configuration - files. -- Deprecated `{asciidoc_version}` glossary entry in favor of - `{asciidoc-version}` (to it consistent with other entries). - -Version 2.0 (2003-02-24) ------------------------- -- The emphasized, strong and monospaced words options have been - generalized with the introduction of macro based 'special words' - lists. -- Glossary references can now appear in both the document and macro - bodies. -- All output files use `crlf` line termination (previously used UNIX - `lf` (newline) termination). -- Added [substitutions] section which implements arbitrary regular - expression based substitutions. -- An optional `master.conf` configuration file can be used for entries - that are not backend or document type specific. -- Special character definitions moved from the code to the new - [special_characters] configuration file section. -- Configuration file glossary added. -- Command-line -g glossary entry added. -- A new 'book' document type has been implemented for the 'docbook' - backend. It outputs DocBook 'book' documents. -- A major internal change has been the implementation of parametrized - user definable 'macros'. Internally most document elements are now - processed as macros. -- Configuration file macro variables can be specified with default - values (literals or other macro variables). -- An attempt has been made to tighten up the vocabulary used to - describe the AsciiDoc document syntax. -- The term abstract has been replaced by the more general term - 'preface' and a new preface section introduced into article - configuration files (replacing the synopsis sections). -- Any section elements can now be put in the document preface - (previous versions only allowed paragraphs). -- AsciiDoc Blocks have been unified and their behavior can be user - defined and parametrized. -- An 'output' inclusion allows an external file to be written directly - to the backend output file. -- A new CustomBlock has been added. Default behavior is to insert the - enveloped AsciiDoc source lines directly into the output file. -- A 'line break' tag can be inserted by terminating a line with a '+' - character (only really useful for HTML backends). -- An fourth section level has been introduced. -- The SidebarBlock delimiter line characters have been changed. The - deprecated underline is still accepted. -- Levels 2 and 3 title underline characters have been changed. The - deprecated underlines are still accepted. -- Lines with backend specific inline tags can be inserted into - AsciiDoc source files. -- Single words enveloped by underscores are no longer emphasized. This - feature was deprecated as it is redundant (use single quotes - instead) and was being applied to file names with underscores. -- A `-q` quiet option has been added to suppress warning messages. -- Badge images sourced locally. -- Added 'author' and 'author-mail' meta tags to HTML configuration - files. - -Version 1.5 (2003-01-08) ------------------------- -- Implemented sidebar document elements. -- Explicit checks for user specified configuration files and input - file (rather than throwing exception). - -Version 1.4 (2003-01-04) ------------------------- -- New configuration file options 'emphasizedwords' and 'strongwords'. - These allow the definition of words that will always be emphasized - or rendered in a strong font without inline formatting. -- Document and section titles are no long subject to inline - formatting. -- Multiple configuration files can be overlaid in a single command. -- Configuration file tags and options entries can now be overridden on - an entry by entry basis (previously the entire section was - overloaded). -- Configuration file tags and options entries are now cached this has - resulted in around 37% performance improvement over version 1.3. -- Variable lists can now contain multiple terms per list item. -- Placeholder paragraph eliminated from empty sections that contain - subsections. -- Added \{asciidoc_version} substitution variable. -- More documentation additions and tidy ups. - -Version 1.3 (2003-01-01) ------------------------- -- A new 'strong' text formatting convention has been implemented: - Word phrases enclosed in pairs of single quote characters (acute - accents) are rendered in a strong font (usually bold). -- Paragraphs can now be followed immediately by Simple lists and - Ordered lists without an intervening blank line. -- A user specified configuration file (`asciidoc(1)` -f option) - overlays the default configuration file rather than replacing it. - Custom configuration files need only contain those sections - that have been customized. -- Comment Block delimiters have been relaxed slightly. They must start - with three forward slashes /// but the remainder can contain any - characters, this allows comments to be embedded in the delimiter line. -- Leading non-digit characters preceding revision number are now - ignored. -- Set default indentsize [option] from 2 to documented default value - of zero in HTML backend html-article.conf and html-manpage.conf - files. -- Fixed error that occurred when taking input from stdin without - explicitly specifying a document type. -- Restored file name and line number error message information. -- Changed deprecated -t option to -d in asciidoc --help and usage - command output. -- CSS styles tweaking. -- Code, configuration file and documentation tidy ups. - -Version 1.2 (2002-12-28) ------------------------- -- Implemented 'include' URL to allow file inclusion. -- `fileextension` configuration file [option] renamed to more sensible - `outfilesuffix` (`fileextension` still accepted by this version but - will be dropped in future). -- Improved error reporting. -- CSS backends generate valid XHTML. -- New `css-embedded` backend generates HTML with embedded stylesheets - (use the `css` backend for linked stylesheets). The css-embedded - backend output contains no linked images so the generated html files - are completely self contained. -- Bug fixes. - -Version 1.1 (2002-12-03) ------------------------- -- Added css (cascading style sheets) backend -- Implemented IndentedBlock document element. -- Tabsize command-line option has been deprecated in - favor of configuration file. -- Default indent width changed to zero. -- Added \{localdate} and \{localtime} substitution variables. -- Added optional [options] configuration file section with - fileextension, tabsize and indentsize options. -- Implemented \{authorinitials} substitution variable. -- Added https link type. -- Corrected [graphic] substitution from \{title} to \{caption} - in linuxdoc-article.conf configuration file. -- Fixed error that occurred when '==' title underline was - used. - -Version 1.0 (2002-11-25) ------------------------- -First AsciiDoc public release along with AsciiDoc web site -(http://asciidoc.org/) and SourceForge.net project registration -(https://sourceforge.net/projects/asciidoc/[]). - -// vim: set syntax=asciidoc: diff -Nru asciidoc-8.6.10/codecov.yml asciidoc-10.1.2/codecov.yml --- asciidoc-8.6.10/codecov.yml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/codecov.yml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,13 @@ +comment: false + +coverage: + status: + patch: + default: + target: auto + project: + default: + target: auto + +github_checks: + annotations: false diff -Nru asciidoc-8.6.10/common.aap asciidoc-10.1.2/common.aap --- asciidoc-8.6.10/common.aap 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/common.aap 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -# -# Executed by all main.aap's before anything else. -# - -_parent.VERS = 8.6.10 -_parent.DATE = 22 September 2017 - -all: - :pass diff -Nru asciidoc-8.6.10/configure.ac asciidoc-10.1.2/configure.ac --- asciidoc-8.6.10/configure.ac 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/configure.ac 2022-02-18 01:52:22.000000000 +0000 @@ -1,4 +1,6 @@ -AC_INIT(asciidoc, 8.6.10) +AC_INIT(asciidoc, 10.1.2) + +AC_SUBST([PACKAGE_DATE], ['17 February 2022']) AC_CONFIG_FILES(Makefile) diff -Nru asciidoc-8.6.10/COPYING asciidoc-10.1.2/COPYING --- asciidoc-8.6.10/COPYING 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/COPYING 1970-01-01 00:00:00.000000000 +0000 @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - <signature of Ty Coon>, 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff -Nru asciidoc-8.6.10/COPYRIGHT asciidoc-10.1.2/COPYRIGHT --- asciidoc-8.6.10/COPYRIGHT 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/COPYRIGHT 2022-02-18 01:52:22.000000000 +0000 @@ -1,6 +1,5 @@ -Copyright (C) 2000-2007 Stuart Rackham - -Email: srackham@gmail.com +Copyright (C) 2000-2013 Stuart Rackham +Copyright (C) 2013-2020 AsciiDoc Contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru asciidoc-8.6.10/dblatex/asciidoc-dblatex.sty asciidoc-10.1.2/dblatex/asciidoc-dblatex.sty --- asciidoc-8.6.10/dblatex/asciidoc-dblatex.sty 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/dblatex/asciidoc-dblatex.sty 1970-01-01 00:00:00.000000000 +0000 @@ -1,22 +0,0 @@ -%% -%% This style is derived from the docbook one. -%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{asciidoc}[2008/06/05 AsciiDoc DocBook Style] -%% Just use the original package and pass the options. -\RequirePackageWithOptions{docbook} - -% Sidebar is a boxed minipage that can contain verbatim. -% Changed shadow box to double box. -\renewenvironment{sidebar}[1][0.95\textwidth]{ - \hspace{0mm}\newline% - \noindent\begin{Sbox}\begin{minipage}{#1}% - \setlength\parskip{\medskipamount}% -}{ - \end{minipage}\end{Sbox}\doublebox{\TheSbox}% -} - -% For DocBook literallayout elements, see `./dblatex/dblatex-readme.txt`. -\usepackage{alltt} -% To preserve simple quotes in the blocs of code -\usepackage{upquote} diff -Nru asciidoc-8.6.10/dblatex/asciidoc-dblatex.xsl asciidoc-10.1.2/dblatex/asciidoc-dblatex.xsl --- asciidoc-8.6.10/dblatex/asciidoc-dblatex.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/dblatex/asciidoc-dblatex.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- -dblatex(1) XSL user stylesheet for asciidoc(1). -See dblatex(1) -p option. ---> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> - - <!-- TOC links in the titles, and in blue. --> - <xsl:param name="latex.hyperparam">colorlinks,linkcolor=blue,pdfstartview=FitH</xsl:param> - <xsl:param name="doc.publisher.show">1</xsl:param> - <xsl:param name="doc.lot.show"></xsl:param> - <xsl:param name="term.breakline">1</xsl:param> - <xsl:param name="doc.collab.show">0</xsl:param> - <xsl:param name="doc.section.depth">3</xsl:param> - <xsl:param name="table.in.float">0</xsl:param> - <xsl:param name="monoseq.hyphenation">0</xsl:param> - <xsl:param name="latex.output.revhistory">1</xsl:param> - - <!-- This doesn't work, don't know why, see: - http://dblatex.sourceforge.net/html/manual/apas03.html - ./docbook-xsl/common.xsl - --> - <!-- - <xsl:param name="doc.toc.show"> - <xsl:choose> - <xsl:when test="/processing-instruction('asciidoc-toc')"> -1 - </xsl:when> - <xsl:otherwise> -0 - </xsl:otherwise> - </xsl:choose> - </xsl:param> - <xsl:param name="doc.lot.show"> - <xsl:choose> - <xsl:when test="/book"> -figure,table,equation,example - </xsl:when> - </xsl:choose> - </xsl:param> - --> - <xsl:param name="doc.toc.show">1</xsl:param> - - <!-- - Override default literallayout template. - See `./dblatex/dblatex-readme.txt`. - --> - <xsl:template match="address|literallayout[@class!='monospaced']"> - <xsl:text>\begin{alltt}</xsl:text> - <xsl:text> \normalfont{} </xsl:text> - <xsl:apply-templates/> - <xsl:text> \end{alltt}</xsl:text> - </xsl:template> - - <xsl:template match="processing-instruction('asciidoc-pagebreak')"> - <!-- force hard pagebreak, varies from 0(low) to 4(high) --> - <xsl:text>\pagebreak[4] </xsl:text> - <xsl:apply-templates /> - <xsl:text> </xsl:text> - </xsl:template> - - <xsl:template match="processing-instruction('asciidoc-br')"> - <xsl:text>\newline </xsl:text> - </xsl:template> - - <xsl:template match="processing-instruction('asciidoc-hr')"> - <!-- draw a 444 pt line (centered) --> - <xsl:text>\begin{center} </xsl:text> - <xsl:text>\line(1,0){444} </xsl:text> - <xsl:text>\end{center} </xsl:text> - </xsl:template> - -</xsl:stylesheet> - diff -Nru asciidoc-8.6.10/dblatex/dblatex-readme.txt asciidoc-10.1.2/dblatex/dblatex-readme.txt --- asciidoc-8.6.10/dblatex/dblatex-readme.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/dblatex/dblatex-readme.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -AsciiDoc dblatex README -======================= - -Customization -------------- -The `./dblatex` directory contains: - -`./dblatex/asciidoc-dblatex.xsl`:: Optional dblatex XSL parameter -customization. - -`./dblatex/asciidoc-dblatex.sty`:: Optional customized LaTeX styles. - -Use these files with dblatex(1) `-p` and `-s` options, for example: - - dblatex -p ../dblatex/asciidoc-dblatex.xsl \ - -s ../dblatex/asciidoc-dblatex.sty article.xml - - -Limitations ------------ -Observed in dblatex 0.2.8. - -- dblatex doesn't seem to process the DocBook 'literallayout' element - correctly: it is rendered in a monospaced font and no inline - elements are processed. By default the normal font should be used - and almost all DocBook inline elements should be processed - (http://www.docbook.org/tdg/en/html/literallayout.html). I almost - fixed this by overriding the default dblatex literallayout template - (in `./dblatex/asciidoc-dblatex.xsl`) and using the LaTeX 'alltt' - package, but there are remaining problems: - - * Blank lines are replaced by a single space. - * The 'literallayout' element incorrectly wraps text when rendered - inside a table. - -- Callouts do not work inside DocBook 'literallayout' elements which - means callouts are not displayed inside AsciiDoc literal blocks. A - workaround is to change the AsciiDoc literal block to a listing - block. diff -Nru asciidoc-8.6.10/debian/a2x.sh asciidoc-10.1.2/debian/a2x.sh --- asciidoc-8.6.10/debian/a2x.sh 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/a2x.sh 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +python3 -m asciidoc.a2x "$@" diff -Nru asciidoc-8.6.10/debian/asciidoc-base.dirs asciidoc-10.1.2/debian/asciidoc-base.dirs --- asciidoc-8.6.10/debian/asciidoc-base.dirs 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-base.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/bin diff -Nru asciidoc-8.6.10/debian/asciidoc-base.install asciidoc-10.1.2/debian/asciidoc-base.install --- asciidoc-8.6.10/debian/asciidoc-base.install 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-base.install 2022-02-19 12:03:32.000000000 +0000 @@ -1,2 +1,4 @@ -asciidocapi.py usr/share/asciidoc -filters/* etc/asciidoc/filters +debian/asciidoc.sh usr/bin +debian/a2x.sh usr/bin +usr/lib/python*/dist-packages/ +usr/lib/python*/dist-packages/asciidoc/resources/filters etc/asciidoc diff -Nru asciidoc-8.6.10/debian/asciidoc-base.manpages asciidoc-10.1.2/debian/asciidoc-base.manpages --- asciidoc-8.6.10/debian/asciidoc-base.manpages 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-base.manpages 2022-02-19 12:03:32.000000000 +0000 @@ -1,2 +1,2 @@ -doc/a2x.1 -doc/asciidoc.1 +usr/share/man/man1/a2x.1 +usr/share/man/man1/asciidoc.1 diff -Nru asciidoc-8.6.10/debian/asciidoc-common.dirs asciidoc-10.1.2/debian/asciidoc-common.dirs --- asciidoc-8.6.10/debian/asciidoc-common.dirs 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-common.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -etc/asciidoc -etc/asciidoc/docbook-xsl -etc/asciidoc/filters -etc/asciidoc/stylesheets -usr/share/asciidoc diff -Nru asciidoc-8.6.10/debian/asciidoc-common.install asciidoc-10.1.2/debian/asciidoc-common.install --- asciidoc-8.6.10/debian/asciidoc-common.install 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-common.install 2022-02-19 12:03:32.000000000 +0000 @@ -1,9 +1,3 @@ -*.conf etc/asciidoc -docbook-xsl etc/asciidoc -docbook-xsl/*.xsl etc/asciidoc/docbook-xsl -images usr/share/asciidoc -images/icons usr/share/asciidoc -javascripts usr/share/asciidoc -stylesheets etc/asciidoc -stylesheets/*.css etc/asciidoc/stylesheets -themes etc/asciidoc +usr/lib/python*/dist-packages/asciidoc/resources/* etc/asciidoc +usr/lib/python*/dist-packages/asciidoc/resources/icons usr/share/asciidoc +usr/lib/python*/dist-packages/asciidoc/resources/javascripts usr/share/asciidoc diff -Nru asciidoc-8.6.10/debian/asciidoc-common.links asciidoc-10.1.2/debian/asciidoc-common.links --- asciidoc-8.6.10/debian/asciidoc-common.links 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-common.links 2022-02-19 12:03:32.000000000 +0000 @@ -1,4 +1 @@ -etc/asciidoc/stylesheets usr/share/asciidoc/stylesheets -usr/share/asciidoc/icons usr/share/asciidoc/images/icons -usr/share/asciidoc/images etc/asciidoc/images usr/share/asciidoc/javascripts etc/asciidoc/javascripts diff -Nru asciidoc-8.6.10/debian/asciidoc-dblatex.install asciidoc-10.1.2/debian/asciidoc-dblatex.install --- asciidoc-8.6.10/debian/asciidoc-dblatex.install 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-dblatex.install 2022-02-19 12:03:32.000000000 +0000 @@ -1 +1 @@ -dblatex etc/asciidoc +/usr/lib/python*/dist-packages/asciidoc/resources/dblatex etc/asciidoc diff -Nru asciidoc-8.6.10/debian/asciidoc-doc.dirs asciidoc-10.1.2/debian/asciidoc-doc.dirs --- asciidoc-8.6.10/debian/asciidoc-doc.dirs 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-doc.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/share/doc/asciidoc -usr/share/doc/asciidoc/examples diff -Nru asciidoc-8.6.10/debian/asciidoc-doc.docs asciidoc-10.1.2/debian/asciidoc-doc.docs --- asciidoc-8.6.10/debian/asciidoc-doc.docs 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-doc.docs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -README.asciidoc diff -Nru asciidoc-8.6.10/debian/asciidoc-doc.install asciidoc-10.1.2/debian/asciidoc-doc.install --- asciidoc-8.6.10/debian/asciidoc-doc.install 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-doc.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -examples/website usr/share/doc/asciidoc/examples diff -Nru asciidoc-8.6.10/debian/asciidoc-doc.links asciidoc-10.1.2/debian/asciidoc-doc.links --- asciidoc-8.6.10/debian/asciidoc-doc.links 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-doc.links 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -etc/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt usr/share/doc/asciidoc/examples/website/asciidoc-docbook-xsl.txt -etc/asciidoc/filters/graphviz/asciidoc-graphviz-sample.txt usr/share/doc/asciidoc/examples/website/asciidoc-graphviz-sample.txt -etc/asciidoc/stylesheets/asciidoc.css usr/share/doc/asciidoc/examples/website/asciidoc.css -etc/asciidoc/stylesheets/docbook-xsl.css usr/share/doc/asciidoc/docbook-xsl.css -etc/asciidoc/stylesheets/xhtml11-quirks.css usr/share/doc/asciidoc/examples/website/xhtml11-quirks.css -usr/share/asciidoc/icons usr/share/doc/asciidoc/images/icons -usr/share/asciidoc/images usr/share/doc/asciidoc/doc/images -usr/share/asciidoc/images usr/share/doc/asciidoc/examples/website/images -usr/share/asciidoc/javascripts/ASCIIMathML.js usr/share/doc/asciidoc/examples/website/ASCIIMathML.js -usr/share/asciidoc/javascripts/LaTeXMathML.js usr/share/doc/asciidoc/examples/website/LaTeXMathML.js -usr/share/asciidoc/javascripts/asciidoc.js usr/share/doc/asciidoc/examples/website/asciidoc.js -usr/share/doc/asciidoc/doc/a2x.1.txt usr/share/doc/asciidoc/examples/website/a2x.1.txt -usr/share/doc/asciidoc/doc/asciidoc.1.txt usr/share/doc/asciidoc/examples/website/manpage.txt -usr/share/doc/asciidoc/doc/asciidoc.txt usr/share/doc/asciidoc/examples/website/userguide.txt -usr/share/doc/asciidoc/doc/asciidocapi.txt usr/share/doc/asciidoc/examples/website/asciidocapi.txt -usr/share/doc/asciidoc/doc/asciimathml.txt usr/share/doc/asciidoc/examples/website/asciimathml.txt -usr/share/doc/asciidoc/doc/customers.csv usr/share/doc/asciidoc/examples/website/customers.csv -usr/share/doc/asciidoc/doc/epub-notes.txt usr/share/doc/asciidoc/examples/website/epub-notes.txt -usr/share/doc/asciidoc/doc/faq.txt usr/share/doc/asciidoc/examples/website/faq.txt -usr/share/doc/asciidoc/doc/latex-backend.txt usr/share/doc/asciidoc/examples/website/latex-backend.txt -usr/share/doc/asciidoc/doc/latex-bugs.txt usr/share/doc/asciidoc/examples/website/latex-bugs.txt -usr/share/doc/asciidoc/doc/latexmathml.txt usr/share/doc/asciidoc/examples/website/latexmathml.txt -usr/share/doc/asciidoc/doc/music-filter.txt usr/share/doc/asciidoc/examples/website/music-filter.txt -usr/share/doc/asciidoc/doc/publishing-ebooks-with-asciidoc.txt usr/share/doc/asciidoc/examples/website/publishing-ebooks-with-asciidoc.txt -usr/share/doc/asciidoc/doc/slidy-example.txt usr/share/doc/asciidoc/examples/website/slidy-example.txt -usr/share/doc/asciidoc/doc/slidy.txt usr/share/doc/asciidoc/examples/website/slidy.txt -usr/share/doc/asciidoc/doc/source-highlight-filter.txt usr/share/doc/asciidoc/examples/website/source-highlight-filter.txt -usr/share/doc/asciidoc/doc/testasciidoc.txt usr/share/doc/asciidoc/examples/website/testasciidoc.txt diff -Nru asciidoc-8.6.10/debian/asciidoc.sh asciidoc-10.1.2/debian/asciidoc.sh --- asciidoc-8.6.10/debian/asciidoc.sh 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc.sh 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +python3 -m asciidoc "$@" diff -Nru asciidoc-8.6.10/debian/asciidoc-tests.dirs asciidoc-10.1.2/debian/asciidoc-tests.dirs --- asciidoc-8.6.10/debian/asciidoc-tests.dirs 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-tests.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/bin diff -Nru asciidoc-8.6.10/debian/asciidoc-tests.install asciidoc-10.1.2/debian/asciidoc-tests.install --- asciidoc-8.6.10/debian/asciidoc-tests.install 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-tests.install 2022-02-19 12:03:32.000000000 +0000 @@ -1,2 +1,3 @@ tests/data/ etc/asciidoc tests/testasciidoc.conf etc/asciidoc +tests/testasciidoc.py usr/bin diff -Nru asciidoc-8.6.10/debian/asciidoc-tests.manpages asciidoc-10.1.2/debian/asciidoc-tests.manpages --- asciidoc-8.6.10/debian/asciidoc-tests.manpages 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc-tests.manpages 2022-02-19 12:03:32.000000000 +0000 @@ -1 +1 @@ -doc/testasciidoc.1 +usr/share/man/man1/testasciidoc.1 diff -Nru asciidoc-8.6.10/debian/asciidoc.yaml asciidoc-10.1.2/debian/asciidoc.yaml --- asciidoc-8.6.10/debian/asciidoc.yaml 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/asciidoc.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -addon: asciidoc -description: allow syntax highlighting and autodetection for asciidoc files -files: - - syntax/asciidoc.vim - - ftdetect/asciidoc.vim diff -Nru asciidoc-8.6.10/debian/changelog asciidoc-10.1.2/debian/changelog --- asciidoc-8.6.10/debian/changelog 2020-01-02 19:51:23.000000000 +0000 +++ asciidoc-10.1.2/debian/changelog 2022-07-03 18:01:28.000000000 +0000 @@ -1,8 +1,116 @@ -asciidoc (8.6.10-3~18.04.sav0) bionic; urgency=low +asciidoc (10.1.2-1~18.04.sav0) bionic; urgency=medium * Backport to Bionic + * debian/control: Set debhelper-compat (= 11) BD - -- Rob Savoury <savourytech@use.startmail.com> Thu, 02 Jan 2020 11:51:23 -0800 + -- Rob Savoury <savoury@savos.tech> Sun, 03 Jul 2022 11:01:28 -0700 + +asciidoc (10.1.2-1) unstable; urgency=medium + + * New upstream version 10.1.2 + * d/rules: Manually start tests + + -- Leon Marz <main@lmarz.org> Sat, 19 Feb 2022 13:03:32 +0100 + +asciidoc (10.1.1-1) unstable; urgency=medium + + * New upstream version 10.1.1 (Closes: #1002066) + + -- Leon Marz <main@lmarz.org> Tue, 21 Dec 2021 16:30:06 +0100 + +asciidoc (10.1.0-1) unstable; urgency=medium + + * New upstream version 10.1.0 + * d/control: annotate python dependency with :any in asciidoc-tests + + -- Leon Marz <main@lmarz.org> Sat, 18 Dec 2021 10:52:42 +0100 + +asciidoc (10.0.2-1) unstable; urgency=medium + + * Add symbolic link to javascripts directory in etc/asciidoc (Closes: #999372) + * New upstream version 10.0.2 (Closes: #998831) + + -- Leon Marz <main@lmarz.org> Sat, 13 Nov 2021 10:36:58 +0100 + +asciidoc (10.0.1-3) unstable; urgency=medium + + [ Bastian Germann ] + * Use pristine-tar (branch existing) + + [ Leon Marz ] + * Use custom scripts for usr/bin (Closes: #998114) + + -- Leon Marz <main@lmarz.org> Sat, 30 Oct 2021 17:56:56 +0200 + +asciidoc (10.0.1-2) unstable; urgency=medium + + * d/control: Add build dependency python3-setuptools + + -- Leon Marz <main@lmarz.org> Fri, 29 Oct 2021 18:29:00 +0200 + +asciidoc (10.0.1-1) unstable; urgency=medium + + * New maintainer (Closes: #934015) + * New upstream version (Closes: #980904) + * Remove vim-asciidoc (Closes: #954780) + * Remove asciidoc-doc as there are no real docs + * Change upstream url + * d/control: Bump Standards-Version to 4.6.0 + * d/control: Bump debhelper-compat version to 13 + * d/control: Add dependency docbook-xsl to asciidoc-base + * d/rules: Switch to pybuild + * d/rules: Remove some overrides and clean dh_install + * d/rules: Reenable tests + * d/rules: Make python test script executable + * d/patches: Drop normpath-not-realpath.path + * d/patches: Drop vim-asciidoc-add_dummy_ftdetect.patch + * d/patches: Rewrite testasciidoc_usage.patch + * d/patches: Add enable-nonet-for-xsltproc.patch (Closes: #980930) + * d/patches: Add recognize-etc-asciidoc.patch + * d/patches: Drop fix_asciidoc_api_doc.patch + - Replaced by recognize-etc-asciidoc.patch + * d/copyright: Add Upstream-Contact + * d/copyright: Update copyright information + + -- Leon Marz <main@lmarz.org> Fri, 29 Oct 2021 10:53:00 +0200 + +asciidoc (9.0.0~rc2-1) unstable; urgency=medium + + * New upstream version 9.0.0~rc2 + * New dependency: add xsltproc to asciidoc-base (Closes: #956729) + * Remove patch integrated upstream and refresh the rest of the patches + * Re-disable tests for now as not working. + * d/control: Bump standards to 4.5.0 + + -- Joseph Herlant <aerostitch@debian.org> Sun, 26 Apr 2020 19:54:51 -0700 + +asciidoc (9.0.0~rc1-1) unstable; urgency=medium + + * New upstream version 9.0.0rc1 (Closes: #945391) + * Refresh patches and remove patch integrated in the release + * d/control: + * bump standards to 4.4.1 + * fix typo in package description + * adding an explicit Rules-Requires-Root field + * d/gbp.conf: move to deb14 branch naming for debian branch + + -- Joseph Herlant <aerostitch@debian.org> Wed, 11 Dec 2019 16:26:21 -0800 + +asciidoc (8.6.10+git20190307.51d7c14-1) unstable; urgency=medium + + * Switch upstream to asciidoc-py3 (Closes: #936151) + * New upstream version snapshot 8.6.10+git20190307.51d7c14 + * Refresh patches for new release + * Switch dependencies to python3 + * d/control: + * bump standards to 4.4.0 + * bump debhelper-control to 12 + * d/changelog: fix file-contains-trailing-whitespace + * asciidoc-doc: add doc-base registration + * Add autopkgtest suite + * Add upstream/metadata for dep-12 compatibility + + -- Joseph Herlant <aerostitch@debian.org> Sat, 07 Sep 2019 20:41:47 -0700 asciidoc (8.6.10-3) unstable; urgency=low @@ -403,4 +511,3 @@ * Initial Release. -- Fredrik Steen <stone@debian.org> Mon, 28 Feb 2005 15:02:05 +0100 - diff -Nru asciidoc-8.6.10/debian/clean asciidoc-10.1.2/debian/clean --- asciidoc-8.6.10/debian/clean 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/clean 2022-02-19 12:03:32.000000000 +0000 @@ -4,3 +4,8 @@ debian/asciidoc.1.xml debian/testasciidoc.1.xml debian/a2x.1.xml +asciidoc.egg-info/PKG-INFO +asciidoc.egg-info/SOURCES.txt +asciidoc.egg-info/dependency_links.txt +asciidoc.egg-info/entry_points.txt +asciidoc.egg-info/top_level.txt diff -Nru asciidoc-8.6.10/debian/compat asciidoc-10.1.2/debian/compat --- asciidoc-8.6.10/debian/compat 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -11 diff -Nru asciidoc-8.6.10/debian/control asciidoc-10.1.2/debian/control --- asciidoc-8.6.10/debian/control 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/control 2022-07-03 18:00:23.000000000 +0000 @@ -1,18 +1,19 @@ Source: asciidoc Section: text Priority: optional -Maintainer: Joseph Herlant <herlantj@gmail.com> -Build-Depends: debhelper (>= 11), dh-python -Build-Depends-Indep: python (>= 2.4), xmlto -Standards-Version: 4.1.5 +Maintainer: Leon Marz <main@lmarz.org> +Build-Depends: debhelper-compat (= 11), dh-python, python3, python3-setuptools +Build-Depends-Indep: xmlto +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/debian/asciidoc Vcs-Git: https://salsa.debian.org/debian/asciidoc.git -Homepage: http://www.asciidoc.org +Homepage: https://asciidoc.org +Rules-Requires-Root: no Package: asciidoc Architecture: all Depends: asciidoc-base, ${misc:Depends} -Recommends: asciidoc-dblatex, asciidoc-doc, vim-asciidoc +Recommends: asciidoc-dblatex Multi-Arch: foreign Description: Highly configurable text format for writing documentation AsciiDoc is a text document format for writing articles, books, manuals and @@ -26,54 +27,12 @@ AsciiDoc files are designed to be viewed, edited and printed directly or translated to other presentation formats . - This metapackage provides a fully functionnal asciidoc environment working + This metapackage provides a fully functional asciidoc environment working with dblatex for historical purposes. -Package: vim-asciidoc -Architecture: all -Depends: vim-addon-manager, ${misc:Depends} -Suggests: asciidoc-base -Replaces: asciidoc (<< 8.6.9-4) -Breaks: asciidoc (<< 8.6.9-4) -Multi-Arch: foreign -Description: Vim syntax highlighting files for asciidoc - AsciiDoc is a text document format for writing articles, books, manuals and - UNIX man pages. AsciiDoc files can be translated to HTML (with or without - stylesheets), DocBook (articles, books and refentry documents) and LinuxDoc - using the asciidoc command. AsciiDoc can also be used to build and maintain - websites. - . - You write an AsciiDoc document the same way you would write a - normal text document, there are no markup tags or weird format notations. - AsciiDoc files are designed to be viewed, edited and printed directly or - translated to other presentation formats - . - This package provides vim syntax highlighting for asciidoc. - -Package: asciidoc-doc -Section: doc -Architecture: all -Depends: asciidoc-common (= ${binary:Version}), ${misc:Depends} -Replaces: asciidoc (<< 8.6.9-4) -Breaks: asciidoc (<< 8.6.9-4) -Multi-Arch: foreign -Description: Examples and documentation for asciidoc - AsciiDoc is a text document format for writing articles, books, manuals and - UNIX man pages. AsciiDoc files can be translated to HTML (with or without - stylesheets), DocBook (articles, books and refentry documents) and LinuxDoc - using the asciidoc command. AsciiDoc can also be used to build and maintain - websites. - . - You write an AsciiDoc document the same way you would write a - normal text document, there are no markup tags or weird format notations. - AsciiDoc files are designed to be viewed, edited and printed directly or - translated to other presentation formats - . - This package provides examples and documentation for asciidoc. - Package: asciidoc-common Architecture: all -Depends: ${misc:Depends} +Depends: python3, ${misc:Depends} Replaces: asciidoc (<< 8.6.9-4) Breaks: asciidoc (<< 8.6.9-4) Multi-Arch: foreign @@ -94,10 +53,11 @@ Package: asciidoc-base Architecture: all Depends: asciidoc-common (= ${binary:Version}), + docbook-xsl, libxml2-utils, - python (>= 2.4), + xsltproc, ${misc:Depends}, - ${python:Depends} + ${python3:Depends} Recommends: xmlto Suggests: asciidoc-doc, docbook-utils, source-highlight Replaces: asciidoc (<< 8.6.9-4) @@ -121,7 +81,7 @@ Package: asciidoc-dblatex Architecture: all -Depends: asciidoc-base, dblatex, docbook-utils, ${misc:Depends} +Depends: asciidoc-base, dblatex, docbook-utils, python3, ${misc:Depends} Suggests: asciidoc-doc, epubcheck Multi-Arch: foreign Description: Asciidoc package including dblatex dependencies @@ -161,7 +121,7 @@ Package: asciidoc-tests Architecture: all -Depends: asciidoc-base, python (>= 2.4), ${misc:Depends}, ${python:Depends} +Depends: asciidoc-base, python3:any, ${misc:Depends}, ${python3:Depends} Suggests: asciidoc-doc Multi-Arch: foreign Description: Test framework for asciidoc diff -Nru asciidoc-8.6.10/debian/copyright asciidoc-10.1.2/debian/copyright --- asciidoc-8.6.10/debian/copyright 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/copyright 2022-02-19 12:03:32.000000000 +0000 @@ -1,6 +1,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: asciidoc -Source: https://github.com/asciidoc/asciidoc +Upstream-Contact: AsciiDoc Contributors https://groups.google.com/group/asciidoc +Source: https://github.com/asciidoc-py/asciidoc-py Files: * Copyright: 2002-2013, Stuart Rackham @@ -8,23 +9,35 @@ 2008-2009, Gouichi Iisaka 2002, Mihai Bazon 2006, Troy D. Hanson - 2008-2009, Gouichi Iisaka + 2013-2021, AsciiDoc Contributors License: GPL-2+ -Files: a2x.py - filters/latex/latex2img.py -Copyright: 2002-2011, Stuart Rackham -License: MIT - Unspecified MIT style license. +Files: asciidoc/asciidoc.py + asciidoc/resources/filters/music/music2png.py + asciidoc/resources/filters/code/code-filter.py + asciidoc/resources/filters/latex/latex2img.py +Copyright: 2002-2013, Stuart Rackham + 2013-2021, AsciiDoc Contributors +License: GPL-2-only + +Files: asciidoc/a2x.py +Copyright: 2002-2013, Stuart Rackham + 2013-2020, AsciiDoc Contributors +License: Expat -Files: lang-cs.conf +Files: asciidoc/resources/lang-cs.conf Copyright: 2012, Petr Klíma -License: GFDL-1.3 +License: GFDL-NIV-1.3 + +Files: asciidoc/resources/lang-pl.conf +Copyright: 2015, Kerusey Karyu +License: GFDL-NIV-1.3 Files: debian/* Copyright: 2005-2007, Fredrik Steen <stone@debian.org> 2007-2014, Alexander Wirt <formorer@debian.org> - 2014, Joseph Herlant <herlantj@gmail.com> + 2014-2021, Joseph Herlant <herlantj@gmail.com> + 2021 Leon Marz <main@lmarz.org> License: GPL-2+ License: GPL-2+ @@ -46,9 +59,49 @@ Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public - License can be found in the file `/usr/share/common-licenses/GPL-2'. + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + +License: GPL-2-only + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; version 2. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + `/usr/share/common-licenses/GPL-2'. + +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -License: GFDL-1.3 +License: GFDL-NIV-1.3 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no diff -Nru asciidoc-8.6.10/debian/gbp.conf asciidoc-10.1.2/debian/gbp.conf --- asciidoc-8.6.10/debian/gbp.conf 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/gbp.conf 2022-02-19 12:03:32.000000000 +0000 @@ -1,6 +1,6 @@ [DEFAULT] -debian-branch = master +debian-branch = debian/master upstream-branch = upstream -pristine-tar = False +pristine-tar = True debian-tag=debian/%(version)s upstream-tag=upstream/%(version)s diff -Nru asciidoc-8.6.10/debian/NEWS asciidoc-10.1.2/debian/NEWS --- asciidoc-8.6.10/debian/NEWS 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/NEWS 2022-02-19 12:03:32.000000000 +0000 @@ -1,3 +1,23 @@ +asciidoc (10.0.1-1) unstable; urgency=medium + + vim-asciidoc has been dropped in favor of vim-runtime, + which already contains the asciidoc.vim syntax file. + See #954780 for more info. + + -- Leon Marz <main@lmarz.org> Wed, 20 Oct 2021 14:13:00 +0200 + +asciidoc (8.6.10+git20190307.51d7c14-1) unstable; urgency=medium + + This new version of asciidoc is using the unreleased python3 implementation + as python2 is deprecated. This implementation has a very low maturity to it + and has not seen an upstream release yet. As the maintenance of this upstream + is very low and they advise to use asciidoctor in the past, we advise you to + use asciidoctor instead as it is now the official reference for the AsciiDoc + language and is way ahead of this Python implementation both in terms of + maintenance and support of language features. + + -- Joseph Herlant <aerostitch@debian.org> Sat, 07 Sep 2019 20:41:47 -0700 + asciidoc (8.6.10-1) unstable; urgency=low The version 8.6.10 has been marked as FINAL RELEASE by the upstream maintainers. diff -Nru asciidoc-8.6.10/debian/patches/767179_speed_up_syntax_highlighting.patch asciidoc-10.1.2/debian/patches/767179_speed_up_syntax_highlighting.patch --- asciidoc-8.6.10/debian/patches/767179_speed_up_syntax_highlighting.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/767179_speed_up_syntax_highlighting.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: Implement the solution proposed in #767179 to avoid some slowness - during the manipulation of big files with vim-asciidoc. Not forwarding as - upstream has officially stopped the development of this tool. -Author: Joseph Herlant <herlantj@gmail.com> -Forwarded: No ---- a/vim/syntax/asciidoc.vim -+++ b/vim/syntax/asciidoc.vim -@@ -23,8 +23,6 @@ - endif - - syn clear --syn sync fromstart --syn sync linebreaks=100 - - " Run :help syn-priority to review syntax matching priority. - syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED diff -Nru asciidoc-8.6.10/debian/patches/adding_testasciidoc_manpage.patch asciidoc-10.1.2/debian/patches/adding_testasciidoc_manpage.patch --- asciidoc-8.6.10/debian/patches/adding_testasciidoc_manpage.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/adding_testasciidoc_manpage.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,127 +0,0 @@ -Author: Joseph Herlant <herlantj@gmail.com> -Description: Adding manpage for testasciidoc to remove lintian warning: -binary-without-manpage usr/bin/testasciidoc -Forwared: https://github.com/asciidoc/asciidoc/pull/10 ---- /dev/null -+++ b/doc/testasciidoc.1.txt -@@ -0,0 +1,120 @@ -+TESTASCIIDOC(1) -+=============== -+:doctype: manpage -+ -+ -+NAME -+---- -+testasciidoc - Run AsciiDoc conformance tests specified in configuration file. -+ -+ -+SYNOPSIS -+-------- -+*testasciidoc* ['OPTIONS'] 'COMMAND' -+ -+ -+DESCRIPTION -+----------- -+The testasciidoc command runs AsciiDoc conformance tests specified in -+configuration file. -+ -+ -+COMMANDS -+-------- -+The testasciidoc toolset has three different commands: -+ -+ testasciidoc list -+ testasciidoc run [NUMBER] [BACKEND] [OPTIONS] -+ testasciidoc update [NUMBER] [BACKEND] [OPTIONS] -+ -+The commands perform as follows: -+ -+*list*:: -+ List available tests cases. -+ -+*run*:: -+ Execute tests (regenerate temporary test cases and compare them to the -+ reference files). -+ -+*update*:: -+ Regenerate and update test data reference files. -+ Needs to be launched at least once to have the reference files to compare to -+ during the tests. -+ -+Where: -+ -+*NUMBER*:: -+ Is the index number of the test case from the `testasciidoc list` command. -+ -+*BACKEND*:: -+ Is the asciidoc backend to use. -+ -+*OPTIONS*:: -+ Are the options listed below. -+ -+ -+OPTIONS -+------- -+*-f, --conf-file*='CONF_FILE':: -+ Use configuration file CONF_FILE for more information about the -+ configuration file format refer to the tests documentation. -+ -+*--force*:: -+ Update all test data overwriting existing data -+ -+ -+EXAMPLES -+-------- -+`testasciidoc list`:: -+ Lists all the test actions available for running or updating. -+ -+`testasciidoc run`:: -+ Runs all the testing actions available. -+ -+`testasciidoc run 1 html5 --conf-file=/etc/asciidoc/testasciidoc.conf`:: -+ Run the test case 1 for the html5 asciidoc backend using the configuration file -+ /etc/asciidoc/testasciidoc.conf. -+ -+`testasciidoc update 1 html5`:: -+ Generate or update the reference files used for the tests cases 1st action of -+ the html5 asciidoc backend. -+ -+ -+EXIT STATUS -+----------- -+*0*:: -+ Success -+ -+*1*:: -+ Failure (syntax or usage error; configuration error; document -+ processing failure; unexpected error). -+ -+ -+BUGS -+---- -+See the AsciiDoc distribution BUGS file. -+ -+ -+AUTHOR -+------ -+AsciiDoc was originally written by Stuart Rackham. Many people have -+contributed to it. -+ -+ -+RESOURCES -+--------- -+SourceForge: <http://sourceforge.net/projects/asciidoc/> -+ -+Main web site: <http://asciidoc.org/> -+ -+ -+SEE ALSO -+-------- -+asciidoc(1), a2x(1) -+ -+ -+COPYING -+------- -+Copyright \(C) 2014 Joseph Herlant. Free use of this software is -+granted under the terms of the GNU General Public License (GPL). -+ diff -Nru asciidoc-8.6.10/debian/patches/enable-nonet-for-xsltproc.patch asciidoc-10.1.2/debian/patches/enable-nonet-for-xsltproc.patch --- asciidoc-8.6.10/debian/patches/enable-nonet-for-xsltproc.patch 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/enable-nonet-for-xsltproc.patch 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,25 @@ +From cbb944434e36341d561c3b1e05ff2c50fa014ef7 Mon Sep 17 00:00:00 2001 +From: Leon Marz <main@lmarz.org> +Date: Thu, 21 Oct 2021 13:08:59 +0200 +Subject: [PATCH] Enable nonet for xsltproc + +--- + asciidoc/a2x.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/asciidoc/a2x.py b/asciidoc/a2x.py +index 4e9d363..8ad958b 100644 +--- a/asciidoc/a2x.py ++++ b/asciidoc/a2x.py +@@ -519,7 +519,7 @@ class A2X(AttrDict): + self.asciidoc_opts.append(('--doctype', self.doctype)) + for attr in self.attributes: + self.asciidoc_opts.append(('--attribute', attr)) +-# self.xsltproc_opts += ' --nonet' ++ self.xsltproc_opts += ' --nonet' + if self.verbose: + self.asciidoc_opts.append(('--verbose',)) + self.dblatex_opts += ' -V' +-- +2.33.0 + diff -Nru asciidoc-8.6.10/debian/patches/fix_asciidoc_api_doc.patch asciidoc-10.1.2/debian/patches/fix_asciidoc_api_doc.patch --- asciidoc-8.6.10/debian/patches/fix_asciidoc_api_doc.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/fix_asciidoc_api_doc.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -Author: Alexander Wirt <formorer@debian.org> -Description: Fix some import issues in the asciidoc API ---- a/asciidocapi.py -+++ b/asciidocapi.py -@@ -5,6 +5,8 @@ - The AsciiDocAPI class provides an API for executing asciidoc. Minimal example - compiles `mydoc.txt` to `mydoc.html`: - -+ import sys -+ sys.path.append("/usr/share/asciidoc") - import asciidocapi - asciidoc = asciidocapi.AsciiDocAPI() - asciidoc.execute('mydoc.txt') -@@ -17,6 +19,8 @@ - 1. Check execution: - - >>> import StringIO -+ >>> import sys -+ >>> sys.path.append("/usr/share/asciidoc") - >>> infile = StringIO.StringIO('Hello *{author}*') - >>> outfile = StringIO.StringIO() - >>> asciidoc = AsciiDocAPI() -@@ -36,6 +40,8 @@ - 2. Check error handling: - - >>> import StringIO -+ >>> import sys -+ >>> sys.path.append("/usr/share/asciidoc") - >>> asciidoc = AsciiDocAPI() - >>> infile = StringIO.StringIO('---------') - >>> outfile = StringIO.StringIO() ---- a/doc/asciidocapi.txt -+++ b/doc/asciidocapi.txt -@@ -44,6 +44,8 @@ - - [source,python] - ------------------------------------------------------------------------------- -+import sys -+sys.path.append("/usr/share/asciidoc") - from asciidocapi import AsciiDocAPI - asciidoc = AsciiDocAPI() - asciidoc.execute('mydoc.txt') -@@ -57,6 +59,8 @@ - [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 - Type "help", "copyright", "credits" or "license" for more information. - >>> from asciidocapi import AsciiDocAPI -+>>> import sys -+>>> sys.path.append("/usr/share/asciidoc") - >>> import StringIO - >>> infile = StringIO.StringIO('Hello *{author}*') - >>> outfile = StringIO.StringIO() diff -Nru asciidoc-8.6.10/debian/patches/normpath-not-realpath.patch asciidoc-10.1.2/debian/patches/normpath-not-realpath.patch --- asciidoc-8.6.10/debian/patches/normpath-not-realpath.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/normpath-not-realpath.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,13 +0,0 @@ -Author: -Description: fixes a python bug with normpath ---- a/asciidoc.py -+++ b/asciidoc.py -@@ -252,7 +252,7 @@ - else: - assert os.path.isdir(directory) - directory = os.path.realpath(directory) -- fname = os.path.realpath(fname) -+ fname = os.path.normpath(fname) - return os.path.commonprefix((directory, fname)) == directory - - def safe(): diff -Nru asciidoc-8.6.10/debian/patches/recognize-etc-asciidoc.patch asciidoc-10.1.2/debian/patches/recognize-etc-asciidoc.patch --- asciidoc-8.6.10/debian/patches/recognize-etc-asciidoc.patch 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/recognize-etc-asciidoc.patch 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,58 @@ +From 3164ecd47260fae2b6e5ee5e68c6b3dcf4a56857 Mon Sep 17 00:00:00 2001 +From: Leon Marz <main@lmarz.org> +Date: Thu, 21 Oct 2021 12:58:15 +0200 +Subject: [PATCH] Recognize /etc/asciidoc + +Add /etc/asciidoc and /usr/share/asciidoc as an option, +where to find the resources +--- + asciidoc/a2x.py | 4 ++++ + asciidoc/asciidoc.py | 3 +++ + 2 files changed, 7 insertions(+) + +diff --git a/asciidoc/a2x.py b/asciidoc/a2x.py +index 4e9d363..44012ca 100644 +--- a/asciidoc/a2x.py ++++ b/asciidoc/a2x.py +@@ -50,6 +50,8 @@ from . import asciidoc + from .collections import DefaultAttrDict as AttrDict + + CONF_DIR = os.path.join(os.path.dirname(__file__), 'resources') ++if not os.path.isdir(CONF_DIR): ++ CONF_DIR = '/etc/asciidoc' + METADATA = {} + with open(os.path.join(os.path.dirname(__file__), '__metadata__.py')) as f: + exec(f.read(), METADATA) +@@ -420,6 +422,8 @@ class A2X(AttrDict): + ''' + CONF_FILE = 'a2x.conf' + a2xdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'resources') ++ if not os.path.isdir(a2xdir): ++ a2xdir = '/etc/asciidoc' + conf_files = [] + # From a2x.py directory. + conf_files.append(os.path.join(a2xdir, CONF_FILE)) +diff --git a/asciidoc/asciidoc.py b/asciidoc/asciidoc.py +index 4c323f1..ba383d9 100644 +--- a/asciidoc/asciidoc.py ++++ b/asciidoc/asciidoc.py +@@ -40,6 +40,8 @@ from .exceptions import EAsciiDoc + from . import utils + + CONF_DIR = os.path.join(os.path.dirname(__file__), 'resources') ++if not os.path.isdir(CONF_DIR): ++ CONF_DIR = '/etc/asciidoc' + METADATA = {} + with open(os.path.join(os.path.dirname(__file__), '__metadata__.py')) as f: + exec(f.read(), METADATA) +@@ -4697,6 +4699,7 @@ class Config: + result = [] + # Load from global configuration directory. + result.append(CONF_DIR) ++ result.append('/usr/share/asciidoc') + # Load configuration files from ~/.asciidoc if it exists. + if USER_DIR is not None: + result.append(USER_DIR) +-- +2.33.0 + diff -Nru asciidoc-8.6.10/debian/patches/series asciidoc-10.1.2/debian/patches/series --- asciidoc-8.6.10/debian/patches/series 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/series 2022-02-19 12:03:32.000000000 +0000 @@ -1,7 +1,4 @@ -normpath-not-realpath.patch testasciidoc_path.patch testasciidoc_usage.patch -fix_asciidoc_api_doc.patch -adding_testasciidoc_manpage.patch -vim-asciidoc-add_dummy_ftdetect.patch -767179_speed_up_syntax_highlighting.patch +enable-nonet-for-xsltproc.patch +recognize-etc-asciidoc.patch diff -Nru asciidoc-8.6.10/debian/patches/testasciidoc_path.patch asciidoc-10.1.2/debian/patches/testasciidoc_path.patch --- asciidoc-8.6.10/debian/patches/testasciidoc_path.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/testasciidoc_path.patch 2022-02-19 12:03:32.000000000 +0000 @@ -1,13 +1,24 @@ -Author: Alexander Wirt <formorer@debian.org> -Description: Help testasciidoc to find its libs +From 47cdcabd598551e81ccc50806b43ed6f5200a7f7 Mon Sep 17 00:00:00 2001 +From: Leon Marz <main@lmarz.org> +Date: Thu, 21 Oct 2021 13:06:20 +0200 +Subject: [PATCH] testasciidoc path + +--- + tests/testasciidoc.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/testasciidoc.py b/tests/testasciidoc.py +index 2aace85..2db41fa 100755 --- a/tests/testasciidoc.py +++ b/tests/testasciidoc.py -@@ -24,6 +24,8 @@ - import os, sys, re, difflib - import time +@@ -12,6 +12,7 @@ import shutil + import sys -+sys.path.append('/usr/share/asciidoc/') -+ - if sys.platform[:4] == 'java': - # Jython cStringIO is more compatible with CPython StringIO. - import cStringIO as StringIO + sys.path.append(str(Path(__file__).resolve().parent.parent)) ++sys.path.append('/usr/share/asciidoc') + from asciidoc import asciidoc # noqa: E402 + + # Default backends. +-- +2.33.0 + diff -Nru asciidoc-8.6.10/debian/patches/testasciidoc_usage.patch asciidoc-10.1.2/debian/patches/testasciidoc_usage.patch --- asciidoc-8.6.10/debian/patches/testasciidoc_usage.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/testasciidoc_usage.patch 2022-02-19 12:03:32.000000000 +0000 @@ -1,30 +1,26 @@ -Author: Alexander Wirt <formorer@debian.org> -Description: remove .py extension for usage and tell it where the conf is +From 582098b59de864d599ffc01eabc3729577811e8d Mon Sep 17 00:00:00 2001 +From: Leon Marz <main@lmarz.org> +Date: Thu, 21 Oct 2021 12:49:21 +0200 +Subject: [PATCH] testasciidoc usage + +Set the correct path to the conffile +--- + tests/testasciidoc.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/testasciidoc.py b/tests/testasciidoc.py +index 2aace85..4777578 100755 --- a/tests/testasciidoc.py +++ b/tests/testasciidoc.py -@@ -1,6 +1,6 @@ - #!/usr/bin/env python +@@ -440,6 +440,8 @@ if __name__ == '__main__': + args = parser.parse_args() --USAGE = '''Usage: testasciidoc.py [OPTIONS] COMMAND -+USAGE = '''Usage: testasciidoc [OPTIONS] COMMAND - - Run AsciiDoc conformance tests specified in configuration FILE. - -@@ -12,7 +12,7 @@ - Options: - -f, --conf-file=CONF_FILE - Use configuration file CONF_FILE (default configuration file is -- testasciidoc.conf in testasciidoc.py directory) -+ /etc/asciidoc/testasciidoc.conf) - --force - Update all test data overwriting existing data''' - -@@ -409,7 +409,7 @@ - if len(args) == 0: - usage() - sys.exit(1) -- conffile = os.path.join(os.path.dirname(sys.argv[0]), 'testasciidoc.conf') -+ conffile = '/etc/asciidoc/testasciidoc.conf' - force = False - for o,v in opts: - if o == '--force': + conffile = os.path.join(os.path.dirname(sys.argv[0]), 'testasciidoc.conf') ++ if not os.path.isfile(conffile): ++ conffile = '/etc/asciidoc/testasciidoc.conf' + force = 'force' in args and args.force is True + if args.conf_file is not None: + conffile = args.conf_file +-- +2.33.0 + diff -Nru asciidoc-8.6.10/debian/patches/vim-asciidoc-add_dummy_ftdetect.patch asciidoc-10.1.2/debian/patches/vim-asciidoc-add_dummy_ftdetect.patch --- asciidoc-8.6.10/debian/patches/vim-asciidoc-add_dummy_ftdetect.patch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/patches/vim-asciidoc-add_dummy_ftdetect.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -Author: Joseph Herlant <herlantj@gmail.com> -Description: No description. ---- /dev/null -+++ b/vim/ftdetect/asciidoc.vim -@@ -0,0 +1,4 @@ -+" Detection of asciidoc formated files in vim using the file extension -+" as upstream removed the autodetection -+" See upstream commit 373ca26f6f9c17e51d5beef328d06d4527e0c88f -+au BufRead,BufNewFile *.adoc,*.asciidoc set filetype=asciidoc diff -Nru asciidoc-8.6.10/debian/rules asciidoc-10.1.2/debian/rules --- asciidoc-8.6.10/debian/rules 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/rules 2022-02-19 12:03:32.000000000 +0000 @@ -1,33 +1,34 @@ #!/usr/bin/make -f # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 -#export DH_OPTIONS=-v +# export DH_VERBOSE=1 +# export DH_OPTIONS=-v %: - dh $@ --with python2 + dh $@ --with python3 --buildsystem=pybuild override_dh_install: - dh_install \ - -X debian/asciidoc/usr/bin/a2x \ - -X debian/asciidoc/usr/bin/a2x.py \ - -X debian/asciidoc/usr/bin/asciidoc.py \ - -X debian/asciidoc/usr/bin/asciidoc - install -m0755 a2x.py debian/asciidoc-base/usr/bin/a2x - install -m0755 asciidoc.py debian/asciidoc-base/usr/bin/asciidoc - install -m0755 tests/testasciidoc.py debian/asciidoc-tests/usr/bin/testasciidoc - cp -a examples/website/ debian/asciidoc-doc/usr/share/doc/asciidoc/examples/ - install -m0644 CHANGELOG.txt debian/asciidoc-doc/usr/share/doc/asciidoc/examples/website/CHANGELOG.txt - install -m0644 INSTALL.txt debian/asciidoc-doc/usr/share/doc/asciidoc/examples/website/INSTALL.txt - install -m0644 README.asciidoc debian/asciidoc-doc/usr/share/doc/asciidoc/examples/website/README.asciidoc - cp -a doc/ debian/asciidoc-doc/usr/share/doc/asciidoc/ - rm debian/asciidoc-doc/usr/share/doc/asciidoc/doc/*.1 - ./asciidoc.py -b xhtml11 -a iconsdir=/usr/share/asciidoc/images/icons \ - -a footer-style=none \ - -o debian/asciidoc-doc/usr/share/doc/asciidoc/userguide.html doc/asciidoc.txt + dh_install + mv debian/asciidoc-base/usr/bin/asciidoc.sh debian/asciidoc-base/usr/bin/asciidoc + mv debian/asciidoc-base/usr/bin/a2x.sh debian/asciidoc-base/usr/bin/a2x + mv debian/asciidoc-tests/usr/bin/testasciidoc.py debian/asciidoc-tests/usr/bin/testasciidoc + find debian -type d -name __pycache__ -prune -exec rm -rf {} \; + rm -rf debian/asciidoc-base/usr/lib/python*/dist-packages/asciidoc/resources + rm -rf debian/asciidoc-base/usr/lib/python*/dist-packages/asciidoc-*.egg-info + rm -rf debian/asciidoc-common/etc/asciidoc/dblatex + rm -rf debian/asciidoc-common/etc/asciidoc/icons + rm -rf debian/asciidoc-common/etc/asciidoc/javascripts + rm -rf debian/asciidoc-common/etc/asciidoc/filters + rm -rf debian/tmp/usr/bin/* -override_dh_link: - rm -rf debian/asciidoc-common/usr/share/asciidoc/images/icons - dh_link +override_dh_installman: + python3 -m asciidoc.a2x -f manpage doc/asciidoc.1.txt + python3 -m asciidoc.a2x -f manpage doc/a2x.1.txt + python3 -m asciidoc.a2x -f manpage doc/testasciidoc.1.txt + mkdir -p debian/tmp/usr/share/man/man1 + mv doc/*.1 debian/tmp/usr/share/man/man1 + dh_installman -override_dh_compress: - dh_compress -X.txt +override_dh_auto_test: +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + python3 tests/testasciidoc.py run +endif diff -Nru asciidoc-8.6.10/debian/tests/control asciidoc-10.1.2/debian/tests/control --- asciidoc-8.6.10/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/tests/control 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,3 @@ +Tests: generate-man +Depends: @ +Restrictions: allow-stderr diff -Nru asciidoc-8.6.10/debian/tests/generate-man asciidoc-10.1.2/debian/tests/generate-man --- asciidoc-8.6.10/debian/tests/generate-man 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/tests/generate-man 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,119 @@ +#!/bin/sh + +set -exu + +# This is a test that generates a man page and compares the output to what's expected. +cd ${AUTOPKGTEST_TMP} + +export SOURCE_DATE_EPOCH=1566164804 +cat > example.adoc << __EOF__ += example(1) +Joseph Herlant +v1.0.0 +:doctype: manpage +:manmanual: EXAMPLE +:mansource: EXAMPLE + +== Name + +example - an example of manpage + +== Synopsis + +*example* [_OPTION_]... _FILE_... + +== Options + +*-o, --out-file*=_OUT_FILE_:: + Write result to file _OUT_FILE_. + +== Exit status + +*0*:: + Success. + Foo! + +*1*:: + Failure. + Bar :( + +== Resources + +*Project web site:* http://example.org + +== Copying + +Copyright (C) 2019 {author}. + +Free use of this software is granted under the terms of the MIT License. +__EOF__ + +cat > example.ref << __EOF__ +'\" t +.\" Title: example +.\" Author: Joseph Herlant +.\" Date: v1.0.0 +.\" Manual: EXAMPLE +.\" Source: EXAMPLE +.\" Language: English +.\" +.TH "EXAMPLE" "1" "v1\&.0\&.0" "EXAMPLE" "EXAMPLE" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +example \- an example of manpage +.SH "SYNOPSIS" +.sp +\fBexample\fR [\fIOPTION\fR]\&... \fIFILE\fR\&... +.SH "OPTIONS" +.PP +\fB\-o, \-\-out\-file\fR=\fIOUT_FILE\fR +.RS 4 +Write result to file +\fIOUT_FILE\fR\&. +.RE +.SH "EXIT STATUS" +.PP +\fB0\fR +.RS 4 +Success\&. Foo! +.RE +.PP +\fB1\fR +.RS 4 +Failure\&. Bar :( +.RE +.SH "RESOURCES" +.sp +\fBProject web site:\fR http://example\&.org +.SH "COPYING" +.sp +Copyright \(co 2019 Joseph Herlant\&. Free use of this software is granted under the terms of the MIT License\&. +.SH "AUTHOR" +.PP +\fBJoseph Herlant\fR +.RS 4 +Author. +.RE +__EOF__ + +a2x -f manpage example.adoc +# Removing the generator as it contains the version so we would have to change that all the time +sed '/Generator/d' -i example.1 +diff example.ref example.1 diff -Nru asciidoc-8.6.10/debian/upstream/metadata asciidoc-10.1.2/debian/upstream/metadata --- asciidoc-8.6.10/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/debian/upstream/metadata 2022-02-19 12:03:32.000000000 +0000 @@ -0,0 +1,7 @@ +--- +Bug-Submit: https://github.com/asciidoc-py/asciidoc-py/issues +Changelog: https://github.com/asciidoc-py/asciidoc-py/blob/main/CHANGELOG.txt +Documentation: https://asciidoc.org +Name: asciidoc +Repository: git@github.com:asciidoc-py/asciidoc-py.git +Repository-Browse: https://github.com/asciidoc-py/asciidoc-py diff -Nru asciidoc-8.6.10/debian/vim-asciidoc.dirs asciidoc-10.1.2/debian/vim-asciidoc.dirs --- asciidoc-8.6.10/debian/vim-asciidoc.dirs 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/vim-asciidoc.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -usr/share/vim/addons/ftdetect -usr/share/vim/addons/syntax -usr/share/vim/registry diff -Nru asciidoc-8.6.10/debian/vim-asciidoc.install asciidoc-10.1.2/debian/vim-asciidoc.install --- asciidoc-8.6.10/debian/vim-asciidoc.install 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/vim-asciidoc.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -debian/asciidoc.yaml usr/share/vim/registry -vim/ftdetect/asciidoc.vim usr/share/vim/addons/ftdetect/ -vim/syntax/asciidoc.vim usr/share/vim/addons/syntax/ diff -Nru asciidoc-8.6.10/debian/vim-asciidoc.README.Debian asciidoc-10.1.2/debian/vim-asciidoc.README.Debian --- asciidoc-8.6.10/debian/vim-asciidoc.README.Debian 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/vim-asciidoc.README.Debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -This package provides the vim syntax highlighting for asciidoc, -but it is not enabled by default. - -To enable it at user-level only, use: - - vim-addon-manager install asciidoc - -To enable it system-wide, use: - - sudo vim-addon-manager -w install asciidoc - -For more information about vim-addon-manager, check its manual page. diff -Nru asciidoc-8.6.10/debian/watch asciidoc-10.1.2/debian/watch --- asciidoc-8.6.10/debian/watch 2018-07-18 03:33:45.000000000 +0000 +++ asciidoc-10.1.2/debian/watch 2022-02-19 12:03:32.000000000 +0000 @@ -1,3 +1,3 @@ -version=3 -opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/asciidoc-$1\.tar\.gz/ \ -https://github.com/asciidoc/asciidoc/tags .*/v?(\d\S*)\.tar\.gz +version=4 +opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/asciidoc-$1\.tar\.gz/ \ + https://github.com/asciidoc-py/asciidoc-py/tags .*/v?(\d\S+)\.tar\.gz diff -Nru asciidoc-8.6.10/doc/a2x.1.txt asciidoc-10.1.2/doc/a2x.1.txt --- asciidoc-8.6.10/doc/a2x.1.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/a2x.1.txt 2022-02-18 01:52:22.000000000 +0000 @@ -123,7 +123,7 @@ *--fop*:: Use FOP to generate PDFs. The default behavior is to use - 'dblatex(1)'. The '--fop' option is implicit if this option is + 'dblatex(1)'. The '--fop' option is implicit if the '--fop-opts' option is used. *--fop-opts*='FOP_OPTS':: @@ -278,21 +278,21 @@ 'a2x' uses the following programs: - *Asciidoc*: - http://asciidoc.org/ + https://asciidoc.org/ - *xsltproc*: (all formats except text): http://xmlsoft.org/XSLT/ - *DocBook XSL Stylesheets* (all formats except text): - http://docbook.sourceforge.net/projects/xsl/ + https://github.com/docbook/xslt10-stylesheets - *dblatex* (pdf, dvi, ps, tex formats): http://dblatex.sourceforge.net/ - *FOP* (pdf format -- alternative PDF file generator): - http://xmlgraphics.apache.org/fop/ + https://xmlgraphics.apache.org/fop/ - *w3m* (text format): http://w3m.sourceforge.net/index.en.html - *Lynx* (text format -- alternative text file generator): - http://lynx.isc.org/ + https://invisible-island.net/lynx/ - *epubcheck* (epub format -- EPUB file validator): - http://code.google.com/p/epubcheck/ + https://github.com/w3c/epubcheck See also the latest README file. @@ -361,9 +361,9 @@ RESOURCES --------- -SourceForge: http://sourceforge.net/projects/asciidoc/ +GitHub: https://github.com/asciidoc/asciidoc-py3/ -Main web site: http://asciidoc.org/ +Main web site: https://asciidoc.org/ SEE ALSO @@ -373,6 +373,9 @@ COPYING ------- -Copyright \(C) 2002-2011 Stuart Rackham. Free use of this software is -granted under the terms of the MIT license. +Copyright \(C) 2002-2013 Stuart Rackham. + +Copyright \(C) 2013-2020 AsciiDoc Contributors. + +Free use of this software is granted under the terms of the MIT license. diff -Nru asciidoc-8.6.10/doc/article-docinfo.xml asciidoc-10.1.2/doc/article-docinfo.xml --- asciidoc-8.6.10/doc/article-docinfo.xml 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/article-docinfo.xml 2022-02-18 01:52:22.000000000 +0000 @@ -7,7 +7,7 @@ <author> <honorific>Dr</honorific> <firstname>Lois</firstname> - <surname>Common-Demoninator</surname> + <surname>Common-Denominator</surname> <affiliation> <shortaffil>Director, M. Behn School of Coop. Eng.</shortaffil> <jobtitle>Director of Cooperative Efforts</jobtitle> diff -Nru asciidoc-8.6.10/doc/asciidoc.1.txt asciidoc-10.1.2/doc/asciidoc.1.txt --- asciidoc-8.6.10/doc/asciidoc.1.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/asciidoc.1.txt 2022-02-18 01:52:22.000000000 +0000 @@ -33,7 +33,7 @@ 'trace' controls the output of diagnostic information. *-b, --backend*='BACKEND':: - Backend output file format: 'docbook45', 'xhtml11', 'html4', + Backend output file format: 'docbook45', 'docbook5', 'xhtml11', 'html4', 'html5', 'slidy', 'wordpress' or 'latex' (the 'latex' backend is experimental). You can also use the backend alias names 'html' (aliased to 'xhtml11') or 'docbook' (aliased to 'docbook45'). @@ -50,7 +50,7 @@ *-d, --doctype*='DOCTYPE':: Document type: 'article', 'manpage' or 'book'. The 'book' document - type is only supported by the 'docbook' backend. Default document + type is only supported by the 'docbook' backends. Default document type is 'article'. *-c, --dump-conf*:: @@ -216,9 +216,9 @@ RESOURCES --------- -SourceForge: <http://sourceforge.net/projects/asciidoc/> +GitHub: <https://github.com/asciidoc/asciidoc-py3/> -Main web site: <http://asciidoc.org/> +Main web site: <https://asciidoc.org/> SEE ALSO @@ -228,6 +228,10 @@ COPYING ------- -Copyright \(C) 2002-2011 Stuart Rackham. Free use of this software is -granted under the terms of the GNU General Public License (GPL). +Copyright \(C) 2002-2013 Stuart Rackham. + +Copyright \(C) 2013-2020 AsciiDoc Contributors. + +Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2). diff -Nru asciidoc-8.6.10/doc/asciidocapi.txt asciidoc-10.1.2/doc/asciidocapi.txt --- asciidoc-8.6.10/doc/asciidocapi.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/asciidocapi.txt 2022-02-18 01:52:22.000000000 +0000 @@ -30,7 +30,7 @@ non-standard library dependencies. You can find `asciidocapi.py` in the AsciiDoc -http://asciidoc.org/INSTALL.html#X1[distribution +https://asciidoc.org/INSTALL.html#X1[distribution archives] (version 8.4.1 or better). Once you have `asciidocapi.py` Verify everything is working by running @@ -122,7 +122,7 @@ (delete) the attribute (this in addition to the `name!` attribute name format that the `asciidoc(1)` command uses). - To simply define an attribute set the attribute value to a blank - string (`name: ''`) + string (`name: ''`) `cmd`:: The file path of the `asciidoc.py` script. Set by the `__init__` diff -Nru asciidoc-8.6.10/doc/asciidoc.conf asciidoc-10.1.2/doc/asciidoc.conf --- asciidoc-8.6.10/doc/asciidoc.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/asciidoc.conf 2022-02-18 01:52:22.000000000 +0000 @@ -3,5 +3,5 @@ # [specialwords] ifndef::doctype-manpage[] -monospacedwords=(?u)\\?\basciidoc\(1\) (?u)\\?\ba2x\(1\) +monospacedwords=\\?\basciidoc\(1\) \\?\ba2x\(1\) endif::doctype-manpage[] diff -Nru asciidoc-8.6.10/doc/asciidoc.dict asciidoc-10.1.2/doc/asciidoc.dict --- asciidoc-8.6.10/doc/asciidoc.dict 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/asciidoc.dict 2022-02-18 01:52:22.000000000 +0000 @@ -1,4 +1,4 @@ -personal_ws-1.1 en 1084 +personal_ws-1.1 en 1093 mandoc colspecs API @@ -7,9 +7,8 @@ dblatex dapibus mycss -attributelist -AttributeList Blondel +SimpleSection permalink Chunking unescapes @@ -19,15 +18,12 @@ XSLT stdin convallis -AttributeEntrys Steen BOTTM CACTU -IndentedBlock +SectionClose passtext -ZapfDingbats CALS -LiteralParagraph del BOM Bon @@ -42,33 +38,35 @@ doctest comspecs MacDermid +Zolochevskiy amet Oleksandr -ExampleBlock +LiteralBlock +literalblock faf luptatum dir Lorum +VariableList superceded -inlinegraphic -specialcharacters +admonitionblock cpp -RevisionLine +pellentesque TitleName Fusce ralink +Zuckschwerdt +UnicodeDecodeError scaledwidth FooParser VMiklos Trotman -DelimitedBlocks css -preconfigured -Magnocavallo csv Mandelson GCC CSW +ExampleBlocks Potapov nisl Gao @@ -85,24 +83,23 @@ graphviz toclevel plaintext +EOL hyperlinks dui +literallayout dsv ENV +TableUnderline dvi stderr -SimpleSection +LiteralParagraph gif eBook prepend -RevisionNumber -CommentBlocks consequat fmt Amade inline -monospacedwords -informaltable realpath validator colwidth @@ -110,20 +107,18 @@ Chai strongwords setlocal -ListingBlock -listingblock formalpara Posuere exe AuthorInfo hhk vsides -rewriteSystem +BulletedList taoup paracounter hhp +JimiProClasses listelement -AttributeLists magna xreflabel PDF's @@ -138,8 +133,6 @@ GPL codec MSHR -listcontinuation -ListContinuation apos ShareSource epubtest @@ -149,22 +142,21 @@ Maier args TableFooter -LiberationSerif blog -passthroughs gui ile sgmlfmt +monospacedwords formulae dbkview AsciiDoc's -BackendBlock tbody DSSSL +outfilesuffix jim valign ldquo -Makefile +makefile munere Raggett's citetitle @@ -175,10 +167,11 @@ starttags tgroup Miklos +PassthroughBlocks porttitor Maecenas -systemIdStartString footnoteref +ListParagraphs joe velit truecolor @@ -200,8 +193,8 @@ Lex mea jqs -PassthroughBlocks blockdef +EmailAddress JavaScript javascript nam @@ -209,9 +202,9 @@ symlinks confdir optionname -sollicitudin companyname pageunits +SidebarBlocks nec loc latexmath @@ -231,8 +224,8 @@ ImageMagick subscripted lpr +NumberedList autoplay -Delikatessen mydocument odf brvbar @@ -248,8 +241,6 @@ Cygwin ogg ultrices -indentedparagraph -IndentedParagraph ltr doctests AsciiDocAPI @@ -269,21 +260,22 @@ autoconf ANDed devnull +mediaobjects autocmd +emphasizedwords readlines pageunit coid noborders facto -ListParagraphs +RevisionInfo nunc opf orci -CustomBlocks -refentryinfo -informalfigure +DelimitedBlocks ORed pygments +LiteralBlocks yyyy online LIBDIR @@ -294,24 +286,26 @@ Broberg Bowlin navPoint +specialsections asciimathml AsciiMathML ASCIIMathML conf +formatlistpat RCS lowriter -UnicodeDecodeError +KeyboardInterrupt CalloutList -SidebarBlocks idprefix TableRow stdout monospaced +subdirectory +consectetuer walsh pre facilisis tzname -ListParagraph partintro Windtrainer hgignore @@ -320,7 +314,6 @@ userguide cras zwsp -keeptogether bweb PRS Sturmer @@ -332,7 +325,6 @@ psv inlinemacro bgcolor -Lavruschenko pts Buenos myslidy @@ -343,21 +335,21 @@ EPUBs Zullinger AuthorLine -specialsections -subsverbatim +fileextension adolescens +specialwords qui htmltoc SJR noautoload biggy pgwide -RevisionDate crlf tex Bólido Bolido tabsize +FilterBlocks colpcwidth Orry Nascetur @@ -382,9 +374,10 @@ massa vel colstart +SVG volutpat stringparam -showcomments +FOPException SVN Tps vih @@ -392,13 +385,10 @@ ttf resx startup -admonitionblock coord Blackdown mainmatter Slackware -tableabswidth -BackendBlocks VMiklos's sys doctype @@ -408,29 +398,33 @@ wnone xhtml url +formatoptions utf footrow +Berguvsvägen +Berguvsvagen usr conubia Hausmann TitleBlock txt lsquo -addEventListener elit +Dourmousoglou Efros's -sectiontitle -CommentLines +VerbatimBlocks subprocess outfile blandit -revisionhistory +Fyodorovitch +ListingBlocks EPUBReader Xin params undefines Andrés yellowback +RevisionNumber Quisque Fabrice htmlhelp @@ -439,6 +433,7 @@ Citeaux themedir srackham +subdirectories Lulea Luleå Ubuntu @@ -450,6 +445,7 @@ staticfree Morbi Blauer +ZapfDingbats footdata al bg @@ -459,7 +455,6 @@ backmatter ar fils -linenumbering de backend's backends @@ -469,7 +464,10 @@ cp fb fermentum +ExampleBlock fi +AsciiDocError +misevaluations cellcount et fo @@ -479,8 +477,10 @@ fugiat toclevels xzf +rewritePrefix gq JB +RevisionLine refactored sgml backcolor @@ -491,16 +491,17 @@ hu testblock Vijay +PassthroughBlock xyz simpara lf defacto resized mb -IndentedBlocks md js erat +Magnocavallo blogpost xsltproc jw @@ -518,6 +519,7 @@ stylesheets roff YYY +DelimitedBlock regex os config @@ -535,12 +537,13 @@ vivamus py Helleu -getElementById addon th sp ru docname +strikethrough +LiteralParagraphs ifeval su uk @@ -552,10 +555,12 @@ Hackett VM Frédérique -SidebarBlock wj ut +necessitatibus Efros +ListingBlock +listingblock param Movet hcol @@ -566,6 +571,7 @@ debian Iaculis quis +LOCALCLASSPATH eval's stylename tooltip @@ -594,49 +600,53 @@ blocktitles BlockTitles Iisaka +passthroughs tfoot Iisaka's -misevaluations frac pagewidth +BackendBlock AUTOEXEC rowcount -ExampleBlocks linux commodo Fernandes pretium notitle +attributeentry +AttributeEntry manvolnum homero validators listindex -testasciidoc imagedata HotSpot vimrc O'Reilly -literallayout doctitle holmes Dmitry backtick Bouchers -strikethrough indexterm Daitx vestibulum quote's noteblock +BackendBlocks refentry +listcontinuation +ListContinuation Xubuntu captionless +Rosenkraenzer orgname OpenOffice -asciidocEmphasized Dostoyevsky chapt -necessitatibus +IndentedParagraph +indentedparagraph +sollicitudin unformatted revremark Thiago @@ -645,10 +655,8 @@ docdir Gogh Jipsen -JimiProClasses sgmlformat LilyPond -CommentBlock xmllint tuples headdata @@ -657,10 +665,12 @@ Tascii MathML nobis -LOCALCLASSPATH +AttributeEntries +Delikatessen Cheatsheet mktemp Xandros +AttributeEntrys rdquo Yakshin's revhistory @@ -671,9 +681,9 @@ expr tempfile ponderum -outfilesuffix libxml -tablepcwidth +attributelist +AttributeList chunked filesystem Martín @@ -682,8 +692,9 @@ toolchains listchars fileext -emphasizedwords +inlinemediaobject smallnew +IndentedBlock linkcss colspan localtime @@ -692,17 +703,21 @@ Stas colspec GPLv -uriStartString Hongli infile suspendisse +reproducibility TOCs todo +CustomBlocks +refentryinfo mimetype -ridiculus volnitsky +uriStartString +ByteInterleavedRaster +Dockerfile setlevel -Rosenkraenzer +inlinegraphic bodydata java Sakellariou @@ -714,7 +729,7 @@ coverpage starttag whitespace -DelimitedBlock +preconfigured foofoo retab xmlns @@ -722,19 +737,25 @@ ChangeLog symlink ascii +ItemContinuation ListLabel Kleber Kléber +getElementById +keeptogether popup Cerrito +docbooks DocBook's fprintf +superscripting mediaobject gizmo outdir getvalue callouts mollis +Lavruschenko autowidth karamazov labitur @@ -745,71 +766,67 @@ Skype POSIX builtins -ByteInterleavedRaster +subsverbatim blockname bulleted Google globals Garnett +CommentBlocks porta OpenBlock colabswidth +informaltable bibliodiv Bushuev +RevisionDate Inguaggiato -SectionClose overline paradef QuoteBlocks +verbatimblock +VerbatimBlock undefine +rewriteSystem docdate Kurapati -Zolochevskiy lacus felis backend webm ListBlock -literalblock -LiteralBlock href metus Mozilla unstyled pagebreak -VariableList -LiteralBlocks Donec BLONP dbook asciimath interesset -pellentesque -formatlistpat +showcomments +favicon IMGs -AttributeEntry -attributeentry -Zuckschwerdt autoindent sectids manname PostScript +LiberationSerif jbloggs epubcheck README colstop -LiteralParagraphs +superscripted tableblock slideshows primis tuple Rackham -admonitionparagraph +asciidocEmphasized mantitle init -VerbatimBlocks imperdiet -refsynopsisdiv emacs consetetur JIMI @@ -817,26 +834,24 @@ docbook DocBook callout -fileextension -programlisting +systemIdStartString outlang QuoteBlock chmod +authorinitials +sectiontitle +CommentLines posattrs -subdirectories -RevisionRemark +OrderedDict +admonitionparagraph TableHeader slideshow Mihai -KeyboardInterrupt justo hexdump SectionBody sectionbody nnoremap -verbatimblock -VerbatimBlock -BulletedList html unchunked Gouichi @@ -844,12 +859,14 @@ StringIO wordpress nonet +startDocument tagname gzip corpname precompiled rewriteURI colcount +optparse fringilla Gentoo mattis @@ -870,97 +887,90 @@ plugins http pychart +IndentedParagraphs fepub Wiki euismod arounds WINA -superscripted -PassthroughBlock footrows configfile misspelt namespace reftext -formatoptions halign rsquo AROUT +informalfigure Wiese bodyrow navMap listtags mauris -Dourmousoglou Wiers -ListingBlocks -TableUnderline bookinfo Vajna upperalpha xmldecl tellus -EmailAddress qanda hyperlink screenshot noout Wieers Artem -startDocument ifdef Shanahan's manmanual Konqueror FirstName firstname +argparse +ListParagraph LaTeXMathML latexmathml +addEventListener sectnum BlockMacros cceeff unfloat +SidebarBlock snabbköp snabbkop -NumberedList everti multi cubilia manpage conformant -AttributeEntries tablewidth LabeledList monospace -AsciiDocError olink softtabstop Ghostscript https dbtimestamp ebuild -rewritePrefix BOLID PUBReader -inlinemediaobject nochunks newlists -mediaobjects endif natively mkdir sodales +revisionhistory BONAP -ItemContinuation +specialcharacters tyger upperroman -RevisionInfo Berglunds egestas nabc autoloaded symlinked Sommer +testasciidoc Klum Obenhuber's revdate @@ -969,13 +979,12 @@ ListTerm augue loweralpha -subdirectory -consectetuer bookmarked Gómez Kubuntu LaTeX litora +tableabswidth FreeBSD Araquil setuptools @@ -992,7 +1001,6 @@ cellpadding entrytbl Ornare -authorinitials javascripts JavaScripts undefining @@ -1001,12 +1009,13 @@ CustomBlock Krämer BufRead -specialwords libexslt subsnormal fxhtml +AttributeLists Builtin hardcoded +CommentBlock Mery utils subclassify @@ -1014,7 +1023,6 @@ unsets ipsum namespaced -FilterBlocks Julien tempor WINNT @@ -1034,13 +1042,14 @@ charset burtoogle Changjian +tablepcwidth Ashworth nbsp lowerroman -FOPException Freshmeat dbhtml manversion +linenumbering TableBody Loïc abc @@ -1051,30 +1060,29 @@ attrlist Bazon attrname +IndentedBlocks Forsterstr Rhoncus Rutrum Redhat +ridiculous datadir Kumar -IndentedParagraphs -Berguvsvagen -Berguvsvägen executables tabledef ftdetect Greaves SimpleList -superscripting baz lorem Comidas bodyrows -Fyodorovitch +refsynopsisdiv topbot greek comspec refmiscinfo +programlisting firefox lectus JavaHelp @@ -1083,3 +1091,4 @@ middlename MiddleName Jimmac's +RevisionRemark diff -Nru asciidoc-8.6.10/doc/asciidoc.txt asciidoc-10.1.2/doc/asciidoc.txt --- asciidoc-8.6.10/doc/asciidoc.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/asciidoc.txt 2022-02-18 01:52:22.000000000 +0000 @@ -1,11 +1,10 @@ AsciiDoc User Guide =================== -Stuart Rackham <srackham@gmail.com> -:Author Initials: SJR +AsciiDoc.py Team :toc: :icons: :numbered: -:website: http://asciidoc.org/ +:website: https://asciidoc.org/ AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, blogs and UNIX man @@ -15,6 +14,15 @@ be almost any type of SGML/XML markup) can be customized and extended by the user. +[WARNING] +This user guide is for AsciiDoc.py, which is a legacy processor for +this syntax, handling an older rendition of AsciiDoc. As such, this +will not properly handle the +https://projects.eclipse.org/projects/technology.asciidoc[current AsciiDoc specification]. +It is suggested that unless you specifically require the AsciiDoc.py +toolchain, you should find a processor that handles the modern +AsciiDoc syntax. + .This document ********************************************************************** This is an overly large document, it probably needs to be refactored @@ -160,6 +168,9 @@ docbook45:: Outputs DocBook XML 4.5 markup. +docbook5:: + Outputs DocBook XML 5.0 markup. + html4:: This backend generates plain HTML 4.01 Transitional markup. @@ -174,14 +185,14 @@ slidy:: Use this backend to generate self-contained - http://www.w3.org/Talks/Tools/Slidy2/[Slidy] HTML slideshows for + https://www.w3.org/Talks/Tools/Slidy2[Slidy] HTML slideshows for your web browser from AsciiDoc documents. The Slidy backend is documented in the distribution `doc/slidy.txt` file and {website}slidy.html[online]. wordpress:: A minor variant of the 'html4' backend to support - http://srackham.wordpress.com/blogpost1/[blogpost]. + https://srackham.wordpress.com/blogpost1/[blogpost]. latex:: Experimental LaTeX backend. @@ -223,7 +234,7 @@ DocBook ------- AsciiDoc generates 'article', 'book' and 'refentry' -http://www.docbook.org/[DocBook] documents (corresponding to the +https://docbook.org/[DocBook] documents (corresponding to the AsciiDoc 'article', 'book' and 'manpage' document types). Most Linux distributions come with conversion tools (collectively @@ -231,8 +242,9 @@ presentation formats such as Postscript, HTML, PDF, EPUB, DVI, PostScript, LaTeX, roff (the native man page format), HTMLHelp, JavaHelp and text. There are also programs that allow you to view -DocBook files directly, for example http://live.gnome.org/Yelp[Yelp] -(the GNOME help viewer). +DocBook files directly, for example +https://wiki.gnome.org/action/show/Apps/Yelp[Yelp] (the GNOME help +viewer). [[X12]] Converting DocBook to other file formats @@ -325,7 +337,7 @@ AsciiDoc:: Converts AsciiDoc (`.txt`) files to DocBook XML (`.xml`) files. -[[X13]]http://docbook.sourceforge.net/projects/xsl/[DocBook XSL Stylesheets]:: +[[X13]]https://github.com/docbook/xslt10-stylesheets[DocBook XSLT Stylesheets]:: These are a set of XSL stylesheets containing rules for converting DocBook XML documents to HTML, XSL-FO, manpage and HTML Help files. The stylesheets are used in conjunction with an XML parser such as @@ -341,7 +353,7 @@ uses <<X13,DocBook XSL Stylesheets>>, <<X40,xsltproc(1)>> and `latex(1)`. -[[X14]]http://xmlgraphics.apache.org/fop/[FOP]:: +[[X14]]https://xmlgraphics.apache.org/fop/[FOP]:: The Apache Formatting Objects Processor converts XSL-FO (`.fo`) files to PDF files. The XSL-FO files are generated from DocBook source files using <<X13,DocBook XSL Stylesheets>> and @@ -351,7 +363,7 @@ The Microsoft HTML Help Compiler (`hhc.exe`) is a command-line tool that converts HTML Help source files to a single HTML Help (`.chm`) file. It runs on MS Windows platforms and can be downloaded from - http://www.microsoft.com. + https://www.microsoft.com/. AsciiDoc dblatex configuration files ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -807,10 +819,15 @@ - A numbered suffix (`_2`, `_3` ...) is added if a same named auto-generated section ID exists. - If the `ascii-ids` attribute is defined then non-ASCII characters - are replaced with ASCII equivalents. This attribute may be - deprecated in future releases and *should be avoided*, it's sole - purpose is to accommodate deficient downstream applications that - cannot process non-ASCII ID attributes. + are replaced with ASCII equivalents. This attribute should be + *should be avoided* if possible as its sole purpose is to accommodate + deficient downstream applications that cannot process non-ASCII ID + attributes. If available, it will use the + https://pypi.org/project/trans/[trans python module], otherwise it + will fallback to using NFKD algorithm, which cannot handle all + unicode characters. For example, 'WstÄ™p żółtej Å‚Ä…ki' will be + translated to 'Wstep zoltej laki' under trans and 'Wstep zotej aki' + under NFKD. Example: the title 'Jim's House' would generate the ID `_jim_s_house`. @@ -1023,7 +1040,7 @@ decorators. Where '<color>' can be any of the -http://en.wikipedia.org/wiki/Web_colors#HTML_color_names[sixteen HTML +https://en.wikipedia.org/wiki/Web_colors#HTML_color_names[sixteen HTML color names]. Examples: [red]#Obvious# and [big red yellow-background]*very obvious*. @@ -1304,7 +1321,7 @@ ensure the 'http' macro is expanded to a hyperlink. --------------------------------------------------------------------- -[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] +[quote,'https://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] _____________________________________________________________________ Sir, a woman's preaching is like a dog's walking on his hind legs. It is not done well; but you are surprised to find it done at all. @@ -1339,6 +1356,12 @@ 'reftext' is used to set the DocBook 'xreflabel' attribute. The 'reftext' attribute can an also be set by the 'BlockId' element. +|floatstyle |docbook | +'floatstyle' is used to specify the floatstyle attribute for the +titled table, example, image and equation blocks. This is useful when +used in conjunction with the dblatex toolchain. A typical example +would be to specify the value as 'floatstyle="[htbp]"'. + |==================================================================== @@ -2168,7 +2191,7 @@ - [[[taoup]]] Eric Steven Raymond. 'The Art of UNIX Programming'. Addison-Wesley. ISBN 0-13-142901-9. - [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. ISBN 1-56592-580-7. --------------------------------------------------------------------- @@ -2451,7 +2474,7 @@ inline macros) and `<name>::<target>[<attrlist>]` (for block macros). Here are some examples: - http://www.docbook.org/[DocBook.org] + https://docbook.org/[DocBook.org] include::chapt1.txt[tabsize=2] mailto:srackham@gmail.com[] @@ -2495,16 +2518,16 @@ Here are some examples: - http://www.docbook.org/[DocBook.org] - http://www.docbook.org/ + https://docbook.org/[DocBook.org] + https://docbook.org/ mailto:joe.bloggs@foobar.com[email Joe Bloggs] joe.bloggs@foobar.com Which are rendered: -http://www.docbook.org/[DocBook.org] +https://docbook.org/[DocBook.org] -http://www.docbook.org/ +https://docbook.org/ mailto:joe.bloggs@foobar.com[email Joe Bloggs] @@ -2610,7 +2633,7 @@ - The optional 'alt' attribute is also the first positional attribute, it specifies alternative text which is displayed if the output application is unable to display the image file (see also - http://htmlhelp.com/feature/art3.htm[Use of ALT texts in IMGs]). For + https://htmlhelp.com/feature/art3.htm[Use of ALT texts in IMGs]). For example: image:images/logo.png[Company Logo] @@ -2722,7 +2745,7 @@ ********************************************************************* If you define the `data-uri` attribute then images will be embedded in XHTML outputs using the -http://en.wikipedia.org/wiki/Data:_URI_scheme[data URI scheme]. You +https://en.wikipedia.org/wiki/Data_URI_scheme[data URI scheme]. You can use the 'data-uri' attribute with the 'xhtml11' and 'html5' backends to produce single-file XHTML documents with embedded images and CSS, for example: @@ -2803,7 +2826,12 @@ does not process nested includes). Setting 'depth' to '1' disables nesting inside the included file. By default, nesting is limited to a depth of ten. -- If the he 'warnings' attribute is set to 'False' (or any other +- The `lines` macro attribute can be used to include specific lines of + the file. You can specify a range of pages by using `..` between + the two numbers, for example `1..10` would include the first 10 + lines. You can include multiple ranges or invdividual pages by using + a comma or semi-colon, for example `1..10,45,50..60`. +- If the 'warnings' attribute is set to 'False' (or any other Python literal that evaluates to boolean false) then no warning message is printed if the included file does not exist. By default 'warnings' are enabled. @@ -2935,7 +2963,7 @@ characters and you can prefix with quoted attributes in the inline version. Example: - Red [red]+++`sum_(i=1)\^n i=(n(n+1))/2`$+++ AsciiMathML formula + Red [red]+++`sum_(i=1)\^n i=(n(n+1))/2`$+++ AsciiMath formula $$:: Inline and block. The double-dollar passthrough is functionally @@ -3628,7 +3656,7 @@ ~~~~~~~~~~~~~~~~~~~~~~ In addition to the automatically created man page <<X60,intrinsic attributes>> you can assign DocBook -http://www.docbook.org/tdg5/en/html/refmiscinfo.html[refmiscinfo] +https://tdg.docbook.org/tdg/4.5/refmiscinfo.html[refmiscinfo] element 'source', 'version' and 'manual' values using AsciiDoc `{mansource}`, `{manversion}` and `{manmanual}` attributes respectively. This example is from the AsciiDoc header of a man page @@ -3660,7 +3688,7 @@ MathJax ~~~~~~~ -http://www.mathjax.org/[MathJax] allows LaTeX Math style formulas to be included +https://www.mathjax.org/[MathJax] allows LaTeX Math style formulas to be included in XHTML documents generated via the AsciiDoc 'xhtml11' and 'html5' backends. This route overcomes several restrictions of the MathML-based approaches, notably, restricted support of MathML by many mainstream browsers. To enable @@ -3673,7 +3701,7 @@ LaTeXMathML ~~~~~~~~~~~ ///////////////////////////////////////////////////////////////////// -There is an http://math.etsu.edu/LaTeXMathML/[extended LaTeXMathML +There is an https://math.etsu.edu/LaTeXMathML/[extended LaTeXMathML version] by Jeff Knisley, in addition to a JavaScript file it requires the inclusion of a CSS file. ///////////////////////////////////////////////////////////////////// @@ -3681,9 +3709,9 @@ 'LaTeXMathML' allows LaTeX Math style formulas to be included in XHTML documents generated using the AsciiDoc 'xhtml11' and 'html5' backends. AsciiDoc uses the -http://www.maths.nottingham.ac.uk/personal/drw/lm.html[original +https://www.maths.nottingham.ac.uk/plp/pmadw/lm.html[original LaTeXMathML] by Douglas Woodall. 'LaTeXMathML' is derived from -ASCIIMathML and is for users who are more familiar with or prefer +ASCIIMath and is for users who are more familiar with or prefer using LaTeX math formulas (it recognizes a subset of LaTeX Math, the differences are documented on the 'LaTeXMathML' web page). To enable LaTeXMathML support you must define the 'latexmath' attribute, for @@ -3705,30 +3733,30 @@ (but only requires the 'latexmath' passthrough blocks for identification of the equations). -ASCIIMathML +ASCIIMath ~~~~~~~~~~~ ///////////////////////////////////////////////////////////////////// -The older ASCIIMathML 1.47 version is used instead of version 2 +The older ASCIIMath 1.47 version is used instead of version 2 because: 1. Version 2 doesn't work when embedded. 2. Version 2 is much larger. ///////////////////////////////////////////////////////////////////// -http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] -formulas can be included in XHTML documents generated using the -'xhtml11' and 'html5' backends. To enable ASCIIMathML support you must -define the 'asciimath' attribute, for example using the `-a asciimath` -command-line option. Example inline formula: +http://asciimath.org/[ASCIIMath] formulas can be included in XHTML +documents generated using the 'xhtml11' and 'html5' backends. To enable +ASCIIMath support you must define the 'asciimath' attribute, for +example using the `-a asciimath` command-line option. Example inline +formula: asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`] For more examples see the {website}[AsciiDoc website] or the -distributed `doc/asciimathml.txt` file. +distributed `doc/asciimath.txt` file. MathML ~~~~~~ -http://www.w3.org/Math/[MathML] is a low level XML markup for +https://www.w3.org/Math/[MathML] is a low level XML markup for mathematics. AsciiDoc has no macros for MathML but users familiar with this markup could use passthrough macros and passthrough blocks to include MathML in output documents. @@ -4304,8 +4332,8 @@ Attribute entries can be used to make your documents easier to read and write, here are some examples: - :1: http://freshmeat.net/projects/asciidoc/ - :homepage: http://asciidoc.org[AsciiDoc home page] + :1: http://freshmeat.sourceforge.net/projects/asciidoc/ + :homepage: https://asciidoc.org[AsciiDoc home page] :new: image:./images/smallnew.png[] :footnote1: footnote:[A meaningless latin term] @@ -4698,7 +4726,7 @@ 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 + https://en.wikipedia.org/wiki/Quotation_mark#Summary_table[non-English usage of quotation marks]. 8. The `{blockname}` attribute identifies the style of the current block. It applies to delimited blocks, lists and tables. Here is a @@ -5094,7 +5122,7 @@ |music |A {website}music-filter.html[music filter] is included in the distribution `./filters/` directory. It translates music in -http://lilypond.org/[LilyPond] or http://abcnotation.org.uk/[ABC] +https://lilypond.org/[LilyPond] or https://abcnotation.com/[ABC] notation to standard classical notation. |source @@ -5107,7 +5135,7 @@ AsciiDoc output documents. |graphviz -|Gouichi Iisaka has written a http://www.graphviz.org/[Graphviz] +|Gouichi Iisaka has written a https://www.graphviz.org/[Graphviz] filter for AsciiDoc. Graphviz generates diagrams from a textual specification. Gouichi Iisaka's Graphviz filter is included in the AsciiDoc distribution. Here are some @@ -5226,7 +5254,7 @@ available (see the <<X61, Example `~/.vimrc` file>>). - Put `set` commands in your `~/.vimrc` file so you don't have to enter them manually. -- The Vim website (http://www.vim.org) has a wealth of resources, +- The Vim website (https://www.vim.org/) has a wealth of resources, including scripts for automated spell checking and ASCII Art drawing. ===================================================================== @@ -5441,8 +5469,8 @@ template sections. The `{empty}` attribute is useful for outputting trailing blank lines in markup templates. -2. Use Dave Raggett's http://tidy.sourceforge.net/[HTML Tidy] program - to tidy asciidoc(1) output. Example: +2. Use https://www.html-tidy.org/[HTML Tidy] program to tidy + asciidoc(1) output. Example: $ asciidoc -b docbook -o - mydoc.txt | tidy -indent -xml >mydoc.xml @@ -5542,7 +5570,7 @@ `--valid` option the document will only be checked that it is well formed. -The online http://validator.w3.org/#validate_by_uri+with_options[W3C +The online https://validator.w3.org/#validate_by_uri+with_options[W3C Markup Validation Service] is the defacto standard when it comes to validating HTML (it validates all HTML standards including HTML5). @@ -5675,16 +5703,13 @@ reading AsciiDoc documents much easier syntax highlighting also helps you catch AsciiDoc syntax errors as you write your documents. -The AsciiDoc distribution directory contains a Vim syntax highlighter -for AsciiDoc (`./vim/syntax/asciidoc.vim`), you can find the latest -version in the online -https://code.google.com/p/asciidoc/source/browse/[AsciiDoc -repository]. +If you use the Vim editor, it comes with an +https://github.com/vim/vim/blob/master/runtime/syntax/asciidoc.vim[AsciiDoc +syntax highlighter pre-included]. By default, it will activate for +files that use the .asciidoc or .adoc file extensions. -Install the highlighter by copying `asciidoc.vim` to your -`$HOME/.vim/syntax` directory (create it if it doesn't already exist). - -To enable syntax highlighing: +Alternatively, to enable syntax highlighting for the current document or +other extensions: - Put a Vim 'autocmd' in your Vim configuration file (see the <<X61,example vimrc file>>). @@ -5863,7 +5888,7 @@ Set a 'CSS signature' for the document (sets the 'id' attribute of the HTML 'body' element). CSS signatures provide a mechanism that allows users to personalize the document appearance. The term 'CSS signature' -was http://archivist.incutio.com/viewlist/css-discuss/13291[coined by +was https://juicystudio.com/article/css-selectors.php[coined by Eric Meyer]. @@ -6066,4 +6091,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details. -Copyright (C) 2002-2011 Stuart Rackham. +Copyright (C) 2002-2013 Stuart Rackham. + +Copyright (C) 2013-2020 AsciiDoc Contributors. diff -Nru asciidoc-8.6.10/doc/asciimathml.txt asciidoc-10.1.2/doc/asciimathml.txt --- asciidoc-8.6.10/doc/asciimathml.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/asciimathml.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -ASCIIMathML Formulae -==================== - -http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] is -a clever JavaScript written by Peter Jipsen that dynamically -transforms mathematical formulae written in a wiki-like plain text -markup to http://www.w3.org/Math/[MathML] markup which is displayed as -standard mathematical notation by the Web Browser. See 'Appendix E' -in the AsciiDoc User Guide for more details. - -The AsciiDoc `xhtml11` backend supports ASCIIMathML -- it links the -ASCIIMathML script and escapes ASCIIMathML delimiters and special -characters to yield valid XHTML. To use ASCIIMathML: - -1. Include the `-a asciimath` command-line option when you run - `asciidoc(1)`. -2. Enclose ASCIIMathML formulas inside math or double-dollar - passthroughs or in math passthrough blocks. - -Here's the link:asciimathml.txt[AsciiDoc source] that generated this -page. - -.NOTE -- When you use the `asciimath:[]` inline macro you need to escape `]` - characters in the formulas with a backslash, escaping is unnecessary - if you use the double-dollar macro (for examples see the second - formula below). -- See the - http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] - website for ASCIIMathML documentation and the latest version. -- If the formulas don't appear to be correct you probably need to - install the correct math fonts (see the - http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] - website for details). -- See the link:latexmathml.html[LaTeXMathML page] if you prefer to use - LaTeX math formulas. - -A list of example formulas: - -- $$`[[a,b],[c,d]]((n),(k))`$$ -- asciimath:[x/x={(1,if x!=0),(text{undefined},if x=0):}] -- asciimath:[d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h] -- +++`sum_(i=1)\^n i=(n(n+1))/2`$+++ and *bold - asciimath:[int_0\^(pi/2) sinx\ dx=1]* -- asciimath:[(a,b\]={x in RR : a < x <= b}] -- asciimath:[x^2+y_1+z_12^34] - -********************************************************************* -The first three terms factor to give -asciimath:[(x+b/(2a))^2=(b^2)/(4a^2)-c/a]. - -asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. - -Now we take square roots on both sides and get -asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. -Finally we move the asciimath:[b/(2a)] to the right and simplify to -get the two solutions: -*asciimath:[x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)]*. - -********************************************************************* - diff -Nru asciidoc-8.6.10/doc/asciimath.txt asciidoc-10.1.2/doc/asciimath.txt --- asciidoc-8.6.10/doc/asciimath.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/doc/asciimath.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,59 @@ +ASCIIMath Formulae +==================== + +http://asciimath.org/[ASCIIMath] is a clever JavaScript written by +Peter Jipsen that dynamically transforms mathematical formulae +written in a wiki-like plain text markup to +https://www.w3.org/Math/[MathML] markup which is displayed as +standard mathematical notation by the Web Browser. See 'Appendix E' +in the AsciiDoc User Guide for more details. + +The AsciiDoc `xhtml11` backend supports ASCIIMath -- it links the +ASCIIMath script and escapes ASCIIMath delimiters and special +characters to yield valid XHTML. To use ASCIIMath: + +1. Include the `-a asciimath` command-line option when you run + `asciidoc(1)`. +2. Enclose ASCIIMath formulas inside math or double-dollar + passthroughs or in math passthrough blocks. + +Here's the link:asciimath.txt[AsciiDoc source] that generated this +page. + +.NOTE +- When you use the `asciimath:[]` inline macro you need to escape `]` + characters in the formulas with a backslash, escaping is unnecessary + if you use the double-dollar macro (for examples see the second + formula below). +- See the http://asciimath.org[ASCIIMath] website for ASCIIMath + documentation and the latest version. +- If the formulas don't appear to be correct you probably need to + install the correct math fonts (see the + http://asciimath.org[ASCIIMath] website for details). +- See the link:latexmathml.html[LaTeXMathML page] if you prefer to use + LaTeX math formulas. + +A list of example formulas: + +- $$`[[a,b],[c,d]]((n),(k))`$$ +- asciimath:[x/x={(1,if x!=0),(text{undefined},if x=0):}] +- asciimath:[d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h] +- +++`sum_(i=1)\^n i=(n(n+1))/2`$+++ and *bold + asciimath:[int_0\^(pi/2) sinx\ dx=1]* +- asciimath:[(a,b\]={x in RR : a < x <= b}] +- asciimath:[x^2+y_1+z_12^34] + +********************************************************************* +The first three terms factor to give +asciimath:[(x+b/(2a))^2=(b^2)/(4a^2)-c/a]. + +asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. + +Now we take square roots on both sides and get +asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. +Finally we move the asciimath:[b/(2a)] to the right and simplify to +get the two solutions: +*asciimath:[x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)]*. + +********************************************************************* + diff -Nru asciidoc-8.6.10/doc/book-multi.txt asciidoc-10.1.2/doc/book-multi.txt --- asciidoc-8.6.10/doc/book-multi.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/book-multi.txt 2022-02-18 01:52:22.000000000 +0000 @@ -46,7 +46,7 @@ The First Chapter ----------------- -Chapters can be grouped by preceeding them with a level 0 Book Part +Chapters can be grouped by preceding them with a level 0 Book Part title. Book chapters are at level 1 and can contain sub-sections nested up to diff -Nru asciidoc-8.6.10/doc/epub-notes.txt asciidoc-10.1.2/doc/epub-notes.txt --- asciidoc-8.6.10/doc/epub-notes.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/epub-notes.txt 2022-02-18 01:52:22.000000000 +0000 @@ -23,7 +23,7 @@ epub outputs include every section in the table of contents regardless of the toc.section.depth XSL Stylesheets parameter -(http://docbook.sourceforge.net/release/xsl/current/doc/html/toc.section.depth.html). +(https://cdn.docbook.org/release/xsl/snapshot/doc/fo/toc.section.depth.html). This behavior is specific to epub (xhtml and fo outputs honor toc.section.depth). @@ -35,8 +35,7 @@ <ncx:meta name="dtb:depth" content="-1"/> Shouldn't it be a positive integer equal to the depth navPoint nesting in the -navMap element (see -http://www.niso.org/workrooms/daisy/Z39-86-2005.html#NavMeta)? Though epubcheck 1.05 doesn't flag it as invalid -- are they both wrong? +navMap element? Though epubcheck 1.05 doesn't flag it as invalid -- are they both wrong? [[X1]] diff -Nru asciidoc-8.6.10/doc/faq.txt asciidoc-10.1.2/doc/faq.txt --- asciidoc-8.6.10/doc/faq.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/faq.txt 2022-02-18 01:52:22.000000000 +0000 @@ -27,7 +27,7 @@ This can be achieved by using the DocBook toolchain but numbering the paragraphs with AsciiDoc using a custom config file containing the -following (see http://asciidoc.org/userguide.html#X27 +following (see https://asciidoc.org/userguide.html#X27 for ways to include such a file): --------------------------------------------------------------------- @@ -175,7 +175,7 @@ DocBook has no provision for specifying table of contents levels but you can set the TOC level further down the toolchain by passing the DocBook XSL Stylesheets -http://docbook.sourceforge.net/release/xsl/current/doc/html/toc.section.depth.html[toc.section.depth] +https://cdn.docbook.org/release/xsl/snapshot/doc/html/toc.section.depth.html[toc.section.depth] parameter to 'dblatex' (using the `--param` option) or 'xsltproc' (using the `--stringparam` option). For example to show only chapter titles in the TOC of a 'book' document set 'toc.section.depth' to '0'. @@ -311,12 +311,12 @@ == What is the preferred file name extension for AsciiDoc files? -The `.txt` http://en.wikipedia.org/wiki/Text_file[text file] extension +The `.txt` https://en.wikipedia.org/wiki/Text_file[text file] extension is preferred, but it's just a convention and it's not enforced by the software. AsciiDoc source files are human readable -http://en.wikipedia.org/wiki/Plain_text[plain text] files which is +https://en.wikipedia.org/wiki/Plain_text[plain text] files which is what the `.txt` extension is for. All text editors recognize and open files with a `.txt` extension. The `.txt` extension is universally recognized and unambiguous -- you are not left asking questions like @@ -470,7 +470,7 @@ == How can I generate a single HTML document file containing images and CSS styles? With the advent of Internet Explorer 8 all major web browsers now support the -http://en.wikipedia.org/wiki/Data:_URI_scheme[data URI scheme] for +https://en.wikipedia.org/wiki/Data_URI_scheme[data URI scheme] for embedded images. The AsciiDoc 'xhtml11' and 'html5' backends supports the data URI scheme for embedded images and by default it embeds the CSS stylesheet. For example the following command will generate a @@ -485,7 +485,7 @@ AsciiDoc has a built-in trace mechanism which is controlled by the 'trace' attribute; there is also the `--verbose` command-line option. These features are detailed in -http://asciidoc.org/userguide.html#X82[Appendix G of the +https://asciidoc.org/userguide.html#X82[Appendix G of the User Guide]. @@ -636,13 +636,13 @@ There are a number of programs available that generate presentation charts from textual specification, for example -http://home.gna.org/pychart/[Pychart] is a library for writing chart +https://pypi.org/project/PyChart/[Pychart] is a library for writing chart scripts in Python. Here's an example from the 'Pychart' documentation: .barchart.py --------------------------------------------------------------------- # -# Example bar chart (from Pychart documentation http://home.gna.org/pychart/). +# Example bar chart (from Pychart documentation https://pypi.org/project/PyChart/). # from pychart import * theme.get_options() @@ -669,7 +669,7 @@ # Attribute cluster=(0,3) tells that you are going to draw three bar # plots side by side. The plot labeled "foo" will the leftmost (i.e., # 0th out of 3). Attribute hcol tells the column from which to -# retrive sample values from. It defaults to one. +# retrieve sample values from. It defaults to one. ar.add_plot(bar_plot.T(label="foo", cluster=(0,3))) ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3))) ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3))) @@ -939,8 +939,9 @@ == Are there any DocBook viewers? -http://live.gnome.org/Yelp[Yelp], the GNOME help viewer, does a -creditable job of displaying DocBook XML files directly. +https://wiki.gnome.org/action/show/Apps/Yelp[Yelp], the GNOME help +viewer, does a creditable job of displaying DocBook XML files +directly. == Can you create ODF and PDF files using LibreOffice? @@ -1358,12 +1359,12 @@ == How can I convert documents from other formats to AsciiDoc? -You can use http://johnmacfarlane.net/pandoc/[Pandoc] to convert -documents in http://daringfireball.net/projects/markdown/[markdown], -http://docutils.sourceforge.net/docs/ref/rst/introduction.html[reStructuredText], -http://redcloth.org/textile[textile], -http://www.w3.org/TR/html40/[HTML], http://www.docbook.org/[DocBook], -or http://www.latex-project.org/[LaTeX] to AsciiDoc. +You can use https://pandoc.org/[Pandoc] to convert documents in +https://daringfireball.net/projects/markdown/[markdown], +https://docutils.sourceforge.io/rst.html[reStructuredText], +https://www.promptworks.com/textile/[textile], +https://html.spec.whatwg.org/[HTML], https://docbook.org/[DocBook], +or https://www.latex-project.org/[LaTeX] to AsciiDoc. == How can I insert raw HTML in a document processed by a2x? @@ -1371,13 +1372,13 @@ use a passthrough block it must contain DocBook (not HTML). Fortunately DocBook XSL Stylesheets has a http://www.sagehill.net/docbookxsl/InsertExtHtml.html[dbhtml-include -processing instruction] which will inlcude a file containing raw HTML +processing instruction] which will include a file containing raw HTML into the generated HTML output. For example: --------------------------------------------------------------- -++++ -<?dbhtml-include href="snippet.html"?> -++++ +++++ +<?dbhtml-include href="snippet.html"?> +++++ --------------------------------------------------------------- @@ -1392,7 +1393,7 @@ The DocBook XSL attribute that controls what character is added after a block title is -http://docbook.sourceforge.net/release/xsl/1.78.1/doc/html/runinhead.default.title.end.punct.html[ +https://cdn.docbook.org/release/xsl/snapshot/doc/html/runinhead.default.title.end.punct.html[ runinhead.default.title.end.punct]. You can override it and eliminate the default period value by adding the following line to the `./docbook-xsl/common.xsl` file that ships with AsciiDoc: Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/highlighter.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/highlighter.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/10.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/10.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/11.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/11.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/12.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/12.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/13.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/13.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/14.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/14.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/15.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/15.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/1.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/1.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/2.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/2.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/3.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/3.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/4.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/4.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/5.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/5.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/6.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/6.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/7.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/7.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/8.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/8.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/callouts/9.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/callouts/9.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/caution.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/caution.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/example.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/example.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/home.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/home.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/important.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/important.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/next.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/next.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/note.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/note.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/prev.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/prev.png differ diff -Nru asciidoc-8.6.10/doc/images/icons/README asciidoc-10.1.2/doc/images/icons/README --- asciidoc-8.6.10/doc/images/icons/README 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/images/icons/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook -icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency -from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. - -Stuart Rackham Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/tip.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/tip.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/up.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/up.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/icons/warning.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/icons/warning.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/smallnew.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/smallnew.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/doc/images/tiger.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/doc/images/tiger.png differ diff -Nru asciidoc-8.6.10/doc/latex-backend.txt asciidoc-10.1.2/doc/latex-backend.txt --- asciidoc-8.6.10/doc/latex-backend.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/latex-backend.txt 2022-02-18 01:52:22.000000000 +0000 @@ -6,7 +6,7 @@ == Introduction -LaTeX backend is a configuration file for Stuart Rackham's http://asciidoc.org/[Asciidoc]. It generates high-level LaTeX markup from Asciidoc documents. LaTeX is a document preparation system for TeX which in turn is a popular typesetting system. It is well known for producing excellently typesetted high quality printouts, especially suited for scientific text. +LaTeX backend is a configuration file for Stuart Rackham's https://asciidoc.org/[Asciidoc]. It generates high-level LaTeX markup from Asciidoc documents. LaTeX is a document preparation system for TeX which in turn is a popular typesetting system. It is well known for producing excellently typesetted high quality printouts, especially suited for scientific text. == Tutorial Getting a ready-to-print document from an Asciidoc document using the LaTeX backend involves at least two steps: @@ -72,7 +72,7 @@ <<<id>,<caption>,<style>>> - + The additional attribute 'style' can have following values: page:: @@ -85,7 +85,7 @@ Let's LaTeX print the number of the section, subsection, figure, table or theorem the referenced anchor resides preceded with a contextual label. cite:: -Let's LaTeX interprete this reference as a reference to a bibliography entry. If the attribute 'latex-use-bibliography-environment' is set, references with 'cite' style as well as their corresponding bibliography anchors are presented as automatically generated numbers. +Let's LaTeX interpret this reference as a reference to a bibliography entry. If the attribute 'latex-use-bibliography-environment' is set, references with 'cite' style as well as their corresponding bibliography anchors are presented as automatically generated numbers. If the 'style' attribute is not set the reference is printed the common way. @@ -130,10 +130,11 @@ The following software is necessary for using the LaTeX backend: -- An up-to-date version of http://asciidoc.org/[Asciidoc] +- An up-to-date version of https://asciidoc.org/[Asciidoc] - An up-to-date TeX distribution, e.g.: - * http://www.miktex.org/[MiKTeX] for Windows - * http://www.tug.org/tetex/[teTeX] for Linux + * https://miktex.org/[MiKTeX] for Windows + * https://tug.org/texlive/[teTeX] for Linux + * https://www.tug.org/mactex/ for macOS [[packageRequirements]] === TeX/LaTeX Package requirements @@ -167,7 +168,7 @@ - `\$$!..braceleft..!$$` instead of `{` - `\$$!..braceright..!$$` instead of `}` - + For more special characters take a look in the `[replacements2]` sections. `[replacements2]` section is responsible for replacing the symbols with their corresponding special characters. @@ -175,7 +176,7 @@ === Code listing block -For creating highlighted code listings I suggest the use of http://www.andre-simon.de/[Highlight] or http://www.gnu.org/software/src-highlite/[GNU Source Highlight]. Both are suited for use as Asciidoc filters. +For creating highlighted code listings I suggest the use of http://www.andre-simon.de/[Highlight] or https://www.gnu.org/software/src-highlite/[GNU Source Highlight]. Both are suited for use as Asciidoc filters. == Known Bugs diff -Nru asciidoc-8.6.10/doc/latex-bugs.txt asciidoc-10.1.2/doc/latex-bugs.txt --- asciidoc-8.6.10/doc/latex-bugs.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/latex-bugs.txt 2022-02-18 01:52:22.000000000 +0000 @@ -67,7 +67,7 @@ `asciidoc` specification to generate valid output in both formats by simple regexp replacement. Related to this is the unfortunate fact that `<COLGROUP>` and related tags aren't a required part of HTML4, -and some broswers (at least Firefox and Konqueror) don't implement +and some browsers (at least Firefox and Konqueror) don't implement them. Solution:: Perhaps table processing could be handled by a Python diff -Nru asciidoc-8.6.10/doc/latex-filter.txt asciidoc-10.1.2/doc/latex-filter.txt --- asciidoc-8.6.10/doc/latex-filter.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/latex-filter.txt 2022-02-18 01:52:22.000000000 +0000 @@ -14,7 +14,7 @@ Two image formats are supported; PNG and SVG. PNG is the default since that was the first format that this filter supported. However, SVG is a better -format since it's scalable. Using SVG make formulas look good in both PDF:s +format since it's scalable. Using SVG make formulas look good in both PDFs and on web pages. SVG will also scale well when zooming in on a web page for example. It is recommended to always use the SVG format. This can be done by setting the 'imgfmt' parameter to 'svg', as is done below. An even better way diff -Nru asciidoc-8.6.10/doc/latexmathml.txt asciidoc-10.1.2/doc/latexmathml.txt --- asciidoc-8.6.10/doc/latexmathml.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/latexmathml.txt 2022-02-18 01:52:22.000000000 +0000 @@ -1,20 +1,20 @@ LaTeXMathML Formulae ==================== -http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML] -capability has been added to AsciiDoc for users who are more familar +https://www.maths.nottingham.ac.uk/plp/pmadw/lm.html[LaTeXMathML] +capability has been added to AsciiDoc for users who are more familiar with or prefer LaTeX math formulas to the -http://asciidoc.org/asciimathml.html[ASCIIMathML] +https://asciidoc.org/asciimath.html[ASCIIMath] notation. 'LaTeXMathML' is a derivative of -http://asciidoc.org/asciimathml.html[ASCIIMathML] -- in +https://asciidoc.org/asciimath.html[ASCIIMath] -- in terms of usage the only difference it that you use the `latexmath` attribute instead of the `asciimath` attribute. 'LaTeXMathML' processes LaTeX math formulas not arbitrary LaTeX (as `dblatex(1)` does). See the -http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML] +https://www.maths.nottingham.ac.uk/plp/pmadw/lm.html[LaTeXMathML] website for details. Here's the link:latexmathml.txt[AsciiDoc source] that generated this diff -Nru asciidoc-8.6.10/doc/main.aap asciidoc-10.1.2/doc/main.aap --- asciidoc-8.6.10/doc/main.aap 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/main.aap 1970-01-01 00:00:00.000000000 +0000 @@ -1,241 +0,0 @@ -##################################################################### -# -# A-A-P file for making AsciiDoc distribution documentation. -# (you can obtain A-A-P from http://www.a-a-p.org) -# -# Stuart Rackham <srackham@gmail.com> -##################################################################### - -:execute ../common.aap - -ASCIIDOC = python ../asciidoc.py -a revnumber=$(VERS)@ -a revdate="$(DATE)@" -A2X = python ../a2x.py - -:syseval which fop | :assign FOP -@if not _no.FOP: - :syseval which fop.sh | :assign FOP -:syseval which lynx | :assign LYNX # Converts HTML to text. -:syseval which xmllint | :assign XMLLINT # Validates XML. -:syseval which dblatex | :assign DBLATEX # Converts DocBook XML to PDF. -:syseval which aspell | :assign ASPELL -:syseval which xsltproc | :assign XSLTPROC - -ROOT = asciidoc asciidoc.1 -INFILES = $*(ROOT).txt -CHUNK_DIR = ./asciidoc.chunked -HTMLHELP_DIR = ./asciidoc.htmlhelp -HTMLHELP_FILE = asciidoc - -OUTFILES = $*(ROOT).html $*(ROOT).css.html $*(ROOT).css-embedded.html \ - asciidoc.pdf asciidoc.1.man a2x.1.man \ - article.html book.html book-multi.html asciidoc.xml asciidoc.1.xml \ - ../BUGS ../CHANGELOG ../README ../INSTALL \ - latex-backend.html \ - $HTMLHELP_DIR/index.html \ - $CHUNK_DIR/index.html \ - article.pdf \ - latexmath.pdf \ - latex-filter.pdf \ - source-highlight-filter.pdf \ - music-filter.pdf \ - book.epub \ - article-standalone.html \ - article-html5-toc2.html - -TEST_FILES = $*(ROOT).css-embedded.html - article.css-embedded.html book.css-embedded.html \ - article.xml book.xml book-multi.xml asciidoc.xml asciidoc.1.xml \ - asciidoc.1.html a2x.1.xml music-filter.xml \ - book.epub asciidoc.epub \ - - -##################################################################### -# Filetype build rules. -##################################################################### - -:rule %.epub : %.txt - :sys $A2X -f epub -d book --epubcheck --icons $source - -:rule %.text : %.txt - # Convert AsciiDoc to HTML then use lynx(1) to convert HTML to text. - @if not _no.LYNX: - :print WARNING: lynx(1) unavailable: skipping $target file generation - @else: - opt = -f ../text.conf - @if source_list[0] == 'asciidoc.1.txt': - opt += -d manpage - @else: - opt += -n - :sys $ASCIIDOC $opt -b html4 -o - $source | \ - lynx -dump -stdin > $target - -:rule %.css.html : %.txt - opt = - @if source_list[0] == 'asciidoc.1.txt': - opt += -d manpage - @else: - opt += -n - opt += -a toc -a toclevels=2 -a scriptsdir=../javascripts - :sys $ASCIIDOC $opt -b xhtml11 -a linkcss -a icons -a stylesdir=../stylesheets -o $target $(source[0]) - @if _no.XMLLINT: - :sys $XMLLINT --nonet --noout --valid $target - @else: - :print WARNING: xmllint(1) unavailable: skipping validation - -:rule %.css-embedded.html : %.txt - opt = - @if source_list[0] == 'asciidoc.1.txt': - opt += -d manpage - @else: - opt += -n - opt += -a toc -a toclevels=2 - :sys $ASCIIDOC -b xhtml11 $opt -o $target $(source[0]) - @if _no.XMLLINT: - :sys $XMLLINT --nonet --noout --valid $target - @else: - :print WARNING: xmllint(1) unavailable: skipping validation - -:rule %.xml : %.txt - opt = - @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'): - opt += -d manpage - @else: - opt += -n - @if source_list[0] == 'asciidoc.txt' or source_list[0].startswith('book'): - opt += -d book - :sys $ASCIIDOC $opt -b docbook $(source[0]) - @if _no.XMLLINT: - :sys $XMLLINT --nonet --noout --valid $target - @else: - :print WARNING: xmllint(1) unavailable: skipping validation - -:rule %.sgml : %.txt - opt = - @if source_list[0] in ('asciidoc.1.txt','a2x.1.txt'): - opt += -d manpage - @if source_list[0] == 'asciidoc.txt' or source_list[0].startswith('book'): - opt += -d book - :sys $ASCIIDOC $opt -b docbook-sgml $(source[0]) - -:rule %.html: %.xml - :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 --stringparam html.stylesheet ./docbook-xsl.css ../docbook-xsl/xhtml.xsl $source >$target - -:rule %.man : %.xml - :sys $XSLTPROC --nonet ../docbook-xsl/manpage.xsl $source - :sys touch $target # Dummy target. - -:rule %.fo: %.xml - :sys $XSLTPROC --nonet --stringparam admon.textlabel 0 ../docbook-xsl/fo.xsl $source >$target - -# This kludge forces the User Guide and LaTeX related PDFs to be generated -# using dblatex so we include a dblatex example in the distribution. -@if _no.DBLATEX: - asciidoc.pdf: asciidoc.txt - :sys $ASCIIDOC -b docbook $(source[0]) - :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target asciidoc.xml - latexmath.pdf: latexmath.xml - :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source - latex-filter.pdf: latex-filter.xml - :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source - -# Force the Source Highlighter PDF to be generated using dblatex -# because dblatex has builtin source code highlighting. -@if _no.DBLATEX: - source-highlight-filter.pdf: source-highlight-filter.xml - :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source - -@if _no.FOP: - :rule %.pdf: %.fo - :sys $FOP $source $target -@elif _no.DBLATEX: - # Fall back to dblatex if no FOP. - :rule %.pdf: %.xml - :sys $DBLATEX -p ../dblatex/asciidoc-dblatex.xsl -s ../dblatex/asciidoc-dblatex.sty -o $target $source -@else: - :rule %.pdf: - :print WARNING: PDF processor unavailable: skipping $target file generation - - -##################################################################### -# Explicit file generation (cases that don't fit the rules). -##################################################################### - -article-standalone.html: article.txt - :sys $ASCIIDOC -a data-uri -a icons -a toc -a max-width=55em -o $target $source - -article-html5-toc2.html: article.txt - :sys $ASCIIDOC -b html5 -a icons -a toc2 -a theme=flask -o $target $source - -asciidoc.1.html: asciidoc.1.txt - :sys $ASCIIDOC -d manpage -b html4 $source - @if _no.XMLLINT: - :sys $XMLLINT --nonet --noout --valid --html $target - @else: - :print WARNING: xmllint(1) unavailable: skipping validation - -# User Guide 'chunked' into linked HTML pages. -$CHUNK_DIR/index.html: asciidoc.txt - :sys $A2X -fchunked -dbook --icons -D ./ asciidoc.txt - -# HTML Help formatted User Guide. -$HTMLHELP_DIR/index.html: asciidoc.xml - :sys $A2X -fhtmlhelp -dbook --icons -D ./ asciidoc.txt - -../BUGS: ../BUGS.text - # Make BUGS.text and copy to BUGS. - :copy ../BUGS.text ../BUGS - -../CHANGELOG: ../CHANGELOG.text - # Make CHANGELOG.text and copy to CHANGELOG. - :copy ../CHANGELOG.text ../CHANGELOG - -../README.text : ../README.asciidoc - # Convert AsciiDoc to HTML then use lynx(1) to convert HTML to text. - @if not _no.LYNX: - :print WARNING: lynx(1) unavailable: skipping $target file generation - @else: - :sys $ASCIIDOC -f ../text.conf -n -b html4 -o - $source | \ - lynx -dump -stdin > $target - -../README: ../README.text - # Make README.text and copy to README. - :copy ../README.text ../README - -../INSTALL: ../INSTALL.text - # Make INSTALL.text and copy to INSTALL. - :copy ../INSTALL.text ../INSTALL - -asciimathml.html: asciimathml.txt - :sys $ASCIIDOC -a asciimath $source - # No xmllint(1) checking -- fails on embedded JavaScript. - -latexmathml.html: latexmathml.txt - :sys $ASCIIDOC -a latexmath $source - # No xmllint(1) checking -- fails on embedded JavaScript. - - -##################################################################### -# Build commands. -##################################################################### - -all: $OUTFILES - -clean: - :del {f} $OUTFILES $TEST_FILES - :del {f} *.bak # Remove aspell backups. - -spell: $INFILES ../CHANGELOG.txt ../README.asciidoc ../BUGS.txt ../INSTALL.txt \ - a2x.1.txt faq.txt asciidocapi.txt testasciidoc.txt \ - epub-notes.txt publishing-ebooks-with-asciidoc.txt \ - source-highlight-filter.txt \ - slidy.txt slidy-example.txt - # Interactively spell check all files. - @for s in source_list: - :sys {i} $ASPELL check -p ./asciidoc.dict $s - -clean_testfiles: - :del {f} $TEST_FILES - :del {f} music*.png # Force Lilypond to run. - -test: clean_testfiles $TEST_FILES - # Force generation and validation of .html and Docbook (.xml) files. diff -Nru asciidoc-8.6.10/doc/music-filter.txt asciidoc-10.1.2/doc/music-filter.txt --- asciidoc-8.6.10/doc/music-filter.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/music-filter.txt 2022-02-18 01:52:22.000000000 +0000 @@ -2,8 +2,8 @@ ============ The AsciiDoc distribution includes a Music Block filter that -translates music in http://lilypond.org/[LilyPond] or -http://abcnotation.org.uk/[ABC] notation to standard classical +translates music in https://lilypond.org/[LilyPond] or +https://abcnotation.com/[ABC] notation to standard classical notation in the form of a trimmed PNG image which is automatically inserted into the AsciiDoc output document (see the examples below). @@ -130,9 +130,9 @@ ------------ In addition to AsciiDoc you will need to have installed: -- http://lilypond.org/web/[LilyPond] (most Linux distributions include +- https://lilypond.org/[LilyPond] (most Linux distributions include this package). -- http://www.imagemagick.org[ImageMagick] (most Linux distributions +- https://imagemagick.org/[ImageMagick] (most Linux distributions include this package). Test the music filter it by converting the test file to HTML with AsciiDoc: diff -Nru asciidoc-8.6.10/doc/publishing-ebooks-with-asciidoc.txt asciidoc-10.1.2/doc/publishing-ebooks-with-asciidoc.txt --- asciidoc-8.6.10/doc/publishing-ebooks-with-asciidoc.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/publishing-ebooks-with-asciidoc.txt 2022-02-18 01:52:22.000000000 +0000 @@ -18,11 +18,11 @@ endif::blogpost[] It's easy to write and publish books in -http://en.wikipedia.org/wiki/EPUB[EPUB] and PDF formats using -http://asciidoc.org/[AsciiDoc]. +https://en.wikipedia.org/wiki/EPUB[EPUB] and PDF formats using +https://asciidoc.org/[AsciiDoc]. ifdef::blogpost[] This article was originally published on the -http://asciidoc.org/publishing-ebooks-with-asciidoc.html[AsciiDoc +https://asciidoc.org/publishing-ebooks-with-asciidoc.html[AsciiDoc website]. endif::blogpost[] @@ -44,14 +44,9 @@ NOTE: A number of 'asciidoc' and 'a2x' features used in this article require newer versions of AsciiDoc -- version 8.6.5 or better is recommended. The version of -http://wiki.docbook.org/topic/DocBookXslStylesheets[DocBook XSL +https://github.com/docbook/wiki/wiki/DocBookXslStylesheets[DocBook XSL Stylesheets] used was 1.76.1. -TIP: If you are experiencing 'xsltproc' errors when you run 'a2x' take -a look at Francis Shanahan's -http://francisshanahan.com/index.php/2011/fixing-epub-problem-docbook-xsl-asciidoc-a2x/[Fixing -the ePub problem with Docbook-XSL/A2X/Asciidoc] blog post. - [[X1]] Minimal Book @@ -86,13 +81,13 @@ The `-f` option specifies the output format, the `-d` option specifies the document type (book, article or manpage). The optional `--epubcheck` option tells 'a2x' to validate the EPUB file using -http://code.google.com/p/epubcheck/[epubcheck]. To generate a PDF +https://github.com/w3c/epubcheck[epubcheck]. To generate a PDF version (`minimal-book.pdf`) with 'dblatex' run: a2x -fpdf -dbook minimal-book.txt The distributed example PDFs were built using FOP -- if you prefer -http://xmlgraphics.apache.org/fop/[FOP] over +https://xmlgraphics.apache.org/fop/[FOP] over http://dblatex.sourceforge.net/[dblatex] use: a2x -fpdf -dbook --fop minimal-book.txt @@ -108,17 +103,17 @@ [NOTE] ====== -The http://asciidoc.org/a2x.1.html[a2x toolchain +The https://asciidoc.org/a2x.1.html[a2x toolchain wrapper] uses the following programs (most will be available prepackaged for your Linux distribution): - http://xmlsoft.org/XSLT/[xsltproc] -- http://docbook.sourceforge.net/projects/xsl/[DocBook XSL +- https://github.com/docbook/xslt10-stylesheets[DocBook XSL Stylesheets] - http://dblatex.sourceforge.net/[dblatex] (PDF file generator) -- http://xmlgraphics.apache.org/fop/[FOP] (alternative PDF file +- https://xmlgraphics.apache.org/fop/[FOP] (alternative PDF file generator) -- http://code.google.com/p/epubcheck/[epubcheck] (optional EPUB file +- https://github.com/w3c/epubcheck[epubcheck] (optional EPUB file validator) ====== @@ -128,25 +123,24 @@ ---------------------- 'The Brothers Karamazov' is an example of a multi-part book. To generate the AsciiDoc source I downloaded the -http://www.gutenberg.org[Project Gutenberg] plain text source and +https://www.gutenberg.org/[Project Gutenberg] plain text source and edited it manually (this took around 15 minutes). To generate the `brothers-karamazov.epub` EPUB file run this command: a2x brothers-karamazov.txt -:examples-url: http://asciidoc.org/examples/books/ [frame="topbot",options="header",caption=""] .Brothers Karamazov source files and eBooks |==================================================================== |EPUB |PDF |AsciiDoc source |Project Gutenburg text -|{examples-url}brothers-karamazov.epub[brothers-karamazov.epub] +|link:examples/books/brothers-karamazov.epub[brothers-karamazov.epub] -|{examples-url}brothers-karamazov.pdf[brothers-karamazov.pdf] +|link:examples/books/brothers-karamazov.pdf[brothers-karamazov.pdf] -|{examples-url}brothers-karamazov.zip[brothers-karamazov.zip] +|link:examples/books/brothers-karamazov.zip[brothers-karamazov.zip] -|http://www.gutenberg.org/etext/28054 +|https://www.gutenberg.org/ebooks/28054 |==================================================================== @@ -155,7 +149,7 @@ --------------------------------------------------------------------- // -// Text from Project Gutenburg http://www.gutenberg.org/etext/28054 +// Text from Project Gutenburg https://www.gutenberg.org/etext/28054 // // Formatted for AsciiDoc by Stuart Rackham. // @@ -197,7 +191,7 @@ --------------------------------------------------------------------- - The book, book part and chapter titles have been edited to conform - to http://asciidoc.org/userguide.html#X17[AsciiDoc + to https://asciidoc.org/userguide.html#X17[AsciiDoc title conventions]. - Book part titles must be level zero titles: @@ -221,7 +215,7 @@ part, chapter and section numbering. - Setting the AsciiDoc 'plaintext' attribute suppresses most of - http://asciidoc.org/userguide.html#_text_formatting[AsciiDoc's + https://asciidoc.org/userguide.html#_text_formatting[AsciiDoc's text formatting] and substitution conventions, this allows large amounts of text to be imported with little or no manual editing. @@ -235,7 +229,7 @@ necessitated editing. * You can selectively enable and disable the 'plaintext' attribute throughout your document using AsciiDoc - http://asciidoc.org/userguide.html#X18[attribute + https://asciidoc.org/userguide.html#X18[attribute entries]. @@ -252,34 +246,34 @@ .Sherlock Holmes source files and eBooks |==================================================================== |EPUB |PDF |AsciiDoc source |Project Gutenburg text -|{examples-url}adventures-of-sherlock-holmes.epub[adventures-of-sherlock-holmes.epub] +|link:examples/books/adventures-of-sherlock-holmes.epub[adventures-of-sherlock-holmes.epub] -|{examples-url}adventures-of-sherlock-holmes.pdf[adventures-of-sherlock-holmes.pdf] +|link:examples/books/adventures-of-sherlock-holmes.pdf[adventures-of-sherlock-holmes.pdf] -|{examples-url}adventures-of-sherlock-holmes.zip[adventures-of-sherlock-holmes.zip] +|link:examples/books/adventures-of-sherlock-holmes.zip[adventures-of-sherlock-holmes.zip] -|http://www.gutenberg.org/etext/1661 +|https://www.gutenberg.org/etext/1661 |==================================================================== Here's a screenshot of the first page of the first chapter (rendered -by the http://www.epubread.com/en/[Firefox EPUBReader addon]): +by the https://www.epubread.com/en/[Firefox EPUBReader addon]): -image::images/epub.png[] +image::examples/books/sherlock-epub.png[] -The {examples-url}adventures-of-sherlock-holmes.zip[AsciiDoc source +The link:examples/books/adventures-of-sherlock-holmes.zip[AsciiDoc source Zip file] contains the following files: `adventures-of-sherlock-holmes.txt`:: The AsciiDoc source (derived from the - http://www.gutenberg.org/etext/1661[Project Gutenberg plain text + https://www.gutenberg.org/etext/1661[Project Gutenberg plain text source]). `adventures-of-sherlock-holmes.jpg`:: The front cover image. `adventures-of-sherlock-holmes-docinfo.xml`:: - A http://asciidoc.org/userguide.html#X87[docinfo] file + A https://asciidoc.org/userguide.html#X87[docinfo] file containing DocBook markup for the front cover image and the Project Gutenberg frontmatter. DocBook XSL Stylesheets identifies the book cover image by the `role="cover"` attribute in the DocBook @@ -287,9 +281,11 @@ `adventures-of-sherlock-holmes.css`:: CSS rules for styling the page layout. The design is based on the - http://epubzengarden.com[ePub Zen Garden] 'Gbs' style. Because this - file is not named `docbook-xsl.css` the name must be specified - explicitly using the 'a2x' `--stylesheet` option. + 'Gbs' style from the defunct ePub Zen Garden (please let us know + if you are the author or know the author so we can give better + attribution). Because this file is not named `docbook-xsl.css` + the name must be specified explicitly using the 'a2x' `--stylesheet` + option. `underline.png`:: A title underline image that is used by the CSS stylesheet. This @@ -301,7 +297,7 @@ --------------------------------------------------------------------- // -// Text from Project Gutenburg http://www.gutenberg.org/etext/1661 +// Text from Project Gutenburg https://www.gutenberg.org/etext/1661 // // Formatted for AsciiDoc by Stuart Rackham. // @@ -332,7 +328,7 @@ The manual editing of imported plain text involves formatting the title and chapter names as -http://asciidoc.org/userguide.html#X17[AsciiDoc titles] +https://asciidoc.org/userguide.html#X17[AsciiDoc titles] (in this example we've used the 'single line' title format). Sherlock Holmes only has two title levels: @@ -364,25 +360,19 @@ to use a different stylesheet file. Take a look at the `adventures-of-sherlock-holmes.css` CSS file. -There are some great examples of EPUB book styles at -http://epubzengarden.com/[ePub Zen Garden]. - Including embedded fonts ------------------------ -See http://asciidoc.org/faq.html#X5[this FAQ]. +See https://asciidoc.org/faq.html#X5[this FAQ]. Reading EPUB documents ---------------------- -My current favorite software epub reader is the -http://www.epubread.com/en/[Firefox EPUBReader addon]. EPUBReader -honors the book's CSS styling rules and renders the page as the author -intended (many EPUB readers only process a sub-set of CSS styling -rules). - -Browsers are a natural fit for EPUB (EPUB is just a bunch of zipped -XHTML files) -- I'd love to see browsers support EPUB natively. +To view and read epub files, you can use +https://www.epubread.com/en/[EPUBReader addon], which is available for +Firefox, Chrome / Chromium, and Opera. EPUBReader honors the book's +CSS styling rules and renders the page as the author intended (many +EPUB readers only process a sub-set of CSS styling rules). As of writing this article most eBook readers (with the notable exception of Amazon's Kindle) support the EPUB format. @@ -393,6 +383,6 @@ AsciiDoc supports a rich set of markup conventions and can generate reference works and technical manuals complete with tables, illustrations, indexes, bibliographies and appendices. All the -examples on the http:///asciidoc.org/[AsciiDoc web site] +examples on the https://asciidoc.org/[AsciiDoc web site] can be formatted as EPUB eBooks. diff -Nru asciidoc-8.6.10/doc/slidy.txt asciidoc-10.1.2/doc/slidy.txt --- asciidoc-8.6.10/doc/slidy.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/slidy.txt 2022-02-18 01:52:22.000000000 +0000 @@ -21,7 +21,7 @@ HTML slideshows. - An overview of 'Slidy' can be found here: - http://www.w3.org/Talks/Tools/Slidy2/ + https://www.w3.org/Talks/Tools/Slidy2 - AsciiDoc ships with the Slidy JavaScript a customised Slidy CSS file. - Use the 'asciidoc' `--backend slidy` command-line option to generate diff -Nru asciidoc-8.6.10/doc/source-highlight-filter.txt asciidoc-10.1.2/doc/source-highlight-filter.txt --- asciidoc-8.6.10/doc/source-highlight-filter.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/source-highlight-filter.txt 2022-02-18 01:52:22.000000000 +0000 @@ -31,7 +31,7 @@ === GNU Source Highlight The default highlighter is the -http://www.gnu.org/software/src-highlite/[GNU source-highlight] which +https://www.gnu.org/software/src-highlite/[GNU source-highlight] which can highlight 'html4', 'html5' and 'xhtml11' outputs. The GNU source-highlight must be installed and the 'source-highlight' command must reside in the shell search 'PATH'. @@ -52,7 +52,7 @@ `--encoding` command-line option. === Pygments -The http://pygments.org/[Pygments] syntax highlighter can be used for +The https://pygments.org/[Pygments] syntax highlighter can be used for 'xhtml11' and 'html5' outputs (set the 'source-highlighter' attribute to 'pygments'). diff -Nru asciidoc-8.6.10/doc/testasciidoc.1.txt asciidoc-10.1.2/doc/testasciidoc.1.txt --- asciidoc-8.6.10/doc/testasciidoc.1.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/doc/testasciidoc.1.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,113 @@ +TESTASCIIDOC(1) +=============== +:doctype: manpage + + +NAME +---- +testasciidoc - Run AsciiDoc conformance tests specified in configuration file. + + +SYNOPSIS +-------- +*testasciidoc* ['OPTIONS'] 'COMMAND' + + +DESCRIPTION +----------- +The testasciidoc command runs AsciiDoc conformance tests specified in +configuration file. + + +COMMANDS +-------- +The testasciidoc toolset has three different commands: + + testasciidoc list + testasciidoc run [-n, --number NUMBER] [-b, --backend BACKEND] [OPTIONS] + testasciidoc update [-n, --number NUMBER] [-b, --backend BACKEND] [OPTIONS] + +The commands perform as follows: + +*list*:: + List available tests cases. + +*run*:: + Execute tests (regenerate temporary test cases and compare them to the + reference files). + +*update*:: + Regenerate and update test data reference files. + Needs to be launched at least once to have the reference files to compare to + during the tests. + +Where: + +*NUMBER*:: + Is the index number of the test case from the `testasciidoc list` command. + +*BACKEND*:: + Is the asciidoc backend to use. + +*OPTIONS*:: + Are the options listed below. + + +OPTIONS +------- +*-f, --conf-file*='CONF_FILE':: + Use configuration file CONF_FILE for more information about the + configuration file format refer to the tests documentation. + +*--force*:: + Update all test data overwriting existing data + + +EXAMPLES +-------- +`testasciidoc list`:: + Lists all the test actions available for running or updating. + +`testasciidoc run`:: + Runs all the testing actions available. + +`testasciidoc run --number 1 --backend html5 --conf-file=/etc/asciidoc/testasciidoc.conf`:: + Run the test case 1 for the html5 asciidoc backend using the configuration file + /etc/asciidoc/testasciidoc.conf. + +`testasciidoc update --number 1 --backend html5`:: + Generate or update the reference files used for the tests cases 1st action of + the html5 asciidoc backend. + + +EXIT STATUS +----------- +*0*:: + Success + +*1*:: + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). + + +BUGS +---- +See the AsciiDoc distribution BUGS file. + + +AUTHOR +------ +AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it. + + +RESOURCES +--------- +GitHub: <https://github.com/asciidoc/asciidoc-py3> + +Main web site: <https://asciidoc.org/> + + +SEE ALSO +-------- +asciidoc(1), a2x(1) diff -Nru asciidoc-8.6.10/doc/testasciidoc.txt asciidoc-10.1.2/doc/testasciidoc.txt --- asciidoc-8.6.10/doc/testasciidoc.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/doc/testasciidoc.txt 2022-02-18 01:52:22.000000000 +0000 @@ -33,22 +33,24 @@ To view the command usage run: --------------------------------------------------------------------- -$ python tests/testasciidoc.py -Usage: testasciidoc.py [OPTIONS] COMMAND +$ python3 tests/testasciidoc.py +usage: testasciidoc.py [-h] [-v] [-f CONF_FILE] command ... Run AsciiDoc conformance tests specified in configuration FILE. -Commands: - list List tests - run [NUMBER] [BACKEND] Execute tests - update [NUMBER] [BACKEND] Regenerate and update test data - -Options: - -f, --conf-file=CONF_FILE - Use configuration file CONF_FILE (default configuration file is - testasciidoc.conf in testasciidoc.py directory) - --force - Update all test data overwriting existing data +positional arguments: + command + list List tests + run Execute tests + update Regenerate and update test data + +optional arguments: + -h, --help show this help message and exit + -v, --version show program's version number and exit + -f CONF_FILE, --conf-file CONF_FILE + Use configuration file CONF_FILE (default + configuration file is testasciidoc.conf in + testasciidoc.py directory) --------------------------------------------------------------------- To view the list of tests in the default `testasciidoc.conf` @@ -106,6 +108,10 @@ - If you don't have GNU source-highlight installed you should disable the 'Tables' and 'Source highlighter' tests in the `tests/testasciidoc.conf` configuration file. +- The `run` and `update` commands both take optional `--number` and + `--backend` options to specify a test case number and/or backend to + test against. Use `python3 tests/testasciidoc.py run --help` for more + information. ===================================================================== @@ -124,9 +130,9 @@ Examples: python tests/testasciidoc.py run - python tests/testasciidoc.py run 3 - python tests/testasciidoc.py run html4 - python tests/testasciidoc.py run 3 html4 + python tests/testasciidoc.py run --number 3 + python tests/testasciidoc.py run --backend html4 + python tests/testasciidoc.py run --number 3 --backend html4 'update':: Generates and updates missing and out of date test output data @@ -135,7 +141,7 @@ Examples: python tests/testasciidoc.py update - python tests/testasciidoc.py --force update 4 + python tests/testasciidoc.py update --number 4 --force NOTE: You can run or update disabled tests by explicitly specifying the test number. @@ -160,17 +166,25 @@ % name Optional base output file name. Defaults to base source file name. +% requires +Optional external requirements necessary to run the test, e.g. dot. + % source AsciiDoc source file name. % backends Optional list of backends to be tested(default is all backends). + % options Optional list of command-line option tuples. % attributes Optional dictionary of attribute values. +% artifacts +Optional list of artifacts that get generated from test, and which +will get cleaned up. + --------------------------------------------------------------------- Example test spec: @@ -181,6 +195,9 @@ % options ['--section-numbers',('--doctype','book')] +% requires +['source-highlight', 'dot'] + % attributes # Exclude date from document footer. {'docdate':None} @@ -209,6 +226,14 @@ equivalent to a `(name,None)` tuple. - The 'attributes' directive data specifies a Python dictionary containing AsciiDoc attributes to be passed to AsciiDoc. +- The `requires` directive data specifies a Python list of strings + which correspond to the command line program specified by filters + in that test. +- The `artifacts` directive data specifies a Python list of strings + which corresponds to the list of files (usually image or other such + files) that get generated when asciidoc is run over the input file. + The files are deleted after the test is for a given source file is + run for all backends. globals directive ~~~~~~~~~~~~~~~~~ diff -Nru asciidoc-8.6.10/docbook45.conf asciidoc-10.1.2/docbook45.conf --- asciidoc-8.6.10/docbook45.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook45.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,802 +0,0 @@ -# -# docbook45.conf -# -# Asciidoc DocBook 4.5 configuration file. -# - -[miscellaneous] -outfilesuffix=.xml -# Printable page width and units. -# Used to calculate DocBook CALS tables absolute column and table widths. -pagewidth=425 -pageunits=* - -[attributes] -basebackend=docbook -basebackend-docbook= -basebackend-docbook45= -# For backward compatibility (docbook backend was renamed to docbook45 at 8.6.2) -backend-docbook= -# toc and numbered are set to maintain original default behavior. -toc= -numbered= - -[replacements2] -# Line break markup. Custom processing instruction in fo.xsl. -(?m)^(.*)\s\+$=\1<?asciidoc-br?> - -[replacements] -ifdef::asciidoc7compatible[] -# Superscripts. -\^(.+?)\^=<superscript>\1</superscript> -# Subscripts. -~(.+?)~=<subscript>\1</subscript> -endif::asciidoc7compatible[] - -[ruler-blockmacro] -# Uses custom processing instructions in fo.xsl and asciidoc-dblatex.xsl. -<simpara><?asciidoc-hr?></simpara> - -[pagebreak-blockmacro] -# Uses custom processing instructions in fo.xsl and asciidoc-dblatex.xsl. -<simpara><?asciidoc-pagebreak?></simpara> - -[blockdef-pass] -latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py" - -[macros] -# math macros. -(?su)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?:\$\s*)?(?P<passtext>.*?)(?:\s*\$)?(?<!\\)\]=[] -(?u)^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[] - -[latexmath-inlinemacro] -<inlineequation> -<alt><![CDATA[${passtext}$]]></alt> -<inlinemediaobject><textobject><phrase></phrase></textobject></inlinemediaobject> -</inlineequation> - -[latexmath-blockmacro] -<informalequation> -<alt><![CDATA[{backslash}[{passtext}{backslash}]]]></alt> -<mediaobject><textobject><phrase></phrase></textobject></mediaobject> -</informalequation> - -[latexmathblock] -<equation{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}><title>{title} -{title%} - - -{title#} -{title%} - -[image-inlinemacro] - - - - - {alt={target}} - - -[image-blockmacro] -{title} -{title%}{pgwide-option?} -# DocBook XSL Stylesheets custom processing instructions. - - - - - - - {alt={target}} - -{title#} -{title%} - -[indexterm-inlinemacro] -# Index term. -# Generate separate index entries for primary, secondary and tertiary -# descriptions. -# Primary only. -{2%} -{2%} {1} -{2%} -# Primary and secondary. -{2#}{3%} -{2#}{3%} {1}{2} -{2#}{3%} -{2#}{3%} -{2#}{3%} {2} -{2#}{3%} -# Primary, secondary and tertiary. -{3#} - {1}{2}{3} -{3#} -{3#} - {2}{3} -{3#} -{3#} - {3} -{3#} - -[indexterm2-inlinemacro] -# Index term. -# Single entry index term that is visible in the primary text flow. -{1}{1} - -[footnote-inlinemacro] -# Footnote. -{0} - -[footnoteref-inlinemacro] -# Footnote reference. -{2#}{2} -{2%} - -[callout-inlinemacro] -# Callout. - - -# List tags. -[listtags-bulleted] -list={unbreakable-option? }{title?{title}}| -item=| -text=| - -[listtags-numbered] -list={unbreakable-option? }{title?{title}}{start?}| -item=| -text=| - -[listtags-labeled] -list={title?{title}}| -entry=| -label= -term=| -item=| -text=| - -[listtags-horizontal] -# Horizontal labeled list (implemented with two column table). -# Hardwired column widths to 30%,70% because the current crop of PDF -# generators do not auto calculate column widths. - list=<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{style? tabstyle="{style}"}{pgwide-option? pgwide="1"} frame="none" colsep="0" rowsep="0">{title?{title}}|<{title?/table}{title!/informaltable}> -entry=| -label=| -term=| -item=| -text=| - -[listtags-callout] -list={title?{title}}| -item=| -text=| - -[listtags-qanda] -list={title?{title}}| -entry=| -label=| -term=| -item=| -text=| - -[listtags-bibliography] -list={title?{title}}| -item=| -text=| - -[listtags-glossary] -list= -entry=| -label= -term=| -item=| -text=| - -[tags] -# Quoted text -emphasis={1?}|{1?} -strong={1?}|{1?} -monospaced={1?}|{1?} -singlequoted={lsquo}{1?}|{1?}{rsquo} -doublequoted={ldquo}{1?}|{1?}{rdquo} -unquoted={1?}|{1?} -subscript={1?}|{1?} -superscript={1?}|{1?} - -ifdef::deprecated-quotes[] -# Override with deprecated quote attributes. -emphasis={role?}|{role?} -strong={role?}|{role?} -monospaced={role?}|{role?} -singlequoted={role?}{amp}#8216;|{amp}#8217;{role?} -doublequoted={role?}{amp}#8220;|{amp}#8221;{role?} -unquoted={role?}|{role?} -subscript={role?}|{role?} -superscript={role?}|{role?} -endif::deprecated-quotes[] - -# Inline macros -[http-inlinemacro] -{0={name}:{target}} -[https-inlinemacro] -{0={name}:{target}} -[ftp-inlinemacro] -{0={name}:{target}} -[file-inlinemacro] -{0={name}:{target}} -[irc-inlinemacro] -{0={name}:{target}} -[mailto-inlinemacro] -{0={target}} -[callto-inlinemacro] -{0={target}} -[link-inlinemacro] -{0={target}} -# anchor:id[text] -[anchor-inlinemacro] - -# [[id,text]] -[anchor2-inlinemacro] - -# [[[id]]] -[anchor3-inlinemacro] -[{1}] -# xref:id[text] -[xref-inlinemacro] -{0} -{0%} -# <> -[xref2-inlinemacro] -{2} -{2%} -# // comment line -[comment-inlinemacro] -{showcomments#}{passtext} - -[comment-blockmacro] -{showcomments#}{passtext} - -[literal-inlinemacro] -# Inline literal. -{passtext} - -# Special word macros -[emphasizedwords] -{words} -[monospacedwords] -{words} -[strongwords] -{words} - -# Paragraph substitution. -[paragraph] -{title} -{title%} -| -{title%} -{title#} -{empty} - -[admonitionparagraph] -<{name}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>| - -# Delimited blocks. -[literalblock] -{title} -{title#} -{title%} -| - -{title#} - -[listingblock] -{title} -{title#} -{title%} -| - -{title#} - -[sidebarblock-open] - -{title} - -[sidebarblock-close] - - -[sidebarblock] -template::[sidebarblock-open] -| -template::[sidebarblock-close] - -[sidebarparagraph] -template::[sidebarblock-open] -| -template::[sidebarblock-close] - -[abstractblock-open] - -{title} - -[abstractblock-close] - - -[abstractblock] -template::[abstractblock-open] -| -template::[abstractblock-close] - -[abstractparagraph] -template::[abstractblock-open] -| -template::[abstractblock-close] - -[openblock] -| - -[partintroblock-open] - -{title} - -[partintroblock-close] - - -[partintroblock] -template::[partintroblock-open] -| -template::[partintroblock-close] - -[partintroparagraph] -template::[partintroblock-open] -| -template::[partintroblock-close] - -[quote-open] -# Common quote and verse element template. - -{title} -# Include attribution only if either {attribution} or {citetitle} is defined. -{attribution#} -{attribution%}{citetitle#} -{attribution} -{citetitle} -{attribution#} -{attribution%}{citetitle#} - -[quote-close] - - -[quoteblock] -template::[quote-open] -| -template::[quote-close] - -[verseblock] -template::[quote-open] -| -template::[quote-close] - -[quoteparagraph] -template::[quote-open] -| -template::[quote-close] - -[exampleblock-open] -<{title?example}{title!informalexample}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}> -# DocBook XSL Stylesheets custom processing instructions. - - -{title} - -[exampleblock-close] - - -[exampleblock] -template::[exampleblock-open] -| -template::[exampleblock-close] - -[exampleparagraph] -template::[exampleblock-open] -| -template::[exampleblock-close] - -[admonitionblock] -<{name}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}> -{title} -| - - -# Tables. -[tabletags-default] -colspec= -bodyrow=| -headdata=| -bodydata=| -paragraph=| - -[tabletags-emphasis] -paragraph=| - -[tabletags-header] -paragraph=| - -[tabletags-strong] -paragraph=| - -[tabletags-monospaced] -paragraph=| - -[tabletags-verse] -bodydata=| -paragraph= - -[tabletags-literal] -bodydata=| -paragraph= - -[tabletags-asciidoc] -paragraph= - -[table] -<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{pgwide-option? pgwide="1"} -frame="{frame=all}" -{grid%rowsep="1" colsep="1"} -rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" -> -{title} -# DocBook XSL Stylesheets custom processing instructions. - - - - - - -{colspecs} -{headrows#} -{headrows} -{headrows#} -{footrows#} -{footrows} -{footrows#} - -{bodyrows} - - - - -#-------------------------------------------------------------------- -# Deprecated old table definitions. -# - -[old_tabledef-default] -template=old_table -colspec= -bodyrow=| -bodydata=| - -[old_table] -<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"} pgwide="0" -frame="{frame=topbot}" -{grid%rowsep="0" colsep="0"} -rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}" -> -{title} - -{colspecs} -{headrows#} -{headrows} -{headrows#} -{footrows#} -{footrows} -{footrows#} - -{bodyrows} - - - - -# End of deprecated old table definitions. -#-------------------------------------------------------------------- - -# Special sections. -[preface] - -{title=} -| - - -[index] - -{title} -| - - -[bibliography] - -{title} -| - - -[glossary] - -{title} -| - - -[appendix] - -{title} -| - - -[floatingtitle] -{title} - - -[header-declarations] - - -{toc#} -{numbered#} - -[+docinfo] -{notitle%} {doctitle} - {revdate} -# To ensure valid articleinfo/bookinfo when there is no AsciiDoc header. - {doctitle%}{revdate%}{docdate} - {authored#} - {firstname} - {middlename} - {lastname} - {email} - {authored#} - {authorinitials} -{revnumber?{revnumber}}{revdate}{authorinitials?{authorinitials}}{revremark?{revremark}} -{docinfo1,docinfo2#}{include:{docdir}/docinfo.xml} -{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.xml} -# DEPRECATED: Use docinfo. -{revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} -# DEPRECATED: Use orgname in preference to companyname. -{companyname} -# DEPRECATED: Use orgname in preference to corpname. -{corpname} -{orgname} - -#------------------------- -# article document type -#------------------------- -ifdef::doctype-article[] - -[header] -template::[header-declarations] - -
    - -template::[docinfo] - - -[footer] -
    - -[preamble] -# Untitled elements between header and first section title. -| - -[abstract] - -| - - -[sect1] - -{title} -| - - -[sect2] - -{title} -| - - -[sect3] - -{title} -| - - -[sect4] - -{title} -| - - -endif::doctype-article[] - -#------------------------- -# manpage document type -#------------------------- -ifdef::doctype-manpage[] - -[replacements] -# The roff format does not substitute special characters so just print them as -# text. -\(C\)=(C) -\(TM\)=(TM) - -[header] -template::[header-declarations] - - -template::[docinfo] - - -{mantitle} -{manvolnum} -# Default source and manual to suppress DocBook XSL warnings. -{mansource= } -{manmanual= } -{manversion={revnumber}} - - - {manname1} - {manname2} - {manname3} - {manname4} - {manname5} - {manname6} - {manname7} - {manname8} - {manname9} - {manpurpose} - - -[footer] - - -# Section macros -[synopsis] - -| - - -[sect1] - -{title} -| - - -[sect2] - -{title} -| - - -[sect3] - -{title} -| - - -endif::doctype-manpage[] - -#------------------------- -# book document type -#------------------------- -ifdef::doctype-book[] - -[header] -template::[header-declarations] - - - -template::[docinfo] - - -[footer] - - -[preamble] -# Preamble is not allowed in DocBook book so wrap it in a preface. - -{title=} -| - - -[dedication] - -{title} -| - - -[colophon] - -{title} -| - - -[sect0] - -{title} -| - - -[sect1] - -{title} -| - - -[sect2] - -{title} -| - - -[sect3] - -{title} -| - - -[sect4] - -{title} -| - - -endif::doctype-book[] - -ifdef::sgml[] -# -# Optional DocBook SGML. -# -# Most of the differences between DocBook XML and DocBook SGML boils -# down to the empty element syntax: SGML does not like the XML empty -# element <.../> syntax, use <...> instead. -# -[miscellaneous] -outfilesuffix=.sgml - -[header-declarations] - - -[tabledef-default] -colspec= - -[image-inlinemacro] - - - - - {alt={target}} - - -[image-blockmacro] -
    {title} -{title%} - - - - - {alt={target}} - -{title#}
    -{title%} - -# Inline macros -[xref-inlinemacro] -{0} -{2%} -[xref2-inlinemacro] -# <> -{2} -{2%} -[anchor-inlinemacro] - -[anchor2-inlinemacro] -# [[id,text]] - - -endif::sgml[] diff -Nru asciidoc-8.6.10/docbook-xsl/asciidoc-docbook-xsl.txt asciidoc-10.1.2/docbook-xsl/asciidoc-docbook-xsl.txt --- asciidoc-8.6.10/docbook-xsl/asciidoc-docbook-xsl.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/asciidoc-docbook-xsl.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -AsciiDoc DocBook XSL Stylesheets Notes -====================================== - -Output file customisation is achieved by tweaking the DocBook XSL -stylesheets. I've tried to keep customization to a minimum and -confine it to the separate XSL driver files in the distribution -`./docbook-xsl/` directory (see the User Guide for details). - -To polish some rough edges I've written some patches for the DocBook -XSL stylesheets -- you don't need them but they're documented below -and included in the distribution `./docbook-xsl/` directory. - - -Manually upgrading Debian to the latest DocBook XSL stylesheets ---------------------------------------------------------------- -The DocBook XSL Stylesheets distribution is just a directory full of -text files and you can switch between releases by changing the -directory name in the system XML catalog. - -To upgrade to the latest docbook-xsl stylesheets without having to -wait for the Debian `docbook-xsl` package: - -- Download the latest docbook-xsl tarball from - http://sourceforge.net/projects/docbook/. Bleeding edge snapshots - can be found at http://docbook.sourceforge.net/snapshots/ - -- Unzip the tarball to `/usr/share/xml/docbook/stylesheet/`: - - $ cd /usr/share/xml/docbook/stylesheet - $ sudo tar -xzf /tmp/docbook-xsl-1.72.0.tar.gz - -- Edit `/etc/xml/docbook-xsl.xml` catalog and replace occurences of - the current stylesheets directory with the new one (in our example - it would be `/usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0`. - - $ cd /etc/xml/ - $ sudo cp -p docbook-xsl.xml docbook-xsl.xml.ORIG - $ sudo vi docbook-xsl.xml - - -Customizing Generated Text --------------------------- -An example -http://www.sagehill.net/docbookxsl/CustomGentext.html#CustomGenText[DocBook -XSL Stylesheets customization file] for formatting chapter titles -without chapter numbering. - -.custom-chapter.xml ---------------------------------------------------------------------- - - - - - - - - ---------------------------------------------------------------------- - -Executed with this 'xsltproc' parameter: - - --param local.l10n.xml document\(\'custom-chapter.xml\'\) - -NOTE: This example is hypothetical -- use the 'xsltproc' -`--stringparam chapter.autolabel 0` option to do the same job. diff -Nru asciidoc-8.6.10/docbook-xsl/chunked.xsl asciidoc-10.1.2/docbook-xsl/chunked.xsl --- asciidoc-8.6.10/docbook-xsl/chunked.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/chunked.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ - - - - -images/icons/ -images/icons/ - - diff -Nru asciidoc-8.6.10/docbook-xsl/common.xsl asciidoc-10.1.2/docbook-xsl/common.xsl --- asciidoc-8.6.10/docbook-xsl/common.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/common.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ - - - - - - - - - - 1 - 0 - - - - - - -images/icons/ -0 - - - - 0 - #E0E0E0 - - - -images/icons/ - - - margin-left: 0; margin-right: 10%; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -article toc,title -book toc,title,figure,table,example,equation - - -chapter toc,title -part toc,title -preface toc,title -qandadiv toc -qandaset toc -reference toc,title -sect1 toc -sect2 toc -sect3 toc -sect4 toc -sect5 toc -section toc -set toc,title - - - -article nop -book nop - - - - - diff -Nru asciidoc-8.6.10/docbook-xsl/epub.xsl asciidoc-10.1.2/docbook-xsl/epub.xsl --- asciidoc-8.6.10/docbook-xsl/epub.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/epub.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - -/article nop - - -/book nop - - - - - diff -Nru asciidoc-8.6.10/docbook-xsl/fo.xsl asciidoc-10.1.2/docbook-xsl/fo.xsl --- asciidoc-8.6.10/docbook-xsl/fo.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/fo.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,152 +0,0 @@ - - - - - - - - - - -false - -left - - -12 - - pt - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0pt - 0pt - 1pc - - - - - -1pc - 0pt - 0pt - - - - - - 0.75in - 0.75in - - - - - 0.5in - 0.5in - - - - - - - - - - - - - - - - - - 10pt - - - - 14pt - bold - false - always - - - - solid - 1pt - silver - #ffffee - 12pt - 12pt - 6pt - 6pt - 0pt - 12pt - 6pt - 6pt - - - - - - - - - - #E0E0E0 - inherit - - - - - - - auto - - - diff -Nru asciidoc-8.6.10/docbook-xsl/htmlhelp.xsl asciidoc-10.1.2/docbook-xsl/htmlhelp.xsl --- asciidoc-8.6.10/docbook-xsl/htmlhelp.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/htmlhelp.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ - - - - - - - - - - -
    -
    - - - -
    -
    - -
    diff -Nru asciidoc-8.6.10/docbook-xsl/manpage.xsl asciidoc-10.1.2/docbook-xsl/manpage.xsl --- asciidoc-8.6.10/docbook-xsl/manpage.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/manpage.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff -Nru asciidoc-8.6.10/docbook-xsl/text.xsl asciidoc-10.1.2/docbook-xsl/text.xsl --- asciidoc-8.6.10/docbook-xsl/text.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/text.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ - - - - - - - - - - - - appendix title - article/appendix nop - article toc,title - book toc,title,figure,table,example,equation - chapter title - part toc,title - preface toc,title - qandadiv toc - qandaset toc - reference toc,title - section toc - set toc,title - - - -
    - -
    -
    - - -

    - -
    -
    - - -
    - -
    -
    - - -
    diff -Nru asciidoc-8.6.10/docbook-xsl/xhtml.xsl asciidoc-10.1.2/docbook-xsl/xhtml.xsl --- asciidoc-8.6.10/docbook-xsl/xhtml.xsl 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/docbook-xsl/xhtml.xsl 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ - - - - - diff -Nru asciidoc-8.6.10/Dockerfile asciidoc-10.1.2/Dockerfile --- asciidoc-8.6.10/Dockerfile 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/Dockerfile 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,41 @@ +# You can specify a specific python version to use by doing +# --build-arg PYTHON_VERSION= on the build command, +# This defaults to 3.6 if nothing is given. +ARG PYTHON_VERSION=3.6 + +# These images are based off Debian Buster (slim) using https://hub.docker.com/_/python/ as the "base" +FROM python:${PYTHON_VERSION}-slim-buster + +WORKDIR "/srv/asciidoc" +COPY . "/srv/asciidoc" + +# Install the dependencies that asciidoc needs. The mkdir line is needed as something pulls in java jdk and it +# will fail if that folder does not already exist because...java. +RUN mkdir -p /usr/share/man/man1/ \ + && echo "deb http://ftp.debian.org/debian stretch-backports main" >> /etc/apt/sources.list && apt-get update \ + && apt-get install -y --no-install-recommends \ + autoconf \ + dblatex \ + docbook-xml \ + docbook-xsl \ + dvipng \ + epubcheck \ + fop \ + git \ + graphviz \ + highlight \ + imagemagick \ + libxml2-utils \ + lilypond \ + make \ + python3 \ + source-highlight \ + time \ + texlive-latex-base \ + unzip \ + zip \ + && apt-get clean && rm -rf /var/lib/apt/lists/* \ + && autoconf \ + && ./configure + +CMD "/bin/bash" diff -Nru asciidoc-8.6.10/.editorconfig asciidoc-10.1.2/.editorconfig --- asciidoc-8.6.10/.editorconfig 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/.editorconfig 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,12 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff -Nru asciidoc-8.6.10/examples/website/a2x.1.txt asciidoc-10.1.2/examples/website/a2x.1.txt --- asciidoc-8.6.10/examples/website/a2x.1.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/a2x.1.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,378 +0,0 @@ -A2X(1) -====== -:doctype: manpage - - -NAME ----- -a2x - A toolchain manager for AsciiDoc (converts Asciidoc text files to other - file formats) - - -SYNOPSIS --------- -*a2x* ['OPTIONS'] 'SOURCE_FILE' - - -DESCRIPTION ------------ -A DocBook toolchain manager that translates an AsciiDoc text file -'SOURCE_FILE' to PDF, EPUB, DVI, PS, LaTeX, XHTML (single page or -chunked), man page, HTML Help or plain text formats using -'asciidoc(1)' and other applications (see <>). -'SOURCE_FILE' can also be a DocBook file with an .xml extension. - - -OPTIONS -------- -*-a, --attribute*='ATTRIBUTE':: - Set asciidoc(1) attribute value (shortcut for *--asciidoc-opts*='"-a - ATTRIBUTE"' option). - This option may be specified more than once. - -*--asciidoc-opts*='ASCIIDOC_OPTS':: - Additional 'asciidoc(1)' options. - This option may be specified more than once. - -*--conf-file*='CONF_FILE':: - Load configuration file. See <>. - -*-D, --destination-dir*='DESTINATION_DIR':: - Output directory. Defaults to 'SOURCE_FILE' directory. This option - is only applicable to HTML and manpage based output formats ('chunked', 'epub', - 'htmlhelp', 'xhtml', 'manpage'). - -*-d, --doctype*='DOCTYPE':: - DocBook document type: 'article', 'manpage' or 'book'. Default - document type is 'article' unless the format is 'manpage' (in which - case it defaults to 'manpage'). - -*-b, --backend*='BACKEND':: - 'BACKEND' is the name of an installed backend plugin. When this - option is specified 'a2x' attempts to load a file name 'a2x-backend.py' - from the 'BACKEND' plugin directory. It then converts the - 'SOURCE_FILE' to a 'BACKEND' formatted output file using a global - function defined in 'a2x-backend.py' called 'to_BACKEND'. - -*-f, --format*='FORMAT':: - Output formats: 'chunked', 'docbook', 'dvi', 'epub', 'htmlhelp', - 'manpage', 'pdf' (default), 'ps', 'tex', 'text', 'xhtml'. - The AsciiDoc 'a2x-format' attribute value is set to 'FORMAT'. - -*-h, --help*:: - Print command-line syntax and program options to stdout. - -*--icons*:: - Use admonition or navigation icon images in output documents. The - default behavior is to use text in place of icons. - -*--icons-dir*='PATH':: - A path (relative to output files) containing admonition - and navigation icons. Defaults to `images/icons`. - The '--icons' option is implicit if this option is used. - -*-k, --keep-artifacts*:: - Do not delete temporary build files. - -*--lynx*:: - Use 'lynx(1)' (actually: the text-based browser defined by the `LYNX` config - variable) when generating text formatted output. The default behavior is to - use 'w3m(1)' (actually: the text-based browser defined by the `W3M` config - variable). - -*-L, --no-xmllint*:: - Do not check asciidoc output with 'xmllint(1)'. - -*---epubcheck*:: - Check EPUB output with 'epubcheck(1)'. - -*-n, --dry-run*:: - Do not do anything just print what would have been done. - -*-r, --resource*='RESOURCE_SPEC':: - Specify a resource. This option may be specified more than once. - See the <> section for more details. - -*-m, --resource-manifest*='FILE':: - 'FILE' contains a list resources (one per line). Manifest 'FILE' - entries are formatted just like *--resource* option arguments. - Environment variables and tilde home directories are allowed. - -*--stylesheet*='STYLESHEET':: - A space delimited list of one or more CSS stylesheet file names that - are used to style HTML output generated by DocBook XSL Stylesheets. - Defaults to 'docbook-xsl.css'. The stylesheets are processed in - list order. The stylesheets must reside in a valid <> location. Applies to HTML formats: 'xhtml', 'epub', - 'chunked', 'htmlhelp' formats. - -*-v, --verbose*:: - Print operational details to stderr. - A second *-v* option applies the verbose option to toolchain commands. - -*--version*:: - Print program version to stdout. - -*--xsltproc-opts*='XSLTPROC_OPTS':: - Additional 'xsltproc(1)' options. - This option may be specified more than once. - -*--xsl-file*='XSL_FILE':: - Override the built-in XSL stylesheet with the custom XSL stylesheet - 'XSL_FILE'. - -*--fop*:: - Use FOP to generate PDFs. The default behavior is to use - 'dblatex(1)'. The '--fop' option is implicit if this option is - used. - -*--fop-opts*='FOP_OPTS':: - Additional 'fop(1)' options. If this option is specified FOP is used - to generate PDFs. - This option may be specified more than once. - -*--dblatex-opts*='DBLATEX_OPTS':: - Additional 'dblatex(1)' options. - This option may be specified more than once. - -*--backend-opts*='BACKEND_OPTS':: - Options for the backend plugin specified by the '--backend' option. - This option may be specified more than once. - -Options can also be set in the AsciiDoc source file. If 'SOURCE_FILE' -contains a comment line beginning with *// a2x:* then the remainder of -the line will be treated as 'a2x' command-line options. For example: - - // a2x default options. - // a2x: -dbook --epubcheck - // Suppress revision history in dblatex outputs. - // a2x: --dblatex-opts "-P latex.output.revhistory=0" - -- Options spanning multiple such comment lines will be concatenated. -- Zero or more white space characters can appear between the leading - *//* and *a2x:*. -- Command-line options take precedence over options set in the source - file. - - -[[X4]] -OUTPUT FILES ------------- -Output files are written to the directory specified by the -*--destination-dir* option. If no *--destination-dir* option is set -output files are written to the 'SOURCE_FILE' directory. - -Output files have the same name as the 'SOURCE_FILE' but with an -appropriate file name extension: `.html` for 'xhtml'; `.epub` for -'epub'; `.hhp` for 'htmlhelp'; `.pdf` for 'pdf'; `.text` for 'text', -`.xml` for 'docbook'. By convention manpages have no `.man` extension -(man page section number only). Chunked HTML directory names have a -`.chunked` extension; chunked HTML Help directory names have a -`.htmlhelp` extension. - -Same named existing files are overwritten. - -In addition to generating HTML files the 'xhtml', 'epub', 'chunked' -and 'htmlhelp' formats ensure <> are copied to -their correct destination directory locations. - - -[[X3]] -RESOURCES ---------- -Resources are files (typically CSS and images) that are required by -HTML based outputs ('xhtml', 'epub', 'chunked', 'htmlhelp' formats). -'a2x' scans the generated HTML files and builds a list of required CSS -and image files. Additional resource files can be specified explicitly -using the *--resource* option. - -'a2x' searches for resource files in the following locations in the -following order: - -. The 'SOURCE_FILE' directory. -. Resource directories specified by the *--resource* option (searched - recursively). -. Resource directories specified by the *--resource-manifest* option - (searched recursively in the order they appear in the manifest - file). -. The stock `images` and `stylesheets` directories in the - 'asciidoc(1)' configuration files directories (searched - recursively). -. The destination directory. - -When a resource file is found it is copied to the correct relative -destination directory. Missing destination sub-directories are created -automatically. - -There are two distinct mechanisms for specifying additional resources: - -. A resource directory which will be searched recursively for missing - resource files. -. A resource file which will be copied to the output destination - directory. - -Resources are specified with *--resource* option values which can be -one of the following formats: - - - [=] - .= - -Where: - -``:: - Specifies a directory (absolute or relative to the 'SOURCE_FILE') - which is searched recursively for missing resource files. To - eliminate ambiguity the `` name should end with a - directory separator character. - -``:: - Specifies a resource file (absolute or relative to the - 'SOURCE_FILE') which will be copied to ``. If - `` is not specified then it is the same as the - ``. - -``:: - Specifies the destination of the copied source file. The - `` path is relative to the destination directory - (absolute paths are not allowed). The location of the destination - directory depends on the output 'FORMAT' (see the <> section for details): - - chunked, htmlhelp;; The chunked output directory. - epub;; The archived `OEBPS` directory. - xhtml;; The output *DESTINATION_DIR*. - -`.=`:: - When adding resources to EPUB files the mimetype is inferred from - the `` extension, if the mimetype cannot be - guessed an error occurs. The `.=` resource syntax can - be used to explicitly set mimetypes. `` is the file name - extension, `` is the corresponding MIME type. - -Resource option examples: - - --resource ../images/ - --resource doc/README.txt=README.txt - --resource ~/images/tiger.png=images/tiger.png - --resource .ttf=application/x-font-ttf - - -EXAMPLES --------- -`a2x -f pdf doc/source-highlight-filter.txt`:: - Generates `doc/source-highlight-filter.pdf` file. - -`a2x -f xhtml -D ../doc --icons -r ../images/ team.txt`:: - Creates HTML file `../doc/team.html`, uses admonition icons and - recursively searches the `../images/` directory for any missing - resources. - -`a2x -f manpage doc/asciidoc.1.txt`:: - Generate `doc/asciidoc.1` manpage. - - -[[X1]] -REQUISITES ----------- -'a2x' uses the following programs: - -- *Asciidoc*: - http://asciidoc.org/ -- *xsltproc*: (all formats except text): - http://xmlsoft.org/XSLT/ -- *DocBook XSL Stylesheets* (all formats except text): - http://docbook.sourceforge.net/projects/xsl/ -- *dblatex* (pdf, dvi, ps, tex formats): - http://dblatex.sourceforge.net/ -- *FOP* (pdf format -- alternative PDF file generator): - http://xmlgraphics.apache.org/fop/ -- *w3m* (text format): - http://w3m.sourceforge.net/index.en.html -- *Lynx* (text format -- alternative text file generator): - http://lynx.isc.org/ -- *epubcheck* (epub format -- EPUB file validator): - http://code.google.com/p/epubcheck/ - -See also the latest README file. - - -[[X2]] -CONF FILES ----------- -A configuration file contains executable Python code that overrides -the global configuration parameters in `a2x.py`. Optional configuration -files are loaded in the following order: - -. `a2x.conf` from the directory containing the 'a2x.py' executable. -. `a2x.conf` from the AsciiDoc global configuration directory. Skip - this step if we are executing a locally installed (non system wide) - copy. -. `a2x.conf` from the AsciiDoc `$HOME/.asciidoc` configuration - directory. -. The 'CONF_FILE' specified in the '--conf-file' option. - -Here are the default configuration file option values: - ---------------------------------------------------------------------- -# Optional environment variable dictionary passed to -# executing programs. If set to None the existing -# environment is used. -ENV = None - -# External executables. -ASCIIDOC = 'asciidoc' -XSLTPROC = 'xsltproc' -DBLATEX = 'dblatex' # pdf generation. -FOP = 'fop' # pdf generation (--fop option). -W3M = 'w3m' # primary text file generator. -LYNX = 'lynx' # alternate text file generator. -XMLLINT = 'xmllint' # Set to '' to disable. -EPUBCHECK = 'epubcheck' # Set to '' to disable. -# External executable default options. -ASCIIDOC_OPTS = '' -BACKEND_OPTS = '' -DBLATEX_OPTS = '' -FOP_OPTS = '' -LYNX_OPTS = '-dump' -W3M_OPTS = '-dump -cols 70 -T text/html -no-graph' -XSLTPROC_OPTS = '' ---------------------------------------------------------------------- - -Note, that it is possible to redefine `W3M` and `LYNX` to use different text-based -browsers, e.g. 'links': http://links.twibright.com/ or -'elinks': http://elinks.or.cz/. `LYNX_OPTS` and `W3M_OPTS` can be used to pass -options to the selected browser. If these are defined they override the -respective defaults listed above (so don't forget to include the '-dump' option -in your definition: this is mandatory at least with 'w3m', 'lynx', 'links', and -'elinks' in order to send the formatted text to stdout). - - -BUGS ----- -See the AsciiDoc distribution BUGS file. - - -AUTHOR ------- -a2x was originally written by Stuart Rackham. Many people have -contributed to it. - - -RESOURCES ---------- -SourceForge: http://sourceforge.net/projects/asciidoc/ - -Main web site: http://asciidoc.org/ - - -SEE ALSO --------- -asciidoc(1) - - -COPYING -------- -Copyright \(C) 2002-2011 Stuart Rackham. Free use of this software is -granted under the terms of the MIT license. - diff -Nru asciidoc-8.6.10/examples/website/asciidocapi.txt asciidoc-10.1.2/examples/website/asciidocapi.txt --- asciidoc-8.6.10/examples/website/asciidocapi.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciidocapi.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -AsciiDoc API -============ - -'asciidocapi' -- a Python API module for 'AsciiDoc'. - - -Introduction ------------- -The 'asciidocapi' module implements a Python API for AsciiDoc. It -allows you to set `asciidoc(1)` program options, compile an AsciiDoc -source file and then interrogate the results. The `asciidocapi.py` -module file contains the `AsciiDocAPI` wrapper class for -`asciidoc.py`. - -.Benefits -- Stable API Shields the user from the undocumented and possibly - volatile `asciidoc.py` internals. -- Easier to use and more flexible than the alternative of running - `asciidoc(1)` as a separate process. -- Executes inside your application (better performance than running - separate `asciidoc(1)` command processes). - - -Using asciidocapi ------------------ -To use the API just drop the `asciidocapi.py` file into your -application directory, import it and use the `AsciiDocAPI` class. The -only requirement is that a compatible version of 'AsciiDoc' is already -installed -- simple, no setuptools to run, no Eggs to install, no -non-standard library dependencies. - -You can find `asciidocapi.py` in the AsciiDoc -http://asciidoc.org/INSTALL.html#X1[distribution -archives] (version 8.4.1 or better). - -Once you have `asciidocapi.py` Verify everything is working by running -the module doctests: - - python asciidocapi.py - -If there are no messages then all is well. - -The following minimal example compiles `mydoc.txt` to `mydoc.html`: - -[source,python] -------------------------------------------------------------------------------- -from asciidocapi import AsciiDocAPI -asciidoc = AsciiDocAPI() -asciidoc.execute('mydoc.txt') -------------------------------------------------------------------------------- - -The next interactive example uses file-like objects for input and output: - -------------------------------------------------------------------------------- -$ python -Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) -[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 -Type "help", "copyright", "credits" or "license" for more information. ->>> from asciidocapi import AsciiDocAPI ->>> import StringIO ->>> infile = StringIO.StringIO('Hello *{author}*') ->>> outfile = StringIO.StringIO() ->>> asciidoc = AsciiDocAPI() ->>> asciidoc.options('--no-header-footer') ->>> asciidoc.attributes['author'] = 'Joe Bloggs' ->>> asciidoc.execute(infile, outfile, backend='html4') ->>> print outfile.getvalue() -

    Hello Joe Bloggs

    - ->>> -------------------------------------------------------------------------------- - - -Implementation Rationale ------------------------- -.Leverage existing knowledge -The API maps directly onto the `asciidoc(1)` command -- this is -deliberate -- if you know the `asciidoc(1)` command learning the API -will be trivial. A nice side effect of this goal is that API and -command-line modes share the same code -- virtually no `asciidoc(1)` -code is specific to API usage. - -.Simplicity -Implemented with a single Python module file (`asciidocapi.py`) -containing the 'AsciiDocAPI' API class. 'AsciiDocAPI' contains just -one method plus a few attributes for processing options and result -messages. No external setup tools and no non-standard library -dependencies are used or required. - -.Loose coupling -The dependency between `asciidocapi.py` and `asciidoc.py` is minimal --- the current `asciidocapi.py` module uses only two attributes and -one function from the `asciidoc.py` module. - -.Why isn't the API baked right into the asciidoc.py command script? -1. You can't just drop `asciidoc.py` into your application because it - requires all the related config files and filters -- complex and - unnecessary since all this was already done when you installed - AsciiDoc. -2. This scheme separates the API from the AsciiDoc application -- the - API implementation can be extended or replaced independently of - AsciiDoc. - - -API reference -------------- - -[[X2]] -Class `AsciiDocAPI(object)` -~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This is the 'AsciiDoc' API class. - -Instance attributes -^^^^^^^^^^^^^^^^^^^ -`asciidoc`:: -The imported `asciidoc.py` module. - -`attributes`:: -A dictionary of AsciiDoc attribute values passed to AsciiDoc. - -- Setting an attribute value to `None` (`name: None`) will undefine - (delete) the attribute (this in addition to the `name!` attribute - name format that the `asciidoc(1)` command uses). -- To simply define an attribute set the attribute value to a blank - string (`name: ''`) - -`cmd`:: -The file path of the `asciidoc.py` script. Set by the `__init__` -method. - -`messages`:: -A chronologically ordered list of message strings generated during -AsciiDoc execution (last message at the end of the list). - -`options`:: -An instance of the <>. Contains a list of command -options passed to AsciiDoc. - -Instance methods -^^^^^^^^^^^^^^^^ -`__init__(self, asciidoc_py=None)`:: -Locate and import `asciidoc.py` module and verify API compatibility. -Initialize instance attributes. A search for the `asciidoc` module is -made in the following order: - -. Use the `ASCIIDOC_PY` environment variable if it is set. -. Use the `asciidoc_py` argument if it is set. -. Search the environment 'PATH' for `asciidoc.py`, `asciidoc.pyc` and - `asciidoc` (in that order). -. Finally repeat the previous search in the current working directory. - -`execute(self, infile, outfile=None, backend=None)`:: -Compile `infile` to `outfile` using `backend` format. `infile` and -`outfile` can be file path strings or file-like objects. `backend` is -name of 'AsciiDoc' backend (takes same values as `asciidoc(1)` command -`--backend` option). If `outfile` or `backend` are `None` then their -respective `asciidoc(1)` defaults are used. - - -[[X1]] -Class `Options(object)` -~~~~~~~~~~~~~~~~~~~~~~~ -Stores `asciidoc(1)` command options. You can use any `asciidoc(1)` -options with the exception of the `--doctest` and `--filter` options. - -Instance attributes -^^^^^^^^^^^^^^^^^^^ -`values`:: -The list of `(name,value)` command option tuples. - -Instance methods -^^^^^^^^^^^^^^^^ -`__call__(self, name, value=None)`:: -A shortcut for the `append` method. Example: - - opts = Options() - opts('--verbose') - -`append(self, name, value=None)`:: -Append `(name,value)` to the options list. Example: - - opts = Options() - opts.append('--conf-file', 'blog.conf') - - -Class `AsciiDocError(Exception)` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Thrown by the <> when an 'AsciiDoc' execution -error occurs. diff -Nru asciidoc-8.6.10/examples/website/asciidoc.css asciidoc-10.1.2/examples/website/asciidoc.css --- asciidoc-8.6.10/examples/website/asciidoc.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciidoc.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,527 +0,0 @@ -/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ - -/* Default font. */ -body { - font-family: Georgia,serif; -} - -/* Title font. */ -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Arial,Helvetica,sans-serif; -} - -body { - margin: 1em 5% 1em 5%; -} - -a { - color: blue; - text-decoration: underline; -} -a:visited { - color: fuchsia; -} - -em { - font-style: italic; - color: navy; -} - -strong { - font-weight: bold; - color: #083194; -} - -h1, h2, h3, h4, h5, h6 { - color: #527bbd; - margin-top: 1.2em; - margin-bottom: 0.5em; - line-height: 1.3; -} - -h1, h2, h3 { - border-bottom: 2px solid silver; -} -h2 { - padding-top: 0.5em; -} -h3 { - float: left; -} -h3 + * { - clear: left; -} -h5 { - font-size: 1.0em; -} - -div.sectionbody { - margin-left: 0; -} - -hr { - border: 1px solid silver; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -ul, ol, li > p { - margin-top: 0; -} -ul > li { color: #aaa; } -ul > li > * { color: black; } - -.monospaced, code, pre { - font-family: "Courier New", Courier, monospace; - font-size: inherit; - color: navy; - padding: 0; - margin: 0; -} -pre { - white-space: pre-wrap; -} - -#author { - color: #527bbd; - font-weight: bold; - font-size: 1.1em; -} -#email { -} -#revnumber, #revdate, #revremark { -} - -#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} -#footer-text { - float: left; - padding-bottom: 0.5em; -} -#footer-badges { - float: right; - padding-bottom: 0.5em; -} - -#preamble { - margin-top: 1.5em; - margin-bottom: 1.5em; -} -div.imageblock, div.exampleblock, div.verseblock, -div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, -div.admonitionblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.admonitionblock { - margin-top: 2.0em; - margin-bottom: 2.0em; - margin-right: 10%; - color: #606060; -} - -div.content { /* Block element content. */ - padding: 0; -} - -/* Block element titles. */ -div.title, caption.title { - color: #527bbd; - font-weight: bold; - text-align: left; - margin-top: 1.0em; - margin-bottom: 0.5em; -} -div.title + * { - margin-top: 0; -} - -td div.title:first-child { - margin-top: 0.0em; -} -div.content div.title:first-child { - margin-top: 0.0em; -} -div.content + div.title { - margin-top: 0.0em; -} - -div.sidebarblock > div.content { - background: #ffffee; - border: 1px solid #dddddd; - border-left: 4px solid #f0f0f0; - padding: 0.5em; -} - -div.listingblock > div.content { - border: 1px solid #dddddd; - border-left: 5px solid #f0f0f0; - background: #f8f8f8; - padding: 0.5em; -} - -div.quoteblock, div.verseblock { - padding-left: 1.0em; - margin-left: 1.0em; - margin-right: 10%; - border-left: 5px solid #f0f0f0; - color: #888; -} - -div.quoteblock > div.attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock > pre.content { - font-family: inherit; - font-size: inherit; -} -div.verseblock > div.attribution { - padding-top: 0.75em; - text-align: left; -} -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -} - -div.admonitionblock .icon { - vertical-align: top; - font-size: 1.1em; - font-weight: bold; - text-decoration: underline; - color: #527bbd; - padding-right: 0.5em; -} -div.admonitionblock td.content { - padding-left: 0.5em; - border-left: 3px solid #dddddd; -} - -div.exampleblock > div.content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -div.imageblock div.content { padding-left: 0; } -span.image img { border-style: none; vertical-align: text-bottom; } -a.image:visited { color: white; } - -dl { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -dt { - margin-top: 0.5em; - margin-bottom: 0; - font-style: normal; - color: navy; -} -dd > *:first-child { - margin-top: 0.1em; -} - -ul, ol { - list-style-position: outside; -} -ol.arabic { - list-style-type: decimal; -} -ol.loweralpha { - list-style-type: lower-alpha; -} -ol.upperalpha { - list-style-type: upper-alpha; -} -ol.lowerroman { - list-style-type: lower-roman; -} -ol.upperroman { - list-style-type: upper-roman; -} - -div.compact ul, div.compact ol, -div.compact p, div.compact p, -div.compact div, div.compact div { - margin-top: 0.1em; - margin-bottom: 0.1em; -} - -tfoot { - font-weight: bold; -} -td > div.verse { - white-space: pre; -} - -div.hdlist { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -div.hdlist tr { - padding-bottom: 15px; -} -dt.hdlist1.strong, td.hdlist1.strong { - font-weight: bold; -} -td.hdlist1 { - vertical-align: top; - font-style: normal; - padding-right: 0.8em; - color: navy; -} -td.hdlist2 { - vertical-align: top; -} -div.hdlist.compact tr { - margin: 0; - padding-bottom: 0; -} - -.comment { - background: yellow; -} - -.footnote, .footnoteref { - font-size: 0.8em; -} - -span.footnote, span.footnoteref { - vertical-align: super; -} - -#footnotes { - margin: 20px 0 20px 0; - padding: 7px 0 0 0; -} - -#footnotes div.footnote { - margin: 0 0 5px 0; -} - -#footnotes hr { - border: none; - border-top: 1px solid silver; - height: 1px; - text-align: left; - margin-left: 0; - width: 20%; - min-width: 100px; -} - -div.colist td { - padding-right: 0.5em; - padding-bottom: 0.3em; - vertical-align: top; -} -div.colist td img { - margin-top: 0.3em; -} - -@media print { - #footer-badges { display: none; } -} - -#toc { - margin-bottom: 2.5em; -} - -#toctitle { - color: #527bbd; - font-size: 1.1em; - font-weight: bold; - margin-top: 1.0em; - margin-bottom: 0.1em; -} - -div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { - margin-top: 0; - margin-bottom: 0; -} -div.toclevel2 { - margin-left: 2em; - font-size: 0.9em; -} -div.toclevel3 { - margin-left: 4em; - font-size: 0.9em; -} -div.toclevel4 { - margin-left: 6em; - font-size: 0.9em; -} - -span.aqua { color: aqua; } -span.black { color: black; } -span.blue { color: blue; } -span.fuchsia { color: fuchsia; } -span.gray { color: gray; } -span.green { color: green; } -span.lime { color: lime; } -span.maroon { color: maroon; } -span.navy { color: navy; } -span.olive { color: olive; } -span.purple { color: purple; } -span.red { color: red; } -span.silver { color: silver; } -span.teal { color: teal; } -span.white { color: white; } -span.yellow { color: yellow; } - -span.aqua-background { background: aqua; } -span.black-background { background: black; } -span.blue-background { background: blue; } -span.fuchsia-background { background: fuchsia; } -span.gray-background { background: gray; } -span.green-background { background: green; } -span.lime-background { background: lime; } -span.maroon-background { background: maroon; } -span.navy-background { background: navy; } -span.olive-background { background: olive; } -span.purple-background { background: purple; } -span.red-background { background: red; } -span.silver-background { background: silver; } -span.teal-background { background: teal; } -span.white-background { background: white; } -span.yellow-background { background: yellow; } - -span.big { font-size: 2em; } -span.small { font-size: 0.6em; } - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } - -div.unbreakable { page-break-inside: avoid; } - - -/* - * xhtml11 specific - * - * */ - -div.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.tableblock > table { - border: 3px solid #527bbd; -} -thead, p.table.header { - font-weight: bold; - color: #527bbd; -} -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - - -/* - * html5 specific - * - * */ - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #527bbd; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #527bbd; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #527bbd; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} - - -/* - * manpage specific - * - * */ - -body.manpage h1 { - padding-top: 0.5em; - padding-bottom: 0.5em; - border-top: 2px solid silver; - border-bottom: 2px solid silver; -} -body.manpage h2 { - border-style: none; -} -body.manpage div.sectionbody { - margin-left: 3em; -} - -@media print { - body.manpage div#toc { display: none; } -} diff -Nru asciidoc-8.6.10/examples/website/asciidoc-docbook-xsl.txt asciidoc-10.1.2/examples/website/asciidoc-docbook-xsl.txt --- asciidoc-8.6.10/examples/website/asciidoc-docbook-xsl.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciidoc-docbook-xsl.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,65 +0,0 @@ -AsciiDoc DocBook XSL Stylesheets Notes -====================================== - -Output file customisation is achieved by tweaking the DocBook XSL -stylesheets. I've tried to keep customization to a minimum and -confine it to the separate XSL driver files in the distribution -`./docbook-xsl/` directory (see the User Guide for details). - -To polish some rough edges I've written some patches for the DocBook -XSL stylesheets -- you don't need them but they're documented below -and included in the distribution `./docbook-xsl/` directory. - - -Manually upgrading Debian to the latest DocBook XSL stylesheets ---------------------------------------------------------------- -The DocBook XSL Stylesheets distribution is just a directory full of -text files and you can switch between releases by changing the -directory name in the system XML catalog. - -To upgrade to the latest docbook-xsl stylesheets without having to -wait for the Debian `docbook-xsl` package: - -- Download the latest docbook-xsl tarball from - http://sourceforge.net/projects/docbook/. Bleeding edge snapshots - can be found at http://docbook.sourceforge.net/snapshots/ - -- Unzip the tarball to `/usr/share/xml/docbook/stylesheet/`: - - $ cd /usr/share/xml/docbook/stylesheet - $ sudo tar -xzf /tmp/docbook-xsl-1.72.0.tar.gz - -- Edit `/etc/xml/docbook-xsl.xml` catalog and replace occurences of - the current stylesheets directory with the new one (in our example - it would be `/usr/share/xml/docbook/stylesheet/docbook-xsl-1.72.0`. - - $ cd /etc/xml/ - $ sudo cp -p docbook-xsl.xml docbook-xsl.xml.ORIG - $ sudo vi docbook-xsl.xml - - -Customizing Generated Text --------------------------- -An example -http://www.sagehill.net/docbookxsl/CustomGentext.html#CustomGenText[DocBook -XSL Stylesheets customization file] for formatting chapter titles -without chapter numbering. - -.custom-chapter.xml ---------------------------------------------------------------------- - - - - - - - - ---------------------------------------------------------------------- - -Executed with this 'xsltproc' parameter: - - --param local.l10n.xml document\(\'custom-chapter.xml\'\) - -NOTE: This example is hypothetical -- use the 'xsltproc' -`--stringparam chapter.autolabel 0` option to do the same job. diff -Nru asciidoc-8.6.10/examples/website/asciidoc-graphviz-sample.txt asciidoc-10.1.2/examples/website/asciidoc-graphviz-sample.txt --- asciidoc-8.6.10/examples/website/asciidoc-graphviz-sample.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciidoc-graphviz-sample.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -= Graphviz filter for AsciiDoc = - -Author: Gouichi Iisaka - -Version: 1.1.3 - -== Introduction == - -The Graphviz(link:http://www.graphviz.org[]) is a way of representing structural information -as diagrams of abstract graphs and networks. - - -Automatic graph drawing has many important applications -in software engineering, database and web design, networking, -and in visual interfaces for many other domains. - -Graphviz take descriptions of graphs in a simple text language, -And has many useful features for concrete diagrams, -such as options for colors, fonts, tabular node layouts, -line styles, hyperlinks, and custom shapes. - -AsciiDoc can external shell commands used to process Paragraph and -DelimitedBlock content by Filter. - -So now, AsciiDoc can draw graphs via graphviz filter. - -== Examples == - -=== Simple === -..................................................................... -[graphviz] ---------------------------------------------------------------------- -digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} ---------------------------------------------------------------------- -..................................................................... - -[graphviz] ---------------------------------------------------------------------- -digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} ---------------------------------------------------------------------- - -=== Using options === -..................................................................... -["graphviz", "sample2.png"] ---------------------------------------------------------------------- -digraph automata_0 { - size ="8.5, 11"; - node [shape = circle]; - 0 [ style = filled, color=lightgrey ]; - 2 [ shape = doublecircle ]; - 0 -> 2 [ label = "a " ]; - 0 -> 1 [ label = "other " ]; - 1 -> 2 [ label = "a " ]; - 1 -> 1 [ label = "other " ]; - 2 -> 2 [ label = "a " ]; - 2 -> 1 [ label = "other " ]; - "Machine: a" [ shape = plaintext ]; -} ---------------------------------------------------------------------- -..................................................................... - -["graphviz", "sample2.png"] ---------------------------------------------------------------------- -digraph automata_0 { - size ="8.5, 11"; - node [shape = circle]; - 0 [ style = filled, color=lightgrey ]; - 2 [ shape = doublecircle ]; - 0 -> 2 [ label = "a " ]; - 0 -> 1 [ label = "other " ]; - 1 -> 2 [ label = "a " ]; - 1 -> 1 [ label = "other " ]; - 2 -> 2 [ label = "a " ]; - 2 -> 1 [ label = "other " ]; - "Machine: a" [ shape = plaintext ]; -} ---------------------------------------------------------------------- - -=== Using Layout === - -..................................................................... -["graphviz", "sample3.png", "dot"] ---------------------------------------------------------------------- -digraph finite_state_machine { - rankdir=LR; - size="8,5" - node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; - node [shape = circle]; - LR_0 -> LR_2 [ label = "SS(B)" ]; - LR_0 -> LR_1 [ label = "SS(S)" ]; - LR_1 -> LR_3 [ label = "S($end)" ]; - LR_2 -> LR_6 [ label = "SS(b)" ]; - LR_2 -> LR_5 [ label = "SS(a)" ]; - LR_2 -> LR_4 [ label = "S(A)" ]; - LR_5 -> LR_7 [ label = "S(b)" ]; - LR_5 -> LR_5 [ label = "S(a)" ]; - LR_6 -> LR_6 [ label = "S(b)" ]; - LR_6 -> LR_5 [ label = "S(a)" ]; - LR_7 -> LR_8 [ label = "S(b)" ]; - LR_7 -> LR_5 [ label = "S(a)" ]; - LR_8 -> LR_6 [ label = "S(b)" ]; - LR_8 -> LR_5 [ label = "S(a)" ]; -} ---------------------------------------------------------------------- -..................................................................... - -["graphviz", "sample3.png", "dot"] ---------------------------------------------------------------------- -digraph finite_state_machine { - rankdir=LR; - size="8,5" - node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8; - node [shape = circle]; - LR_0 -> LR_2 [ label = "SS(B)" ]; - LR_0 -> LR_1 [ label = "SS(S)" ]; - LR_1 -> LR_3 [ label = "S($end)" ]; - LR_2 -> LR_6 [ label = "SS(b)" ]; - LR_2 -> LR_5 [ label = "SS(a)" ]; - LR_2 -> LR_4 [ label = "S(A)" ]; - LR_5 -> LR_7 [ label = "S(b)" ]; - LR_5 -> LR_5 [ label = "S(a)" ]; - LR_6 -> LR_6 [ label = "S(b)" ]; - LR_6 -> LR_5 [ label = "S(a)" ]; - LR_7 -> LR_8 [ label = "S(b)" ]; - LR_7 -> LR_5 [ label = "S(a)" ]; - LR_8 -> LR_6 [ label = "S(b)" ]; - LR_8 -> LR_5 [ label = "S(a)" ]; - } ---------------------------------------------------------------------- - - -== Layout == - -Layout for graphviz as follows. The default is `dot'. - - *dot;; - 'dot' draws directed graphs. - It works well on DAGs and other graphs that can be drawn as hierarchies. - It reads attributed graph files and writes drawings. - - *neato;; - 'neato' draws undirected graphs using ‘‘spring'' models (see Kamada and - Kawai, Information Processing Letters 31:1, April 1989). - Input files must be formatted in the dot attributed graph language. - - *twopi;; - 'twopi' draws graphs using a radial layout (see G. Wills, Symposium on - Graph Drawing GD'97, September, 1997). - Basically, one node is chosen as the center and put at the origin. - The remaining nodes are placed on a sequence of concentric circles - centered about the origin, each a fixed radial distance from - the previous circle. - - *circro;; - 'circo' draws graphs using a circular layout (see Six and Tollis, GD '99 - and ALENEX '99, and Kaufmann and Wiese, GD '02.) - The tool identifies biconnected components and draws the nodes - of the component on a circle. - The blockâ€cutpoint tree is then laid out using a recursive radial - algorithm. - Edge crossings within a circle are minimized by placing as - many edges on the circle's perimeter as possible. - In particular, if the component is outerplanar, - the component will have a planar layout. - - *fdp;; - 'fdp' draws undirected graphs using a ‘‘spring'' model. - It relies on a forceâ€directed approach in the spirit of Fruchterman - and Reingold - (cf. Softwareâ€Practice & Experience 21(11), 1991, pp. 1129â€1164). diff -Nru asciidoc-8.6.10/examples/website/asciidoc.js asciidoc-10.1.2/examples/website/asciidoc.js --- asciidoc-8.6.10/examples/website/asciidoc.js 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciidoc.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -var asciidoc = { // Namespace. - -///////////////////////////////////////////////////////////////////// -// Table Of Contents generator -///////////////////////////////////////////////////////////////////// - -/* Author: Mihai Bazon, September 2002 - * http://students.infoiasi.ro/~mishoo - * - * Table Of Content generator - * Version: 0.4 - * - * Feel free to use this script under the terms of the GNU General Public - * License, as long as you do not remove or alter this notice. - */ - - /* modified by Troy D. Hanson, September 2006. License: GPL */ - /* modified by Stuart Rackham, 2006, 2009. License: GPL */ - -// toclevels = 1..4. -toc: function (toclevels) { - - function getText(el) { - var text = ""; - for (var i = el.firstChild; i != null; i = i.nextSibling) { - if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. - text += i.data; - else if (i.firstChild != null) - text += getText(i); - } - return text; - } - - function TocEntry(el, text, toclevel) { - this.element = el; - this.text = text; - this.toclevel = toclevel; - } - - function tocEntries(el, toclevels) { - var result = new Array; - var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); - // Function that scans the DOM tree for header elements (the DOM2 - // nodeIterator API would be a better technique but not supported by all - // browsers). - var iterate = function (el) { - for (var i = el.firstChild; i != null; i = i.nextSibling) { - if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { - var mo = re.exec(i.tagName); - if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { - result[result.length] = new TocEntry(i, getText(i), mo[1]-1); - } - iterate(i); - } - } - } - iterate(el); - return result; - } - - var toc = document.getElementById("toc"); - if (!toc) { - return; - } - - // Delete existing TOC entries in case we're reloading the TOC. - var tocEntriesToRemove = []; - var i; - for (i = 0; i < toc.childNodes.length; i++) { - var entry = toc.childNodes[i]; - if (entry.nodeName.toLowerCase() == 'div' - && entry.getAttribute("class") - && entry.getAttribute("class").match(/^toclevel/)) - tocEntriesToRemove.push(entry); - } - for (i = 0; i < tocEntriesToRemove.length; i++) { - toc.removeChild(tocEntriesToRemove[i]); - } - - // Rebuild TOC entries. - var entries = tocEntries(document.getElementById("content"), toclevels); - for (var i = 0; i < entries.length; ++i) { - var entry = entries[i]; - if (entry.element.id == "") - entry.element.id = "_toc_" + i; - var a = document.createElement("a"); - a.href = "#" + entry.element.id; - a.appendChild(document.createTextNode(entry.text)); - var div = document.createElement("div"); - div.appendChild(a); - div.className = "toclevel" + entry.toclevel; - toc.appendChild(div); - } - if (entries.length == 0) - toc.parentNode.removeChild(toc); -}, - - -///////////////////////////////////////////////////////////////////// -// Footnotes generator -///////////////////////////////////////////////////////////////////// - -/* Based on footnote generation code from: - * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html - */ - -footnotes: function () { - // Delete existing footnote entries in case we're reloading the footnodes. - var i; - var noteholder = document.getElementById("footnotes"); - if (!noteholder) { - return; - } - var entriesToRemove = []; - for (i = 0; i < noteholder.childNodes.length; i++) { - var entry = noteholder.childNodes[i]; - if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") - entriesToRemove.push(entry); - } - for (i = 0; i < entriesToRemove.length; i++) { - noteholder.removeChild(entriesToRemove[i]); - } - - // Rebuild footnote entries. - var cont = document.getElementById("content"); - var spans = cont.getElementsByTagName("span"); - var refs = {}; - var n = 0; - for (i=0; i" + n + "]"; - spans[i].setAttribute("data-note", note); - } - noteholder.innerHTML += - "
    " + - "" + - n + ". " + note + "
    "; - var id =spans[i].getAttribute("id"); - if (id != null) refs["#"+id] = n; - } - } - if (n == 0) - noteholder.parentNode.removeChild(noteholder); - else { - // Process footnoterefs. - for (i=0; i" + n + "]"; - } - } - } -}, - -install: function(toclevels) { - var timerId; - - function reinstall() { - asciidoc.footnotes(); - if (toclevels) { - asciidoc.toc(toclevels); - } - } - - function reinstallAndRemoveTimer() { - clearInterval(timerId); - reinstall(); - } - - timerId = setInterval(reinstall, 500); - if (document.addEventListener) - document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); - else - window.onload = reinstallAndRemoveTimer; -} - -} diff -Nru asciidoc-8.6.10/examples/website/asciidoc-website.dict asciidoc-10.1.2/examples/website/asciidoc-website.dict --- asciidoc-8.6.10/examples/website/asciidoc-website.dict 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciidoc-website.dict 1970-01-01 00:00:00.000000000 +0000 @@ -1,241 +0,0 @@ -personal_ws-1.1 en 240 -O'Reilly -awb -Blogpost -Bulleted -Iisaka -pygmentize -callouts -JavaScript -asciimath -tex -Philips -stylesheets -passthroughs -LaTexMathML -LaTeXMathML -latexmathml -Rapaz -ASCIIMathML -AsciiMathML -asciimathml -faq -Efros -stdin -LinuxDoc -slideshows -Klum -CentOS -src -plugin -Steen -AsciiDoc -asciidoc -blog -revdate -toc -css -Rosten -screenshot -CSW -Waf -slideshow -Wiese -ShareSource -autowidth -Mandelson -HOWTO -newlists -Hajage -Jipsen -frontmatter -Suraj -AttributeList -dvi -backend -upperalpha -doctype -UNOCONV -dxf -Gentoo -Mowatt -Zuckschwerdt -SGML -raggedright -uri -Røsten -upperroman -Slackware -CouchDB -Wesnoth -matplotlib -adoc -stdout -usr -txt -eBooks -ebooks -linenumbering -ImageMagick -distros -Mowson -qanda -GPL -roff -README -Trotman -xhtml -Stylesheet -inline -weblog -xmllint -refentry -toolchains -Wieers -Debian -xml -filetype -programlisting -asciidocapi -Pommereau -epub -Iisaka's -Hou -doctests -backends -Gingras -sinx -Romé -multi -autoconf -Dmitry -Volnitsky -Shlomi -outlang -Scala -xsltproc -ikiwiki -firefox -Hsu -xsl -iOS -arabic -Neuburg -Ilya -tablewidth -Kaczanowski -testasciidoc -Volnitsky's -backmatter -RPMs -symlink -newtables -cd -Qingping -Calixto -scaledwidth -xzf -xmlto -Lex -refname -html -online -lim -el -mkdir -Kurapati -Solaris -LilyPond -dx -eBook -hg -Gouichi -lang -conf -Tomek -wiki -Maier -DelimitedBlocks -Berker -Neo -js -AsciiDocGen -Portnov -CRAN -jw -ln -pygments -odf -lt -monospace -monospaced -Negroni -ly -docname -OpenOffice -Schottelius -ps -dblatex -Ramaze -pdf -formulae -abc -py -LaTeX -ua -uB -precompiled -vB -latexmath -Wampler -AttributeEntry -chunked -Terje -SourceForge -ascii -Obenhuber's -CHANGLOG -docbook -DocBook -fontlocking -Rosenkraenzer -toolchain -slidy -ebuild -syntaxes -Tomayko -toclevels -Eychaner -OPF -Yannick -repo -showcomments -github -plugins -Xubuntu -AsciiDoc's -png -Backtick -revnumber -userguide -Potapov -Schauer -CHANGELOG -Koster -loweralpha -dBA -SCM -API -lowerroman -Rackham -callout -graphviz -Sakellariou -passthrough -asc -sqrt -TODO -GPLv -Cheatsheet -manpage -Avsajanishvili diff -Nru asciidoc-8.6.10/examples/website/ASCIIMathML.js asciidoc-10.1.2/examples/website/ASCIIMathML.js --- asciidoc-8.6.10/examples/website/ASCIIMathML.js 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/ASCIIMathML.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,938 +0,0 @@ -/* -ASCIIMathML.js -============== -This file contains JavaScript functions to convert ASCII math notation -to Presentation MathML. The conversion is done while the (X)HTML page -loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet -Explorer 6+MathPlayer (http://www.dessci.com/en/products/mathplayer/). -Just add the next line to your (X)HTML page with this file in the same folder: -This is a convenient and inexpensive solution for authoring MathML. - -Version 1.4.7 Dec 15, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen -Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js -For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt -If you use it on a webpage, please send the URL to jipsen@chapman.edu - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License (at http://www.gnu.org/copyleft/gpl.html) -for more details. -*/ - -var checkForMathML = true; // check if browser can display MathML -var notifyIfNoMathML = true; // display note if no MathML capability -var alertIfNoMathML = false; // show alert box if no MathML capability -var mathcolor = ""; // change it to "" (to inherit) or any other color -var mathfontfamily = "serif"; // change to "" to inherit (works in IE) - // or another family (e.g. "arial") -var displaystyle = true; // puts limits above and below large operators -var showasciiformulaonhover = true; // helps students learn ASCIIMath -var decimalsign = "."; // change to "," if you like, beware of `(1,2)`! -var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters -var AMdelimiter2 = "$", AMescape2 = "\\\\\\$", AMdelimiter2regexp = "\\$"; -var doubleblankmathdelimiter = false; // if true, x+1 is equal to `x+1` - // for IE this works only in -//var separatetokens;// has been removed (email me if this is a problem) -var isIE = document.createElementNS==null; - -if (document.getElementById==null) - alert("This webpage requires a recent browser such as\ -\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer") - -// all further global variables start with "AM" - -function AMcreateElementXHTML(t) { - if (isIE) return document.createElement(t); - else return document.createElementNS("http://www.w3.org/1999/xhtml",t); -} - -function AMnoMathMLNote() { - var nd = AMcreateElementXHTML("h3"); - nd.setAttribute("align","center") - nd.appendChild(AMcreateElementXHTML("p")); - nd.appendChild(document.createTextNode("To view the ")); - var an = AMcreateElementXHTML("a"); - an.appendChild(document.createTextNode("ASCIIMathML")); - an.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html"); - nd.appendChild(an); - nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); - an = AMcreateElementXHTML("a"); - an.appendChild(document.createTextNode("MathPlayer")); - an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); - nd.appendChild(an); - nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox")); - nd.appendChild(AMcreateElementXHTML("p")); - return nd; -} - -function AMisMathMLavailable() { - if (navigator.appName.slice(0,8)=="Netscape") - if (navigator.appVersion.slice(0,1)>="5") return null; - else return AMnoMathMLNote(); - else if (navigator.appName.slice(0,9)=="Microsoft") - try { - var ActiveX = new ActiveXObject("MathPlayer.Factory.1"); - return null; - } catch (e) { - return AMnoMathMLNote(); - } - else return AMnoMathMLNote(); -} - -// character lists for Mozilla/Netscape fonts -var AMcal = [0xEF35,0x212C,0xEF36,0xEF37,0x2130,0x2131,0xEF38,0x210B,0x2110,0xEF39,0xEF3A,0x2112,0x2133,0xEF3B,0xEF3C,0xEF3D,0xEF3E,0x211B,0xEF3F,0xEF40,0xEF41,0xEF42,0xEF43,0xEF44,0xEF45,0xEF46]; -var AMfrk = [0xEF5D,0xEF5E,0x212D,0xEF5F,0xEF60,0xEF61,0xEF62,0x210C,0x2111,0xEF63,0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0x211C,0xEF6B,0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0x2128]; -var AMbbb = [0xEF8C,0xEF8D,0x2102,0xEF8E,0xEF8F,0xEF90,0xEF91,0x210D,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0x2115,0xEF97,0x2119,0x211A,0x211D,0xEF98,0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0x2124]; - -var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, - RIGHTBRACKET = 5, SPACE = 6, UNDEROVER = 7, DEFINITION = 8, - LEFTRIGHT = 9, TEXT = 10; // token types - -var AMsqrt = {input:"sqrt", tag:"msqrt", output:"sqrt", tex:null, ttype:UNARY}, - AMroot = {input:"root", tag:"mroot", output:"root", tex:null, ttype:BINARY}, - AMfrac = {input:"frac", tag:"mfrac", output:"/", tex:null, ttype:BINARY}, - AMdiv = {input:"/", tag:"mfrac", output:"/", tex:null, ttype:INFIX}, - AMover = {input:"stackrel", tag:"mover", output:"stackrel", tex:null, ttype:BINARY}, - AMsub = {input:"_", tag:"msub", output:"_", tex:null, ttype:INFIX}, - AMsup = {input:"^", tag:"msup", output:"^", tex:null, ttype:INFIX}, - AMtext = {input:"text", tag:"mtext", output:"text", tex:null, ttype:TEXT}, - AMmbox = {input:"mbox", tag:"mtext", output:"mbox", tex:null, ttype:TEXT}, - AMquote = {input:"\"", tag:"mtext", output:"mbox", tex:null, ttype:TEXT}; - -var AMsymbols = [ -//some greek symbols -{input:"alpha", tag:"mi", output:"\u03B1", tex:null, ttype:CONST}, -{input:"beta", tag:"mi", output:"\u03B2", tex:null, ttype:CONST}, -{input:"chi", tag:"mi", output:"\u03C7", tex:null, ttype:CONST}, -{input:"delta", tag:"mi", output:"\u03B4", tex:null, ttype:CONST}, -{input:"Delta", tag:"mo", output:"\u0394", tex:null, ttype:CONST}, -{input:"epsi", tag:"mi", output:"\u03B5", tex:"epsilon", ttype:CONST}, -{input:"varepsilon", tag:"mi", output:"\u025B", tex:null, ttype:CONST}, -{input:"eta", tag:"mi", output:"\u03B7", tex:null, ttype:CONST}, -{input:"gamma", tag:"mi", output:"\u03B3", tex:null, ttype:CONST}, -{input:"Gamma", tag:"mo", output:"\u0393", tex:null, ttype:CONST}, -{input:"iota", tag:"mi", output:"\u03B9", tex:null, ttype:CONST}, -{input:"kappa", tag:"mi", output:"\u03BA", tex:null, ttype:CONST}, -{input:"lambda", tag:"mi", output:"\u03BB", tex:null, ttype:CONST}, -{input:"Lambda", tag:"mo", output:"\u039B", tex:null, ttype:CONST}, -{input:"mu", tag:"mi", output:"\u03BC", tex:null, ttype:CONST}, -{input:"nu", tag:"mi", output:"\u03BD", tex:null, ttype:CONST}, -{input:"omega", tag:"mi", output:"\u03C9", tex:null, ttype:CONST}, -{input:"Omega", tag:"mo", output:"\u03A9", tex:null, ttype:CONST}, -{input:"phi", tag:"mi", output:"\u03C6", tex:null, ttype:CONST}, -{input:"varphi", tag:"mi", output:"\u03D5", tex:null, ttype:CONST}, -{input:"Phi", tag:"mo", output:"\u03A6", tex:null, ttype:CONST}, -{input:"pi", tag:"mi", output:"\u03C0", tex:null, ttype:CONST}, -{input:"Pi", tag:"mo", output:"\u03A0", tex:null, ttype:CONST}, -{input:"psi", tag:"mi", output:"\u03C8", tex:null, ttype:CONST}, -{input:"Psi", tag:"mi", output:"\u03A8", tex:null, ttype:CONST}, -{input:"rho", tag:"mi", output:"\u03C1", tex:null, ttype:CONST}, -{input:"sigma", tag:"mi", output:"\u03C3", tex:null, ttype:CONST}, -{input:"Sigma", tag:"mo", output:"\u03A3", tex:null, ttype:CONST}, -{input:"tau", tag:"mi", output:"\u03C4", tex:null, ttype:CONST}, -{input:"theta", tag:"mi", output:"\u03B8", tex:null, ttype:CONST}, -{input:"vartheta", tag:"mi", output:"\u03D1", tex:null, ttype:CONST}, -{input:"Theta", tag:"mo", output:"\u0398", tex:null, ttype:CONST}, -{input:"upsilon", tag:"mi", output:"\u03C5", tex:null, ttype:CONST}, -{input:"xi", tag:"mi", output:"\u03BE", tex:null, ttype:CONST}, -{input:"Xi", tag:"mo", output:"\u039E", tex:null, ttype:CONST}, -{input:"zeta", tag:"mi", output:"\u03B6", tex:null, ttype:CONST}, - -//binary operation symbols -{input:"*", tag:"mo", output:"\u22C5", tex:"cdot", ttype:CONST}, -{input:"**", tag:"mo", output:"\u22C6", tex:"star", ttype:CONST}, -{input:"//", tag:"mo", output:"/", tex:null, ttype:CONST}, -{input:"\\\\", tag:"mo", output:"\\", tex:"backslash", ttype:CONST}, -{input:"setminus", tag:"mo", output:"\\", tex:null, ttype:CONST}, -{input:"xx", tag:"mo", output:"\u00D7", tex:"times", ttype:CONST}, -{input:"-:", tag:"mo", output:"\u00F7", tex:"divide", ttype:CONST}, -{input:"@", tag:"mo", output:"\u2218", tex:"circ", ttype:CONST}, -{input:"o+", tag:"mo", output:"\u2295", tex:"oplus", ttype:CONST}, -{input:"ox", tag:"mo", output:"\u2297", tex:"otimes", ttype:CONST}, -{input:"o.", tag:"mo", output:"\u2299", tex:"odot", ttype:CONST}, -{input:"sum", tag:"mo", output:"\u2211", tex:null, ttype:UNDEROVER}, -{input:"prod", tag:"mo", output:"\u220F", tex:null, ttype:UNDEROVER}, -{input:"^^", tag:"mo", output:"\u2227", tex:"wedge", ttype:CONST}, -{input:"^^^", tag:"mo", output:"\u22C0", tex:"bigwedge", ttype:UNDEROVER}, -{input:"vv", tag:"mo", output:"\u2228", tex:"vee", ttype:CONST}, -{input:"vvv", tag:"mo", output:"\u22C1", tex:"bigvee", ttype:UNDEROVER}, -{input:"nn", tag:"mo", output:"\u2229", tex:"cap", ttype:CONST}, -{input:"nnn", tag:"mo", output:"\u22C2", tex:"bigcap", ttype:UNDEROVER}, -{input:"uu", tag:"mo", output:"\u222A", tex:"cup", ttype:CONST}, -{input:"uuu", tag:"mo", output:"\u22C3", tex:"bigcup", ttype:UNDEROVER}, - -//binary relation symbols -{input:"!=", tag:"mo", output:"\u2260", tex:"ne", ttype:CONST}, -{input:":=", tag:"mo", output:":=", tex:null, ttype:CONST}, -{input:"lt", tag:"mo", output:"<", tex:null, ttype:CONST}, -{input:"<=", tag:"mo", output:"\u2264", tex:"le", ttype:CONST}, -{input:"lt=", tag:"mo", output:"\u2264", tex:"leq", ttype:CONST}, -{input:">=", tag:"mo", output:"\u2265", tex:"ge", ttype:CONST}, -{input:"geq", tag:"mo", output:"\u2265", tex:null, ttype:CONST}, -{input:"-<", tag:"mo", output:"\u227A", tex:"prec", ttype:CONST}, -{input:"-lt", tag:"mo", output:"\u227A", tex:null, ttype:CONST}, -{input:">-", tag:"mo", output:"\u227B", tex:"succ", ttype:CONST}, -{input:"-<=", tag:"mo", output:"\u2AAF", tex:"preceq", ttype:CONST}, -{input:">-=", tag:"mo", output:"\u2AB0", tex:"succeq", ttype:CONST}, -{input:"in", tag:"mo", output:"\u2208", tex:null, ttype:CONST}, -{input:"!in", tag:"mo", output:"\u2209", tex:"notin", ttype:CONST}, -{input:"sub", tag:"mo", output:"\u2282", tex:"subset", ttype:CONST}, -{input:"sup", tag:"mo", output:"\u2283", tex:"supset", ttype:CONST}, -{input:"sube", tag:"mo", output:"\u2286", tex:"subseteq", ttype:CONST}, -{input:"supe", tag:"mo", output:"\u2287", tex:"supseteq", ttype:CONST}, -{input:"-=", tag:"mo", output:"\u2261", tex:"equiv", ttype:CONST}, -{input:"~=", tag:"mo", output:"\u2245", tex:"cong", ttype:CONST}, -{input:"~~", tag:"mo", output:"\u2248", tex:"approx", ttype:CONST}, -{input:"prop", tag:"mo", output:"\u221D", tex:"propto", ttype:CONST}, - -//logical symbols -{input:"and", tag:"mtext", output:"and", tex:null, ttype:SPACE}, -{input:"or", tag:"mtext", output:"or", tex:null, ttype:SPACE}, -{input:"not", tag:"mo", output:"\u00AC", tex:"neg", ttype:CONST}, -{input:"=>", tag:"mo", output:"\u21D2", tex:"implies", ttype:CONST}, -{input:"if", tag:"mo", output:"if", tex:null, ttype:SPACE}, -{input:"<=>", tag:"mo", output:"\u21D4", tex:"iff", ttype:CONST}, -{input:"AA", tag:"mo", output:"\u2200", tex:"forall", ttype:CONST}, -{input:"EE", tag:"mo", output:"\u2203", tex:"exists", ttype:CONST}, -{input:"_|_", tag:"mo", output:"\u22A5", tex:"bot", ttype:CONST}, -{input:"TT", tag:"mo", output:"\u22A4", tex:"top", ttype:CONST}, -{input:"|--", tag:"mo", output:"\u22A2", tex:"vdash", ttype:CONST}, -{input:"|==", tag:"mo", output:"\u22A8", tex:"models", ttype:CONST}, - -//grouping brackets -{input:"(", tag:"mo", output:"(", tex:null, ttype:LEFTBRACKET}, -{input:")", tag:"mo", output:")", tex:null, ttype:RIGHTBRACKET}, -{input:"[", tag:"mo", output:"[", tex:null, ttype:LEFTBRACKET}, -{input:"]", tag:"mo", output:"]", tex:null, ttype:RIGHTBRACKET}, -{input:"{", tag:"mo", output:"{", tex:null, ttype:LEFTBRACKET}, -{input:"}", tag:"mo", output:"}", tex:null, ttype:RIGHTBRACKET}, -{input:"|", tag:"mo", output:"|", tex:null, ttype:LEFTRIGHT}, -//{input:"||", tag:"mo", output:"||", tex:null, ttype:LEFTRIGHT}, -{input:"(:", tag:"mo", output:"\u2329", tex:"langle", ttype:LEFTBRACKET}, -{input:":)", tag:"mo", output:"\u232A", tex:"rangle", ttype:RIGHTBRACKET}, -{input:"<<", tag:"mo", output:"\u2329", tex:null, ttype:LEFTBRACKET}, -{input:">>", tag:"mo", output:"\u232A", tex:null, ttype:RIGHTBRACKET}, -{input:"{:", tag:"mo", output:"{:", tex:null, ttype:LEFTBRACKET, invisible:true}, -{input:":}", tag:"mo", output:":}", tex:null, ttype:RIGHTBRACKET, invisible:true}, - -//miscellaneous symbols -{input:"int", tag:"mo", output:"\u222B", tex:null, ttype:CONST}, -{input:"dx", tag:"mi", output:"{:d x:}", tex:null, ttype:DEFINITION}, -{input:"dy", tag:"mi", output:"{:d y:}", tex:null, ttype:DEFINITION}, -{input:"dz", tag:"mi", output:"{:d z:}", tex:null, ttype:DEFINITION}, -{input:"dt", tag:"mi", output:"{:d t:}", tex:null, ttype:DEFINITION}, -{input:"oint", tag:"mo", output:"\u222E", tex:null, ttype:CONST}, -{input:"del", tag:"mo", output:"\u2202", tex:"partial", ttype:CONST}, -{input:"grad", tag:"mo", output:"\u2207", tex:"nabla", ttype:CONST}, -{input:"+-", tag:"mo", output:"\u00B1", tex:"pm", ttype:CONST}, -{input:"O/", tag:"mo", output:"\u2205", tex:"emptyset", ttype:CONST}, -{input:"oo", tag:"mo", output:"\u221E", tex:"infty", ttype:CONST}, -{input:"aleph", tag:"mo", output:"\u2135", tex:null, ttype:CONST}, -{input:"...", tag:"mo", output:"...", tex:"ldots", ttype:CONST}, -{input:":.", tag:"mo", output:"\u2234", tex:"therefore", ttype:CONST}, -{input:"/_", tag:"mo", output:"\u2220", tex:"angle", ttype:CONST}, -{input:"\\ ", tag:"mo", output:"\u00A0", tex:null, ttype:CONST}, -{input:"quad", tag:"mo", output:"\u00A0\u00A0", tex:null, ttype:CONST}, -{input:"qquad", tag:"mo", output:"\u00A0\u00A0\u00A0\u00A0", tex:null, ttype:CONST}, -{input:"cdots", tag:"mo", output:"\u22EF", tex:null, ttype:CONST}, -{input:"vdots", tag:"mo", output:"\u22EE", tex:null, ttype:CONST}, -{input:"ddots", tag:"mo", output:"\u22F1", tex:null, ttype:CONST}, -{input:"diamond", tag:"mo", output:"\u22C4", tex:null, ttype:CONST}, -{input:"square", tag:"mo", output:"\u25A1", tex:null, ttype:CONST}, -{input:"|__", tag:"mo", output:"\u230A", tex:"lfloor", ttype:CONST}, -{input:"__|", tag:"mo", output:"\u230B", tex:"rfloor", ttype:CONST}, -{input:"|~", tag:"mo", output:"\u2308", tex:"lceiling", ttype:CONST}, -{input:"~|", tag:"mo", output:"\u2309", tex:"rceiling", ttype:CONST}, -{input:"CC", tag:"mo", output:"\u2102", tex:null, ttype:CONST}, -{input:"NN", tag:"mo", output:"\u2115", tex:null, ttype:CONST}, -{input:"QQ", tag:"mo", output:"\u211A", tex:null, ttype:CONST}, -{input:"RR", tag:"mo", output:"\u211D", tex:null, ttype:CONST}, -{input:"ZZ", tag:"mo", output:"\u2124", tex:null, ttype:CONST}, -{input:"f", tag:"mi", output:"f", tex:null, ttype:UNARY, func:true}, -{input:"g", tag:"mi", output:"g", tex:null, ttype:UNARY, func:true}, - -//standard functions -{input:"lim", tag:"mo", output:"lim", tex:null, ttype:UNDEROVER}, -{input:"Lim", tag:"mo", output:"Lim", tex:null, ttype:UNDEROVER}, -{input:"sin", tag:"mo", output:"sin", tex:null, ttype:UNARY, func:true}, -{input:"cos", tag:"mo", output:"cos", tex:null, ttype:UNARY, func:true}, -{input:"tan", tag:"mo", output:"tan", tex:null, ttype:UNARY, func:true}, -{input:"sinh", tag:"mo", output:"sinh", tex:null, ttype:UNARY, func:true}, -{input:"cosh", tag:"mo", output:"cosh", tex:null, ttype:UNARY, func:true}, -{input:"tanh", tag:"mo", output:"tanh", tex:null, ttype:UNARY, func:true}, -{input:"cot", tag:"mo", output:"cot", tex:null, ttype:UNARY, func:true}, -{input:"sec", tag:"mo", output:"sec", tex:null, ttype:UNARY, func:true}, -{input:"csc", tag:"mo", output:"csc", tex:null, ttype:UNARY, func:true}, -{input:"log", tag:"mo", output:"log", tex:null, ttype:UNARY, func:true}, -{input:"ln", tag:"mo", output:"ln", tex:null, ttype:UNARY, func:true}, -{input:"det", tag:"mo", output:"det", tex:null, ttype:UNARY, func:true}, -{input:"dim", tag:"mo", output:"dim", tex:null, ttype:CONST}, -{input:"mod", tag:"mo", output:"mod", tex:null, ttype:CONST}, -{input:"gcd", tag:"mo", output:"gcd", tex:null, ttype:UNARY, func:true}, -{input:"lcm", tag:"mo", output:"lcm", tex:null, ttype:UNARY, func:true}, -{input:"lub", tag:"mo", output:"lub", tex:null, ttype:CONST}, -{input:"glb", tag:"mo", output:"glb", tex:null, ttype:CONST}, -{input:"min", tag:"mo", output:"min", tex:null, ttype:UNDEROVER}, -{input:"max", tag:"mo", output:"max", tex:null, ttype:UNDEROVER}, - -//arrows -{input:"uarr", tag:"mo", output:"\u2191", tex:"uparrow", ttype:CONST}, -{input:"darr", tag:"mo", output:"\u2193", tex:"downarrow", ttype:CONST}, -{input:"rarr", tag:"mo", output:"\u2192", tex:"rightarrow", ttype:CONST}, -{input:"->", tag:"mo", output:"\u2192", tex:"to", ttype:CONST}, -{input:"|->", tag:"mo", output:"\u21A6", tex:"mapsto", ttype:CONST}, -{input:"larr", tag:"mo", output:"\u2190", tex:"leftarrow", ttype:CONST}, -{input:"harr", tag:"mo", output:"\u2194", tex:"leftrightarrow", ttype:CONST}, -{input:"rArr", tag:"mo", output:"\u21D2", tex:"Rightarrow", ttype:CONST}, -{input:"lArr", tag:"mo", output:"\u21D0", tex:"Leftarrow", ttype:CONST}, -{input:"hArr", tag:"mo", output:"\u21D4", tex:"Leftrightarrow", ttype:CONST}, - -//commands with argument -AMsqrt, AMroot, AMfrac, AMdiv, AMover, AMsub, AMsup, -{input:"hat", tag:"mover", output:"\u005E", tex:null, ttype:UNARY, acc:true}, -{input:"bar", tag:"mover", output:"\u00AF", tex:"overline", ttype:UNARY, acc:true}, -{input:"vec", tag:"mover", output:"\u2192", tex:null, ttype:UNARY, acc:true}, -{input:"dot", tag:"mover", output:".", tex:null, ttype:UNARY, acc:true}, -{input:"ddot", tag:"mover", output:"..", tex:null, ttype:UNARY, acc:true}, -{input:"ul", tag:"munder", output:"\u0332", tex:"underline", ttype:UNARY, acc:true}, -AMtext, AMmbox, AMquote, -{input:"bb", tag:"mstyle", atname:"fontweight", atval:"bold", output:"bb", tex:null, ttype:UNARY}, -{input:"mathbf", tag:"mstyle", atname:"fontweight", atval:"bold", output:"mathbf", tex:null, ttype:UNARY}, -{input:"sf", tag:"mstyle", atname:"fontfamily", atval:"sans-serif", output:"sf", tex:null, ttype:UNARY}, -{input:"mathsf", tag:"mstyle", atname:"fontfamily", atval:"sans-serif", output:"mathsf", tex:null, ttype:UNARY}, -{input:"bbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"bbb", tex:null, ttype:UNARY, codes:AMbbb}, -{input:"mathbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"mathbb", tex:null, ttype:UNARY, codes:AMbbb}, -{input:"cc", tag:"mstyle", atname:"mathvariant", atval:"script", output:"cc", tex:null, ttype:UNARY, codes:AMcal}, -{input:"mathcal", tag:"mstyle", atname:"mathvariant", atval:"script", output:"mathcal", tex:null, ttype:UNARY, codes:AMcal}, -{input:"tt", tag:"mstyle", atname:"fontfamily", atval:"monospace", output:"tt", tex:null, ttype:UNARY}, -{input:"mathtt", tag:"mstyle", atname:"fontfamily", atval:"monospace", output:"mathtt", tex:null, ttype:UNARY}, -{input:"fr", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"fr", tex:null, ttype:UNARY, codes:AMfrk}, -{input:"mathfrak", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"mathfrak", tex:null, ttype:UNARY, codes:AMfrk} -]; - -function compareNames(s1,s2) { - if (s1.input > s2.input) return 1 - else return -1; -} - -var AMnames = []; //list of input symbols - -function AMinitSymbols() { - var texsymbols = [], i; - for (i=0; i=n where str appears or would be inserted -// assumes arr is sorted - if (n==0) { - var h,m; - n = -1; - h = arr.length; - while (n+1> 1; - if (arr[m]=str -} - -function AMgetSymbol(str) { -//return maximal initial substring of str that appears in names -//return null if there is none - var k = 0; //new pos - var j = 0; //old pos - var mk; //match pos - var st; - var tagst; - var match = ""; - var more = true; - for (var i=1; i<=str.length && more; i++) { - st = str.slice(0,i); //initial substring of length i - j = k; - k = AMposition(AMnames, st, j); - if (k=AMnames[k]; - } - AMpreviousSymbol=AMcurrentSymbol; - if (match!=""){ - AMcurrentSymbol=AMsymbols[mk].ttype; - return AMsymbols[mk]; - } -// if str[0] is a digit or - return maxsubstring of digits.digits - AMcurrentSymbol=CONST; - k = 1; - st = str.slice(0,1); - var integ = true; - while ("0"<=st && st<="9" && k<=str.length) { - st = str.slice(k,k+1); - k++; - } - if (st == decimalsign) { - st = str.slice(k,k+1); - if ("0"<=st && st<="9") { - integ = false; - k++; - while ("0"<=st && st<="9" && k<=str.length) { - st = str.slice(k,k+1); - k++; - } - } - } - if ((integ && k>1) || k>2) { - st = str.slice(0,k-1); - tagst = "mn"; - } else { - k = 2; - st = str.slice(0,1); //take 1 character - tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi"); - } - if (st=="-" && AMpreviousSymbol==INFIX) { - AMcurrentSymbol = INFIX; //trick "/" into recognizing "-" on second parse - return {input:st, tag:tagst, output:st, ttype:UNARY, func:true}; - } - return {input:st, tag:tagst, output:st, ttype:CONST}; -} - -function AMremoveBrackets(node) { - var st; - if (node.nodeName=="mrow") { - st = node.firstChild.firstChild.nodeValue; - if (st=="(" || st=="[" || st=="{") node.removeChild(node.firstChild); - } - if (node.nodeName=="mrow") { - st = node.lastChild.firstChild.nodeValue; - if (st==")" || st=="]" || st=="}") node.removeChild(node.lastChild); - } -} - -/*Parsing ASCII math expressions with the following grammar -v ::= [A-Za-z] | greek letters | numbers | other constant symbols -u ::= sqrt | text | bb | other unary symbols for font commands -b ::= frac | root | stackrel binary symbols -l ::= ( | [ | { | (: | {: left brackets -r ::= ) | ] | } | :) | :} right brackets -S ::= v | lEr | uS | bSS Simple expression -I ::= S_S | S^S | S_S^S | S Intermediate expression -E ::= IE | I/I Expression -Each terminal symbol is translated into a corresponding mathml node.*/ - -var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol; - -function AMparseSexpr(str) { //parses str and returns [node,tailstr] - var symbol, node, result, i, st,// rightvert = false, - newFrag = document.createDocumentFragment(); - str = AMremoveCharsAndBlanks(str,0); - symbol = AMgetSymbol(str); //either a token or a bracket or empty - if (symbol == null || symbol.ttype == RIGHTBRACKET && AMnestingDepth > 0) { - return [null,str]; - } - if (symbol.ttype == DEFINITION) { - str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); - symbol = AMgetSymbol(str); - } - switch (symbol.ttype) { - case UNDEROVER: - case CONST: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode(symbol.tag, //its a constant - document.createTextNode(symbol.output)),str]; - case LEFTBRACKET: //read (expr+) - AMnestingDepth++; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseExpr(str,true); - AMnestingDepth--; - if (typeof symbol.invisible == "boolean" && symbol.invisible) - node = AMcreateMmlNode("mrow",result[0]); - else { - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - node.appendChild(result[0]); - } - return [node,result[1]]; - case TEXT: - if (symbol!=AMquote) str = AMremoveCharsAndBlanks(str,symbol.input.length); - if (str.charAt(0)=="{") i=str.indexOf("}"); - else if (str.charAt(0)=="(") i=str.indexOf(")"); - else if (str.charAt(0)=="[") i=str.indexOf("]"); - else if (symbol==AMquote) i=str.slice(1).indexOf("\"")+1; - else i = 0; - if (i==-1) i = str.length; - st = str.slice(1,i); - if (st.charAt(0) == " ") { - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - } - newFrag.appendChild( - AMcreateMmlNode(symbol.tag,document.createTextNode(st))); - if (st.charAt(st.length-1) == " ") { - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - } - str = AMremoveCharsAndBlanks(str,i+1); - return [AMcreateMmlNode("mrow",newFrag),str]; - case UNARY: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseSexpr(str); - if (result[0]==null) return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str]; - if (typeof symbol.func == "boolean" && symbol.func) { // functions hack - st = str.charAt(0); - if (st=="^" || st=="_" || st=="/" || st=="|" || st==",") { - return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str]; - } else { - node = AMcreateMmlNode("mrow", - AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); - node.appendChild(result[0]); - return [node,result[1]]; - } - } - AMremoveBrackets(result[0]); - if (symbol.input == "sqrt") { // sqrt - return [AMcreateMmlNode(symbol.tag,result[0]),result[1]]; - } else if (typeof symbol.acc == "boolean" && symbol.acc) { // accent - node = AMcreateMmlNode(symbol.tag,result[0]); - node.appendChild(AMcreateMmlNode("mo",document.createTextNode(symbol.output))); - return [node,result[1]]; - } else { // font change command - if (!isIE && typeof symbol.codes != "undefined") { - for (i=0; i64 && st.charCodeAt(j)<91) newst = newst + - String.fromCharCode(symbol.codes[st.charCodeAt(j)-65]); - else newst = newst + st.charAt(j); - if (result[0].nodeName=="mi") - result[0]=AMcreateElementMathML("mo"). - appendChild(document.createTextNode(newst)); - else result[0].replaceChild(AMcreateElementMathML("mo"). - appendChild(document.createTextNode(newst)),result[0].childNodes[i]); - } - } - node = AMcreateMmlNode(symbol.tag,result[0]); - node.setAttribute(symbol.atname,symbol.atval); - return [node,result[1]]; - } - case BINARY: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseSexpr(str); - if (result[0]==null) return [AMcreateMmlNode("mo", - document.createTextNode(symbol.input)),str]; - AMremoveBrackets(result[0]); - var result2 = AMparseSexpr(result[1]); - if (result2[0]==null) return [AMcreateMmlNode("mo", - document.createTextNode(symbol.input)),str]; - AMremoveBrackets(result2[0]); - if (symbol.input=="root" || symbol.input=="stackrel") - newFrag.appendChild(result2[0]); - newFrag.appendChild(result[0]); - if (symbol.input=="frac") newFrag.appendChild(result2[0]); - return [AMcreateMmlNode(symbol.tag,newFrag),result2[1]]; - case INFIX: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode("mo",document.createTextNode(symbol.output)),str]; - case SPACE: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - newFrag.appendChild( - AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - return [AMcreateMmlNode("mrow",newFrag),str]; - case LEFTRIGHT: -// if (rightvert) return [null,str]; else rightvert = true; - AMnestingDepth++; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseExpr(str,false); - AMnestingDepth--; - var st = ""; - if (result[0].lastChild!=null) - st = result[0].lastChild.firstChild.nodeValue; - if (st == "|") { // its an absolute value subterm - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - node.appendChild(result[0]); - return [node,result[1]]; - } else { // the "|" is a \mid - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - return [node,str]; - } - default: -//alert("default"); - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode(symbol.tag, //its a constant - document.createTextNode(symbol.output)),str]; - } -} - -function AMparseIexpr(str) { - var symbol, sym1, sym2, node, result, underover; - str = AMremoveCharsAndBlanks(str,0); - sym1 = AMgetSymbol(str); - result = AMparseSexpr(str); - node = result[0]; - str = result[1]; - symbol = AMgetSymbol(str); - if (symbol.ttype == INFIX && symbol.input != "/") { - str = AMremoveCharsAndBlanks(str,symbol.input.length); -// if (symbol.input == "/") result = AMparseIexpr(str); else ... - result = AMparseSexpr(str); - if (result[0] == null) // show box in place of missing argument - result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); - else AMremoveBrackets(result[0]); - str = result[1]; -// if (symbol.input == "/") AMremoveBrackets(node); - if (symbol.input == "_") { - sym2 = AMgetSymbol(str); - underover = (sym1.ttype == UNDEROVER); - if (sym2.input == "^") { - str = AMremoveCharsAndBlanks(str,sym2.input.length); - var res2 = AMparseSexpr(str); - AMremoveBrackets(res2[0]); - str = res2[1]; - node = AMcreateMmlNode((underover?"munderover":"msubsup"),node); - node.appendChild(result[0]); - node.appendChild(res2[0]); - node = AMcreateMmlNode("mrow",node); // so sum does not stretch - } else { - node = AMcreateMmlNode((underover?"munder":"msub"),node); - node.appendChild(result[0]); - } - } else { - node = AMcreateMmlNode(symbol.tag,node); - node.appendChild(result[0]); - } - } - return [node,str]; -} - -function AMparseExpr(str,rightbracket) { - var symbol, node, result, i, nodeList = [], - newFrag = document.createDocumentFragment(); - do { - str = AMremoveCharsAndBlanks(str,0); - result = AMparseIexpr(str); - node = result[0]; - str = result[1]; - symbol = AMgetSymbol(str); - if (symbol.ttype == INFIX && symbol.input == "/") { - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseIexpr(str); - if (result[0] == null) // show box in place of missing argument - result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); - else AMremoveBrackets(result[0]); - str = result[1]; - AMremoveBrackets(node); - node = AMcreateMmlNode(symbol.tag,node); - node.appendChild(result[0]); - newFrag.appendChild(node); - symbol = AMgetSymbol(str); - } - else if (node!=undefined) newFrag.appendChild(node); - } while ((symbol.ttype != RIGHTBRACKET && - (symbol.ttype != LEFTRIGHT || rightbracket) - || AMnestingDepth == 0) && symbol!=null && symbol.output!=""); - if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) { -// if (AMnestingDepth > 0) AMnestingDepth--; - var len = newFrag.childNodes.length; - if (len>0 && newFrag.childNodes[len-1].nodeName == "mrow" && len>1 && - newFrag.childNodes[len-2].nodeName == "mo" && - newFrag.childNodes[len-2].firstChild.nodeValue == ",") { //matrix - var right = newFrag.childNodes[len-1].lastChild.firstChild.nodeValue; - if (right==")" || right=="]") { - var left = newFrag.childNodes[len-1].firstChild.firstChild.nodeValue; - if (left=="(" && right==")" && symbol.output != "}" || - left=="[" && right=="]") { - var pos = []; // positions of commas - var matrix = true; - var m = newFrag.childNodes.length; - for (i=0; matrix && i1) matrix = pos[i].length == pos[i-2].length; - } - if (matrix) { - var row, frag, n, k, table = document.createDocumentFragment(); - for (i=0; i(-,-,...,-,-) - n = node.childNodes.length; - k = 0; - node.removeChild(node.firstChild); //remove ( - for (j=1; j2) { - newFrag.removeChild(newFrag.firstChild); //remove ) - newFrag.removeChild(newFrag.firstChild); //remove , - } - table.appendChild(AMcreateMmlNode("mtr",row)); - } - node = AMcreateMmlNode("mtable",table); - if (typeof symbol.invisible == "boolean" && symbol.invisible) node.setAttribute("columnalign","left"); - newFrag.replaceChild(node,newFrag.firstChild); - } - } - } - } - str = AMremoveCharsAndBlanks(str,symbol.input.length); - if (typeof symbol.invisible != "boolean" || !symbol.invisible) { - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - newFrag.appendChild(node); - } - } - return [newFrag,str]; -} - -function AMparseMath(str) { - var result, node = AMcreateElementMathML("mstyle"); - if (mathcolor != "") node.setAttribute("mathcolor",mathcolor); - if (displaystyle) node.setAttribute("displaystyle","true"); - if (mathfontfamily != "") node.setAttribute("fontfamily",mathfontfamily); - AMnestingDepth = 0; - node.appendChild(AMparseExpr(str.replace(/^\s+/g,""),false)[0]); - node = AMcreateMmlNode("math",node); - if (showasciiformulaonhover) //fixed by djhsu so newline - node.setAttribute("title",str.replace(/\s+/g," "));//does not show in Gecko - if (mathfontfamily != "" && (isIE || mathfontfamily != "serif")) { - var fnode = AMcreateElementXHTML("font"); - fnode.setAttribute("face",mathfontfamily); - fnode.appendChild(node); - return fnode; - } - return node; -} - -function AMstrarr2docFrag(arr, linebreaks) { - var newFrag=document.createDocumentFragment(); - var expr = false; - for (var i=0; i1 || mtch) { - if (checkForMathML) { - checkForMathML = false; - var nd = AMisMathMLavailable(); - AMnoMathML = nd != null; - if (AMnoMathML && notifyIfNoMathML) - if (alertIfNoMathML) - alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n\ - or Firefox/Mozilla/Netscape"); - else AMbody.insertBefore(nd,AMbody.childNodes[0]); - } - if (!AMnoMathML) { - frg = AMstrarr2docFrag(arr,n.nodeType==8); - var len = frg.childNodes.length; - n.parentNode.replaceChild(frg,n); - return len-1; - } else return 0; - } - } - } else return 0; - } else if (n.nodeName!="math") { - for (i=0; i"); - document.write(""); -} - -// GO1.1 Generic onload by Brothercake -// http://www.brothercake.com/ -//onload function (replaces the onload="translate()" in the tag) -function generic() -{ - translate(); -}; -//setup onload function -if(typeof window.addEventListener != 'undefined') -{ - //.. gecko, safari, konqueror and standard - window.addEventListener('load', generic, false); -} -else if(typeof document.addEventListener != 'undefined') -{ - //.. opera 7 - document.addEventListener('load', generic, false); -} -else if(typeof window.attachEvent != 'undefined') -{ - //.. win/ie - window.attachEvent('onload', generic); -} -//** remove this condition to degrade older browsers -else -{ - //.. mac/ie5 and anything else that gets this far - //if there's an existing onload function - if(typeof window.onload == 'function') - { - //store it - var existing = onload; - //add new onload handler - window.onload = function() - { - //call existing onload function - existing(); - //call generic onload function - generic(); - }; - } - else - { - //setup onload function - window.onload = generic; - } -} diff -Nru asciidoc-8.6.10/examples/website/asciimathml.txt asciidoc-10.1.2/examples/website/asciimathml.txt --- asciidoc-8.6.10/examples/website/asciimathml.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/asciimathml.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -ASCIIMathML Formulae -==================== - -http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] is -a clever JavaScript written by Peter Jipsen that dynamically -transforms mathematical formulae written in a wiki-like plain text -markup to http://www.w3.org/Math/[MathML] markup which is displayed as -standard mathematical notation by the Web Browser. See 'Appendix E' -in the AsciiDoc User Guide for more details. - -The AsciiDoc `xhtml11` backend supports ASCIIMathML -- it links the -ASCIIMathML script and escapes ASCIIMathML delimiters and special -characters to yield valid XHTML. To use ASCIIMathML: - -1. Include the `-a asciimath` command-line option when you run - `asciidoc(1)`. -2. Enclose ASCIIMathML formulas inside math or double-dollar - passthroughs or in math passthrough blocks. - -Here's the link:asciimathml.txt[AsciiDoc source] that generated this -page. - -.NOTE -- When you use the `asciimath:[]` inline macro you need to escape `]` - characters in the formulas with a backslash, escaping is unnecessary - if you use the double-dollar macro (for examples see the second - formula below). -- See the - http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] - website for ASCIIMathML documentation and the latest version. -- If the formulas don't appear to be correct you probably need to - install the correct math fonts (see the - http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] - website for details). -- See the link:latexmathml.html[LaTeXMathML page] if you prefer to use - LaTeX math formulas. - -A list of example formulas: - -- $$`[[a,b],[c,d]]((n),(k))`$$ -- asciimath:[x/x={(1,if x!=0),(text{undefined},if x=0):}] -- asciimath:[d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h] -- +++`sum_(i=1)\^n i=(n(n+1))/2`$+++ and *bold - asciimath:[int_0\^(pi/2) sinx\ dx=1]* -- asciimath:[(a,b\]={x in RR : a < x <= b}] -- asciimath:[x^2+y_1+z_12^34] - -********************************************************************* -The first three terms factor to give -asciimath:[(x+b/(2a))^2=(b^2)/(4a^2)-c/a]. - -asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. - -Now we take square roots on both sides and get -asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. -Finally we move the asciimath:[b/(2a)] to the right and simplify to -get the two solutions: -*asciimath:[x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)]*. - -********************************************************************* - diff -Nru asciidoc-8.6.10/examples/website/build-website.sh asciidoc-10.1.2/examples/website/build-website.sh --- asciidoc-8.6.10/examples/website/build-website.sh 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/build-website.sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#!/bin/sh - -VERS="8.6.10" -DATE="2017-09-22" - -# Leave the desired layout uncommented. -#LAYOUT=layout1 # Tables based layout. -LAYOUT=layout2 # CSS based layout. - -ASCIIDOC_HTML="python ../../asciidoc.py --backend=xhtml11 --conf-file=${LAYOUT}.conf --attribute icons --attribute iconsdir=./images/icons --attribute=badges --attribute=revision=$VERS --attribute=date=$DATE" - -$ASCIIDOC_HTML -a index-only index.txt -$ASCIIDOC_HTML -a toc -a numbered userguide.txt -$ASCIIDOC_HTML -d manpage manpage.txt -$ASCIIDOC_HTML downloads.txt -$ASCIIDOC_HTML latex-backend.txt -$ASCIIDOC_HTML README.txt -$ASCIIDOC_HTML INSTALL.txt -$ASCIIDOC_HTML CHANGELOG.txt -$ASCIIDOC_HTML README-website.txt -$ASCIIDOC_HTML support.txt -$ASCIIDOC_HTML source-highlight-filter.txt -$ASCIIDOC_HTML music-filter.txt -$ASCIIDOC_HTML a2x.1.txt -$ASCIIDOC_HTML asciimath.txt diff -Nru asciidoc-8.6.10/examples/website/CHANGELOG.txt asciidoc-10.1.2/examples/website/CHANGELOG.txt --- asciidoc-8.6.10/examples/website/CHANGELOG.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/CHANGELOG.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,3213 +0,0 @@ -AsciiDoc ChangeLog -================== - -:website: http://asciidoc.org/ - - -Version 8.6.10 (2017-09-22) ---------------------------- -.Additions and changes -- Improve reproducibility of builds (e.g. support SOURCE_DATE_EPOCH) -- Add SVG output support -- Improve documentation -- Update translations -- Full list of changes is at https://github.com/asciidoc/asciidoc/compare/asciidoc:8.6.9...asciidoc:8.6.10 - -Version 8.6.9 (2013-11-09) --------------------------- -.Additions and changes -- 'html5', 'xhtml11' and 'slidy' outputs now wrap 'pre' element - contents at right margin (see -https://groups.google.com/group/asciidoc/browse_thread/thread/9877a316b7a47309). -- Vim syntax file: highlight line breaks in lists (patch submitted by - Alex Efros). See - https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a). -- Vim syntax file: fixed highlighting of lines with spaces preceding - an indented paragraph. See - https://groups.google.com/group/asciidoc/browse_thread/thread/5145e4c0b65cde0a -- Vim syntax file: dropped ')' from list of illegal characters - following opening quote. See - https://groups.google.com/group/asciidoc/browse_thread/thread/1a60eb4507a0555f/264c39c6a89fc7a0 -- Added {plus} intrinsic attribute. See - http://code.google.com/p/asciidoc/issues/detail?id=14 -- Allow `tabsize=0 in` configuration file. See - https://groups.google.com/group/asciidoc/browse_thread/thread/c88457020288ce1d -- Removed 'wordpress' backend into the blogpost project (where it - belongs) as an AsciiDoc backend plugin. -- Added HTML5 footer badges. -- Added favicon to AsciiDoc website. -- Changed AsciiDoc website domain to 'asciidoc.org'. -- Vim syntax file: closing quote character cannot be immediately - followed by same closing quote character. -- Documentation updates. -- If admonition icons are embedded using the Data URI Scheme and the - icons directory is undefined or does not exist then the 'iconsdir' - attribute is set to the location of the icons installed in the - AsciiDoc configuration directory. -- Updated `./stylesheets/pygments.css` from pygments 1.4. -- HTML backends: Align inline images to text-bottom. -- html4 backend: Added 'hr' attribute to make the inter-section - horizontal ruler element optional. -- Documented 'Callout lists cannot be used within tables'. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/268f9b46ebc192d3 -- Removed Vim related stuff from the installer makefile. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 - and - https://groups.google.com/group/asciidoc/browse_thread/thread/cd07629fa7a53fb3 -- Dropped `vim/ftdetect/asciidoc_filetype.vim` from distribution, the - file detection was broken and the default settings satisfied noone. -- Vim syntax highlighter: increase sync backtracking to catch changes - to large block elements. -- Added Romanian language configuration file. Contributed by Vitalie - Lazu. See - https://groups.google.com/group/asciidoc/browse_thread/thread/2fe14a10dbf20d20/27726e7e13f7bfc7?lnk=gst&q=romanian#27726e7e13f7bfc7 -- Added ruler and line-break outputs to HTML Help outputs. Patch - submitted by DonM. See - https://groups.google.com/group/asciidoc/browse_thread/thread/b131d0155eccd73e -- Added Czech language configuration file. Contributed by Petr Klíma. -- html4 backend: allow embedded images and icons (data-uri - attribute). -- html4 backend: table and example block caption place at bottom for - consistency. -- html4 backend: dropped border around example block. -- html4 backend: cellpaddings made equal to 4 for consistency. -- Vim syntax highligher: Highlight closing OpenBlock delimiter when it - immediately follows a list. -- Updated html5 backend (previous commit was xhtml11 only). See: - https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 -- Embedded data-uri images now figure file mimetype from file contents - rather than the file extension. Patch submitted by Lex Trotman. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/dbdfaf838f93e020 - -.Bug fixes -- `indexterm2:[]` macro syntax now recognized. See - https://groups.google.com/group/asciidoc/browse_thread/thread/1b3f1a0f0a21425e -- Synthesised `*-option` attributes for options set in table conf file - style entries. See - https://groups.google.com/group/asciidoc/browse_thread/thread/8aa340a3069ef5f1/a727a8a564eea76c -- Makefile: Fixed sh compatibility issue. See - https://groups.google.com/group/asciidoc/browse_thread/thread/753a52b2af85fcfc/04c9091b0856fc13 - - -Version 8.6.8 (2012-07-17) --------------------------- -.Release highlights -Added full complement of styles to 'Open Blocks' and 'Normal -Paragraphs' -- those with a minimalist bent could construct virtually -any document using just Title, Normal Paragraph and Open Block -syntaxes. - -.Other additions and changes -- Increased default maximum include depth from 5 to 10. -- Emit warning if maximum include depth is exceeded. -- Suppress repeated console messages. -- Music filter: removed '--beams=None' option from abc2ly invocation - because it is broken on LilyPond 2.14 (Ubuntu 12.04). -- Replaced obsolete '' tag with '' in HTML backends. -- Allow configuration attribute entries to create a new section - (previously you could only modify existing sections). See: - https://groups.google.com/group/asciidoc/browse_thread/thread/7be28e9714f249c7[discussion - list]. -- Documented `{wj}` (word-joiner) attribute and updated FAQ. See: - https://groups.google.com/group/asciidoc/browse_thread/thread/961a957ab5872ebf[discussion - list]. -- FAQ: Added 'How can I place a footnote immediately following quoted - text?' See - https://groups.google.com/group/asciidoc/browse_thread/thread/961a957ab5872ebf[discussion - list]. -- Added Greek language configuration file. Contributed by Michael - Dourmousoglou. See - https://groups.google.com/group/asciidoc/browse_thread/thread/9e79d8494ef8d870[discussion - list]. -- FAQ: Added 'Using roles to select fonts for PDF'. Submitted by Lex - Trotman and based on solution by Antonio Borneo. See: - https://groups.google.com/group/asciidoc/browse_frm/thread/64b071bb21de9cf0[discussion - list]. -- Apply same monospaced font size to all monospaced text. -- Changed '0' number padding to spaces in numbered GNU - source-highlight outputs. -- Allow 'highlight' source highlighter to use 'python' for Python - `{language}` name. r1142: Update the AsciiDoc 'source' filter to - allow the use of the 'highlight' source code highlighter. See - https://groups.google.com/group/asciidoc/browse_frm/thread/e045c9986c71d72a[discussion - list]. -+ -NOTE: The 'pygments' attribute has been deprecated in favor of the new -'source-highlighter' attribute. - -- Vim syntax highlighter: Don't confuse trailing open block delimiter - with section underline. -- Added 'skip' option to paragraphs (c.f. Delimited Block 'skip' - option). - -.Bug fixes -- *FIXED*: latex, music and graphviz filters: When the filter output - image is data-uri encoded write it to the indir (instead of the - outdir) so that encoder can find it. See - https://groups.google.com/group/asciidoc/browse_thread/thread/f5174f450a61f14b[discussion - list]. -- *FIXED*: Escape the ']' character inside inline macros. See - https://groups.google.com/group/asciidoc/browse_thread/thread/db3b734a6931cb74[discussion - list]. -- *FIXED*: source highlighter filter: Pass 'role' attribute to HTML - backends. -- *FIXED*: source highlight filter: docbook backend: 'role' attribute - was not passed to listings without a title. Patch submitted by Lex - Trotman. See - https://groups.google.com/group/asciidoc/browse_thread/thread/13c9ee97930342b3[discussion - list]. -- *FIXED*: music2png.py: 'FOPException: Raster ByteInterleavedRaster' - error (FOP 1.0, ImageMagick 6.6.9-7). - - - -Version 8.6.7 (2012-03-17) --------------------------- -.Release highlights -No major enhancements but quite a few bug fixes which, among other -things, fixes Jython compatibility and improves Windows compatibility. - -.All additions and changes -- Vim syntax highlighter: highlight entity refs in macro arguments. -- Added files with `.asciidoc` extension to Vim file type detection. - http://groups.google.com/group/asciidoc/browse_thread/thread/a9762e21ec0cc244/5d3a4ebf20e6847e[Patch] - submitted by Dag Wiers. -- Added 'replacement3' substitution to enable - http://groups.google.com/group/asciidoc/browse_thread/thread/843d7d3d671006fb/25628e14c829db3f[ODT - whitespace processing]. -- Added 'unbreakable' option to XHTML and HTML 5 backends. -- Implemented toc::[] block macro and 'toc-placement' attribute for - HTML backends to allow the Table of Contents placement to be set - manually by the author. -- Added FAQs: 'How can I control page breaks when printing HTML - outputs?' and 'Is it possible to reposition the Table of Contents - in HTML outputs?'. -- Added `--backend` and `--backend-opts` options to the 'a2x' command - to allow 'a2x' to use backend plugin code extensions. - http://groups.google.com/group/asciidoc/browse_thread/thread/b8e93740b7cd0e1d/b5e0b83fe37ae31a[Patch] - submitted by Lex Trotman. -- Added - http://groups.google.com/group/asciidoc/browse_thread/thread/3d06b0105dfbb780/8c60eb7a62f522e4[args - block attribute] to source highlight blocks to allow arbitrary - parameters to be passed to the source highlighters. -- If the 'ascii-ids' attribute is defined then non-ascii characters in - auto-generated IDs - http://groups.google.com/group/asciidoc/browse_thread/thread/33e99b78e2472122[are - replaced] by their nearest ascii equivalents (to work around DocBook - processor limitations). -- Added global 'blockname' attribute which is dynamically updated to - identify the current block. See - http://groups.google.com/group/asciidoc/browse_thread/thread/8200e29815c40f72[discussion - list]. -- 'xhtml11', 'html5' backends: Include book part TOC entries for - multi-part books. Patch submitted by Loïc Paillotin. -- Removed code filter example from the AsciiDoc User Guide so that - backends implemented as external plugins can compile the manual. See - http://groups.google.com/group/asciidoc/browse_thread/thread/849e5ea91f43adf2[discussion - list]. -- If the delimited block 'skip' option is set then do not consume - block title and attributes. This makes it possible for the comment - delimited blocks to use an attribute list (previously the comment - delimited block was hardwired to skip preceding attributes and - titles). See - http://groups.google.com/group/asciidoc/browse_thread/thread/e92a75abcc382701[discussion - list]. -- Added `backend-confdir` intrinsic attribute. - -.Bug fixes -- *FIXED*: slidy backend: broken 'stylesheet' attribute. - http://groups.google.com/group/asciidoc/browse_thread/thread/58d0843ae4345afd[Patch] - submitted by Micheal Hackett. -- *FIXED*: Restored - http://groups.google.com/group/asciidoc/browse_thread/thread/b0e69e393b6f9f20/47a2c7586f9e40c6?lnk=gst&q=themes+tarball#47a2c7586f9e40c6[missing - themes] to zip file distribution archive. -- *FIXED*: Grammatical error in error messages. - http://groups.google.com/group/asciidoc/browse_thread/thread/b9d705c6b6b39f59/1e120483dafca109[Patch] - submitted by Dag Wieers. -- *FIXED*: Use configured normal substitution in preference to the - default one. -- *FIXED*: The 'eval' block macro would execute multiple times if it - evaluated to 'None'. -- *FIXED*: Duplicated entries in TOC of large document. - http://groups.google.com/group/asciidoc/browse_thread/thread/103445ab9d95cb0c[Patch] - submitted by Sebastien Helleu. -- *FIXED*: Python 2.4 backward - http://code.google.com/p/asciidoc/issues/detail?id=9[incompatibility]. -- *FIXED*: 8.6.6 regression broke Jython compatibility. See - http://groups.google.com/group/asciidoc/browse_thread/thread/4608b77ec289f6c4[discussion - list]. -- *FIXED*: Leaky file handles in a2x and music and latex filters which - created incompatibility problems for Jython. -- *FIXED*: All Python filters are executed with the same Python - interpreter that executes the asciidoc parent (previously filters - were hardwired to execute the 'python' interpreter). This prevents - http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b/3af3b4e57b827c78?lnk=gst&q=archlinux#3af3b4e57b827c78[Python - mix-ups]. -- *FIXED*: Microsoft Windows shelled command-line truncation that - caused shelled commands to fail e.g. the 'data-uri' attribute - failure. - - -Version 8.6.6 (2011-09-04) --------------------------- -.Release highlights -- The AsciiDoc plugin architecture has been enhanced, unified and - extended: - * Plugin commands have been added to the asciidoc(1) `--backend` - option. - * An asciidoc(1) `--theme` option has been implemented to specify a - theme and to manage theme plugins. - * A plugin 'build' command (for creating plugins) added. - * 'build', 'install', 'list' and 'remove' plugin commands are all - recognized by asciidoc(1) `--backend`, `--filter` and `--theme` - options. -- A security update by Kenny MacDermid removes the use of `eval()` on - untrusted input (to disallow code malicious execution). - -.All additions and changes -- 'xhtml11', 'html5': Made verse and quote block text darker to print - legibly in Google Chrome browser. -- Added plugin 'build' command for plugin file creation. -- Merged `--help plugins` back to `--help manpage` so it matches the - asciidoc(1) manpage. -- The `--filter` command-line option can specify the name of filters - that will be unconditionally loaded. -- If a filter directory contains a file named `__noautoload__` then - the filter is not automatically loaded (you can used the `--filter` - command-line option to override this behavior). -- tests: Add Italian language tests. Patch submitted by Simon - Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a -- tests: Add tests for localized man pages. Patch submitted by Simon - Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/5e2e6f4dd740d51a -- If the section name is prefixed with a '+' character then the - section contents is appended to the contents of an already existing - same-named section (the default behavior is to replace the the - section). -- If a configuration file section named 'docinfo' is loaded then it - will be included in the document header. Typically the 'docinfo' - section name will be prefixed with a '+' character so that it is - appended to (rather than replace) other 'docinfo' sections. -- Added `{sp}` intrinsic attribute for single space character. See - http://groups.google.com/group/asciidoc/browse_thread/thread/a839aa01db0765d2 -- Fixed TOC and footnotes generator. Patch submitted by Will. See - http://groups.google.com/group/asciidoc/browse_thread/thread/734ac5afed736987 -- The `asciidoc-confdir` attribute is set to the asciidoc executable - directory if it contains global configuration files i.e. a local - asciidoc installation. -- asciidoc now throws an error instead of just a warning of the - backend configuration file is not found. -- latex filter: write MD5 file after successful PNG file generation. - Always delete temp files irrespective of outcome. -- Added truecolor option to LaTeX filter. Patch submitted by Michel - Krämer. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851 -- Unit test for table column specifiers with merged cells. Patch - submitted by Simon Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a -- Added verbose message for `ifeval::[]` macro evaluation. -- Added test case for `ifeval::[]` evaluation. -- Security update to remove the use of `eval()` on untrusted input (to - disallow code malicious execution). Patch submitted by Kenny - MacDermid. -- Changed web site layout from table to CSS based. See - http://groups.google.com/group/asciidoc/browse_thread/thread/ec8e8481eb0e27b0/d1c035092b5bb7a4?lnk=gst&q=caption+option#d1c035092b5bb7a4 -- a2x: Pass `--format` option value to asciidoc as 'a2x-format' - attribute. Patch submitted by Lex Trotman - (http://groups.google.com/group/asciidoc/browse_thread/thread/3e177b84bc133ca9/659796dfadad30ea?lnk=gst&q=a2x+format#659796dfadad30ea). -- Added two FAQs submitted by Lex Trotman. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/16d3fb9672a408e7 -- html5,xhtml11: Implemented themes directory structure. -- html5,xhtml11: Implemented asciidoc `--theme` management option - (install, list, build and remove commands). -- html5,xhtml11: A theme can now optionally include a JavaScript file - `.js` -- html5,xhtml11: If the 'data-uri' attribute is defined then icons - from the theme icons directory (if they exist) will be embedded in - the generated document. -- Added optional 'warnings' argument to include macros. -- The asciidoc `--verbose` option now prints file inclusion messages. -- xhtml11, html5: Remove necessity for separate manpage CSS files. -- Added 'css-signature' attribute to tests. -- Add 'css-signature' attribute to set a CSS signature for the - document. Patch submitted by Peg Russell, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/bacbf8aeb8ad6a3a -- White background for toc2 TOC viewport so that horizontally scrolled - content does not obscure the the TOC. Patch submitted by Lionel - Orry, see: http://code.google.com/p/asciidoc/issues/detail?id=8 - -.Bug fixes -- *FIXED*: Plugin install command: Delete backend directory is install - fails. -- *FIXED*: Plugin install command: Fixed bug extracting binary files - on Windows (reported by Jean-Michel Inglebert). -- *FIXED*: tests: Skip blank sections in testasciidoc.conf test - configuration file instead of throwing an exception (reported by - Jean-Michel Inglebert). -- *FIXED*: If a plugin Zip file does not contain file permissions - (probably because it was created under Windows) then install it - using the default permissions. -- *FIXED*: Fixed missing quote in preceding LaTeX filter patch. Fix - submitted by Simon Ruderich. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/6436788a10561851 -- *FIXED*: Some path attributes were processed as escaped Python - strings which could result in corrupted path names with backslash - separated Windows path names. Reported by Will. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/e8f3938bcb4c8bb4/44d13113a35738ef -- *FIXED*: Vertically spanned table cells resulted in incorrect column - styles being applied to some cells. Reported by Will: - http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a/9afc4559d51e1dbd -- *FIXED*: LaTeX backend: fixed bad escapes. Patch submitted by Mark - McCurry: - http://groups.google.com/group/asciidoc/browse_thread/thread/8c111f1046b33691/158a944cf4d5ff0d?lnk=gst&q=latex+escapes#158a944cf4d5ff0d -- *FIXED*: When using slidy backend, display of characters with - accents is wrong because of 'meta http-equiv' line missing. Reported - by Fabrice Flore-Thebault. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/eaf25f21d1da180a - - -Version 8.6.5 (2011-05-20) --------------------------- -.Release highlights -- The addition of an 'html5' backend to generate HTML 5 output. Apart - from the inclusion of 'audio' and 'video' block macros the 'html5' - backend is functionally identical to the 'xhtml11' backend. - -- A new 'flask' theme for 'xhtml11' and 'html5' backends inspired by - the http://flask.pocoo.org/docs/[Flask website] styling (see 'toc2' - example in the next item below). - -- The new 'toc2' attribute generates a table of contents in - the left hand margin ('xhtml11' and 'html5' backends). - link:article-html5-toc2.html[This example] was generated using - the following command: - - asciidoc -b html5 -a icons -a toc2 -a theme=flask article.txt - -- `a2x(1)` now has a flexible mechanism for copying arbitrary - resource files to HTML based outputs -- this is very handy for - generating EPUB files with embedded fonts and other resources. - - * The `a2x(1)` `--resource` option can be used to inject any file - into EPUB output documents e.g. CSS resources such as fonts and - background images. - * Explicitly specified resources are added to the EPUB OPF manifest - automatically. - * You can explicitly specify file extension MIME types. - * The enhanced resource processing works around a couple of DocBook - XSL bugs (see link:epub-notes.html[EPUB Notes]). - -.All additions and changes -- A new 'flask' theme for 'xhtml11' and 'html5' backends. A shameless - knock-off of the http://flask.pocoo.org/docs/[Flask website] - styling. -- Added HTML 5 article with 'toc2' table of contents to the example on - the AsciiDoc website home page. -- Added 'filters' and 'topics' help topics. Fixed documentation - errors in help text. Patch submitted by Lionel Orry, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/9da9d48a6461ff14 -- Pass parent configuration files, command-line attributes and header - attributes to table asciidoc filters. Based on patch submitted by - Simon Ruderich, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/5c792cbb395b753b -- Allow a 'title' attribute entry in the document header so that HTML - backends can set the 'title' element separately from the displayed - document title (the 'doctitle' attribute). -- Pass 'lang' attribute to 'asciidoc' table style filter. Patch - submitted by Simon Ruderich, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/e2100b7cb29283ce -- xhtml11,html5: Added 'toc2' attribute which generates a scrollable - table of contents in the left hand margin. Based on customized CSS - written by Suraj Kurapati, see - http://groups.google.com/group/asciidoc/browse_thread/thread/c5e30ee5555877f5 -- Added 'asciidoc-confdir' intrinsic attribute which expands to the - global conf directory. -- Documented that you can specify multiple CSS files with the a2x(1) - `--stylesheet` command option. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/baf3218551d05a05 -- Improved xhtml11 backend's table of contents generation latency. - Patch submitted by Hongli Lai. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/5a7fe64fbfd65ad -- Added html5 backend. -- For consistency converted all DOS formatted configuration and text - files to UNIX format. -- html4: Added ability to use 'role' attribute with most block - elements. Patch contributed by Simon Ruderich. See - http://groups.google.com/group/asciidoc/browse_thread/thread/5620ba634fdb030a -- Added Dutch language configuration file and accompanying test file - (contributed by Dag Wieers, see - http://groups.google.com/group/asciidoc/browse_thread/thread/f969b9ce987d7f5d). -- Configuration files are loaded in two passes when the -e - command-line option is used (the same behavior as when the -e option - is not used). Patch submitted by haad. See - http://groups.google.com/group/asciidoc/browse_thread/thread/cd0f47495fd04181 - and - http://code.google.com/p/asciidoc/issues/detail?id=6&q=label%3APriority-Medium -- Documented how to include embedded fonts in an EPUB document. -- a2x: Added `.=` resource specifier syntax. -- a2x: Enable admonition icons in example EPUBs. -- a2x: allow environment variables and tilde home directories in - resource manifest files. -- a2x: don't process non-existent resource directories. -- a2x: assume resource option is a directory if the name ends with a - directory separator. -- a2x: Added a new syntax to the `--resource` option specifier which - allows the destination path to be specified. -- a2x: Copy resources referenced in the OPF and resources referenced - by the generated HTML (in theory DocBook XSL should ensure they are - identical but this is not always the case e.g. - http://sourceforge.net/tracker/?func=detail&atid=373747&aid=2854075&group_id=21935). -- Drop border from callout list image links. -- html4: Moved manpage NAME section out of header so that the name - section is rendered when the asciidoc(1) `--no-header-footer` option - is specified (so that manpages processed blogpost include the NAME - section). -- Vim syntax highlighter: TODO markers now appear in list items and - literal paragraphs and blocks. -- Constrained quotes can now be bounded on the left by a } character. - See: - http://groups.google.com/group/asciidoc/browse_thread/thread/b24cc3362f35b801 -- Added text-decoration roles (underline, overline, line-through, - blink) for xhtml11 and html5 outputs. - -.Bug fixes -- *FIXED*: epubcheck 1.1 previously issued a warning for files not - registered in the manifest (epubcheck 1.0.5 did not). This resulted - in a problem compiling the adventures-of-sherlock-holmes.txt example - (the `underline.png` resource was not in the manifest). - - -Version 8.6.4 (2011-02-20) --------------------------- -.Additions and changes -- Added text foreground and background color along with text size CSS - styles for XHTML outputs, see {website}userguide.html#X96[]. -- Vim syntax highlighter: highlight macros that start with an - attribute reference (a common idiom). -- Vim syntax highlighter: highlight attribute references in macro - attribute lists. -- Attribute entries can be used to set configuration markup templates. -- Double-width East Asian characters in titles now correctly match the - title underline widths. Submitted by Changjian Gao (see - http://groups.google.com/group/asciidoc/browse_thread/thread/77f28b0dfe60d262). -- Implemented {website}manpage.html[asciidoc(1)] filter commands, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/40c64cd33ee1905c -- User's home directory now calculated in a platform independent - manner. -- Added double-quote characters to French language file. Patch - contributed Yves-Alexis Perez, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 -- Vim Syntax highlighter: Highlight closing OpenBlocks which - immediately follow a literal paragraph. -- Changed UNIX `/dev/null` to OS independent `os.devnull` in filters - code. Suggested by Henrik Maier: - http://groups.google.com/group/asciidoc/browse_thread/thread/5ac8e8ea895147e9 -- Vim syntax highlighter: Single and double quoted text now highlights - correctly when preceded by an attributes list. -- Added Ukrainian language file (`lang-uk.conf`). Added double-quote - characters to Russian language file.conf). Patches contributed by - Lavruschenko Oleksandr, see - http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 -- Single and double quote characters are now set using the `{lsquo}`, - `{rsquo}`, `{ldquo}` and `{rdquo}` attributes. This makes is easy to - customise language specific quotes. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/e15282f072413940 -- Implemented 'conf-files' attribute to allow configuration files to - be specified in the source document. Suggested by Lex Trotman, see: - http://groups.google.com/group/asciidoc/browse_thread/thread/b11066a828ab45b9 - -.Bug fixes -- *FIXED*: Auto-generated section title ids are now Unicode aware. -- *FIXED*: Setting 'quotes' configuration entries using document - attribute entries failed if the attribute entry was not in the - document header. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/a1dd0562dee8b939 -- *FIXED*: If the input and output file names were different then the - output file name was incorrectly used to synthesize 'docinfo' file - names. Reported by Christian Zuckschwerdt. -- *FIXED*: An error can occur when more than one consecutive quotes - are defined as a blank string. Reported by Peggy Russell. -- *FIXED*: Encoding error in automatically generated author initials. - Patch submitted by Xin Wang. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/f44615dca0b834e9 - - -Version 8.6.3 (2010-11-14) --------------------------- -.Additions and changes -- Added and 'unbreakable' option to bulleted and numbered lists - (thanks to Henrik Maier for this patch). -- Added `ifeval::[]` system macro (thanks to Henrik Maier for - suggesting this feature). -- The image 'scale' attribute sets the DocBook 'imagedata' element - 'scale' attribute. Patch submitted by Henrik Maier. -- DocBook 'preface', 'colophon' and 'dedication' style section titles - now work. Based on patch submitted by Henrik Maier. -- 'a2x': Do not inject xsltproc parameters if they were specified on - the command-line (parameter double-ups generate xsltproc 'Global - parameter already defined' errors). -- 'a2x': Refactored xsltproc parameter injection. -- 'a2x': articles chunked at section level by default. -- 'attributes', 'titles' and 'specialcharacters' sections are now read - from the local `asciidoc.conf` file before the header is parsed. - This fixes a regression problem. See - http://groups.google.com/group/asciidoc/browse_thread/thread/1b3f88f1f8118ab3 -- Document header attributes take precedence over configuration file - attributes. -- Refactored 'music', 'graphviz' and 'latex' filter configurations. -- Refactored source filter configuration and added literal paragraph - source style. -- Separated paragraph styles from paragraph syntax -- any style can be - applied to any syntax. -- Added 'listing' and 'quote' paragraph styles. -- Renamed paragraph 'default' style to 'normal'. -- Updated `--help` option text. -- 'a2x': The `asciidoc_opts`, `dblatex_opts`, `fop_opts` and - `xsltproc_opts` command-line options can be specified multiple - times. This makes embedding multiple 'a2x' options in document - headers easier to manage and less error prone. -- Added ASCIIMathML and LaTeXMathML support to slidy backend. -- Pass the 'encoding' attribute to the Pygments source highlight - filter command. -- 'a2x': HTML Help `.hhk` file named after AsciiDoc source file. -- 'a2x': Added `--xsl-file` option to allow custom XSL stylesheets to - be specified. -- Make builds the man pages. Patch submitted by Sebastian Pipping. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c21c2902c29bae64 - -.Bug fixes -- *FIXED*: Sometimes double backquotes were misinterpreted as inline - literal macros. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/f510ea82a88aaee8 -- *FIXED*: Regression in 8.6.2: command-line attributes were not - available to the global asciidoc.conf. -- *FIXED*: Postponed document title substitutions until backend conf - files have been loaded (8.6.2 regression). See - http://groups.google.com/group/asciidoc/browse_thread/thread/42b63ce90c2563b8 -- *FIXED*: The XSL Stylesheets customizations were preventing chapter - and section level TOCs from being generated when using XSL - Stylesheets via 'a2x'. See - http://groups.google.com/group/asciidoc/browse_thread/thread/42b63ce90c2563b8 -- *FIXED*: ``UnicodeDecodeError: \'ascii' codec can't decode byte'' - error. This error is due to a limitation in the Python HTMLParser - module, see: http://bugs.python.org/issue3932 -- *FIXED*: Broken `--no-conf` option (8.6.2 regression). -- *FIXED*: Regression in 8.6.2: configuration attribute entries set in - the document header may cause a 'FAILED: incomplete configuration - files' error. -- *FIXED*: 'html4': corrected self closed meta tags. -- *FIXED*: 'a2x' regression in 8.6.2: HTML Help `.hhp` file name had - reverted to default name instead of the AsciiDoc source file name. - See: - http://groups.google.com/group/asciidoc/browse_thread/thread/dedc961b23e9ac56 -- *FIXED*: Attributes in man page title caused it to be dropped - resulting in invalid DocBook output. -- *FIXED*: `make uninstall` now deletes the `asciidoc.1` and `a2x.1` - man pages. - - -Version 8.6.2 (2010-10-03) --------------------------- -.Additions and changes -- 'docbook45': Enclosed bibliographic lists in a 'bibliodiv' -- you - can now include block titles with bibliographic lists. -- Added optional 'keywords', 'description' and 'title' document header - meta-data attributes to HTML backends for SEO. -- AttributeEntry values can span multiple lines with a ' +' line - continuation. -- Added 'slidy' backend (based on Phillip Lord's slidy backend - https://phillordbio-asciidoc-fixes.googlecode.com/hg/). -- Implemented 'OpenBlock' 'partintro' style for book part - introductions. -- Comment lines substitute special characters only. -- Backend specific global configuration files (all except - `asciidoc.conf`) are loaded *after* the header has been parsed -- - virtually any attribute can now be specified in the document header. -- 'xhtml11': Volnitsky theme: allow bulleted lists to have intervening - children. -- 'xhtml11': refactored CSS font-family rules to start of file. -- 'xhtml11': list bullets colored gray. -- 'ifdef' and 'ifndef' system block macros accept multiple attribute - names: multiple names separated by commas are 'ored'; multiple - attribute names separated by pluses are 'anded'. -- 'xhtml11': Volnitsky theme: set max-width on labeled lists. -- Vim syntax highlighter: Entities inside quoted text are now - highlighted. -- Added 'role' and 'id' attributes to HTML outputs generated by - 'OpenBlocks'. -- Allow floating titles to generate 'h1' (level 0) titles in HTML - outputs. -- Added a 'start' attribute to numbered lists to set the start number. - See: - http://groups.google.com/group/asciidoc/browse_thread/thread/c14a4c3b1e4f6dc5 -- Added two more docinfo attributes 'docinfo1' and 'docinfo2' to allow - and control inclusion of a shared docinfo file. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c948697943432e24 -- Vim syntax highlighter highlights multi-name conditional attributes. -- LaTeX backend patch submitted by Andreas Hermann Braml (see - http://groups.google.com/group/asciidoc/browse_thread/thread/1c415fc4540ce5e5). -- Implemented 'backend aliases'; renamed `docbook.conf` to - `docbook45.conf` and aliased 'docbook45' backend to 'docbook'; - aliased 'xhtml11' to 'html'. - -.Bug fixes -- *FIXED*: Filter commands located in filter directories local to the - source document that where not in the search 'PATH' where not found. -- *FIXED*: Volnitsky theme: Verseblock font set normal instead of - monospaced. -- *FIXED*: 'xhtml11': Callout icons were not rendered as Data URIs - when 'icons' and 'data-uri' attributes were specified. -- *FIXED*: Long standing bug: nested include macros did not restore - the parent document 'infile' and 'indir' attributes. See: - http://groups.google.com/group/asciidoc/browse_thread/thread/8712a95e95a292a7 -- *FIXED*: 'html4': set preamble ID anchor. -- *FIXED*: 'xhtml11': dropped unusable 'id' and 'role' attributes from - preamble template. -- *FIXED*: Bug in multi-name conditional attributes e.g. `{x,y#}` - fails if x or y is undefined. -- *FIXED*: latex filter not being installed by Makefile. Thanks to - Grant Edwards for this patch. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c4427a3902d130a8 -- *FIXED*: 'a2x': Long-standing bug in a2x which always passes - `--string-param navig.graphics 0` to 'xsltproc', regardless of - whether icons are enabled or not. Reported by Michael Wild: - http://groups.google.com/group/asciidoc/browse_thread/thread/59a610068e4acb58 - - -Version 8.6.1 (2010-08-22) --------------------------- -.Additions and changes -- 'a2x': `--resource-dir` option renamed to `--resource`. -- 'a2x': `--resource` option accepts both file and directory names. -- 'a2x': Added `-m,--resource-manifest` option. -- Added Vim syntax highlighting for quote attribute lists. -- Load 'asciidoc.conf' from all configuration directories before any - other configuration files. This ensures that attributes used for - conditional inclusion are set before backend configuration files are - processed. Previously if you wanted to control global conf file - inclusion your only choice was to modify the global 'asciidoc.conf' - file. -- AsciiDoc 'Quote element' attributes have been simplified and - generalized -- positional color and size attributes and named 'role' - attribute have been replaced by a single positional attribute. - -.Bug fixes -- *FIXED*: 'testasciidoc.py': `BACKEND` command argument was being - ignored. -- *FIXED*: Broken 'docinfo' file functionality in 'html4' and - 'xhtml11' backends (previously the docinfo file was included in - the 'body' instead of the 'header'). - -Regression issues -~~~~~~~~~~~~~~~~~ -This release breaks compatibility with quoted element positional color -and size attributes (HTML backends). To revert to the deprecated quote -behavior define the 'deprecated-quotes' attribute in the global -`asciidoc.conf` file or on the command-line. For a more detailed -explanation of the rationale behind this change see -http://groups.google.com/group/asciidoc/browse_thread/thread/b22603bfb879418c. - - -Version 8.6.0 (2010-08-16) --------------------------- -.Additions and changes -- The AsciiDoc distribution can now be built ``out of the box'' - from the distribution tarball or the Mercurial repository - (provided you have the requisite build applications installed). -- The global configuration files directory is ignored by both - 'asciidoc' and 'a2x' if AsciiDoc configuration files are installed - in the same directory as the asciidoc executable. This change - allows both a system wide copy and multiple local copies of AsciiDoc - to coexist on the same host PC. -- CSS 'quirks' mode is no longer the default 'xhtml11' output - (http://groups.google.com/group/asciidoc/browse_thread/thread/1c02d27d49221aa2). -- Relaxed anchor ID name syntax - (http://groups.google.com/group/asciidoc/browse_thread/thread/5f3e825c74ed30c). -- Added document files: `doc/epub-notes.txt`, - `doc/publishing-ebooks-with-asciidoc.txt`. -- 'a2x': If all other resource locations are exhausted then recursively - search directories named 'images' and 'stylesheets' in the - 'asciidoc' configuration files directory. -- 'a2x': options can also be set in the AsciiDoc source file. If the - source file contains a line beginning with '// a2x:' then the - remainder of the line will be treated as a2x command-line options. -- Added dblatex table-width processing instruction -- tables generated - by dblatex now observe the AsciiDoc table width as a percentage - (thanks to Gustav Broberg for suggesting this enhancement). -- 'a2x': Don't exit if the `--epubcheck` option is set and 'epubcheck' - is missing, issue warning and continue. -- Added a global 'plaintext' attribute for dealing with large amounts - of imported text. -- The author name format has been relaxed, if the the author does not - match the formal specification then it is assigned to the - 'firstname' attribute (previously asciidoc exited with an error - message). -- FAQ and documentation updates. -- Refactored chunked.xsl and epub.xsl files. -- Exchanged article.epub for more relevant book.epub on website. -- Put asciidoc.epub User Guide on website. -- 'a2x': Chunking EPUB and HTML outputs set to a per chapter basis and - the first chapter is separate from preceding contents. -- Changed dates format in example article and books to suppress EPUB - validation error. -- Added 'style' and 'role' CSS classes to xhtml11 section templates. -- Added the 'role' element to xhtml11 backend block templates. -- Suppressed md5 module deprecation warning from music and Graphviz filters. -- Pygments (http://pygments.org/) option added to source code - highlight filter. Based on Pygments source code filter written by - David Hajage - (http://groups.google.com/group/asciidoc/browse_thread/thread/d8d042f5a3021369/8934ebbb8cb7144b). -- xhtml11: Added a new theme (volnitsky). Written and contributed by - Leonid V. Volnitsky. -- xhtml11: Set body element class name to document type. -- Added refentryinfo element and contents (including revdate) to man - page DocBook output. Man pages are now dated using the revdate - attribute value if it has been defined. Based on patch supplied by - Rainer Muller - http://groups.google.com/group/asciidoc/browse_frm/thread/319e5cd94493e330/3fcb83fab067af42. -- Added `{template:...}` system attribute. -- Table of contents attribute 'toc' can now be specified in the - document header. -- Reimplemented music and latex filter -m option functionality when - the input is stdin using MD5 checksums. -- Added 'latex' filter. -- Added auto file name generation to image generating filters - (latex,music, graphviz). -- Added `counter2` and `set2` system attributes (to implement image - auto file name generation). -- Undefined attribute in filter command generates error but does not - exit. -- Attribute substitution proceeds from start line to end line - (previously was in reverse order which was really confusing). -- Tidied up music filter code: - * Format option is optional and default to 'abc' unless Lilypond - notation detected. - * The -m option does not apply to stdin input. -- Added paragraph styles to music and graphviz filters. -- Documented dynamic template names. 753: Graphviz filter can now - generate SVG format images. Patch submitted by Elmo Todurov, see: - http://groups.google.com/group/asciidoc/browse_frm/thread/fe9b33d8f5f1e0af - The xhtml11 SVG Graphviz template marked EXPERIMENTAL. No SVG - support for other backends. -- AsciiDoc template names can now contain embedded attribute - references. -- Added 'legalnotice' tag to `doc/article-docinfo.xml` example. -- xhtml11 backend: Callouts and callout lists display callout icons - when the 'icons' attribute is defined. See - http://groups.google.com/group/asciidoc/browse_frm/thread/8eda3ea812968854 -- Document attribute names are case insensitive everywhere, this makes using -attribute entries more consistent e.g. previously :VERS: had to be refered to -with {vers} ({VERS} did not work). -- Hungarian translation of footer-text (submitted by Miklos Vajna). - See - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72# -- asciidocapi.py 0.1.2: Can now load AsciiDoc script named asciidoc. - See - http://groups.google.com/group/asciidoc/browse_frm/thread/66e7b59d12cd2f91 - Based on patch submitted by Phillip Lord. -- German translation of footer-text (submitted by Simon Ruderich). See - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 -- Pushed HTML footer text into language conf files with the - introduction of a [footer-text] configuration file template section. - See - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 - -.Bug fixes -- *FIXED*: Sometimes multiple double quoted text elements in the same - paragraph were mistakenly seen as starting with an inline literal. - See - http://groups.google.com/group/asciidoc/browse_frm/thread/219c86ae25b79a21 -- *FIXED*: 'localtime' and 'doctime' attributes calculated incorrect - daylight saving / non daylight saving timezones and consequently so - did HTML footers. Patch submitted by Slawomir Testowy. See - http://groups.google.com/group/asciidoc/browse_frm/thread/af652507caf6cec9 -- *FIXED*: Missing selector for 'List of examples' title in DocBook - CSS file. Patch submitted by Laurent Laville. See - http://groups.google.com/group/asciidoc/browse_frm/thread/3f96900f7fbf5620 -- *FIXED*: Broken accents in lang-hu.conf. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/7174cb7598993c72 -- *FIXED*: DocBook XSL generated HTML callout lists are properly - aligned. Submitted by Lionel Orry. See - http://groups.google.com/group/asciidoc/browse_frm/thread/2ff802547b6a75ea -- *FIXED*: Filter execution now occurs prior to filter markup template - substitution to ensure image data URI encoding happens after image - generation (see - http://groups.google.com/group/asciidoc/browse_thread/thread/14e8fcb289a135b). -- *FIXED*: The section numbers no longer increment when the 'numbered' - attribute is undefined (see - http://groups.google.com/group/asciidoc/browse_thread/thread/faa36e9e5c7da019/d24cab3fe363e58d). - - -Version 8.5.3 (2010-01-18) --------------------------- -.Additions and changes -- a2x: Added a2x configuration file options ASCIIDOC_OPTS, - DBLATEX_OPTS, FOP_OPTS, XSLTPROC_OPTS (appended to same-named - command-line options). See - http://groups.google.com/group/asciidoc/browse_frm/thread/ac4b9bfa2116db28 -- Dropped `.hgignore` from the repository. See - http://groups.google.com/group/asciidoc/browse_frm/thread/c17abd175778f5ea -- Don't pass verbose options to asciidoc table filter so that - asciidocapi messages are not discarded. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/c17abd175778f5ea -- Added `./tests/data/lang-pt-BR-test.txt` file to the repository. -- xhtml11: Verse block and verse paragraph content enveloped in a - 'pre' tag (instead of a 'div') so it renders better in text-only - browsers. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/1b6b66adb24e710 -- User Guide: Clarified Passthrough Blocks (suggested by Simon - Ruderich). -- FAQ: 'How can I include lines of dashes inside a listing block?' -- FAQ errata and updates (submitted by Simon Ruderich). -- User Guide errata. -- Simplified 'asciidoc-toc' processing instruction and included lists - of figures, tables, examples and equations in books (i.e. revert to - pre-8.5.0 behavior). -- Attempted to have dblatex recognise the 'asciidoc-toc' processing - instruction but couldn't get it to work. -- Added 'notitle' attribute to allow the document title to be hidden. - - -.Bug fixes -- *FIXED*: Regression: system attribute escaping did not work. -- *FIXED*: Website: broken image links in chunked User Guide. - - -Version 8.5.2 (2009-12-07) --------------------------- -.Additions and changes -- Updated example article and book documents with the recommended - explicit section name syntax (see the 'Special section titles - vs. explicit template names' sidebar in the AsciiDoc 'User Guide'). -- Added Italian language configuration file (contributed by Fabio - Inguaggiato). -- Added 'header' table style. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/a23fea28394c8ca9 -- Pass 'icons', 'data-uri', 'imagesdir', 'iconsdir' attributes to - 'asciidoc' table style filter so that images are rendered in table - cells. -- Pass 'trace' and 'verbose' attributes to 'asciidoc' table style - filter so diagnostic information is printed from table cell source. -- The 'eval' system attribute can be nested inside other system - attributes. -- HTML outputs: Table and figure caption punctuation set to more usual - syntax. -- docbook backend: footnotes can now contain embedded images. See - http://groups.google.com/group/asciidoc/browse_frm/thread/50b28f6941de111a -- CSS tweaks so that tables processed by DocBook XSL Stylesheets have - the default asciidoc xhtml11 backend styling. See - http://groups.google.com/group/asciidoc/browse_frm/thread/dfe5204d5b2c9685 -- Block titles take precedence over section titles to avoid titled - delimited blocks being mistaken for two line section titles (see - http://groups.google.com/group/asciidoc/browse_frm/thread/f0b6f9989f828c3). -- Section title trace displays level and title text. -- FAQ additions. -- Added `{zwsp}` (zero width space) attribute. -- Undefined paragraph styles are reported (previously threw a runtime - error). -- Eliminated empty preamble generation. -- Floating titles now processed in all contexts. -- Implemented auto-lettered appendix names and updated example - documents. -- Section numbering can be disabled in HTML outputs with a - ':numbered!:' AttributeEntry. -- xhtml11: Nicer default quote block styling. -- Exclude floating titles from xhtml11 table of contents. Patch - submitted by Mark Burton (see - http://groups.google.com/group/asciidoc/browse_frm/thread/14aefc1cb6bd85f5). -- Enhanced `doc/article-docinfo.xml` example docinfo file. -- Vim syntax highlighter improvements. - -.Bug fixes -- *FIXED*: Absolute 'imagesdir' and 'iconsdir' attribute path names - do not work with the xhtml11 data-uri encoding. See - http://groups.google.com/group/asciidoc/browse_frm/thread/cb8b7694bbc82a6 -- *FIXED*: Regression issue with inline data-uri images. See - http://groups.google.com/group/asciidoc/browse_frm/thread/cb8b7694bbc82a6 -- *FIXED*: An unexpected error occurred when processing a table - containing CSV data if the 'cols' attribute was not explicitly - specified. See - http://groups.google.com/group/asciidoc/browse_frm/thread/4b0f364b477ec165 - - -Version 8.5.1 (2009-10-31) --------------------------- -.Additions and changes -- If an AsciiDoc document file begins with a UTF-8 BOM (byte order - mark) then it is passed transparently through to the output file. - The BOM is stripped from included files. See - http://groups.google.com/group/asciidoc/browse_frm/thread/e5e61823ff4203cd -- Added AsciiDoc 'role' attribute to quoted text. Sets 'class' - attribute in HTML outputs; 'role' attribute in DocBook outputs. See: - http://groups.google.com/group/asciidoc/browse_frm/thread/2aa3e5711d243045 -- Conditional attribute syntax extended: they now accept multiple ORed - or ANDed attribute names. -- The 'xhtml11' backend dynamically processes footnotes using - JavaScript. -- Tidied up and namespaced 'xhtml11' JavaScript. -- Superceded `javascripts/toc.js` with `javascripts/asciidoc-xhtml11.js`. -- Added 'disable-javascript' attribute ('xhtml11' backend). -- Styled HTML footnotes. -- Added links to HTML footnote refs. -- Added title attribute to inline image macros to display popup - ``tooltip'' (HTML outputs only). -- Single-quoted attribute values are substituted in block macros (just - like the AttributeList element). -- For consistency changed underscores to dashes in attribute names. - Public attributes with underscores retained for compatibility. -- Added Brazilian Portuguese language configuration file (contributed - by Thiago Farina). -- Added 'leveloffset' attribute to make it easier to combine - documents. - -.Bug fixes -- *FIXED:* a2x: `--dblatex-opts` is now processed last so - `asciidoc-dblatex.xsl` params can be overridden. Patch submitted by - Mark Fernandes (see - http://groups.google.com/group/asciidoc/browse_frm/thread/5215c99dcc865e7d). -- *FIXED:* An error occurred if a directory in current path with same - name as executable. - -Regression issues -~~~~~~~~~~~~~~~~~ -There's been quite a bit of tiding up to the xhtml11 JavaScript. The -most obvious change is that the toc.js script has been superceded by -asciidoc-xhtml11.js so if you're linking you'll need get a copy of -the new file from the distribution javascripts directory. - -If you use customised xhtml11 configuration file `[header]` and -`[footer]` sections and you want them to use the new footnotes feature -then you've got a bit more work to do: - -. The onload event expression changed. -. The new `
    ...
    ` div envelopes document - content. -. You need to add `
    ...
    ` div to the - `[footnotes]` section for footnotes to work. -. Drop the `ifdef::toc[]` macro that surround JavaScript inclusion. - -Take a look at the [header] and [footer] changes in the xhtml11.conf -diff to see what's going on: -http://hg.sharesource.org/asciidoc/diff/55a5999bfd04/xhtml11.conf - - -Version 8.5.0 (2009-10-04) --------------------------- -.Additions and changes -- Implemented a 'float' attribute for tables and block images (HTML - outputs only). -- Added `unfloat::[]` block macro to cancel floating. -- Added table 'align' attribute to (HTML outputs only). -- The image 'align' attribute now works with HTML backends. -- Renamed table cell 'align' attribute to 'halign' so it doesn't clash - with the new table 'align' attribute. -- Added 'breakable' and 'unbreakable' options to AsciiDoc example and - block image elements. -- `[miscellaneous]` section entries now update properly when set from - a document 'AttributeEntry'. -- `[miscellaneous]` section `pagewidth` entry accepts fractional - values. -- Fractional column widths are now calculated correctly when using - fractional 'pageunits' (DocBook tables). -- Use DocBook XSL table width processing instructions. -- asciidoc 'KeyboardInterrupt' exits with error code 1. -- Added 'set' system attribute to allow attributes to be set from - configuration file templates. -- Allow constrained quotes to be bounded on the left by a colons and - semicolons, see - http://groups.google.com/group/asciidoc/browse_frm/thread/b276a927fdc87995 -- Titled listing and literal blocks (DocBook outputs) no longer default - to examples. See - http://groups.google.com/group/asciidoc/browse_frm/thread/f4df7c9eec01a9bd -- Updated language file table, figure and example captions to - accommodate new auto-numbering in html4 and xhtml11 backends. -- Titled source highlight filter listings generated by docbook backend - are now rendered as examples. See - http://groups.google.com/group/asciidoc/browse_frm/thread/f4df7c9eec01a9bd -- Implemented 'counter' system attribute. -- Use 'counter' system attributes to number titled tables and block - images in HTML backends. -- Added program name suffix to console messages. -- Added substitution to the 'AttributeEntry' passthrough syntax, this - replaces the now unnecessary 'attributeentry-subs' attribute. -- Allow passthrough inline macro syntax to be used in - 'AttributeEntrys'. -- Reinstated 8.4.4 default 'lang' attribute behavior. See - http://groups.google.com/group/asciidoc/browse_frm/thread/d29924043e21cb6a. -- Added 'max-width' attribute to the 'xhtml11' backend to set maximum - display width. See - http://groups.google.com/group/asciidoc/browse_frm/thread/74d9a542b79ccd50. -- Added 'a2x.py', a rewritten and much enhanced version of the old - 'a2x' bash script. -- The new 'a2x' can output EPUB formatted documents. -- Added `--safe` option and deprecated `--unsafe` option. Patch - submitted by Todd Zullinger. See - http://groups.google.com/group/asciidoc/browse_frm/thread/ea3a8ea399ae5d2a - and - http://groups.google.com/group/asciidoc/browse_frm/thread/69b3183fdab7c6a5 -- Added 'CHECK' and 'TEST' todo highlight words to Vim syntax - highlighter. -- Line breaks, page breaks, and horizontal rulers are now processed by - dblatex, thanks to a patch submitted by Mark Fernandes - (http://groups.google.com/group/asciidoc/browse_frm/thread/a254cf949ea7c6c5). -- Allow footnote macros hard up against the preceding word so the - rendered footnote mark can be placed against the noted text without - an intervening space (patch submitted by Stas Bushuev, - http://groups.google.com/group/asciidoc/browse_frm/thread/e1dcb7ee0efc17b5). -- Normalized path in `safe_filename` function (submitted by Todd - Zullinger, - http://groups.google.com/group/asciidoc/browse_frm/thread/69b3183fdab7c6a5). -- The Asciidoc 'numbered' and 'toc' attributes cause DocBook outputs - to include `asciidoc-numbered` and `asciidoc-toc` processing - instructions, these are used by DocBook XSL to include section - numbering and table of contents (like Asciidoc HTML backends). For - backward compatibility both 'numbered' and 'toc' attributes are - defined by default when the 'docbook' backend is used. See - http://groups.google.com/group/asciidoc/browse_frm/thread/1badad21ff9447ac. -- 'data-uri' attribute is now evaluated dynamically and can be set in - document body (previously could only be set from command-line). -- Added 'sys3' and 'eval3' system attributes to passthrough generated - output, this fixes the data-uri inline image problem: - http://groups.google.com/group/asciidoc/browse_frm/thread/a42db6bc54c2c537. -- Missing language file generates a warning instead of an error. -- Updated Spanish language file (updates contributed by Gustavo Andrés - Gómez Farhat). - -.Bug fixes -- *FIXED:* Options in an 'AttributeList' option attribute are merged - with (rather than replace) configuration file options. -- *FIXED:* Comment blocks and comment block macros no longer consume - preceding block titles and attribute lists. -- *FIXED:* `examples/website/layout1.conf` and - `examples/website/layout2.conf` TOC problem. Submitted by Mark - (burtoogle). See - http://groups.google.com/group/asciidoc/browse_frm/thread/b9c63be67dd1d11c -- *FIXED:* Only the first occurrence of passthrough macro was - substituted. Patch submitted by Peter Johnson. See - http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c -- *FIXED:* asciidoc now runs on Jython 2.5.0. -- *FIXED:* Wordpress margins and pads in a number of block - elements - (http://groups.google.com/group/asciidoc/browse_frm/thread/36ff073c79cbc20a). - -Regression issues -~~~~~~~~~~~~~~~~~ -- Tables generated by 'dblatex' occupy 100% of the available space - regardless of the 'width' attribute setting. To restore width - behavior change the 'pageunits' miscellaneous parameter to 'pt'. You - can do this from the command-line with the `-a pageunits=pt` option. - See {website}userguide.html#X89[DocBook table widths]. - - -Version 8.4.5 (2009-05-24) --------------------------- -.Additions and changes -- Added manpage 'Name' and 'Synopsis' section title customization to languages - configuration files. -- Synopsis manpage section no longer mandatory. -- Section markup templates can be specified by setting the title's - first positional attribute or 'template' attribute. -- The article and book document header can now include a revision - remark. -- A 'role' attribute can now be applied to block elements. This adds - the 'role' attribute to DocBook elements. Patch submitted by - http://groups.google.com/group/asciidoc/browse_thread/thread/62278a054188a038[Noah - Slater]). -- Renamed 'revision' and 'date' attributes to more sensible and consistent - 'revnumber' and 'revdate' (old names deprecated but still - recognized). -- Moved backend specific attributes to Appendix H in User Guide. -- Renamed and generalized the docbook backend revision history - inclusion mechanism to 'docinfo' to reflect the use of all article - or book information elements. The old revision history names still - work but have been deprecated. -- Refactored docbook.conf headers. -- Moved line break replacement from `[replacements]` to - `[replacements2]` so the replacement occurs after the mailto macro. - This fixes bug - http://groups.google.com/group/asciidoc/browse_thread/thread/4bdcdfb0af773e2 -- The typewriter to punctuation apostrophe replacement can be escaped - with a backslash. -- Graphviz filter outputs images to 'imagesdir' if it is defined. -- Made the block image macro generic so that it can be used for filter - outputs. As a result Music and Graphviz filters: - * Have been greatly simplified. - * Honor the 'data-uri' attribute. - * 'html4' outputs no longer generate W3C validation warning. -- The 'iconsdir' attribute no longer requires a trailing directory - separator character. -- Removed borders around linked html4 images. -- Added 'html4' specific HTML output for music filter. -- 'a2x': Added `--unsafe` option (shortcut for - `--asciidoc-opts=--unsafe`). -- 'a2x': The FOP executable can now be named `fop` (this is the - default name in some distributions). -- Attributes are now substituted in the system macro attribute list. -- If the output is set to stdout (i.e. no output directory is defined) - then Music and Graphviz filters will output included images to the - source file directory. -- Added 'name' directive to 'testasciidoc'. -- Added lots of 'testasciidoc' new tests. -- Moved language specific configuration parameters into `lang-en.conf` - file. -- 'lang' attribute entry can be specified in the AsciiDoc source file - (preceding the header). -- Removed cruft from A-A-P scripts and documented them. -- Added German language config file (`lang-de.conf`) contributed by - Michael Wild. -- Added French language config file (`lang-fr.conf`) contributed by - Yves-Alexis Perez. -- Added Russian language config file (`lang-ru.conf`) contributed by - Artem Zolochevskiy. -- Added Hungarian language config file (`lang-hu.conf`) contributed by - Miklos Vajna. - -.Bug fixes -- *FIXED:* Multiple manpage names are now handled correctly when - generating DocBook output, each name now generates a separate - DocBook `` element. See - http://groups.google.com/group/asciidoc/browse_thread/thread/c93bb4db025225d8 -- *FIXED:* A problem that caused AttributeEntries preceding the header - to be overwritten when the language conf file loaded. -- *FIXED:* Possible inline macro name ambiguity e.g. link matches olink. -- *FIXED:* The documented macro definition deletion behavior had been - broken for a long time. -- *FIXED:* Email addresses not recognized when followed by a period - character. -- *FIXED:* Hyphens in mailto macros can delimit nested addresses e.g. - \bloggs@mail was processed inside - \mailto:joe-bloggs@mail-server.com[Mail]. -- *FIXED:* User name in FTP URI generated incorrect FTP link. See - http://groups.google.com/group/asciidoc/browse_thread/thread/1d796a9c9ddb2855 -- *FIXED:* Source highlighter now works with Wordpress backend (see - http://groups.google.com/group/asciidoc/browse_thread/thread/6d8c716748b109e3). - -[[X2]] -Regression issues -~~~~~~~~~~~~~~~~~ -. A colon following the date in the AsciiDoc header is treated as a - revision remark delimiter -- this could be an issue if you have used - a colon in the header date. - - -Version 8.4.4 (2009-04-26) --------------------------- -.Additions and changes -- Added table column and row spanning. -- Table styles can now be applied per cell. -- Vertical cell alignment can be applied to columns and individual - cells. -- Added table 'align' attribute to set horizontal alignment for entire - table. -- Included Geoff Eddy's update of the experimental LaTeX backend. -- A new attribute named 'trace' controls the output of diagnostic - information. If the 'trace' attribute is defined then - element-by-element diagnostic messages detailing output markup - generation are printed to stderr. -- Added 'literal' paragraph style (allows 'literal' style to be - applied to normal paragraphs). -- Deleted unused `replacements2` from `xhtml11.conf`. -- Added `replacements2` to default substitutions. -- 'testasciidoc.py': messages to 'stdout', only diffs to 'stderr'. -- Added transparency to `smallnew.png` image. - -.Bug fixes -- All combinations of leading comments and attribute entries at the - start of a document are now skipped correctly. -- *FIXED:* `./configure` doesn't support `--docdir` as expected (patch - submitted by Artem Zolochevskiy) -- *FIXED:* Constrained quotes were incorrectly matched across line - boundaries e.g. the string `+\nabc+` incorrectly matched a monospace - quote. - - -Version 8.4.3 (2009-04-13) --------------------------- -.Additions and changes -- DocBook outputs default to DocBook version 4.5 doctype (previously - 4.2). -- Configuration file `[specialsections]` definitions can be undefined - by setting their configuration entry values blank. -- The Makefile 'install' target depends on the 'all' target to ensure - pre-install patches are applied. -- 'testasciidoc.py' now emits user friendly messages if: - . the configuration file is missing. - . an illegal backend is specified. - . an illegal test number is specified. - -.Bug fixes -- Fixed - http://groups.google.com/group/asciidoc/browse_thread/thread/fd27add515597c06[missing - template section] error. -- The 'testasciidoc.py' `--force` option no longer deletes test data - files that were not specified. -- Dropped second quotes substitution in table cells -- it had - effectively disabled quote escaping in table cells. - - -Version 8.4.2 (2009-03-19) --------------------------- -.Additions and changes -- Added {website}testasciidoc.html[testasciidoc], a tool to verify - AsciiDoc conformance. -- A warning is issued if nested inline passthroughs are encountered. -- 'asciidocapi': setting an attribute value to `None` will undefine - (delete) the attribute (this in addition to the `name!` attribute - name format that the `asciidoc(1)` command uses). - -.Bug fixes - - -Version 8.4.1 (2009-03-10) --------------------------- -.Additions and changes -- AsciiDoc now has a {website}asciidocapi.html[Python API]. The - following minimal example compiles `mydoc.txt` to `mydoc.html`: -+ -[source,python] -------------------------------------------------------------------------------- -from asciidocapi import AsciiDocAPI asciidoc = AsciiDocAPI() -asciidoc.execute('mydoc.txt') -------------------------------------------------------------------------------- - -- Backtick quoting for monospaced text is now implemented as an - 'inline literal' passthrough. This makes more sense since monospace - text is usually intended to be rendered literally. See - <> below for the impact this may have on - existing documents. Here are some examples that would previously - have had to be escaped: - - The `++i` and `++j` auto-increments. - Paths `~/.vim` and `~/docs`. - The `__init__` method. - The `{id}` attribute. - -- Added `--doctest` option to `asciidoc(1)` command. -- Added an optional second argument to 'BlockId' element, this sets - the `{reftext}` attribute which in turn is used to set the `xreflabel` - attribute in DocBook elements. -- Added lists to `--help` syntax summary. -- `{infile}` and `{indir}` attributes reflect the current input file - (previously always referred to the root document). -- `{docfile}` (new) and `{docdir}` (previously deprecated) attributes - refer to the root document specified on the `asciidoc(1)` - command-line. -- Vim syntax highlighter improvements. -- Syntax summary command (`asciidoc -h syntax`) additions. -- Admonition icons now have transparent backgrounds. -- Changed yellow W3C badges to blue ones in page footers. - -.Bug fixes -- Dropped `asciidoc(1)` broken undocumented `--profile` option. -- Em dash replacement now recognized at start of block. - -Regression issues -~~~~~~~~~~~~~~~~~ -Replacing backtick quoting with the 'inline literal' passthrough -raises two regression scenarios for existing documents: - -1. You have escaped the expansion of enclosed inline elements, for - example: `\{id}`. You would need to delete the backslashes: `{id}` - (if you don't the backslashes will be printed). Mostly it's just a - case of interactively finding and replacing of all occurrences of - `\. - -2. There are enclosed inline elements, for example: `some *bold* - monospaced`. You would need to switch to plus character monospace - quoting: `+some *bold* monospaced+` (if you don't the enclosed - elements won't be expanded). - -If your existing documents include these cases and you don't want to -upgrade then use the `-a no-inline-literal` command-line option, -alternatively put this in `~/.asciidoc/asciidoc.conf`: - - [attributes] - no-inline-literal= - - -Version 8.3.5 (2009-02-02) --------------------------- -.Additions and changes -- Cached compiled regular expression delimiters (speed up 'User - Manual' compilation by 250%). -- Created distinct list definitions for each numbered list style to - allow nesting of all styles. -- Roman numbers in numbered lists are followed by a closing - parenthesis instead of a period to eliminate 'i', 'v', 'x' item - ambiguity with respect to alpha numbered list items. -- Added `**`, `***`, `****`, `*****` - bulleted lists. -- Added `...`, `....`, `.....` implicit numbered - lists. -- Added `:::`, `::::` labeled lists. -- Updated User Guide for new list syntaxes. -- Optimized paragraph and list termination detection with separate - precompiled regular expressions for performance and to prevent - reaching Python 100 named group limit. -- Updated Vim syntax highlighter for new list syntaxes. -- Allow `template::[]` macros in conf file entries sections (not just - in template sections). -- Dropped unused `[listdef-numbered2]` conf file sections. -- Renamed 'ListBlock' to more appropriate 'OpenBlock'. -- Implemented single-line versions of `ifdef::[]` and `ifndef::[]` - macros. -- 'html4' backend styling: - * Underlined admonition captions. - * Added side border to Example Blocks. -- 'xhtml11' backend styling: - * Dropped right hand margin from all but quote and verse blocks. - * html4 backend: corrected over-sized width of caption in admonition - block. - -.Bug fixes -- Fixed broken numbered list nesting. - -Compatibility issues -~~~~~~~~~~~~~~~~~~~~ -The roman numbered list parenthesis syntax is incompatible with the -potentially ambiguous roman period syntax introduced in 8.3.2. - - -Version 8.3.4 (2009-01-20) --------------------------- -.Additions and changes -- Implemented a title 'float' style. A floating title (or bridgehead) - is rendered just like a normal section but is not formally - associated with a text body and is not part of the regular section - hierarchy so the normal ordering rules do not apply. -- Implemented inline comment macro so comment lines can now appear - inside block elements. -- Comment lines are sent to the output if the 'showcomments' attribute - is defined (comment blocks are never sent to the output). -- Single quoting attribute values in 'AttributeList' elements causes - them to be substituted like normal inline text (without single - quoting only attribute substitution is performed). -- Rewrote list item processing (was very crufty). List continuation - and list blocks now work as expected. Updated and clarified list - documentation in User Guide. -- The 'revision' attribute now recognizes the RCS $Id$ marker format. -- An RCS $Id$ marker formatted revision line in the header does not - need to be preceded by an author line. -- If an RCS $Id$ formatted revision is specified and the author name - has not already been set then the author name in the $Id$ marker - will be used. -- Updated Gouichi Iisaka's Graphviz filter to version 1.1.3. -- Added 'autowidth' table attribute option for (X)HTML outputs. -- DocBook backend now puts 'orgname' optional attribute in DocBook - header. -- Deprecated undocumented 'companyname' attribute in favor of - DocBook's 'corpname'. -- Removed explicit closing backslash from HTML4 self-closing tags to - comply with WC3 recommendation. - -.Bug fixes -- Fixed 8.3.3 regression whereby adjacent lists with the same syntax - but different list styles were incorrectly treated as a single list. - - -Version 8.3.3 (2009-01-02) --------------------------- -This release supersedes 8.3.2. - -.Bug fixes -- The broken and confusing numeration and numeration2 numbered list - attributes have been dropped, use the style attribute instead. - - -Version 8.3.2 (2009-01-01) --------------------------- -.Additions and changes -- Added Gouichi Iisaka's Graphviz filter to distribution. -- The 'SidebarBlock' element can now be rendered with an 'abstract' - style. -- Reorganized filters into a separate subdirectory for each filter. -- Updated `Makefile.in` and `MANIFEST` files to reflect new filters - organization. -- Added 'listing' style to 'LiteralBlock' element so listings with - nested listing blocks can be rendered as a listing block. -- Changed example 'code' filter to use preferred 'ListingBlock' syntax - (the old `~` delimited filter syntax is no longer used). -- Implemented 'enumeration' and 'enumeration2' numbered list - attributes for specifying the list numbering style ('arabic', - 'loweralpha', 'upperalpha', 'lowerroman' and 'upperroman'). -- AsciiDoc now recognizes 'upperalpha', 'lowerroman' and 'upperroman' - numbers in `listdef-numbered2` numbered lists and sets the number - style based on the style of the first numbered list item - (alternative to setting 'enumeration2' attribute). -- Updated `formatlistpat` definition in `.vimrc` example in User - Guide. -- You can now backslash escape system block macros. -- Added 'Pychart' FAQ. -- Drop paragraph 'text' and list 'text', 'index' and 'label' match - groups from attributes -- they are included in the element's text - and we don't want them processed a second time as attributes. -- Changed comment line block macro to a passthrough block macro to - ensure no substitutions. -- A 'subslist' no longer has to be appended to a 'PassthroughBlock' - macro definition, if omitted no substitutions are performed. -- Code tidy up: replaced deprecated `<>` operator with `!=`. -- Removed unused linuxdoc code. -- Code tidy ups: dropped old types module reference; replaced - `has_key()` with preferred `in` operator. - -.Bug fixes -- Old syntax source highlight filter regression: special characters - where not escaped in DocBook outputs. - - -Version 8.3.1 (2008-12-14) --------------------------- -.Additions and changes -- Replaced the `install.sh` script with Ben Walton's updated autoconf - scripts -- see {website}INSTALL.html[INSTALL] for details. -- Added a generalized 'AttributeEntry' syntax to allow arbitrary - configuration file entries to be set from within an AsciiDoc - document (suggested by Henrik Maier). -- Listing delimited blocks in DocBook outputs now support IDs; IDs of - titled Listing and Literal delimited blocks have been moved to the - enclosing DocBook example tag (thanks to Vijay Kumar for this - patch). -- Replaced vertical typewriter apostrophe with punctuation apostrophe - (thanks to Noah Slater). - -.Bug fixes -- Regression: Excluding double-quotes from unquoted attribute values - resulted in backward incompatibility, double-quotes in unquoted - attribute values has been reinstated. -- Regression: Text like `&...;` was sometimes mistaken for an entity - reference -- tightened up entity reference matching. - - -Version 8.3.0 (2008-11-29) --------------------------- -.Additions and changes -- {website}newtables.html[AsciiDoc new tables] is a complete redesign - of the tables syntax and generation. The new syntax and features are - a huge improvement over the old tables. The old tables syntax has - been deprecated but is currently still processed. -- {website}newlists.html[Lists can now be styled] like other block - elements. This allows a single list syntax for 'glossary', 'qanda' - (Question and Answer) and 'bibliography' lists instead of having to - remember a different syntax for each type. -- Inline passthroughs macros have been improved and block passthrough - macros added. Attribute substitution can be optionally specified - when the macro is called. -- The passthrough block has a fully transparent passthrough delimited - block block style called 'pass'. -- The 'asciimath' and 'latexmath' - {website}userguide.html#X77[passthrough macros] along with - 'asciimath' and 'latexmath' {website}userguide.html#X76[passthrough - blocks] provide a (backend dependent) mechanism for rendering - mathematical formulas. There are {website}latexmath.pdf[LaTeX Math], - {website}asciimathml.html[AsciiMathML] and - {website}latexmathml.html[LaTeXMathML] examples on the AsciiDoc - website. -- Reimplemented and cleaned up filter processing based on a patch - submitted by Kelly Anderson. Uses the newer subprocess module - instead of the deprecated popen2 module. Now works in Win32 command - shell. -- Addition FAQs, more documentation updates. -- Arbitrary HTML/XML entities can be entered in AsciiDoc source. -- Did away with the need for the `shaded-literallayout.patch` (thanks - to Henrik Maier for this patch). -- Implemented 'page break' block macro. -- Added 'line breaks' and 'ruler' processing instructions to DocBook - outputs (thanks to Henrik Maier for this patch). -- Added 'deg' (degree) and 'wj' (word joiner) entity attributes - (thanks to Henrik Maier). -- Tweaked DocBook 'indexterm2' macro to avoid white space preceding - the term when used in table cells (thanks to Henrik Maier for this - patch). -- Title elements now process the 'options' attribute like other block - elements. -- Added `single quoted' element. -- Spaces on both sides of a -- em-dash are translated to thin space - characters. -- Improved detection and reporting of malformed attribute lists. -- The list 'compact' style is now a list option. -- Added 'strong' labeled list option which makes the labels bold (HTML - outputs only). -- Dropped unsupported 'linuxdoc' backend. -- Dropped deprecated 'xhtml-deprecated' (version 6) backend. -- Added 'breakable' and 'unbreakable' attribute options to tables to - control table breaking across page boundaries (DocBook XSL/FO - outputs). By and in collaboration with Henrik Maier. -- Added 'pgwide' attribute option to tables to table, block image, - horizontal labeled lists. Specifies that the element should be - rendered across the full text width of the page irrespective of the - current indentation (DocBook XSL/FO outputs). Thanks to Henrik Maier - for this patch. -- Vim syntax highlighter: spaces before/after bullets no longer - highlighted (which is ugly if using a theme that highlights with - underlines). Thanks to Donald Chai for this patch. -- Added `a2x(1)` `--fop` option. -- Added `a2x(1)` `--no-xmllint` option. -- Highlighted labelled list terms with the navy color in XHTML - outputs. -- Use `w3m(1)` as default `a2x(1)` text format generator (fallback to - `lynx(1)`). -- Changed callout formats in html4 and xhtml11 outputs to angle - brackets to match source highlighter rendering. -- Macros now inject user defined `-option` attributes into - markup. -- Added IRC URLs to AsciiDoc inline macros. -- Added `depth` attribute to `include::[]` system macro. -- Added 'footnoteref' inline macro. -- Added 'stylesheet' XHTML attribute to specify additional custom CSS - stylesheet. -- If a paragraph style is specified it will be added to the XHTML - 'class' attribute and DocBook 'role' attribute. -- Replacements can be set in a document using the reserved - AttributeEntry name 'replacement'. -- The prefix for auto-generated section name IDs can be set with the - 'idprefix' attribute. - -.Bug fixes -- Escaped quote skipped over leading and trailing quote instead of - just the leading quote. -- Fixed bug that was causing false negative safe mode warnings (patch - submitted by Julien Palmas). -- Placed priority of AttributeEntry, AttributeList and BlockTitle - above Title. This ensures an AttributeEntry, AttributeList or - BlockTitle followed by a same length leading ListingBlock delimiter - is not mistaken for a two-line title. -- Vim syntax highlighter: fixed multi-line quoted text. -- Contstrained quote termination after non-space character enforced. -- Vim syntax highlighter: unterminated quoted text is no longer - highlighted. -- Vim syntax highlighter: passthroughs now exactly match AsciiDoc - semantics. -- Vim syntax highlighter: escaped quoted text, attribute references - and inline macros are not highlighted. -- Vim syntax highlighter: TODO's highlighted in CommentBlocks (thanks - to Scott Wall); non-greedy pass:[$$...$$]. -- Vim syntax highlighter: Comment lines mistaken for vertical list - labels (thanks to Scott Wall). -- Vim syntax highlighter: Single unmatched $$ mistakenly highlighted - remaining text (patch contributed by Scott Wall). -- Callouts now work in source highlighted listing generated by - dblatex. -- Fixed exception that occured if undefined attribute was present in - filter command. -- AttributeList block can now follow a paragraph without intervening - blank line. -- The include macro tabsize attribute is no longer propagated to - nested includes. - -.Omissions -The following features were implemented but then but removed from this -release: - -- 'pi', 'cdata' and 'comment' passthrough macros and passthrough block - styles (creeping featurism, use 'pass' macros instead). -- Generic 'tag' inline macro (creeping featurism, use 'pass' macros - instead). - - -[[X1]] -Compatibility issues -~~~~~~~~~~~~~~~~~~~~ -Version 8.3.0 has a number of backward incompatibilities with respect -to the previous 8.2.7 release: - -- The old table syntax is still processed but a 'DEPRECATED' warning - is issued. -- Entity references have to be escaped with a backslash. -- You have to explicitly precede horizontal style labeled lists with - the `[horizontal]` style attribute -- by default all labeled lists - are rendered vertically. -- The list 'compact' style has been dropped and is now a list option - (use `options="compact"` in attribute lists). -- AsciiDoc version 6 sytnax no longer supported. -- Linuxdoc been removed from the distribution. -- The unsupported experimental 'latex' backend has not been tested on - this release. -- The introduction of single-quote quoting requires that double-quote - quoting is escaped with two backslashes. - - -Version 8.2.7 (2008-07-04) --------------------------- -.Additions and changes -- Added `dvi`, `ps` and `tex` output format options to a2x(1). -- Added `--dblatex` option to a2x(1) so `dblatex(1)` can be used to - generate PDFs. -- Added custom `dblatex(1)` configuration files (in distribution - `./dblatex` directory) that are used by a2x(1). -- `dblatex(1)` is now used to generate the distributed PDF version of - the AsciiDoc User Guide. -- If you don't need a customized the link caption you can enter the - 'http', 'https', 'ftp', 'file' URLs and email addresses without any - special macro syntax -- you get the links by just cutting and - pasting URLs and emails addresses. This also makes it easier to open - links directly form AsciiDoc source ( most editors allow you to open - URLs directly). The Vim syntax highlighter has been updated to - reflect these changes. -- Highlighted source code paragraphs have been implemented -- it's a - much more convenient way to enter short code examples (see - http://asciidoc.org/source-highlight-filter.html[the - online docs]). -- The source highlighter and music filter syntax has changed -- they - now used the ListingBlock syntax customized with 'source' and - 'music' style attribute values. This follows the Paragraph styling - convention introduced by the source paragraph (previous item) and is - easier to read. The old syntax still works but has been deprecated. -- QuoteBlocks now have a 'verse' style -- you no longer have to nest a - 'verse' LiteralBlock inside a QuoteBlock for verses. The 'verse' - style on the LiteralBlock has been deprecated (still works though) - and the 'style' attribute is positional attribute 1, pushing - 'attribution' and 'citetitle' attributes to the right (you'll need - to insert a 'quote' attribute into your existing QuoteBlocks). -- It is no up to the DocBook processor to highlight source code syntax - in `` elements rather than GNU Highlighter -- this - is the correct way to handle it, plus `dblatex(1)` makes a much - better job. -- 'scaledwidth' and 'align' attributes have been added to the 'image' - macro. They apply to DocBook outputs (specifically for PDF - documents). 'scaledwidth' sets the image size as a percent of the - available page width; 'align' applies 'left', 'center' or 'right' - horizontal image justification. -- Added a2x(1) `--fop-opts=FOP_OPTS` option (patch submitted by Miklos - Vajna). -- Added a2x(1) `--dblatex-opts=DBLATEX_OPTS` option. -- Added Mikhail Yakshin's FOP 0.95 patch which fixes a long-standing - `fo.xsl` problem and allows PDF's to be generated with FOP 0.95 - (previously had to use FOP 0.20.5). -- The User Guide has been updated and outdated FOP configuration and - installation sections removed. - -.Bug fixes -- Fixed `stylesheets/xhtml11-manpage.css` not being included when - 'linkcss' attribute was used. -- Configuration file `*-style` attributes are now dumped correctly. -- Fixed 'FAILED: malformed section entry' LaTeX backend error. - -See the also the https://sharesource.org/hg/asciidoc/[AsciiDoc -repository changelog]. - - -Version 8.2.6 (2008-04-29) --------------------------- -.Additions and changes -- Enhancements to the Vim AsciiDoc syntax highlighter, for example, - quoted text is now highlighted in titles and macro captions. -- If you define the `data-uri` intrinsic attribute images referenced - by 'image' macros will be embedded in XHTML using the - http://en.wikipedia.org/wiki/Data:_URI_scheme[data: URI scheme]. - *NOTE*: Microsoft browser support for the 'data: URI scheme' is - currently limited to MSIE 8 beta 1. -- Added `toc-title` attribute to allow custom table of contents - titles. -- Added references to Alex Efros's AsciiDoc Cheatsheet to AsciiDoc - website. -- `asciidoc(1)` and `a2x(1)` man pages formatted to conform to - `man-pages(7)` recommendations. -- Old code-filter syntax (pre-8.1.0) is no longer recognized so that - malformed two-line level 2 titles are no longer confused with - 'code-filter' block delimiters. -- Added -> <- => <= arrow replacements from the Arrows block of - Unicode. -- Added DocBook refentry lang attribute -- patch contributed by - VMiklos. -- AttributeEntry names can now be numeric (``named macro targets''). -- Hide Table of Contents title if Table of Contents empty -- patch - contributed by Alex Efros. -- Various XHTML CSS tweaks. -- Code cleanup: - * Replaced `realpath()` with Python 2.2 `os.path.realpath()` library - function. - * Replaced old string library functions with string methods. - * Use file generators instead of `readlines()`. - * Renamed entities that shadowed builtins. - * Standardized string quoting. - * Dropped `readlines()` function. - -.Bug fixes -- Fixed broken CSS for decimal ordered lists nested in alpha ordered - list, thanks to Alex Efros. -- A missing closing block delimiter now reports the opening delimiter - line number instead of the end of file line number. -- Fixed an error generated by the asciidoc `-e` option when there are - no block definitions -- patch contributed by Alejandro Mery. -- Handle both `\r\n` (as well as `\n`) line separators that may be - returned by `{sys}` attribute evaluation. -- Numbered attribute names no longer interfere with positional - attribute list values. - - -Version 8.2.5 (2007-11-18) --------------------------- -.Additions and changes - -.Bug fixes -- Fixed exception thrown by illegal command-line arguments. -- Rolled back the 'with' warning bug fix introduced in 8.2.4 -- it was - incompatible with Python <2.5. - - -Version 8.2.4 (2007-11-10) --------------------------- -.Additions and changes -- You can now use the `lang` attribute to set the DocBook language - attribute. -- Attribute values can now contain attribute references. -- If the `lang` attribute is defined then configuration files named - like `lang-.conf` will be loaded automatically. -- The help file name `help-.conf` is based on the AsciiDoc - `lang` attribute, defaults to `help.conf` (English). -- Admonition, figure and table captions have been factored into a - predefined set of `caption_*` attributes. They only apply to - directly generated (X)HTML outputs (DocBook stylesheets generate - their own language specific captions based on the `lang` attribute). -- Dropped platform dependent `doc/asciidoc.chm` file from - distribution documentation formats. - -.Bug fixes -- The spurious warning 'with will become a reserved keyword - in Python 2.6' has been suppressed. - - -Version 8.2.3 (2007-09-12) --------------------------- -.Additions and changes -- Added VMiklos's 'permalink' patch for auto-generated section IDs - (enabled by default by the `sectids` attribute). -- Added http://asciidoc.org/faq.html[FAQ] to website. -- Changed format of \{localdate} attribute to ISO 8601 (`%Y-%m-%d`). -- Added `abc2ly --beams=None` option to make `music2png.py` conform to - ABC's notion of beams. -- XHTML level 2 section headings are now styled with an underlining - border. -- XHTML links to AsciiDoc title elements are now implemented with - title ID attributes (previously separate `` element targets were - generated. -- Multi-word first, middle and last names can be entered in the header - author line using the underscore as a word separator. -- The nested inline macros restriction has now been lifted, for - example you can now include links and inline images inside - footnotes. -- Help topic names can be shortened (so long as they are not - ambiguous). For example `asciidoc -hm` will print the AsciiDoc man - page. -- Added `{two_colons}` and `{two_semicolons}` attributes for - escaping labeled list ambiguity. -- If quirks mode is disabled the XHTML Mime Type is set to the - recommended `application/xhtml+xml` (rather than `text/html`). - -.Bug fixes -- Author information is now correctly set when using attribute entries - in the header instead of an author line (previously the 'author' - attribute was not being calculated correctly and there were - attribute substitution problems). - - -Version 8.2.2 (2007-07-22) --------------------------- -.Additions and changes -- http://www.maths.nottingham.ac.uk/personal/drw/lm.html[LaTeXMathML] - capability has been added for users who are more familiar with or - prefer LaTeX math formulas to the - http://asciidoc.org/asciimathml.html[ASCIIMathML] - notation (thanks to Arthur Sakellariou for the patch). -- The 'source highlight' and 'code' filters now process embedded - callouts. -- Added an `--attribute=ATTRIBUTE` option to `a2x(1)` for passing - attribute values to asciidoc(1) (a shortcut for `--asciidoc-opts="-a - ATTRIBUTE"`). -- Image block and inline macros prepend optional `{imagesdir}` - attribute to image link targets. - - -.Bug fixes -- Fixed an assertion error that occurred when a configuration file - containing an `include::[]` macro was loaded using the - `--conf-file` option and the configuration file name did not - include an explicit directory path -- patch submitted by Dmitry - Potapov. -- Asciidoc titles are only converted to lower case if all characters - are upper case otherwise case is left unchanged -- patch submitted - by Dmitry Potapov. -- Added a missing check that input is not stdin before loading - configuration files from the document directory -- patch submitted - by Dmitry Potapov. -- Attribute list items must evaluate to strings, numbers or None - (previously it was possible to evaluate to other object types which - resulted in surprising attribute values). -- If an AsciiDoc document has no title an empty XHTML 1.1 'title' - element is created -- previously the 'title' element was dropped - which resulted in invalid XHTML 1.1. -- The Vim syntax file no longer highlights escaped callouts. -- The Vim syntax highlighter now correctly highlights Double-dollar - passthroughs when they enclose dollar delimited ASCIIMathML and - LaTeXMathML formulas. - - -Version 8.2.1 (2007-04-06) --------------------------- -.Additions and changes -- A number of improvements have been made to the Vim syntax - highlighter, for example the word C++ is no longer mistaken for the - start of an unconstrained monospace quote. -- Labeled list definitions have been tightened -- a list label can no - longer containing trailing spaces. The following example is no - longer recognized as a valid list label: - - Lorum ipsum :: -+ -This change implements the originally intended behavior (as per the -AsciiDoc documentation and examples) so there should be very few -compatibility issues. - -.Bug fixes - - -Version 8.2.0 (2007-04-04) --------------------------- -.Additions and changes -- A Vim syntax file is now included in the AsciiDoc distribution - (inspired by Felix Obenhuber's `asciidoc.vim` script). You can find - it (along with a Vim filetype detection script in the distribution - `./vim/` directory (the scripts are installed automatically by the - AsciiDoc installer `./install.sh`). See 'Appendix J' of the - 'AsciiDoc User Guide' for details. -- Added 'toclevel' attribute (1..4) which sets the number of title - levels reported in the table of contents. Defaults to 2 and must be - used with the 'toc' attribute. Example usage: - - $ asciidoc -a toc -a toclevels=3 doc/asciidoc.txt - -- Added a `listindex` attribute which is the current list item index - (1..). If this attribute appears outside a list its value is the - number of items in the most recently closed list. -- The single line titles syntax now accepts trailing suffixes -- this - syntax matches the title line syntax of a number of popular Wiki - markups. -- If a QuoteBlock has no attribution or citetitle then the DocBook - `` element is not generated (previously generated empty - `` element). -- If the text of a labeled list item is blank then no `texttag` is - written. -- An end of line backslash performs line continuation for horizontal - labeled list items. -- The Revision line now accommodates Subversion `$Id` markers (in - addition to CVS and RCS markers). Thanks to Tiago Sturmer Daitx for - this patch. -- Implemented `a2x(1)` option `--skip-asciidoc` which allows `a2x(1)` - to convert DocBook XML files not derived from AsciiDoc sources. -- If `a2x(1) --doctype` option is not specified it defaults to - `manpage` if `--format=manpage` else defaults to `article` - (previously `--doctype` always defaulted to `article`). -- Added an 'External Resources' section to the - http://asciidoc.org/index.html[AsciiDoc home page]. - -.Bug fixes - - -Version 8.1.0 (2006-10-22) --------------------------- -.Additions and changes -- AsciiDoc generated XHTML documents now display a table of contents - if the 'toc' attribute is defined (JavaScript needs to be enabled - for this to work). Thanks to Troy Hanson who contributed this - feature based on a JavaScript by Mihai Bazon. I've simplified things - somewhat to match Docbook XSL Stylesheets style, see Troy's - http://tpl.sourceforge.net/userguide.html[tpl User Guide] for a - fancier layout. Use the `-a toc -a numbered` command-line options to - produce a number table of contents. -- A http://asciidoc.org/music-filter.html[music filter] - is included in the distribution `./filters/` directory. It - translates music in http://lilypond.org/[LilyPond] or - http://abcnotation.org.uk/[ABC] notation to standard classical - notation in the form of a trimmed PNG image which is inserted into - the AsciiDoc output document. -- Incorporated Paul Melis's Win32 filter patch. This workaround - allows AsciiDoc to run filters under Windows. -- Added `uninstall.sh` script. -- Rather than proliferate a confusing number of filter block - delimiters the following convention has been adopted: delimiters - belonging to DelimitedBlock filters distributed with AsciiDoc will - consist of a word (normally a noun identifying the block content) - followed by four or more tilde characters. This has necessitated - changing existing filter delimiters (the old delimiters still work - but may be deprecated in future versions): - - * The example code filter block delimiter is now the word `code` - followed by four or more tilde characters. - * The source highlight filter block delimiter is now the word - `source` followed by four or more tilde characters. - -- Conditionally redefined subscript and superscripting so they use the - old replacements mechanism when asciidoc7compatible is defined - rather than the asciidoc 8 default unconstrained quoting (patch for - affected files attached). -- Moved the source highlight filter from `./examples/` to `./filter/`. -- Added `{verbose}` intrinsic attribute (useful for passing verbose - flag to filters). -- Added `{outdir}` intrinsic attribute. -- Renamed `{docdir}` intrinsic attribute to unambiguous `{indir}` - (`{docdir}` still works but may be removed in future release). -- If `asciidoc(1)` outputs to stdout then intrinsic attribute - `{docname}` is extracted from the input file name. - - -Version 8.0.0 (2006-08-27) --------------------------- -********************************************************************* -This is a major release because changes to quoting and index entry -handling may break existing documents (see 'Additions and changes' -below and 'Appendix A: Migration Notes' in the AsciiDoc User Guide). - -Please report any problems you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -********************************************************************* - -.Additions and changes -- Quoting can can occur within words (based on patch submitted by - Benjamin Klum). See the 'Unconstrained Quotes' sub-section in the - User Guide. - -- The underline and plus characters can be used as alternatives to the - existing apostrophe and backtick quote characters. They are arguably - better choices than the apostrophe and backtick as they are not - confused with punctuation. - -- The syntax for index entry macros have have been deprecated from - `+...+` and `++...++` to `((...))` and `(((...)))` respectively. - Rationale: - * Bracketing is consistent other with `[[...]]` and `<<...>>` - reference macros. - * To easily confused with triple plus passthroughs. - * To make way for the new monospace quoting. - -- Superscripts and subscripts are implemented as constrained quotes so - they can now be escaped with a leading backslash and prefixed with - with an attribute list. - -- An experimental LaTeX backend has been written by Benjamin Klum (a - number additions in this release are to accommodate the LaTeX - backend). -- `include` macro file names now expand environment variables and - tilde expansions. -- A configuration file `[quotes]` entry can be undefined by setting to - a blank value. -- Added `callto` inline macro for Skype 'callto' links. -- Added `colnumber` attribute for table data markup. -- A leading comment block or comment lines are now skipped (previously - a document had to start with either attribute entries or a document - Title). -- Experimental `rows` attribute (number of source lines in table) - available in table markup templates (used by experimental LaTeX - backend). -- Included install shell script written by mailto:jlm@ofb.net[Jacob - Mandelson] for installing the tarball distribution. -- Added INSTALL documentation file. -- Added 'replacements2' substitution options -- a second replacements - section. -- Added the ability to redefine 'normal' and 'verbatim' substitutions - with `subsnormal` and `subsverbatim` entries in configuration file - `[miscellaneous]` section. -- By default `AttributeEntry` values are substituted for - `specialcharacters` and `attributes`, if you want a different - AttributeEntry substitution set the `attributeentry-subs` attribute. -- The `name` in `name=value` configuration file entries can now end - with a backslash, just escape the trailing backslash with a - backslash. For example: - - abc\\=xyz -+ -Results in `name=abc\` and `value=xyz` -- previously this would have -escaped the `=` character. - -- A blank configuration file section deletes any preceding section - with the same name (applies to non-markup template sections). -- A command-line attribute value with a `@` suffix does not override - existing document and configuration file attributes (normally - command-line attributes have precedence over document and - configuration file attributes). -- `localtime` attribute is now encoded from the native system encoding - to the output encoding. Patch submitted by - mailto:m_pupil@yahoo.com.cn[FKtPp] -- here's his description of the - problem: -+ -``I am a Chinese user of AsciiDoc and I find that when I use UTF-8 -(the default encoding) to write asciidoc documents in Windows platform -the resulting html footer line will get screwed. It was caused by a -localized tzname that was always encoded in the windows native -encoding, which in my case is 'cp936'.'' - -- a2x(1) can generate Open Document Text files using - http://open.comsultia.com/docbook2odf/[docbook2odf]. Currently - `docbook2odf(1)` only processes a subset of DocBook, unimplemented - elements are skipped. -- The a2x(1) format option defaults to `xhtml` (previously a format - had to be specified explicitly). -- The `-d, \--doctype=DOCTYPE` option has been added to a2x(1) which - is a shortcut for `--asciidoc-options="--doctype=DOCTYPE"`. -- Replaced a2x(1) `--no-icons` and `--no-copy` options with their - negated equivalents: `--icons` and `--copy` respectively. The - default behavior has also changed: copying and use of icons is - disabled by default. Rationale: - * To make the default behavior more consistent since use of icons - and CSS stylesheets does not apply to all formats. - * To make the default behavior less surprising (the creation of icon - and stylesheet output files must now be explicit). - -- a2x(1) has been bumped from version 0.1.1 to version 1.0.0. - - -.Bug fixes -- Removed duplicate `./doc/a2x.1.txt` from distribution tarball. -- Documentation errata. -- Attribute replacement is no longer performed twice in Titles and - AttributeEntrys. -- a2x(1) skipped asciidoc(1) execution when rerun with different - `--asciidoc-options` options, it now always executes asciidoc(1). - The problem was that previously asciidoc(1) was executed only if the - output file was missing or older than the source file. - - -Version 7.1.2 (2006-03-07) --------------------------- -.Additions and changes -- Support for - http://www1.chapman.edu/~jipsen/mathml/asciimath.html[ASCIIMathML] - has been added. See 'Appendix I: ASCIIMathML Support' in the User - Guide and the examples at - http://asciidoc.org/asciimath.html. -- You can now prefix quoted text with inline attributes lists. You - can use this to set font size and color (XHTML and HTML outputs). -- Added `##...##` quoting -- it does nothing -- it's purpose is to - allow inline attributes to be applied to normal text. -- An 'inline passthrough' mechanism has been implemented. -- Configuration file comment lines can be escaped with a backslash -- - this is to allows the inclusion of configuration lines that start - with a hash character. -- The `scriptsdir` attribute can be used to specify the name of the - directory containing linked JavaScripts (see the - link:userguide.html#X33[User Guide] for details. -- The BackendBlock has been renamed PassthroughBlock for consistency - with the new inline passthrough naming. -- `a2x(1)` now works with the older `bash(1)` version 2.05b. Patch - submitted by mailto:francis@daoine.org[Francis Daly]. -- Content included by the `include1::[]` system macro is no longer - subject to attribute substitution so that ambiguities no longer - arise when used to include CSS or JavaScript files. - - -Version 7.1.1 (2006-02-24) --------------------------- -.Additions and changes -- The `caption` attribute can be used to customize admonition captions - as well as image, table and example block element title prefixes - (`xhtml11` and `html4` backends). -- You can now override the default icon image using the `icon` - attribute to specify the path of the linked image (xhtml11 and html4 - backends only). -- The deprecated `imagesdir` attribute is no longer recognized (use - `iconsdir` instead). -- Added 'Appendix H: Using AsciiDoc with non-English Languages' to the - AsciiDoc User Guide. -- Added 'Admonition Icons and Captions' subsection to the User Guide - explaining how to customize Admonition elements. - -.Bug fixes -- `a2x(1)` failed when configuration files were installed in the - global `/etc/asciidoc/` directory -- it was only searching the - directory containing the asciidoc executable (thanks to Christian - Wiese for finding and submitting a patch this bug). -- The html4 backend admonition caption now correctly displays the - admonition `caption` attribute (previously displayed the `style` - attribute). - - -Version 7.1.0 (2006-01-13) --------------------------- -.Additions and changes -- `a2x(1)` toolchain wrapper utility. This overcomes the biggest - hurdle for new users which seems to be assembling and using a - working DocBook XML toolchain. With `a2x(1)` you can generate XHTML - (chunked and unchunked), PDF, man page, HTML Help and text file - outputs from an AsciiDoc input file with a single command. All you - need to install (in addition to AsciiDoc) is xsltproc(1), DocBook XSL - Stylesheets and optionally FOP (if you want PDF) or lynx(1) (if you - want text). -- Block titles can now start with any non-space character (previously - where not allowed to start with `.~-_` characters). -- `./stylesheets/docbook.css` renamed to - `./stylesheets/docbook-xsl.css` to clarify its function. -- Renamed `./docbook-xsl/manpages.xsl` to `./docbook-xsl/manpage.xsl` - for consistency. -- Admonition and navigation icons moved to `./images/icons/` to - clarify usage and conform with a2x(1) usage. -- Renamed xhtml11 intrinsic attribute `imagesdir` to `iconsdir` to - keep vocab consistent and changed default value to `./images/icons` - (previously `./images`). `imagesdir` attribute still accepted but - deprecated. -- Unused image files have been weeded out of the distribution. -- Packager notes (appendix B) have been updated to reflect the needs - of `a2x(1)`. - -IMPORTANT: The renaming of the xhtml11 backend `imagesdir` intrinsic -attribute and it's new default value introduces a backward -compatibility issue: if you use the `icons` attribute you will need to -either move your icons to the new default `./images/icons` location or -include an `--attribute{nbsp}iconsdir="your_icons_path"` option in -your asciidoc commands. - -.Bug fixes -- Backslash line continuation is now observed in verbatim paragraphs. -- Fixed errors generated by example - `./examples/website/build-website.sh` script. - - -Version 7.0.4 (2005-12-08) --------------------------- -.Additions and changes -- Added ternary conditional attributes - `{@:[:]}` and - `{$:[:]}`. -- Safety violations now generate errors (they previously generated - warnings). -- asciidoc(1) now defaults to safe mode, consequently the - `[miscellaneous]` safe mode entry and `--safe` command-line option - are no longer necessary (though for backward compatibility - asciidoc(1) still accepts the `--safe` option). -- Backend Blocks are now flagged unsafe (they could be used to include - arbitrary and hence potentially unsafe output content). -- Filters are no longer considered unsafe. There's not much point in - insisting on filter safety since the installation of an unsafe - filter would require the introduction of new or modified - configuration files -- if your application configurations can be - compromised you're in all sorts of trouble (safe mode protects - against unsafe input files not unsafe configuration). As with all - filters, before installing, you should verify that they can't be - coerced into generating malicious output or exposing sensitive - information. - -.Bug fixes -- Fixed a lot of glaring grammatical and factual errors in the User - Guide. - - -Version 7.0.3 (2005-12-01) --------------------------- -.Additions and changes -- Added `--safe` and `--unsafe` command-line options -- AsciiDoc can - now be executed in a 'safe mode' which disallows the execution of - arbitrary code or the inclusion of arbitrary files (see - link:userguide.html#X39[Appendix C in the AsciiDoc User Guide]). -- Included link:source-highlight-filter.html[source-highlight filter] - in the distribution `./examples/source-highlight-filter/` directory - (based on filter submitted by mailto:trolocsis@gmail.com[Ryan - Phillips]). -- Included the DocBook XSL Stylesheets 1.69.1 customizations used to - generate the distributed AsciiDoc documentation (read the - `asciidoc-docbook-xsl.txt` file in the distribution `./docbook-xsl/` - directory). -- AsciiDoc DocBook XSL Stylesheet drivers moved from `./doc/` to - `./docbook-xsl/`. -- Modified `./doc/manpages.xsl` so only URL content is displayed in - manpages. - -.Bug fixes -- Explicitly set table CSS border style (`xhtml11` backend) to `solid` - because default border styles vary from browser to browser. - - -Version 7.0.2 (2005-08-28) --------------------------- -.Additions and changes -- There are now long versions of all AsciiDoc options. -- If the `--backend` is not specified it defaults to `xhtml11`. -- Added CSS simulated frames layout to the examples website (see - `./examples/website/layout2/README-website.txt`). This layout does - not work with IE6 and the original tables based layout is still the - default. -- Support page added to AsciiDoc website. - -.Bug fixes -- Invalid options are now trapped gracefully. -- Documentation errata. - - -Version 7.0.1 (2005-06-24) --------------------------- -.Additions and changes -- Reverted to use of `strong`, `em`, `tt` XHTML tags -- they're more - obvious and no less correct than `span` tags, besides, the generated - file sizes are smaller (the 'User Guide' was 11% smaller). -- Table title rendered with `caption` tag rather than a separate - `div`. -- The AsciiDoc 'stylesdir' attribute (if specified) is now recognized - when searching for embedded stylesheets (previously only searched - default `./stylesheets` directory). -- Default charset encoding changed from ISO-8859-1 to UTF-8 -- it's - less language specific and displays most common languages. -- `template::[]` macros now expand in all configuration file sections - previously only in markup template sections. -- Cleaned up example website layout CSS and configuration - (presentation has not been changed). -- Refactored `xhtml11.conf` configuration file. -- Set consistent and sensible permissions on distributed files. -- White space is now stripped from DSV formatted table cell data. -- `class="tableblock"` attribute added to tables generated by - `xhtml-deprecated-css.conf` to assist CSS. - -.Bug fixes -- Illegal character set encoder (specified by the AsciiDoc `encoding` - attribute) and character data are trapped gracefully. -- AsciiDoc table 'format' attribute in table attribute lists were not - recognized. -- The nested horizontal labeled list example in the 'AsciiDoc User - Guide' has been dropped -- it generated invalid DocBook markup. - - -Version 7.0.0 (2005-06-06) --------------------------- -*************************************************** -This is a major release with many code and -documentation changes. -Please report any problems you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -*************************************************** - -.Additions and changes -- A new 'xhtml11' backend generates XHTML 1.1 with integrated CSS2 - replacing the previous 'xhtml', 'css', and 'css-embedded' backends. -- The CSS stylesheets have finally been rewritten. -- The asciidoc(1) command help now includes user - link:userguide.html#X36[customizable help] topics. When asciidoc is - invoked with the `--help` option the command argument is - interpreted as a help topic. -- The previous example website has been replaced by the actual - AsciiDoc website (see `./examples/website/`. -- XHTML generation options now controlled by the following attributes: - 'badges', 'linkcss', 'icons', 'numbered', 'quirks', 'theme', - 'stylesdir', 'imagesdir' (see the link:userguide.html#X33[User - Guide] for details. -- By default HTML and XHTML are output as stand-alone documents (no - embedded CSS and no linked admonition icon images). -- Documents encoded with the UTF-8 Unicode character set are now - processed thanks to a patch supplied by - mailto:viktor@rbg.informatik.tu-darmstadt.de[Viktor Vasilev]. -- The `-a ^name` command-line syntax to undefine an attribute has been - deprecated in favor of the `-a name!` syntax. -- AttributeEntry syntax addition: `:name!:` to undefine `name` attribute. -- Added `template` system block macro to allow the inclusion of one - configuration file template section within another. -- A 'verse' style attribute can now be applied to literal paragraphs - and blocks to reproduce line breaks and white space from the source - document. -- Replacements and Special Words can now be escaped with leading - backslashes. -- Replacements are now processed in configuration file order (previous - ordering was indeterminate). -- System macros can now be used in the base `asciidoc.conf` - configuration file. -- Deprecated features that emitted warnings in prior versions are no - longer tolerated. -- The `eval` system attribute expression evaluates to `False` the - attribute is undefined, if it evaluates to `True` the result is an - empty string. -- The Paragraph and DelimitedBlock 'presubs' parameter can be aliased - as 'subs'. -- Added 'verbatim' substitutions option. -- Renamed 'List Continuation Block' to 'List Block' and renamed the - 'listcontinuation' option to 'list'. -- Deprecated 'default' substitutions option (use 'normal' instead). -- The 'section-numbers' section numbering attribute has be renamed - 'numbered'. -- Dropped the '\#UNDER CONSTRUCTION#' block macro. -- Rewrote Paragraph and DelimitedBlock handlers adding a - link:userguide.html#X23[styles] configuration entry. - -.Bug fixes -- Included files are no longer read inside conditionally excluded - content. -- Manpage command names containing dashes (in the manpage NAME - section) were misinterpreted as the spaced dash command name/purpose - separator. Bug report and patch supplied by - mailto:david@dgreaves.com[David Greaves]. -- Unexpected error following malformed author line error. - - -Version 6.0.3 (2005-04-20) --------------------------- -.Additions and changes -- Special characters are now substituted in AttributeEntry element - values. -- Spaced and unspaced em dashes are now recognized (previously only - spaced em dashes were recognized). -- Replaced the table 'noborders' option with richer 'frame' and 'grid' - attributes. -- The `duplicate macro` warning message now only occurs when the - verbose (`-v`) option is enabled. -- Single lines starting with two forward slashes hard up against the - left margin are treated as comments and are not processed. -- Renamed 'section' delimited block option to 'sectionbody' to more - accurately reflect it's role. -- Added a List Continuation block -- a specialized delimited block - that is functionally equivalent to the List Item Continuation - feature except that the list contained within the block does not - require explicit '+' list item continuation lines. -- Dropped deprecated `` tags from generated HTML. -- Literal Block delimiters must now consist of at least four points - (previously three) to avoid lone ellipsis ambiguity. - -.Bug fixes -- Some system attribute evaluation failures caused unexpected - exceptions to occur. - - -Version 6.0.2 (2005-03-30) --------------------------- -.Additions and changes -- Three new 'system' block macros have been added -- `eval`, `sys` and - `sys2` which are the block macro equivalents to the same named - system attributes. -- 'Intrinsic' macros have been renamed 'system' macros along with - 'action' attributes which have been renamed 'system' attributes: - * To reflect their common (though contextually different) behavior. - * To avoid confusion with 'intrinsic attributes'. - -.Bug fixes -- Asciidoc now searches in `/etc/asciidoc/filters` for filters. - - -Version 6.0.1 (2005-03-06) --------------------------- -.Additions and changes -- A global configuration file location `/etc/asciidoc` has been added - and is now processed before all other locations (patch supplied by - mailto:stone@debian.org[Fredrik Steen]). -- Recoded `tempfile.mktemp()` and other artifacts that are no longer - necessary or desirable (patches supplied by - mailto:stone@debian.org[Fredrik Steen]). -- Added BUGS file to the distribution. - -.Bug fixes -- Illegal comment syntax in `css-embedded-stylesheet.conf` resulted in - illegal CSS in files generated by the `css-embedded` backend. - - -Version 6.0.0 (2005-01-28) --------------------------- -*************************************************** -This release has had some fairly major code and -documentation changes. Please report any problems -you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -*************************************************** - -A lot of new stuff. A new major version number -- some regression -incompatibility (hopefully mitigated by 'deprecated' warnings). - -Went mad trying to rein in the current feature anarchy -- established -a unified notion of document attributes. Attempted to introduce a -consistent vocabulary -- renamed many poorly or inconsistently named -entities. - -Actually, deprecated syntax is still processed correctly in almost all -cases. One source of incompatibility that may arise if you have -customized CSS stylesheets is the change of AsciiDoc CSS class names -(see below). I guess the moral is if you've done a lot of -configuration file customization and are happy with version 5 then you -may want to stay put. - -NOTE: This version requires Python 2.3 or better to run. - -.Additions and changes -- 'Glossary entries' have been renamed 'attributes'. This eliminates - confusion with the accepted meaning of glossary. -- An `AttributeEntry` block element has been added so that document - attributes can be assigned from within an AsciiDoc document. -- The `AttributeList` block element has been added which is a more - general solution than the (now deprecated) DelimitedBlock arguments. -- An BlockId element has been added for setting block element anchor - (link target) IDs. -- Quoted text can now span multiple lines (thanks to James Bowlin for - this patch). -- Inline macros can now span multiple lines. -- \``double backtick / apostrophe'' quotes generate ``curly quotes''. -- A warning is now emitted for out of order list item (applies to - explicitly enumerated numbered list items). -- Added `include` action attribute. -- A line of three or more apostrophes generates an HTML horizontal - ruler (`
    ` tag). You will get a warning if processed with - non-HTML backend. -- An `{imagesdir}` attribute specifies image file location for images - referenced in configuration files when generating HTML (the default - location is `images`). -- An `{stylesdir}` attribute specifies the location of CSS - stylesheets when generating styled HTML (the default location for - configured markup is `.`). -- The use of the (often inappropriately named) `{caption}` attribute - list entry has been deprecated, use `{0}` instead. -- New 'ExampleBlock' delimited block along with associated variants - Note, Tip, Warning, Caution and Important. -- The `docbook.conf` file now facilitates the optional inclusion of a - DocBook revision history file. -- To better reflect their purpose the following block elements have - been renamed: `VerbatimBlock` to `ListingBlock`; `IndentedBlock` to - `LiteralBlock`; `IndentedParagraph` to `LiteralParagraph`; - `CustomBlock` to `BackendBlock`; `SimpleSection` to `SectionBody`. - Any corresponding CSS class names have also been changed which could - result in backward incompatibility in customized stylesheets. -- Swapped plain DocBook admonition icons for Jimmac's DocBook icons - (http://jimmac.musichall.cz/ikony.php3). The original plain icons - have been moved to `./images/plain`. -- Renamed `html` backend to `xhtml` to better reflect it's function - (former `html-4` backend renamed to `html`). -- A new inline anchor macro syntax `[[[]]]` is available, it - displays `[]` at the anchor location and is for anchoring - bibliography list entries. -- An optional 'single-line titles' syntax can be used. -- Tweaks to distributed CSS stylesheets and FOP `fo.xsl` customization - file. -- 'List Item Continuation' has been implemented which allows - additional block elements to be included in list items by separating - them from the preceding list item element with a line containing a - single plus character. -- A new 'Horizontal Labeled List' list type has been added. Generates - two column list -- the first column contains the list element - labels, the second contains the element text. Same syntax as - `Vertical Labeled Lists` except the double colon label suffix is - followed by the start of the list item text. - -.Bug fixes -- Fixed broken backslash line continuation. -- Labeled list end tags were not undergoing attribute substitution. -- Documents without any author information now generate legitimate - DocBook (previously if the author line was not included in the - document header then an empty (illegal) DocBook `author` element was - generated). -- Multiple spaces in filter command arguments were replaced by a - single space. The `./examples/asciidoc2text/asciidoc2text.sh` script - now indents text correctly. - - -Version 5.1.1 (2004-10-10) --------------------------- -*15-December-2004: Interim update:* Updated `asciidoc.py` to fix -broken `join_lines` function -- no other changes. - -- PDF documentation is now produced from DocBook XML using XSLTLib and - FOP. Previously we processed DocBook SGML with `jw(1)` (which used - Dvips to convert DVI files to PDF). FOP has come a long way in the - last 12 months and produces very acceptable PDF under both Linux and - Windows. -- Sections detailing how to install and use the DocBook XSL - Stylesheets, xsltproc, FOP toolchain and the AsciiDoc XSLT drivers - have been added to the User Guide. -- The PDF output from the he example article template has been - included in the distribution (`./doc/article.pdf`). -- Special characters are emitted using decimal Unicode character codes - (previously used named character entities which cannot be assumed - included in non-HTML documents). -- Added registered trademark (R) to `[replacements]`. -- CSS stylesheet tweaks. -- Admonitions (Note, Tip, Important, Warning, Caution) include icons - when generating css output. - - -Version 5.1.0 (2004-09-18) --------------------------- -- Callouts have been implemented (see the 'Callouts' section of the - AsciiDoc User Guide for details). -- Added XSL drivers for generating XHTML, chunked XHTML and HTML Help - from DocBook XML using XSL stylesheets and xsltproc(1). -- Added CSS stylesheet for HTML generated from DocBook XML using XSL - stylesheets. -- Distribution contains HTML Help formatted User Guide - (`./doc/asciidoc.chm`), the User Guide tells you how it's generated. -- Images referred to by distributed stylesheets are now located in the - `./images` subdirectory (previously located in `.`). -- Filters path names are now handled properly under Cygwin. -- The usual documentation and examples additions, updates and - polishing. - - -Version 5.0.9 (2004-09-09) --------------------------- -- The convention of using a `.asc` file extension for AsciiDoc files - has been dropped in favor of the familiar `.txt` extension. It makes - more sense in that AsciiDoc is a text presentation format and - because `.asc` clashed with the same extension used by other - applications. It's only a naming convention -- you don't have to - switch if you don't want to. -- Changed the subscript formatting character from underline to tilde - since underscores in file names are reasonably common (especially in - link and image macros). -- An alternative syntax for the index term inline macro has been - added: `++,,++`. -- Index terms that have secondary and tertiary entries now - additionally generate separate index terms for the secondary and - tertiary entries. -- A `++` index term inline macro has been added which - displays the term in the primary text flow. -- Added alternative variable list definition using double semi-colon - terminator as opposed to the standard double colon terminator so - variable lists can be nested to two levels. -- Footnotes now appear on a separate line in HTML and Linuxdoc - outputs. -- Python version compatibility is checked at startup. -- Preface and appendix section titles in multi-part Book documents are - meant to be out of sequence -- warnings are no longer emitted when - outputting HTML. -- Empty section warnings have been replaced by error messages and are - emitted only if invalid markup would result. -- Missing macro sections or invalid macro name warnings are only - generated at startup if the `-v` (verbose) option is set. Otherwise - they are deferred until a matching macro is encountered in the input - file. -- Missing or invalid table definition warnings are only generated at - startup if the `-v` (verbose) option is set. Otherwise they are - deferred until a matching table is encountered in the input file. -- AsciiDoc now makes more of an effort to continue in the face of - errors. -- Fixed broken `./examples/website/main.aap` script. -- Converted distribution text files DOS text format as a sop to - Windows users with challenged text editors. -- Documentation additions and corrections. - - -Version 5.0.8 (2004-05-15) --------------------------- -- Spurious 'out of sequence' level 2 warnings no longer appear when - processing 'book' document multi-part book top level Preface and - Appendix sub-sections since they are (correctly) out of sequence. -- A warning is no longer emitted for empty Index sections since this - is normal when generating DocBook outputs. -- Fixed: `[quotes]` configuration file entries where not being - overridden by downstream configuration file entries. -- Footnote text is now output enclosed in square brackets in HTML - documents. -- Added superscripts and subscripts to the standard PRS configuration - files. -- Adjusted CSS stylesheets so list titles don't have so much space - between title and first list item (broken in IE6 due to poor CSS - compliance). Lessened sidebar title top margin. - - -Version 5.0.7 (2004-04-22) --------------------------- -- The version 5.0.6 README incorrectly stated that AsciiDoc would run - under Python 2.0, in fact it requires Python 2.1 or better. The - README has been corrected. -- Documented techniques for combining and splitting AsciiDoc documents - and processing the combined and split parts (see the 'Tips and - Tricks' section of the User Guide). -- An example of marking up superscripts and subscripts is documented - in the 'Tips and Tricks' section of the User Guide (the example - configuration file is in the AsciiDoc `examples` directory). -- Added ellipsis to shipped `[replacements]`; three periods output an - ellipsis entity. -- Removed unused 'SectionClose' class. -- The AsciiDoc 'Preamble' element is output as a DocBook 'Preface' - when processed as a 'book' document type (in older AsciiDoc versions - a warning was issued and processing stopped). -- Fixed a quoting anomaly: quoted text can no longer begin or end with - with white space. - - -Version 5.0.6 (2004-03-07) --------------------------- -- New 'image' macro implements optional image scaling and linking and - works in both inline and block contexts. The 'image' macro obsolesces - the existing 'graphic' block macro and 'icon' inline macro. -- Macro substitution section names now have `-inlinemacro` and - `-blockmacro` suffixes to resolve context ambiguity, make their - purpose clearer and relieve section namespace congestion. -- Header derived glossary entries can now be overridden from the - command-line. -- Special character substitution is now performed on AuthorLine - derived author names. -- A macro or block argument called 'options' can be used as a shortcut - for a list named arguments with zero length string values. -- Tables can be output without borders using the `options="noborders"` - argument. -- Table data lines that do not immediately follow a table section - underline can now be blank. This allows CSV data with embedded blank - lines to be processed correctly. -- Blank DSV format table data lines are silently skipped. -- Tightened up on enforcement of configuration file section names to - reduce the possibility of section content being seen as a section - header line. -- Section titles can be optionally suffixed with title arguments - enclosed in double square brackets. -- A replacement has been added to `asciidoc.conf` to replace inline - double dashes with the `—` entity. -- Changed the `.UNDER-CONSTRUCTION.` macro syntax to - `#UNDER-CONSTRUCTION#` so it is not mistaken for a BlockTitle. - Similarly changed the `.NEW.` replacement with - `#NEW#`. -- `#NEW#` and `#UNDER-CONSTRUCTION#` macros are now - included in the DocBook backend. -- Replaced shipped `smallnew.gif` with `smallnew.png`. -- Documentation tidy ups. - - -Version 5.0.5 (2004-02-25) --------------------------- -- Fixed the disappearing paragraph titles problem that was caused by - Inline macros (incorrectly) processing BlockTitles. -- Tightened AuthorLine validation. Previously invalid email addresses - and embedded special characters in the AuthorLine resulted in - invalid output markup. - - -Version 5.0.4 (2004-02-09) --------------------------- -- Reinstated missing `infile`, `outfile`, `filetype` and - `filetype-` glossary entries. -- As of version 5.0.3 asciidoc(1) now requires Python 2.0 or greater, - this has now been documented. - - -Version 5.0.3 (2004-01-23) --------------------------- -- Fixed problem that caused any filters directory file containing - `.conf` (not just those with the `.conf` extension) from being - loaded. -- All `[miscellaneous]` configuration file entries can now be - referenced like glossary entries (they are now processed internally - as glossary entries). -- The output file line terminator (previously hardwired to `\r\n` is - now set using the `newline` entry in the configuration file - `[miscellaneous]` section. -- The misspelt `blocktitles` configuration file entry name has been - corrected (to `blocktitle`). -- An `{empty}` glossary entry has been added to the default - configuration which is useful for outputting trailing blank lines - from configuration file substitution sections. - - -Version 5.0.2 (2003-12-18) --------------------------- -- New (alternative) 'anchor' and 'xref' macro syntax (old syntax still - valid). -- DocBook `mediaobject` and `inlinemediaobject` tags are generated in - place of `graphic` and `inlinegraphic` tags by the AsciiDoc - `graphic` and `icon` macros. If a macro argument is specified it is - the alternative text output if the target document format does not - support the specified graphic file format. -- Dropped the LinuxDoc left and right square bracket special character - substitutions as they interfered with macro substitution. -- Documentation updates and corrections. - - -Version 5.0.1 (2003-12-09) --------------------------- -- Fixed problem with anchor tag when generating CSS styled HTML. - - -Version 5.0 (2003-12-08) ------------------------- -*************************************************** -This release has had some fairly major code and -documentation changes. Please report any problems -you encounter. - -mailto:srackham@gmail.com['Stuart Rackham'] -*************************************************** - -- AsciiDoc can now produce a full-blown multi-part DocBook book - including dedication, abstract, preface, colophon, glossary, - appendix, bibliography and book part elements using the new - `specialsections` configuration file section. -- All Section element children (Paragraph, DelimitedBlock, List, - Table, BlockMacro) can now be titled using the BlockTitle element. - A BlockTitle element is a single line containing a title and - beginning with a period. -- The `index` and `backmatter` macros have been dropped, superseded by - `specialsections`. -- The AsciiDoc 'Preface' element has been renamed 'Preamble' (to avoid - confusion with the DocBook book preface element). -- Out of sequence titles are now tolerated with a warning. This allows - book document level 0 sections to be processed. -- An 'anchor' inline macro has been added for document link target - creation. -- 'Note', 'Tip', 'Important' and 'Warning' paragraph types have been - added to support the corresponding DocBook elements. -- Title substitution is now performed in SidebarBlock titles. -- DocBook graphics now output as `figure` and `informalfigure` - elements rather than `mediaobjects`. This ensures numbered figures - and a lists of figures are produced by the DocBook toolchain. -- You can now escape block argument lines by appending a backslash. - Alternatively, if you embed arguments in the delimiter line AsciiDoc - does not check for an arguments line. -- The default DocBook backend file extension has been changed from - `.docbook` to `.xml` (`.sgml` for the 'docbook-sgml' backend). -- Warnings are output by default (previously they only printed when - verbose option enabled). -- A Question and Answer variable list definition has been added to the - shipped configuration files, primarily to create DocBook `qanda` - DocBook elements. -- Fixed broken code-filter `-b linuxdoc` option. The asciidoc.asc User - Guide can now be processed by linuxdoc(1) (although tables are - dropped because LinuxDoc does not implement tables). - -.Compatibility issues: -1. Table titles are no longer in the arguments line, use the new - BlockTitles. -2. Graphic titles are no longer in the 'graphic' block macro caption, - use the new BlockTitles. -3. The code-filter title must be placed in a preceding BlockTitle. -4. SidebarBlock titles must be placed in a preceding BlockTitle. -5. The DelimitedBlock option 'sidebar' has been renamed to 'section'. -6. The default DocBook backend file extension has been changed from -`.docbook` to `.xml` (`.sgml` for the 'docbook-sgml' backend). - - -Version 4.2 (2003-11-26) ------------------------- -- The default HTML output is now XHTML 1.0 markup. To output the - former HTML 4 markup specify the `html-4` backend. -- The default DocBook output is now DocBook XML. To output the former - DocBook SGML specify the `docbook-sgml` backend. The associated - `docbook-sgml.conf` file illustrates how to support minor DTD - variations. Examples of using the `xmlto(1)` command for DocBook - conversion have been added to the User Guide. -- Glossary entries set using the command-line -g option can now be - referenced in configuration files. -- Configuration dumps (`-c` command-line option) no longer output - redundant undefined glossary entries. -- DelimitedBlock arguments can now be specified in a separate arguments - line immediately following the leading delimiter line, This is in - preference to the existing delimiter embedded arguments. Reasons: - * The syntax is in keeping with the Tables arguments syntax. - * It's easier to enter and implements line continuation. -- A new QuoteBlock DelimitedBlock definition has been added to the - distribution configuration files. -- The table arguments lines can be continued using the backslash line - continuation character. -- Added new calculated glossary reference type `{%}`. -- Double-quote characters can now appear in unquoted positional - arguments. - - -Version 4.1 (2003-11-13) ------------------------- -- Added DSV (Delimiter Separated Values) tables format. -- `{eval:}` glossary references drop the containing line if - `` evaluates to `None`. -- Block, Table and Macro arguments can now be positional (quoted or - unquoted). -- Vocabulary change: DelimitedBlock, Table and Macro 'attributes' are - now referred to as 'arguments'. This makes more sense in light of the - extended syntax and avoids confusion with backend markup tag - attributes. -- 'tablewidth' table ruler parameter can now be expressed in percent - units (0..100). If between 0 and 1 then the original fractional unit - measure is applied. -- The use of quoting for generating footnotes and index entries has - been dropped in favor of 'footnote' and 'indexterm' inline macros. -- 'backmatter' inline macro included in distribution. -- Fixed: CSS styled HTML tables are now fully XHTML 1.0 conformant. -- Fixed: 'tablewidth' was processed incorrectly when passed as table - argument. -- Fixed: Glossary references like `{x=\{y}}` were one character off - if \{x] was defined and `{y}` was not. - - -Version 4.0 (2003-11-08) ------------------------- -*************************************************** -This release has had some fairly major code and -documentation changes. Please report any problems -you encounter. - -'Stuart Rackham' -*************************************************** - -- Added tables to AsciiDoc. -- Added two special 'subs' options: 'default' specifies the default - substitution options and 'none' specifies no substitution. These - options can only appear singly. -- Line continuation using a trailing backslash character is available - in Paragraphs, ListItems, Tables. -- The left and right quotes for quoted text can now be specified - separately. -- Shipped configuration files implement footnotes (only useful for - DocBook output) using \[[]] quoting. -- Shipped configuration files implement index terms (only useful for - DocBook and LinuxDoc output) using \(()) quoting. -- The shipped 'html' backend configuration now emits valid 'HTML 4.01 - Transitional'. -- Added new calculated glossary reference types `{!}` - and `{#}`. -- The DelimitedBlock 'params' option has been dropped in favor of the - new 'block attributes' mechanism. If you have customized block - params options you may need to adjust source files to use the - 'block attributes' syntax. The example code filter has been updated - to reflect these changes. -- The code filter now has a `-t tabsize` option. -- Replaced `-w` option with `-v` (verbose) option. The warnings option - was just to confusing. -- Named attributes can now be specified in macro calls. -- The 'tabsize' attribute is recognized in the built-in `include` - macros. A tabsize of zero suppresses tab expansion. -- The configuration file `[options]` section has been split into - `[miscellaneous]` and `[titles]`. If you have customized any of - these settings you will need to adjust the affected configuration - files. -- Configuration file `[miscellaneous]` entries can now also be set - using the command-line `-g` option. -- Fixed: error that occurred when attempting to use zero length - configuration and source files. -- Fixed: blocking filter halt problem. -- Fixed: inline macro escape prefix problem. -- Fixed: missing macros from configuration dump problem. -- Fixed: named macros were dumped incorrectly. -- Many documentation changes/additions/corrections. - - -Version 3.2.2 (2003-10-26) --------------------------- -- Added `-n` option (synonym for `-g section-numbers`). -- Dropped the processing commentary (hey, this is Unix). -- Added new calculated glossary reference type `{?}`. - `` is the glossary entry name and `` is the text - substituted if the glossary entry is defined. `` can only - contain literal text (no glossary references allowed). -- Added `asciidoc2text` to distribution `examples/asciidoc2text` - directory (converts AsciiDoc source to text file with section - numbering). -- Fixed incorrect nesting of Simple lists inside Variable lists. -- List definitions have been modified so that list items can be - indented. This allows a more intuitive indentation of nested lists - in AsciiDoc source. -- Lists must be separated from preceding paragraphs by a blank line. - This is to avoid paragraph lines being mistaken for list items. -- Corrected asciidoc man page documentation error: the`-f` option does - *not* search relative to source document directory for the - configuration file. -- Minor updates to various distribution `.conf` files. -- Included `badges.conf` in `examples` directory. -- `css-embedded-stylesheet.conf` now supports footer badges. -- The default in-line element processing order has been changed: - Glossary References are now processed before Inline Macros. This - allows glossary expansions to occur inside macro references. -- Glossary entries are now allowed in Author and Revision lines. -- Default List `subs` options and Paragraph `presubs` options are - assigned the following default value if not specified: - - specialcharacters,quotes,specialwords,replacements,glossary,macros - -- Documentation changes/additions/corrections. - - -Version 3.2 (2003-05-26) ------------------------- -- Added a `-s` command-line option to suppress the output of - `[header]` and `[footer]` sections. -- Article document headers are no longer mandatory: this allows - AsciiDoc to process arbitrary chunks of text. When used in - conjunction with the new `-s` command-line option corresponding - chunks of backend markup can be generated. -- AsciiDoc now emits a warning message and continues when an out of - sequence section title is detected (previously it failed and - halted). This allows document sections to be processed separately. -- Optional 'presubs' and 'postsubs' entries have been added to - 'DelimitedBlock' and 'Paragraph' definitions. As a consequence - substitution options are no longer legal in 'options' entries. -- 'presubs' and 'postsubs' substitutions are processed in the order - the options are specified (rather than the fixed 'options' order of - previous versions). -- ./filters subdirectories are automatically searched for filter - commands. -- A 'title-subs' configuration option specifies the substitutions - performed on document Header and Section titles. -- A 'subs' entry in now included in List configuration file - definitions that specified substitutions performed on list entry - text. -- Configuration files are auto-loaded from ./filters subdirectories. -- Added example code filter (see ./examples/filters). -- Bug fix: if section was empty you may have got erroneous 'missing - tag "paragraph"' error. -- Internal code tidy up. - - -Version 3.1 (2003-05-18) ------------------------- -- In version 3.0 a `[macros]` section entry of the form 'name' was - equivalent to 'name='. An entry of the form 'name' now undefines the - entry (to bring it in line with the behavior of other special - sections). -- Paragraphs have now been generalized (in the same way as Lists and - DelimitedBlocks). -- The 'indentsize' option has been dropped as as consequence of - paragraph generalization. -- Pipe | characters can be included in substituted tag and - substitution section text using the \{brvbar} (broken vertical bar) - glossary reference. -- Removed the restriction requiring substitution section text - placeholders | to be on a separate line. -- Added an `-e` asciidoc(1) command option that excludes implicit - configuration files (used in conjunction with `-c` generated - configuration files). -- Version 3.0 documentation has undergone a considerable cleanup. -- The dumping of quoted section entries (see `-c` option) now works - correctly. -- The format of special section entries has been made consistent: - `name` undefines the entry; `name=` sets the entry value to a blank - string; `name=value` sets the entry value to `value`. -- As a consequence of the previous change the caret prefix is no - longer used in glossary configuration file entries (although it is - still used when undefining an entry using the `-g` command-line - option). - - -Version 3.0 (2003-05-13) ------------------------- -This version is the culmination of work begun in the 2.x releases -whereby fixed policy has been replaced by extensible mechanisms. - -- Added `-c` command-line option to dump a composite asciidoc(1) - configuration file to stdout. -- Lists and Delimited Blocks are now defined by a set of configuration - file parameter sections. The user can modify the default - definitions or add new ones. -- Block content can now be processed through external filters. -- The default behavior for Custom Blocks is to perform glossary - substitution (previously there was no substitution inside Custom - Blocks). -- The old 2.x style macros have been reimplemented; as with Lists and - Delimited Blocks there syntax and behavior can be configured by the - user. The default macro syntax remains the same but the semantics - are now (hopefully) a bit more intelligible. -- Block and Builtin macros use :: delimiter instead of the 2.x single - colon delimit (to distinguish them from inline macros). The 2.x - syntax is still supported for backward compatibility. -- Nested lists are now supported and IndentedParagraphs can be - included in list items. -- Conditional source inclusion can be specified using built in `ifdef`, - `ifndef` and `endif` macros. -- The new conditional source inclusion feature has been used to reduce - the number of default configuration files down to one per backend. -- A change of name: 2.x 'Substitutions' are now called 'Replacements' - and the 2.x `[substitutions]` configuration file section is now - called `[replacements]` (the old name is still recognized for - backward compatibility). -- The line break is now implemented as a 'Replacements' substitution. -- Inline 'icon' macro for inline images has been added to default - configuration files. - -Version 2.2 (2003-04-07) ------------------------- -- The `master.conf` configuration file name has been deprecated in - favor of `asciidoc.conf`. -- The standard configuration files set is now loaded from the - `.asciidoc` folder in the users home directory (if it exists) and - then from the source document directory. Configuration files that - don't exist are silently skipped. -- Configuration files named like the source file will be automatically - loaded if they are found in the source file directory. For example - if the source file is `mydoc.asc` and the `-b html` option is used - then asciidoc(1) will look for `mydoc.conf` and `mydoc-html.conf` in - that order. -- The characters used to quote formatted text can be configured and - extended by the user (see the master.conf [quotes] section). -- Quoted text can now be escaped by prefixing a backslash character to - the leading quote. -- The double single-quote '' strong text quote has been deprecated in - favor of an asterisk * character. -- Added \{eval:expression}, \{sys:command} and \{sys2:command} - glossary reference actions. -- Trailing brace characters `}` are now allowed inside glossary - references provided they are escaped with a backslash character. -- Glossary entries can now be escaped by prefixing a backslash - character to the leading brace character (use this in preference to - placing the backslash inside the brace). -- The output macro has been deprecated (use the new include1 macro - inside a CustomBlock). -- The default document type is `article` (asciidoc no longer attempts - to guess). -- Files included within DelimitedBlocks are not searched for block - termination underlines. This ensures the entire file is part of the - DelimitedBlock. -- `include` macros can now be used in configuration files. -- Corrected \{infile} and \{outfile} glossary entry documentation. -- File inclusion is now limited to a depth of 5 to catch recursion - loops. -- Inline tags have been deprecated, they're not necessary and they - immediately make the source document backend specific. Use - CustomBlocks or Substitutions instead. - -Version 2.1 (2003-03-17) ------------------------- -- Added section auto numbering `{sectnum}` glossary entry - (auto-numbering function contributed by Ludovico Magnocavallo). -- asciidoc(1) now correctly returns non-zero exit status if an error - occurs. -- An AsciiDoc example website has been included in the AsciiDoc - distribution `examples/website` directory. -- NOTE: The `asciidoc` wrapper script included in the 2.0 distribution - has been dropped, if you've symlinked or aliased to `asciidoc` you'll - need to change them to point directly to `asciidoc.py` instead. -- An RCS $Id$ marker can be used as the document header revision line - (based on a patch submitted by Ludovico Magnocavallo). -- In addition to the `name=value` glossary entry format two new ones - have been introduced: `name` (the default value is set to an empty - string) and `^name` (the glossary entry is undefined). -- The `-q` command-line option has been deprecated and the `-w level` - command-line option added. + - NOTE: By default skipped substitution warnings are now suppressed. -- If a configuration file specified with the `-f` command-line option - is not found relative to the current working directory then the - search is repeated relative to the asciidoc(1) directory. This - allows global configuration files to be used. -- Added `{infile}`, `{outfile}` predefined glossary entries. -- Added `under-construction` macro to HTML article configuration - files. -- Deprecated `{asciidoc_version}` glossary entry in favor of - `{asciidoc-version}` (to it consistent with other entries). - -Version 2.0 (2003-02-24) ------------------------- -- The emphasized, strong and monospaced words options have been - generalized with the introduction of macro based 'special words' - lists. -- Glossary references can now appear in both the document and macro - bodies. -- All output files use `crlf` line termination (previously used UNIX - `lf` (newline) termination). -- Added [substitutions] section which implements arbitrary regular - expression based substitutions. -- An optional `master.conf` configuration file can be used for entries - that are not backend or document type specific. -- Special character definitions moved from the code to the new - [special_characters] configuration file section. -- Configuration file glossary added. -- Command-line -g glossary entry added. -- A new 'book' document type has been implemented for the 'docbook' - backend. It outputs DocBook 'book' documents. -- A major internal change has been the implementation of parametrized - user definable 'macros'. Internally most document elements are now - processed as macros. -- Configuration file macro variables can be specified with default - values (literals or other macro variables). -- An attempt has been made to tighten up the vocabulary used to - describe the AsciiDoc document syntax. -- The term abstract has been replaced by the more general term - 'preface' and a new preface section introduced into article - configuration files (replacing the synopsis sections). -- Any section elements can now be put in the document preface - (previous versions only allowed paragraphs). -- AsciiDoc Blocks have been unified and their behavior can be user - defined and parametrized. -- An 'output' inclusion allows an external file to be written directly - to the backend output file. -- A new CustomBlock has been added. Default behavior is to insert the - enveloped AsciiDoc source lines directly into the output file. -- A 'line break' tag can be inserted by terminating a line with a '+' - character (only really useful for HTML backends). -- An fourth section level has been introduced. -- The SidebarBlock delimiter line characters have been changed. The - deprecated underline is still accepted. -- Levels 2 and 3 title underline characters have been changed. The - deprecated underlines are still accepted. -- Lines with backend specific inline tags can be inserted into - AsciiDoc source files. -- Single words enveloped by underscores are no longer emphasized. This - feature was deprecated as it is redundant (use single quotes - instead) and was being applied to file names with underscores. -- A `-q` quiet option has been added to suppress warning messages. -- Badge images sourced locally. -- Added 'author' and 'author-mail' meta tags to HTML configuration - files. - -Version 1.5 (2003-01-08) ------------------------- -- Implemented sidebar document elements. -- Explicit checks for user specified configuration files and input - file (rather than throwing exception). - -Version 1.4 (2003-01-04) ------------------------- -- New configuration file options 'emphasizedwords' and 'strongwords'. - These allow the definition of words that will always be emphasized - or rendered in a strong font without inline formatting. -- Document and section titles are no long subject to inline - formatting. -- Multiple configuration files can be overlaid in a single command. -- Configuration file tags and options entries can now be overridden on - an entry by entry basis (previously the entire section was - overloaded). -- Configuration file tags and options entries are now cached this has - resulted in around 37% performance improvement over version 1.3. -- Variable lists can now contain multiple terms per list item. -- Placeholder paragraph eliminated from empty sections that contain - subsections. -- Added \{asciidoc_version} substitution variable. -- More documentation additions and tidy ups. - -Version 1.3 (2003-01-01) ------------------------- -- A new 'strong' text formatting convention has been implemented: - Word phrases enclosed in pairs of single quote characters (acute - accents) are rendered in a strong font (usually bold). -- Paragraphs can now be followed immediately by Simple lists and - Ordered lists without an intervening blank line. -- A user specified configuration file (`asciidoc(1)` -f option) - overlays the default configuration file rather than replacing it. - Custom configuration files need only contain those sections - that have been customized. -- Comment Block delimiters have been relaxed slightly. They must start - with three forward slashes /// but the remainder can contain any - characters, this allows comments to be embedded in the delimiter line. -- Leading non-digit characters preceding revision number are now - ignored. -- Set default indentsize [option] from 2 to documented default value - of zero in HTML backend html-article.conf and html-manpage.conf - files. -- Fixed error that occurred when taking input from stdin without - explicitly specifying a document type. -- Restored file name and line number error message information. -- Changed deprecated -t option to -d in asciidoc --help and usage - command output. -- CSS styles tweaking. -- Code, configuration file and documentation tidy ups. - -Version 1.2 (2002-12-28) ------------------------- -- Implemented 'include' URL to allow file inclusion. -- `fileextension` configuration file [option] renamed to more sensible - `outfilesuffix` (`fileextension` still accepted by this version but - will be dropped in future). -- Improved error reporting. -- CSS backends generate valid XHTML. -- New `css-embedded` backend generates HTML with embedded stylesheets - (use the `css` backend for linked stylesheets). The css-embedded - backend output contains no linked images so the generated html files - are completely self contained. -- Bug fixes. - -Version 1.1 (2002-12-03) ------------------------- -- Added css (cascading style sheets) backend -- Implemented IndentedBlock document element. -- Tabsize command-line option has been deprecated in - favor of configuration file. -- Default indent width changed to zero. -- Added \{localdate} and \{localtime} substitution variables. -- Added optional [options] configuration file section with - fileextension, tabsize and indentsize options. -- Implemented \{authorinitials} substitution variable. -- Added https link type. -- Corrected [graphic] substitution from \{title} to \{caption} - in linuxdoc-article.conf configuration file. -- Fixed error that occurred when '==' title underline was - used. - -Version 1.0 (2002-11-25) ------------------------- -First AsciiDoc public release along with AsciiDoc web site -(http://asciidoc.org/) and SourceForge.net project registration -(https://sourceforge.net/projects/asciidoc/[]). - -// vim: set syntax=asciidoc: diff -Nru asciidoc-8.6.10/examples/website/customers.csv asciidoc-10.1.2/examples/website/customers.csv --- asciidoc-8.6.10/examples/website/customers.csv 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/customers.csv 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -"AROUT","Around the Horn","Thomas Hardy","120 Hanover Sq. -London","(171) 555-7788" -"BERGS","Berglunds snabbkop","Christina Berglund","Berguvsvagen 8 -Lulea","0921-12 34 65" -"BLAUS","Blauer See Delikatessen","Hanna Moos","Forsterstr. 57 -Mannheim","0621-08460" -"BLONP","Blondel pere et fils","Frederique Citeaux","24, place Kleber -Strasbourg","88.60.15.31" -"BOLID","Bolido Comidas preparadas","Martin Sommer","C/ Araquil, 67 -Madrid","(91) 555 22 82" -"BONAP","Bon app'","Laurence Lebihan","12, rue des Bouchers -Marseille","91.24.45.40" -"BOTTM","Bottom-Dollar Markets","Elizabeth Lincoln","23 Tsawassen Blvd. -Tsawassen","(604) 555-4729" -"BSBEV","B's Beverages","Victoria Ashworth","Fauntleroy Circus -London","(171) 555-1212" -"CACTU","Cactus Comidas para llevar","Patricio Simpson","Cerrito 333 -Buenos Aires","(1) 135-5555" diff -Nru asciidoc-8.6.10/examples/website/epub-notes.txt asciidoc-10.1.2/examples/website/epub-notes.txt --- asciidoc-8.6.10/examples/website/epub-notes.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/epub-notes.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,210 +0,0 @@ -AsciiDoc EPUB Notes -=================== - - -Restrictions ------------- -- If the date format of the DocBook 'data' element is not formatted like - `YYYY[-MM[-DD]]` you will get an error like the following one when - validating with `epubcheck(1)`: - - ERROR: doc/article.epub/OEBPS/content.opf(6): date value 'Dec 2003' - is not valid, YYYY[-MM[-DD]] expected - -- Navigation headers are suppressed by `docbook-xsl/epub.xsl` (see - <>). - - -DocBook XSL Stylesheets related limitations and bugs ----------------------------------------------------- - -=== epub: toc.section.depth parameter ignored -https://sourceforge.net/tracker/?func=detail&aid=3043393&group_id=21935&atid=373747 - -epub outputs include every section in the table of contents regardless of the -toc.section.depth XSL Stylesheets parameter -(http://docbook.sourceforge.net/release/xsl/current/doc/html/toc.section.depth.html). -This behavior is specific to epub (xhtml and fo outputs honor -toc.section.depth). - -Environment: DocBook XSL 1.75.2; Xubuntu 10.04 - -Also epub/docbook.xsl has written a hard-coded illegal dtb:depth value of -1 -into the toc.ncx navigation control file: - - - -Shouldn't it be a positive integer equal to the depth navPoint nesting in the -navMap element (see -http://www.niso.org/workrooms/daisy/Z39-86-2005.html#NavMeta)? Though epubcheck 1.05 doesn't flag it as invalid -- are they both wrong? - - -[[X1]] -=== epub: untitled DocBook sidebar emits invalid XHTML -https://sourceforge.net/tracker/index.php?func=detail&aid=2840768&group_id=21935&atid=373747 - -I get the same problem, but is confined to EPUB outputs (not XHTML) -and results in the sidebar and all subsequent text on the page -displayed in bold text in both Firefox 3.6.8 and Google Chrome -5.0.375.125 (I haven't checked other browsers). - -Environment: DocBook XSL 1.75.2; Xubuntu 10.04 - -If a DocBook sidebar element does not have a title then the emitted -title is (I haven't checked other browsers). -set to instead of , for example this DocBook markup: - - - Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - - -Generates this EPUB XHTML: - - - -This problem is not picked up by either the epubcheck or the W3C -validators. - -The problem does not occur generating XHTML which emits the following -for the above example: - - - - -=== epub: Unreferenced callout icons in OPF -NOTE: A workaround for this problem was added in `a2x(1)` version -8.6.5. - -https://sourceforge.net/tracker/?func=detail&aid=2854075&group_id=21935&atid=373747 - -Environment: DocBook XSL 1.75.2; Xubuntu 8.04 - -When callouts are used in a document and callout graphics are disabled -(callout.graphics=0) the generated 'contents.opf' still contains -references to all the callout icons even though none are not -referenced in the generated XHTML content. This results in 10 -epubcheck validation errors like: - - image file OEBPS/images/icons/callouts/1.png is missing - -It appears that epub is adding the icons to the OPF without -first checking the callout.graphics parameter. - - -=== epub: Table grids not generated -https://sourceforge.net/tracker/?func=detail&aid=2849647&group_id=21935&atid=373747 - -Environment: DocBook XSL 1.75.2; Xubuntu 8.04 - -DocBook XSL epub does not appear to process the DocBook table element rowsep -and colsep attributes -- table grids are not displayed. The DocBook - results in: - -epub DocBook XSL generates: - - -......................................... - -Now you can use the style name to style cells or columns (in this -example we use an unambiguous shortened abbreviation 'r'): - -[listing] -......................................... -|================================== -|Normal cell r|Red cell -|================================== -......................................... - - -== How can I add highlighted editorial comments to an AsciiDoc document? -Both block and inline link:userguide.html#X25[comment lines] are -displayed on the output if the 'showcomments' attribute is defined. -Example: - -[listing] -......................................... -:showcomments: -// A block comment line. - -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -// An inline comment line. -adolescens. -......................................... - -Is rendered as: - -:showcomments: -// A block comment line. - -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -// An inline comment line. -adolescens. - -NOTE: link:userguide.html#X26[Comment blocks] are never displayed. - - -== What is the preferred file name extension for AsciiDoc files? -The `.txt` http://en.wikipedia.org/wiki/Text_file[text file] extension -is preferred, but it's just a convention and it's not enforced by the -software. - -AsciiDoc source files are human readable -http://en.wikipedia.org/wiki/Plain_text[plain text] files which is -what the `.txt` extension is for. All text editors recognize and open -files with a `.txt` extension. The `.txt` extension is universally -recognized and unambiguous -- you are not left asking questions like -``What on earth is this file with the funny extension?'', ``How do I -open it?'' and ``Is it safe to open?''. - - -== How can I generate numbered bibliographic entries? -If your outputs are DocBook generated then adding the following inline -macro to a custom configuration file will result in auto-incrementing -bibliography entry numbers (instead of displaying the bibliographic -identifiers): - - [anchor3-inlinemacro] - [{counter:bibliography2}] - -This FAQ submitted by Bela Hausmann. - - -== How can I include lines of dashes inside a listing block? -A line of four or more dashes will be mistaken for the ListingBlock -terminator, one way round this problem is to use a LiteralBlock styled -as a listing block. For example: - - [listing] - ........................... - Lorum ipsum - ----------- - ........................... - - -== How can I customize PDF files generated by dblatex? - -There are a number of dblatex XSL parameters that can be used to -customize PDF output. You can set them globally in the AsciiDoc -`./dblatex/asciidoc-dblatex.xsl` configuration file or you can also -pass them on the a2x(1) command-line. Here are some examples: - -The -http://dblatex.sourceforge.net/doc/manual/latex.output.revhistory.html[latex.output.revhistory] -parameter is used to suppress the revision history: - - a2x -f pdf --dblatex-opts "-P latex.output.revhistory=0" doc/article.txt - -The -http://dblatex.sourceforge.net/doc/manual/doc.layout.html[doc.layout] -parameter is used to include the cover page and document body (i.e. excludes -table of contents and index), the -http://dblatex.sourceforge.net/doc/manual/doc.publisher.show.html[doc.publisher.show] -parameter is used to exclude the cover page logo: - - a2x -f pdf --dblatex-opts " -P doc.layout=\"coverpage mainmatter\" -P doc.publisher.show=0" doc/article.txt - -See also the -http://dblatex.sourceforge.net/doc/manual/sec-params.html[dblatex XSL -parameter reference]. - - -== How can I add lists of figures and tables to PDFs created by dblatex? -Set the -http://dblatex.sourceforge.net/doc/sec-custom.html[doc.lot.show XSL -parameter] -- you can set it using the dblatex `--param` command-line -option, for example: - - a2x --dblatex-opts="--param=doc.lot.show=figure,table" doc/article.txt - - -== How can I stop the document title being displayed? -You could simply omit the document title, but this will result in a -blank 'title' element in HTML outputs. If you want the HTML 'title' -element to contain the document title then define the 'notitle' -attribute (this will just suppress displaying the title), for example: - - My document title - ================= - :no title: - - -== Why am I having trouble getting nested macros to work? -The following example expands the 'image' inline macro, but the -expansion contains double-quote characters which confuses the ensuing -'footnoteref' macro expansion: - - footnoteref:["F1","A footnote, with an image image:smallnew.png[]"] - -The solution is to use unquoted attribute values, replacing embedded -commas with the comma character entity (`,`): - - footnoteref:[F1,A footnote, with an image image:smallnew.png[]] - -Similarly, you can embed double-quote characters in unquoted attribute -values using the `"` character entity. - - -== Why am I getting DocBook validation errors? -Not all valid AsciiDoc source generates valid DocBook, for example -'special sections' (abstract, preface, colophon, dedication, -bibliography, glossary, appendix, index, synopsis) have different -DocBook schema's to normal document sections. For example, a paragraph -is illegal in a bibliography. - -Don't forget if your document is a book you need to specify the -asciidoc `-d book` command option, if you don't an article DocBook -document will be generated, possibly containing book specific -sections, resulting in validation errors. - - -== How can I disable special section titles? -For example, you want to use 'References' as a normal section name but -AsciiDoc is auto-magically generating a DocBook 'bibliography' -section. All you need to do is explicitly specify the section template -name, for example: - - [sect1] - References - ---------- - - -== How can I insert XML processing instructions into output documents? -Use an inline or block passthrough macros. This example inserts -`` into the DocBook output generated by -AsciiDoc: - - pass::[] - -NOTE: XML processing instructions are specific to the application that -processes the XML (the previous `dblatex` processing instruction is -recognized by `dblatex(1)` when it processes the DocBook XML generated -by Asciidoc). - - -[[X4]] -== How do I prevent double-quoted text being mistaken for an inline literal? -Mixing doubled-quoted text with inline literal passthroughs can -produce undesired results, for example, all of the following line is -interpreted as an inline literal passthrough: - - ``XXX'' `YYY` - -In this case the solution is to use monospace quoting instead of the -inline literal: - - ``XXX'' +YYY+ - -Use the +\pass:[]+ macro if it's necessary to suppress -substitutions in the monospaced text, for example: - - ``XXX'' +pass:[don't `quote` me]+ - - -== How can I generate a single HTML document file containing images and CSS styles? -With the advent of Internet Explorer 8 all major web browsers now -support the -http://en.wikipedia.org/wiki/Data:_URI_scheme[data URI scheme] for -embedded images. The AsciiDoc 'xhtml11' and 'html5' backends supports -the data URI scheme for embedded images and by default it embeds the -CSS stylesheet. For example the following command will generate a -single `article.html` file containing embedded images, admonition -icons and the CSS stylesheet: - - asciidoc -a data-uri -a icons article.txt - - -== Are there any tools to help me understand what's going on inside AsciiDoc? - -AsciiDoc has a built-in trace mechanism which is controlled by the -'trace' attribute; there is also the `--verbose` command-line option. -These features are detailed in -http://asciidoc.org/userguide.html#X82[Appendix G of the -User Guide]. - - -== One-liner ifdef::[]'s are disproportionately verbose can they shortened? - -This is the response to a question posted on the AsciiDoc discussion -list, it illustrates a number of useful techniques. The question arose -because the source highlight filter language identifier for the C++ -language is `c++` when generating PDFs via dblatex (LaTeX listings -package) or `cpp` when generating HTML (GNU source-highlight). - -Using straight `ifdef::[]` block macros we have: - -[listing] -......................................... -\ifdef::basebackend-docbook[] -[source,c++] -\endif::basebackend-docbook[] -\ifdef::basebackend-html[] -[source,cpp] -\endif::basebackend-html[] ------------------------------------------ -class FooParser { -public: - virtual void startDocument() = 0; - virtual void endDocument() = 0; -}; ------------------------------------------ -......................................... - - -This can be shortened using the short form of the `ifdef::[]` macro: - -[listing] -......................................... -\ifdef::basebackend-docbook[[source,c++]] -\ifdef::basebackend-html[[source,cpp]] ------------------------------------------ -class FooParser { -public: - virtual void startDocument() = 0; - virtual void endDocument() = 0; -}; ------------------------------------------ -......................................... - - -Using a conditional attribute instead of the `ifdef::[]` macro is even -shorter: - -[listing] -......................................... -[source,{basebackend@docbook:c++:cpp}] ------------------------------------------ -class FooParser { -public: - virtual void startDocument() = 0; - virtual void endDocument() = 0; -}; ------------------------------------------ -......................................... - - -If you have a number of listings it makes sense to factor the -conditional attribute to a normal attribute: - -[listing] -......................................... -:cpp: {basebackend@docbook:c++:cpp} - -[source,{cpp}] ------------------------------------------ -class FooParser { -public: - virtual void startDocument() = 0; - virtual void endDocument() = 0; -}; ------------------------------------------ -......................................... - - -Even shorter, set the default source highlight filter `language` -attribute so you don't have to specify it every time: - -[listing] -......................................... -:language: {basebackend@docbook:c++:cpp} - -[source] ------------------------------------------ -class FooParser { -public: - virtual void startDocument() = 0; - virtual void endDocument() = 0; -}; ------------------------------------------ -......................................... - - -== Some of my inline passthroughs are not passed through, why? - -Most likely the passthrough encloses another passthrough with a higher -precedence. For example trying to render this +\pass:[]+ with this -+\`\pass:[]`+ results in a blank string because the +\pass:[]+ -passthrough evaluates first, instead use monospaced quoting and escape -the passthrough i.e. ++ \+\\pass:[]+ ++ - - -== How can I place an anchor (link target) on a list item? - -You can't use a 'BlockId' block element inside a list but you can use -the syntactically identical 'anchor' inline macro. For example: - ---------------------- -one:: Item one. -[[X2]]two:: Item two. -three:: Item three. ---------------------- - -This *will not* work: - ---------------------- -one:: Item one. -[[X2]] -two:: Item two. -three:: Item three. ---------------------- - - -== How can I stop lists from nesting? - -If you place two lists with different syntax hard up against each -other then the second list will be nested in the first. If you don't -want the second list to be nested separate them with a comment line -block macro. For example: - -------------------- -1. List 1. -2. List 1. - -// -a. List 2. -b. List 2. -------------------- - - -== Is it possible to include charts in AsciiDoc documents? - -There are a number of programs available that generate presentation -charts from textual specification, for example -http://home.gna.org/pychart/[Pychart] is a library for writing chart -scripts in Python. Here's an example from the 'Pychart' documentation: - -.barchart.py ---------------------------------------------------------------------- -# -# Example bar chart (from Pychart documentation http://home.gna.org/pychart/). -# -from pychart import * -theme.get_options() - -data = [(10, 20, 30, 5), (20, 65, 33, 5), (30, 55, 30, 5), (40, 45, 51, 7), - (50, 25, 27, 3), (60, 75, 30, 5), (70, 80, 42, 5), (80, 62, 32, 5), - (90, 42, 39, 5), (100, 32, 39, 4)] - -# The attribute y_coord=... tells that the Y axis values -# should be taken from samples. -# In this example, Y values will be [40,50,60,70,80]. -ar = area.T(y_coord = category_coord.T(data[3:8], 0), - x_grid_style=line_style.gray50_dash1, - x_grid_interval=20, x_range = (0,100), - x_axis=axis.X(label="X label"), - y_axis=axis.Y(label="Y label"), - bg_style = fill_style.gray90, - border_line_style = line_style.default, - legend = legend.T(loc=(80,10))) - -# Below call sets the default attributes for all bar plots. -chart_object.set_defaults(bar_plot.T, direction="horizontal", data=data) - -# Attribute cluster=(0,3) tells that you are going to draw three bar -# plots side by side. The plot labeled "foo" will the leftmost (i.e., -# 0th out of 3). Attribute hcol tells the column from which to -# retrive sample values from. It defaults to one. -ar.add_plot(bar_plot.T(label="foo", cluster=(0,3))) -ar.add_plot(bar_plot.T(label="bar", hcol=2, cluster=(1,3))) -ar.add_plot(bar_plot.T(label="baz", hcol=3, cluster=(2,3))) -ar.draw() ---------------------------------------------------------------------- - -To execute the script and include the generated chart image in your -document add the following lines to the AsciiDoc source: - ---------------------------------------------------------------------- -// Generate chart image file. -\sys2::[python "{indir}/barchart.py" --format=png --output="{outdir}/barchart.png" --scale=2] - -// Display chart image file. -image::barchart.png[] ---------------------------------------------------------------------- - -[NOTE] -===================================================================== -- The `barchart.py` script is located in the same directory as the - AsciiDoc source file (`{indir}`). -- The generated chart image file (`barchart.png`) is written to the - same directory as the output file (`{outdir}`). -===================================================================== - - -== How can I render indented paragraphs? - -Styling is backend dependent: - -[float] -==== Create an indented paragraph style (xhtml11 and html5 backends) -. Define an 'indented' paragraph style, for example, by putting this - in a custom configuration file: -+ ---------------------------------------------------------------------- -[paradef-default] -indented-style=template="indentedparagraph" - -[indentedparagraph] -
    {title?
    {title}
    }

    -| -

    ---------------------------------------------------------------------- - -. Now apply the 'indented' style to normal paragraphs, for example: -+ ---------------------------------------------------------------------- -[indented] -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas -ultrices justo porttitor augue. Vestibulum pretium. Donec porta -vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed -lacinia. Vivamus at lectus. ---------------------------------------------------------------------- - -[float] -==== Use the role attribute (xhtml11 and html5 backends) -. Add the following line to custom stylesheet: -+ ---------------------------------------------------------------------- -div.paragraph.indented p {text-indent: 3em;} ---------------------------------------------------------------------- - -. Apply the 'role' attribute to indented paragraphs, for example: -+ ---------------------------------------------------------------------- -[role="indented"] -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas -ultrices justo porttitor augue. Vestibulum pretium. Donec porta -vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed -lacinia. Vivamus at lectus. ---------------------------------------------------------------------- - -. Include the custom stylesheet by setting the 'stylesheet' attribute - (either from the command-line or with an attribute entry in the - document header). - -[float] -==== Use the role attribute (docbook backend) -. Add the following line to the distributed `docbook-xsl.css` - stylesheet or include it in a custom stylesheet: -+ ---------------------------------------------------------------------- -p.indented {text-indent: 3em;} ---------------------------------------------------------------------- - -. Apply the 'role' attribute to indented paragraphs, for example: -+ ---------------------------------------------------------------------- -[role="indented"] -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas -ultrices justo porttitor augue. Vestibulum pretium. Donec porta -vestibulum mi. Aliquam pede. Aenean lobortis lorem et lacus. Sed -lacinia. Vivamus at lectus. ---------------------------------------------------------------------- - -. If you have included the custom CSS in a separate stylesheet you - will need to specify the stylesheet file name (along with the - default `docbook-xsl.css` stylesheet file name) with the - `html.stylesheet` XSL parameter. If you are using 'a2x(1)' use the - `--stylesheet` option (it sets the `html.stylesheet` XSL parameter), - for example: `--stylesheet "docbook-xsl.css mycss.css"`. - -NOTE: This applies to HTML outputs not PDF. To achieve the same -results with PDF outputs you will need to customize the DocBook XSL -Stylesheets to render indented paragraphs from DocBook `simpara` -elements containing the the `role="indented"` attribute. - - -== Is there a way to set default table grid and frame attributes? - -You can set the 'grid' and 'frame' attributes globally in your -document header with Attribute Entries or from the command-line using -the `--attribute` option. In the following example tables that don't -explicitly set the 'grid' and 'frame' values will default to 'all' and -'topbot' respectively: - ---------------------------------------------------------------------- -:grid: all -:frame: topbot ---------------------------------------------------------------------- - -TIP: This technique can be applied to any block element attribute -(just beware of possible ambiguity, for example, table and image -blocks both have a 'width' attribute). - - -== How can I place a backslash character in front of an attribute reference without escaping the reference? - -Use the predefined `{backslash}` attribute reference instead of an -actual backslash, for example if the `{projectname}` attribute has -the value `foobar` then: - - d:\data{backslash}{projectname} - -would be rendered as: - - d:\data\foobar - -== How can I escape AsciiDoc markup? - -Most AsciiDoc inline elements can be suppressed by preceding them with -a backslash character. These elements include: - -- Attribute references. -- Text formatting. -- Quoting, -- Macros. -- Replacements. -- Special words. -- Table cell separators. - -But there are exceptions -- see the next question. - - -== Some elements can't be escaped with a single backslash - -There are a number of exceptions to the usual single backslash rule --- mostly relating to URL macros that have two syntaxes or quoting -ambiguity. Here are some non-standard escape examples: - -[cols="l,v",width="40%",frame="topbot",options="header"] -|======================================== -|AsciiDoc | Renders - -2*| -\joe.bloggs@example.com -<\joe.bloggs@example.com> -\mailto:[\joe.bloggs@example.com] - -2*| -\http://www.example.com -\\http://www.example.com[] -\\http://www.example.com[Foobar Limited] - -2*| -A C\++ Library for C++ -\\``double-quotes'' -\*\*F**ile Open\... -|======================================== - -The source of this problem is ambiguity across substitution types -- -the first match unescapes allowing the second to substitute. A -work-around for difficult cases is to side-step the problem using the -+\pass:[]+ passthrough inline macro. - -NOTE: Escaping is unnecessary inside 'inline literal passthroughs' -(backtick quoted text). - - -== How can I escape a list? -Here's how to handle situations where the first line of a paragraph is -mistaken for a list item. - -[float] -==== Numbered and bulleted lists -Precede the bullet or index of the first list item with an `{empty}` -attribute, for example: - - {empty}- Qui in magna commodo est labitur dolorum an. Est ne magna - primis adolescens. - -The predefined `{empty}` attribute is replaced by an empty string and -ensures the first line is not mistaken for a bulleted list item. - -[float] -==== Labeled lists -Two colons or semicolons in a paragraph may be confused with a labeled -list entry. Use the predefined `{two-colons}` and `{two-semicolons}` -attributes to suppress this behavior, for example: - - Qui in magna commodo{two-colons} est labitur dolorum an. Est ne - magna primis adolescens. - -Will be rendered as: - -Qui in magna commodo{two-colons} est labitur dolorum an. Est ne -magna primis adolescens. - - -== How can I set default list and tables styles? - -You can set the element's 'style' entry in a global or custom -configuration file. - -This example this will horizontally style all labeled lists that don't -have an explicit style attribute: - ----------------------------------- -[listdef-labeled] -style=horizontal - -[listdef-labeled2] -style=horizontal ----------------------------------- - -This example will put a top and bottom border on all tables that don't -already have an explicit style attribute: - ----------------------------------- -[tabledef-default] -style=topbot -topbot-style=frame="topbot" ----------------------------------- - -Alternatively you can set the configuration entries from inside your -document, the above examples are equivalent to: - ----------------------------------- -:listdef-labeled.style: horizontal -:listdef-labeled2.style: horizontal - -:tabledef-default.topbot-style: frame="topbot" -:tabledef-default.style: topbot ----------------------------------- - - -== Why do I get a filter non-zero exit code error? - -An error was returned when AsciiDoc tried to execute an external -filter command. The most common reason for this is that the filter -command could not be found by the command shell. To figure out what -the problem is run AsciiDoc with the `--verbose` option to determine -the command that is failing and then try to run the command manually -from the command-line. - - -== Are there any DocBook viewers? - -http://live.gnome.org/Yelp[Yelp], the GNOME help viewer, does a -creditable job of displaying DocBook XML files directly. - - -== Can you create ODF and PDF files using LibreOffice? - -https://www.libreoffice.org/[LibreOffice] can convert HTML produced by -AsciiDoc to ODF text format and PDF format (I used LibreOffice 3.5 at -the time of writing, the fidelity is very good but it's not perfect): - -. Create the HTML file using AsciiDoc, for example: - - asciidoc -a icons -a numbered -a disable-javascript article.txt -+ -JavaScript is disabled because LibreOffice does not execute -JavaScript, this means that AsciiDoc table of contents and footnotes -will not be rendered into ODF (if you want the table of contents and -footnotes you could manually cut and paste them from a Web browser). - -. Convert the HTML file to an ODF text file using LibreOffice: - - lowriter --invisible --convert-to odt article.html -+ --- -The images imported from an HTML file will be linked, if your document -contains images you should convert them to embedded images: - -[lowerroman] -. Open the document in LibreOffice Writer. -. Run the 'Edit->Links...' menu command. -. Select all links and press the 'Break Link' button. - -Some images may also have been resized. To restore an image to its -original size: - -[lowerroman] -. Right-click on the image and select the 'Picture...' menu item. -. Click on the 'Crop' tab. -. Press the 'Original Size' button. - --- - -. Convert the ODF file to an PDF text file using LibreOffice: - - lowriter --invisible --convert-to pdf article.odt -+ -A PDF index is automatically created using the section headings. - -Alternatively you could manually copy-and-paste the entire document -from a Web browser into a blank ODF document in LibreOffice -- this -technique will bring through the table of contents and footnotes. - -This tip was originally contributed by Bernard Amade. - - -== How can I suppress cell separators in included table data files? - -Use the `{include:}` system attribute instead of the `include::[]` -macro (the former is not expanded until after the table data has been -parsed into cells, whereas the latter is included before the table is -processed. - - -== How can I preserve paragraph line boundaries? - -Apply the The 'verse' paragraph style, the rendered text preserves -line boundaries and is useful for lyrics and poems. For example: - ---------------------------------------------------------------------- -[verse] -Consul *necessitatibus* per id, -consetetur, eu pro everti postulant -homero verear ea mea, qui. ---------------------------------------------------------------------- - -Alternatively, if you are generating PDF files, you can use line -breaks. For example: - ---------------------------------------------------------------------- -Consul *necessitatibus* per id, + -consetetur, eu pro everti postulant + -homero verear ea mea, qui. ---------------------------------------------------------------------- - - -== How can I include non-breaking space characters? - -Use the non-breaking space character entity reference ` ` (see -the next question). You could also use the predefined `{nbsp}` -attribute reference. - - -== Can I include HTML and XML character entity references in my document? - -Yes, just enter the reference in your document. For example `β` -will print a Greek small beta character β - - -[[X1]] -== How do I include spaces in URLs? - -URL inline macro targets (addresses) cannot contain white space -characters. If you need spaces encode them as `%20`. For example: - - image:large%20image.png[] - http://www.foo.bar.com/an%20example%20document.html - - -== How can I get AsciiDoc to assign the correct DocBook language attribute? - -Set the AsciiDoc 'lang' attribute to the appropriate language code. -For example: - - a2x -a lang=es doc/article.txt - -This will ensure that downstream DocBook processing will generate the -correct language specific document headings (things like table of -contents, revision history, figure and table captions, admonition -captions). - - -== How can I turn off table and image title numbering? -For HTML outputs set the 'caption' attribute to an empty string, -either globally: - -------------------------- -:caption: -------------------------- - -or on an element by element basis, for example: - -------------------------- -.Tiger -[caption=""] -image::images/tiger.png[] -------------------------- - - -== How can I assign multiple author names? - -A quick way to do this is put both authors in a single first name, for -example: - ---------------------------------------- -My Document -=========== -:Author: Bill_and_Ben_the_Flowerpot_Men -:Author Initials: BB & BC ---------------------------------------- - -asciidoc(1) replaces the underscores with spaces. - -If you are generating DocBook then a more flexible approach is to -create a 'docinfo' file containing a DocBook 'authorgroup' element -(search the 'User Guide' for 'docinfo' for more details). - - -== How can I selectively disable a quoted text substitution? - -Omitting the tag name will disable quoting. For example, if you don't -want superscripts or subscripts then put the following in a custom -configuration file or edit the global `asciidoc.conf` configuration -file: - -------------------- -[quotes] -^= -~= -------------------- - -Alternatively you can set the configuration entries from within your -document, the above examples are equivalent to: - -------------------- -:quotes.^: -:quotes.~: -------------------- - - -== How can I customize the \{localdate} format? - -The default format for the `{localdate}` attribute is the ISO 8601 -`yyyy-mm-dd` format. You can change this format by explicitly setting -the `{localdate}` attribute. For example by setting it using the -asciidoc(1) `-a` command-line option: - - asciidoc -a localdate=`date +%d-%m-%Y` mydoc.txt - -You could also set it by adding an Attribute Entry to your source -document, for example: - - :localdate: {sys: date +%Y-%m-%d} - - -== Where can I find examples of commands used to build output documents? - -The User Guide has some. You could also look at `./doc/main.aap` and -`./examples/website/main.aap` in the AsciiDoc distribution, they have -all the commands used to build the AsciiDoc documentation and the -AsciiDoc website (even if you don't use A-A-P you'll still find it -useful). - - -== Why have you used the DocBook element instead of ? - -`` is really the same as `` except it can't contain -block elements -- this matches, more closely, the AsciiDoc paragraph -semantics. - - -== How can I format text inside a listing block? - -By default only 'specialcharacters' and 'callouts' are substituted in -listing blocks; you can add quotes substitutions by explicitly setting -the block 'subs' attribute, for example: - -[listing] -.......................................... -[subs="quotes"] ------------------------------------------- -$ ls *-al* ------------------------------------------- -.......................................... - -The `-al` will rendered bold. Note that: - -- You would need to explicitly escape text you didn't want quoted. -- Don't do this in source code listing blocks because it modifies the - source code which confuses the syntax highlighter. -- This only works if your DocBook processor recognizes DocBook - `` elements inside `` elements. - -Alternative, if the lines are contiguous, you could use the 'literal' -paragraph style: - ------------------------------------------- -["literal",subs="quotes"] -$ ls *-al* ------------------------------------------- - - -== Why doesn't the include1::[] macro work? - -Internally the `include1` macro is translated to the `include1` system -attribute which means it must be evaluated in a region where attribute -substitution is enabled. `include1` won't work, for example, in a -ListingBlock (unless attribute substitution is enabled). `include1` -is intended for use in configuration files, use the `include` macro -and set the attribute `depth=1` instead, for example: - -[listing] -................................................ ------------------------------------------------- -\include::blogpost_media_processing.txt[depth=1] ------------------------------------------------- -................................................ - - -== How can I make the mailto macro work with multiple email addresses? - -For the AsciiDoc 'mailto' macro to work with multiple email addresses -(as per RFC2368) you need to URL encode the '@' characters (replace -them with '%40'), if you don't the individual addresses will be -rendered as separate links. You also need to <>. - -For example, the following call won't work: - - mailto:jb@example.com,jd@example.com?subject=New foofoo release[New foofoo release] - -Use this instead: - - mailto:jb%40example.com,jd%40example.com?subject=New%20foofoo%20release[New foofoo release] - - -== How can a replacement have a trailing backslash? -Quote the entry name -- this nonsensical example replaces `x\` with -`y`: - - "x\\"=y - -If quoting were omitted the equals character (separating the -entry name `x` from the value `y`) would be escaped. - - -== How can I control page breaks when printing HTML outputs? -Here are some techniques you can use to control page breaks in HTML -outputs produced by the 'xhtml11' and 'html5' backends: - -- You can generate a page break with the '<<<' block macro. The - following example prints the 'Rats and Mice' section on a new page: -+ ----------------- -<<< -== Rats and Mice -Lorum ipsum ... ----------------- - -- You can use the 'unbreakable' option to instruct the browser not to - break a block element. The following image and it's caption will be - kept together the printed page: -+ ------------------------------------- -[options="unbreakable"] -.Tiger block image -image::images/tiger.png[Tiger image] ------------------------------------- - -- You can apply the 'unbreakable' option globally to all block - elements by defining the 'unbreakable-option' attribute in your - document header. - -- Finally, the most powerful technique is to create custom CSS - containing paged media properties. For example this asciidoc(1) - command: -+ --- - - asciidoc --attribute stylesheet=article.css article.txt - -Will include the following `article.css` file in the output document: - -------------------------------------------------- -div#toc, div.sect1 { page-break-before: always; } -------------------------------------------------- - -Which will ensure the table of contents and all top level sections -start on a new printed page. --- - - -== Is it possible to reposition the Table of Contents in HTML outputs? -By default the 'xhtml11' and 'html5' backends auto-position the TOC -after the header. You can manually position the TOC by setting the -'toc-placement' attribute value to 'manual' and then inserting the -`toc::[]` block macro where you want the TOC to appear. For example, -put this in the document header: - ----------------------- -:toc: -:toc-placement: manual ----------------------- - -The put this where you want the TOC to appear: - -------- -toc::[] -------- - - -== HTML generated by AsciiDoc fills the width of the browser, how can I limit it to a more readable book width? -You can set the maximum with for outputs generated by 'html5', -'xhtml11' and 'slidy' backends by assigning the -link:userguide.html#X103[max-width] attribute (either from the -command-line or with an attribute entry in the document header). For -example: - - asciidoc -a max-width=55em article.txt - - -== Using roles to select fonts for PDF -Some applications require mixing fonts beyond the set of faces -normally provided by default (normal, monospace, italic etc.) for -example mixed language text where the font used for the majority of -text does not contain suitable glyphs in the minority language. - -As AsciiDoc can not provide presentation markup since it is not -provided by Docbook this is achieved by marking text which should use -a different font with a custom role which can be rendered by the the -docbook toolchain. - -NOTE: For XHTML outputs AsciiDoc translates the role attribute to a -class which can be selected and styled by CSS as described in the -AsciiDoc users guide. - -The Docbook toolchains will have to be configured to render the text -that you mark with the custom role. - -For FOP a small XSL wrapper is needed, say a file called `my_fo.xsl` -containing: - ---------------------------------------------------------------- - - - - - - - - ---------------------------------------------------------------- - -This is used with `a2x` by: - - a2x -f pdf --fop --xsl-file=my_fo.xsl input.txt - -and the AsciiDoc source marked by: - - normal text [f2]#special font is like this# and back to normal - -Thanks to Antonio Borneo for this answer. - - -== How can I place a footnote immediately following quoted text? -A closing quote is not recognised if it is immediately followed by a -letter (the 'f' in 'footnote' in the following example): - - ``Double-quoted text''footnote:[Lorum ipsum...] - -A workaround is to put a word-joiner between the trailing quote -and the footnote (the `{empty}` attribute would also work), for -example: - - ``Double-quoted text''{wj}footnote:[Lorum ipsum...] - - -== How can I convert documents from other formats to AsciiDoc? -You can use http://johnmacfarlane.net/pandoc/[Pandoc] to convert -documents in http://daringfireball.net/projects/markdown/[markdown], -http://docutils.sourceforge.net/docs/ref/rst/introduction.html[reStructuredText], -http://redcloth.org/textile[textile], -http://www.w3.org/TR/html40/[HTML], http://www.docbook.org/[DocBook], -or http://www.latex-project.org/[LaTeX] to AsciiDoc. - - -== How can I insert raw HTML in a document processed by a2x? -`a2x` generates HTML via DocBook (DocBook XSL Stylesheets) so if you -use a passthrough block it must contain DocBook (not HTML). -Fortunately DocBook XSL Stylesheets has a -http://www.sagehill.net/docbookxsl/InsertExtHtml.html[dbhtml-include -processing instruction] which will inlcude a file containing raw HTML -into the generated HTML output. For example: - ---------------------------------------------------------------- -++++ - -++++ ---------------------------------------------------------------- - - -== Why is there a period after the block title in the PDF output? -If your document has blocks that have block titles, you may notice in -the PDF output (generated by `a2x(1)` using the `--fop` flag) that a -period gets added to the end of the block title. - -You will not see the period in the intermediary DocBook XML that’s -generated when creating a PDF -- it’s added by the DocBook XSL -templates when the DocBook XML is converted to FO XML. - -The DocBook XSL attribute that controls what character is added after -a block title is -http://docbook.sourceforge.net/release/xsl/1.78.1/doc/html/runinhead.default.title.end.punct.html[ -runinhead.default.title.end.punct]. You can override it and eliminate -the default period value by adding the following line to the -`./docbook-xsl/common.xsl` file that ships with AsciiDoc: - - - -This FAQ was -https://groups.google.com/group/asciidoc/browse_thread/thread/19dda8807fa7c3f2[contributed -by Dan Allen]. Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/favicon.ico and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/favicon.ico differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/highlighter.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/highlighter.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/10.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/10.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/11.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/11.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/12.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/12.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/13.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/13.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/14.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/14.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/15.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/15.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/1.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/1.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/2.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/2.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/3.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/3.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/4.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/4.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/5.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/5.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/6.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/6.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/7.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/7.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/8.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/8.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/callouts/9.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/callouts/9.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/caution.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/caution.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/example.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/example.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/home.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/home.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/important.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/important.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/next.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/next.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/note.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/note.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/prev.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/prev.png differ diff -Nru asciidoc-8.6.10/examples/website/images/icons/README asciidoc-10.1.2/examples/website/images/icons/README --- asciidoc-8.6.10/examples/website/images/icons/README 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/images/icons/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook -icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency -from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. - -Stuart Rackham Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/tip.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/tip.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/up.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/up.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/icons/warning.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/icons/warning.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/smallnew.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/smallnew.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/examples/website/images/tiger.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/examples/website/images/tiger.png differ diff -Nru asciidoc-8.6.10/examples/website/index.txt asciidoc-10.1.2/examples/website/index.txt --- asciidoc-8.6.10/examples/website/index.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/index.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,532 +0,0 @@ -AsciiDoc Home Page -================== -// Web page meta data. -:keywords: AsciiDoc, DocBook, EPUB, PDF, ebooks, slideshow, slidy, man page -:description: AsciiDoc is a text document format for writing notes, + - documentation, articles, books, ebooks, slideshows, + - web pages, man pages and blogs. AsciiDoc files can be + - translated to many formats including HTML, PDF, EPUB, + - man page. - - -.{revdate}: AsciiDoc {revnumber} Released -************************************************************************ -Read the link:CHANGELOG.html[CHANGELOG] for release highlights and a -full list of all additions, changes and bug fixes. Changes are -documented in the updated link:userguide.html[User Guide]. See the -link:INSTALL.html[Installation page] for downloads and and -installation instructions. - -'Stuart Rackham' -************************************************************************ - -Introduction ------------- -{description} - -AsciiDoc is highly configurable: both the AsciiDoc source file syntax -and the backend output markups (which can be almost any type of -SGML/XML markup) can be customized and extended by the user. - -AsciiDoc is free software and is licenced under the terms of the 'GNU -General Public License version 2' (GPLv2). - -TIP: The pages you are reading were written using AsciiDoc, to view -the corresponding AsciiDoc source click on the *Page Source* menu item -in the left hand margin. - - -Overview and Examples ---------------------- -You write an AsciiDoc document the same way you would write a -normal text document, there are no markup tags or weird format -notations. AsciiDoc files are designed to be viewed, edited and -printed directly or translated to other presentation formats using -the asciidoc(1) command. - -The asciidoc(1) command translates AsciiDoc files to HTML, XHTML and -DocBook markups. DocBook can be post-processed to presentation -formats such as HTML, PDF, EPUB, DVI, LaTeX, roff, and Postscript -using readily available Open Source tools. - -Example Articles -~~~~~~~~~~~~~~~~ -- This XHTML version of the - link:asciidoc.css-embedded.html[AsciiDoc User Guide] - was generated by AsciiDoc from - link:asciidoc.txt[this AsciiDoc file]. - -- Here's the link:asciidoc.html[same document] created by first - generating DocBook markup using AsciiDoc and then converting the - DocBook markup to HTML using 'DocBook XSL Stylesheets'. - -- The User Guide again, this time a - link:chunked/index.html[chunked version]. - -- AsciiDoc generated this link:article-standalone.html[stand-alone - HTML file] containing embedded CSS, JavaScript and images from this - link:article.txt[AsciiDoc article template] with this command: - - asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt - -- The same link:article.txt[AsciiDoc article template] generated - link:article-html5-toc2.html[this HTML 5] (the 'toc2' attribute puts - a table of contents in the left margin) from this command: - - asciidoc -b html5 -a icons -a toc2 -a theme=flask article.txt - -- The same link:article.txt[AsciiDoc article template] produced - this link:article.html[HTML file] and this - link:article.pdf[PDF file] via DocBook markup generated by AsciiDoc. - -[[X7]] -Example Books -~~~~~~~~~~~~~ -AsciiDoc markup supports all the standard DocBook frontmatter and -backmatter sections (dedication, preface, bibliography, glossary, -index, colophon) plus footnotes and index entries. - -- This link:book.txt[AsciiDoc book] produced link:book.html[this HTML - file] using the 'DocBook XSL Stylesheets'. -- The link:asciidoc.pdf[PDF formatted AsciiDoc User Guide] was - generated from asciidoc(1) DocBook output. -- The link:asciidoc.epub[EPUB formatted AsciiDoc User Guide] was - generated using link:a2x.1.html[a2x]. -- This link:book.epub[EPUB formatted book skeleton] was generated - using link:a2x.1.html[a2x]. -- This link:book-multi.txt[multi-part AsciiDoc book] produced - link:book-multi.html[this HTML file] using the 'DocBook XSL - Stylesheets'. - -Example UNIX Man Pages -~~~~~~~~~~~~~~~~~~~~~~ -HTML formatted AsciiDoc man pages -link:asciidoc.1.css-embedded.html[with stylesheets] and -link:asciidoc.1.html[without stylesheets] were generated by AsciiDoc -from link:asciidoc.1.txt[this file]. - -This link:asciidoc.1[roff formatted man page] was generated from -asciidoc(1) DocBook output using `xsltproc(1)` and DocBook XSL -Stylesheets. - -[[X8]] -Example Slideshows -~~~~~~~~~~~~~~~~~~ -The http://www.w3.org/Talks/Tools/Slidy2/[Slidy] backend generates -HTML slideshows that can be viewed in any web browser. What's nice is -that you can create completely self contained slideshows including -embedded images. - -- Here is the link:slidy.html[slidy backend documentation] slideshow - and here is it's link:slidy.txt[AsciiDoc source]. -- An link:slidy-example.html[example slidy slideshow] and the - link:slidy-example.txt[AsciiDoc source]. - -Example Web Site -~~~~~~~~~~~~~~~~ -The link:README-website.html[AsciiDoc website] is included in the -AsciiDoc distribution (in `./examples/website/`) as an example website -built using AsciiDoc. See `./examples/website/README-website.txt`. - -More examples -~~~~~~~~~~~~~ -- See below: <>. -- Example link:newtables.html[Tables]. - - -eBook Publication ------------------ -The two most popular open eBook formats are -http://en.wikipedia.org/wiki/EPUB[EPUB] and PDF. -The AsciiDoc link:a2x.1.html[a2x] toolchain wrapper makes it easy to -link:publishing-ebooks-with-asciidoc.html[publish EPUB and PDF eBooks -with AsciiDoc]. See also <> and -link:epub-notes.html[AsciiDoc EPUB Notes]). - - -Blogpost weblog client ----------------------- -http://srackham.wordpress.com/blogpost-readme/[blogpost] is a -command-line weblog client for publishing AsciiDoc documents to -http://wordpress.org/[WordPress] blog hosts. It creates and updates -weblog posts and pages directly from AsciiDoc source documents. - - -Source code highlighter ------------------------ -AsciiDoc includes a link:source-highlight-filter.html[source code -highlighter filter] that uses -http://www.gnu.org/software/src-highlite/[GNU source-highlight] to -highlight HTML outputs. You also have the option of using the -http://pygments.org/[Pygments] highlighter. - - -[[X3]] -Mathematical Formulae ---------------------- -You can include mathematical formulae in AsciiDoc XHTML documents using -link:asciimathml.html[ASCIIMathML] or link:latexmathml.html[LaTeXMathML] -notation. - -The link:latex-filter.html[AsciiDoc LaTeX filter] translates LaTeX -source to an image that is automatically inserted into the AsciiDoc -output documents. - -AsciiDoc also has 'latexmath' macros for DocBook outputs -- they are -documented in link:latexmath.pdf[this PDF file] and can be used in -AsciiDoc documents processed by `dblatex(1)`. - - -Editor Support --------------- -- An AsciiDoc syntax highlighter for the Vim text editor is included in the - AsciiDoc distribution (see the 'Vim Syntax Highlighter' appendix in - the 'AsciiDoc User Guide' for details). -+ -.Syntax highlighter screenshot -image::images/highlighter.png[height=400,caption="",link="images/highlighter.png"] - -- Dag Wieers has implemented an alternative Vim syntax file for - AsciiDoc which can be found here - http://svn.rpmforge.net/svn/trunk/tools/asciidoc-vim/. -- David Avsajanishvili has written a source highlighter for AsciiDoc - files for http://projects.gnome.org/gtksourceview/[GtkSourceView] - (used by http://projects.gnome.org/gedit/[gedit] and a number of - other applications). The project is hosted here: - https://launchpad.net/asciidoc-gtk-highlight -- AsciiDoc resources for the Emacs editor can be found on the - http://www.emacswiki.org/emacs/AsciiDoc[AsciiDoc page] at the - http://www.emacswiki.org/emacs/EmacsWiki[Emacs Wiki]. -- Christian Zuckschwerdt has written a - https://github.com/zuckschwerdt/asciidoc.tmbundle[TextMate bundle] - for AsciiDoc. - - -Try AsciiDoc on the Web ------------------------ -Thaddée Tyl has written an online live editor named -http://espadrine.github.io/AsciiDocBox/[AsciiDocBox] to try AsciiDoc in -your browser. - -You can use http://gist.asciidoctor.org/[DocGist] to preview AsciiDoc -files hosted on GitHub, Dropbox, and other services. DocGist also -features a real-time collaboration mode. - -[[X2]] -External Resources and Applications ------------------------------------ -Here are resources that I know of, if you know of more drop me a line -and I'll add them to the list. - -- Check the link:INSTALL.html#X2[installation page] for packaged versions - of AsciiDoc. -- http://asciidoctor.org[Asciidoctor] provides a modern, compliant, and - substantially faster implementation of the AsciiDoc processor written - in Ruby. This implementation can also be run on the JVM (with - AsciidoctorJ) or using JavaScript (with Asciidoctor.js). The - Asciidoctor project now maintains the official definition of the - AsciiDoc syntax. -- Alex Efros has written an HTML formatted - http://powerman.name/doc/asciidoc[AsciiDoc Cheatsheet] using AsciiDoc. - The Asciidoctor project also provides a comprehensive - http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[AsciiDoc - syntax quick reference]. -- Thomas Berker has written an - http://liksom.info/blog/?q=node/114[AsciiDoc Cheatsheet] in Open - Document and PDF formats. -- The http://www.wikimatrix.org/[WikiMatrix] website has an excellent - http://www.wikimatrix.org/syntax.php[web page] that compares the - various Wiki markup syntaxes. An interesting attempt at Wiki markup - standardization is http://www.wikicreole.org/[CREOLE]. -- Franck Pommereau has written - http://www.univ-paris12.fr/lacl/pommereau/soft/asciidoctest.html[Asciidoctest], - a program that doctests snippets of Python code within your Asciidoc - documents. -- The http://remips.sourceforge.net/[ReMIPS] project website has been - built using AsciiDoc. -- Here are some link:asciidoc-docbook-xsl.html[DocBook XSL Stylesheets - Notes]. -- Karl Mowatt-Wilson has developed an http://ikiwiki.info/[ikiwiki] - plugin for AsciiDoc which he uses to render - http://mowson.org/karl[his website]. The plugin is available - http://www.mowson.org/karl/colophon/[here] and there is some - discussion of the ikiwiki integration - http://ikiwiki.info/users/KarlMW/discussion/[here]. -- Glenn Eychaner has - http://groups.google.com/group/asciidoc/browse_thread/thread/bf04b55628efe214[reworked - the Asciidoc plugin for ikiwiki] that was created by Karl Mowson, - the source can be downloaded from - http://dl.dropbox.com/u/11256359/asciidoc.pm -- David Hajage has written an AsciiDoc package for the - http://www.r-project.org/[R Project] (R is a free software - environment for statistical computing). 'ascii' is available on - 'CRAN' (just run `install.packages("ascii")` from R). Briefly, - 'ascii' replaces R results in AsciiDoc document with AsciiDoc - markup. More information and examples here: - http://eusebe.github.com/ascii/. -- Pascal Rapaz has written a Python script to automate AsciiDoc - website generation. You can find it at - http://www.rapazp.ch/opensource/tools/asciidoc.html. -- Jared Henley has written - http://jared.henley.id.au/software/awb/documentation.html[AsciiDoc - Website Builder]. 'AsciiDoc Website Builder' (awb) is a python - program that automates the building of of a website written in - AsciiDoc. All you need to write is the AsciiDoc source plus a few - simple configuration files. -- Brad Adkins has written - http://dbixjcl.org/jcl/asciidocgen/asciidocgen.html[AsciiDocGen], a - web site generation and deployment tool that allows you write your - web site content in AsciiDoc. The - http://dbixjcl.org/jcl/asciidocgen/asciidocgen.html[AsciiDocGen web - site] is managed using 'AsciiDocGen'. -- Filippo Negroni has developed a set of tools to facilitate 'literate - programming' using AsciiDoc. The set of tools is called - http://eweb.sourceforge.net/[eWEB]. -- http://vanderwijk.info/2009/4/23/full-text-based-document-generation-using-asciidoc-and-ditaa[Ivo's - blog] describes a http://ditaa.sourceforge.net/[ditaa] filter for - AsciiDoc which converts http://en.wikipedia.org/wiki/ASCII_art[ASCII - art] into graphics. -- http://github.com/github/gollum[Gollum] is a git-powered wiki, it - supports various formats, including AsciiDoc. -- Gregory Romé has written an - http://github.com/gpr/redmine_asciidoc_formatter[AsciiDoc plugin] - for the http://www.redmine.org/[Redmine] project management - application. -- Paul Hsu has started a - http://github.com/paulhsu/AsciiDoc.CHT.userguide[Chinese translation - of the AsciiDoc User Guide]. -- Dag Wieers has written - http://dag.wieers.com/home-made/unoconv/[UNOCONV]. 'UNOCONV' can - export AsciiDoc outputs to OpenOffice export formats. -- Ed Keith has written http://codeextactor.berlios.de/[Code - Extractor], it extracts code snippets from source code files and - inserts them into AsciiDoc documents. -- The http://csrp.iut-blagnac.fr/jmiwebsite/home/[JMI website] hosts - a number of extras for AsciiDoc and Slidy written by Jean-Michel - Inglebert. -- Ryan Tomayko has written an number of - http://tomayko.com/src/adoc-themes/[themes for AsciiDoc] along with - a http://tomayko.com/src/adoc-themes/hacking.html[script for - combining the CSS files] into single CSS theme files for AsciiDoc - embedded CSS documents. -- Ilya Portnov has written a - https://gitorious.org/doc-building-system[document building system - for AsciiDoc], here is - http://iportnov.blogspot.com/2011/03/asciidoc-beamer.html[short - article in Russian] describing it. -- Lex Trotman has written - https://github.com/elextr/codiicsa[codiicsa], a program that - converts DocBook to AsciiDoc. -- Qingping Hou has written http://houqp.github.com/asciidoc-deckjs/[an - AsciiDoc backend for deck.js]. - http://imakewebthings.github.com/deck.js/[deck.js] is a JavaScript - library for building modern HTML presentations (slideshows). -- The guys from O'Reilly Media have posted an - https://github.com/oreillymedia/docbook2asciidoc[XSL Stylesheet to -github] that converts DocBook to AsciiDoc. -- Lex Trotman has written - https://github.com/elextr/flexndex[flexndex], an index generator - tool that be used with AsciiDoc. -- Michael Haberler has created a - https://code.google.com/p/asciidoc-diag-filter/[blockdiag filter for - Asciidoc] which embeds http://blockdiag.com/[blockdiag] images in - AsciiDoc documents. -- Dan Allen has written a - https://github.com/mojavelinux/asciidoc-bootstrap-docs-backend[Bootstrap - backend] for AsciiDoc. -- Steven Boscarine has written - https://github.com/StevenBoscarine/JavaAsciidocWrapper[Maven wrapper for AsciiDoc]. -- Christian Goltz has written - https://github.com/christiangoltz/shaape[Shaape], an Ascii art to - image converter for AsciiDoc. -- Eduardo Santana has written an - https://github.com/edusantana/asciidoc-highlight[Asciidoc Highlight - for Notepad++]. -- http://www.geany.org/[Geany] 1.23 adds document structure support - for AsciiDoc. - -Please let me know if any of these links need updating. - - -[[X6]] -Documents written using AsciiDoc --------------------------------- -Here are some documents I know of, if you know of more drop me a line -and I'll add them to the list. - -- The book http://practicalunittesting.com/[Practical Unit Testing] by - Tomek Kaczanowski was - https://groups.google.com/group/asciidoc/browse_frm/thread/4ba13926262efa23[written - using Asciidoc]. - -- The book http://oreilly.com/catalog/9781449397296[Programming iOS 4] - by Matt Neuburg was written using AsciiDoc. Matt has - http://www.apeth.net/matt/iosbooktoolchain.html[written an article] - describing how he used AsciiDoc and other tools to write the book. - -- The book - http://oreilly.com/catalog/9780596155957/index.html[Programming - Scala] by Dean Wampler and Alex Payne (O'Reilly) was - http://groups.google.com/group/asciidoc/browse_frm/thread/449f1199343f0e27[written - using Asciidoc]. - -- The http://www.ncfaculty.net/dogle/fishR/index.html[fishR] website - has a number of - http://www.ncfaculty.net/dogle/fishR/bookex/AIFFD/AIFFD.html[book - examples] written using AsciiDoc. - -- The Neo4j graph database project uses Asciidoc, and the output is - published here: http://docs.neo4j.org/. The build process includes - live tested source code snippets and is described - http://groups.google.com/group/asciidoc/browse_thread/thread/49d570062fd3ff52[here]. - -- http://frugalware.org/[Frugalware Linux] uses AsciiDoc for - http://frugalware.org/docs[documentation]. -- http://www.cherokee-project.com/doc/[Cherokee documentation]. - -- Henrik Maier produced this professional User manual using AsciiDoc: - http://www.proconx.com/assets/files/products/modg100/UMMBRG300-1101.pdf - -- Henrik also produced this folded single page brochure format - example: - http://www.proconx.com/assets/files/products/modg100/IGMBRG300-1101-up.pdf -+ -See this -http://groups.google.com/group/asciidoc/browse_thread/thread/16ab5a06864b934f[AsciiDoc -discussion group thread] for details. - -- The - http://www.kernel.org/pub/software/scm/git/docs/user-manual.html[Git - User's Manual]. -- 'Git Magic' + - http://www-cs-students.stanford.edu/~blynn/gitmagic/ + - http://github.com/blynn/gitmagic/tree/1e5780f658962f8f9b01638059b27275cfda095c -- 'CouchDB: The Definitive Guide' + - http://books.couchdb.org/relax/ + - http://groups.google.com/group/asciidoc/browse_thread/thread/a60f67cbbaf862aa/d214bf7fa2d538c4?lnk=gst&q=book#d214bf7fa2d538c4 -- 'Ramaze Manual' + - http://book.ramaze.net/ + - http://github.com/manveru/ramaze-book/tree/master -- Some documentation about git by Nico Schottelius (in German) - http://nico.schotteli.us/papers/linux/git-firmen/. -- The http://www.netpromi.com/kirbybase_ruby.html[KirbyBase for Ruby] - database management system manual. -- The http://xpt.sourceforge.net/[*Nix Power Tools project] uses - AsciiDoc for documentation. -- The http://www.wesnoth.org/[Battle for Wesnoth] project uses - AsciiDoc for its http://www.wesnoth.org/wiki/WesnothManual[Manual] - in a number of different languages. -- Troy Hanson uses AsciiDoc to generate user guides for the - http://tpl.sourceforge.net/[tpl] and - http://uthash.sourceforge.net/[uthash] projects (the HTML versions - have a customised contents sidebar). -- http://volnitsky.com/[Leonid Volnitsky's site] is generated using - AsciiDoc and includes Leonid's matplotlib filter. -- http://www.weechat.org/[WeeChat] uses AsciiDoc for - http://www.weechat.org/doc[project documentation]. -- http://www.clansuite.com/[Clansuite] uses AsciiDoc for - http://www.clansuite.com/documentation/[project documentation]. -- The http://fc-solve.berlios.de/[Freecell Solver program] uses - AsciiDoc for its - http://fc-solve.berlios.de/docs/#distributed-docs[distributed - documentation]. -- Eric Raymond's http://gpsd.berlios.de/AIVDM.html[AIVDM/AIVDO - protocol decoding] documentation is written using AsciiDoc. -- Dwight Schauer has written an http://lxc.teegra.net/[LXC HOWTO] in - AsciiDoc. -- The http://www.rowetel.com/ucasterisk/[Free Telephony Project] - website is generated using AsciiDoc. -- Warren Block has http://www.wonkity.com/~wblock/docs/[posted a - number of articles written using AsciiDoc]. -- The http://code.google.com/p/waf/[Waf project's] 'Waf Book' is - written using AsciiDoc, there is an - http://waf.googlecode.com/svn/docs/wafbook/single.html[HTML] and a - http://waf.googlecode.com/svn/docs/wafbook/waf.pdf[PDF] version. -- The http://www.diffkit.org/[DiffKit] project's documentation and - website have been written using Asciidoc. -- The http://www.networkupstools.org[Network UPS Tools] project - http://www.networkupstools.org/documentation.html[documentation] is - an example of a large documentation project written using AsciiDoc. -- http://www.archlinux.org/pacman/[Pacman], the - http://www.archlinux.org/[Arch Linux] package manager, has been - documented using AsciiDoc. -- Suraj Kurapati has written a number of customized manuals for his - Open Source projects using AsciiDoc: - - * http://snk.tuxfamily.org/lib/detest/ - * http://snk.tuxfamily.org/lib/ember/ - * http://snk.tuxfamily.org/lib/inochi/ - * http://snk.tuxfamily.org/lib/rumai/ - -- The http://cxxtest.com/[CxxTest] project (unit testing for C++ - language) has written its User Guide using AsciiDoc. - -Please let me know if any of these links need updating. - - -DocBook 5.0 Backend -------------------- -Shlomi Fish has begun work on a DocBook 5.0 `docbook50.conf` backend -configuration file, you can find it -http://bitbucket.org/shlomif/asciidoc[here]. See also: -http://groups.google.com/group/asciidoc/browse_thread/thread/4386c7cc053d51a9 - - -[[X1]] -LaTeX Backend -------------- -An experimental LaTeX backend was written for AsciiDoc in 2006 by -Benjamin Klum. Benjamin did a superhuman job (I admit it, I didn't -think this was doable due to AsciiDoc's SGML/XML bias). Owning to to -other commitments, Benjamin was unable to maintain this backend. -Here's link:latex-backend.html[Benjamin's original documentation]. -Incompatibilities introduced after AsciiDoc 8.2.7 broke the LaTeX -backend. - -In 2009 Geoff Eddy stepped up and updated the LaTeX backend, thanks to -Geoff's efforts it now works with AsciiDoc 8.4.3. Geoff's updated -`latex.conf` file shipped with AsciiDoc version 8.4.4. The backend -still has limitations and remains experimental (see -link:latex-bugs.html[Geoff's notes]). - -It's probably also worth pointing out that LaTeX output can be -generated by passing AsciiDoc generated DocBook through `dblatex(1)`. - - -Patches and bug reports ------------------------ -Patches and bug reports are are encouraged, but please try to follow -these guidelines: - -- Post bug reports and patches to the - http://groups.google.com/group/asciidoc[asciidoc discussion list], - this keeps things transparent and gives everyone a chance to - comment. -- The email subject line should be a specific and concise topic - summary. Commonly accepted subject line prefixes such as '[ANN]', - '[PATCH]' and '[SOLVED]' are good. - -=== Bug reports -- When reporting problems please illustrate the problem with the - smallest possible example that replicates the issue (and please test - your example before posting). This technique will also help to - eliminate red herrings prior to posting. -- Paste the commands that you executed along with any relevant - outputs. -- Include the version of AsciiDoc and the platform you're running it - on. -- If you can program please consider writing a patch to fix the - problem. - -=== Patches -- Keep patches small and atomic (one issue per patch) -- no patch - bombs. -- If possible test your patch against the current trunk. -- If your patch adds or modifies functionality include a short example - that illustrates the changes. -- Send patches in `diff -u` format, inline inside the mail message is - usually best; if it is a very long patch then send it as an - attachment. -- Include documentation updates if you're up to it; otherwise insert - 'TODO' comments at relevant places in the documentation. - diff -Nru asciidoc-8.6.10/examples/website/INSTALL.txt asciidoc-10.1.2/examples/website/INSTALL.txt --- asciidoc-8.6.10/examples/website/INSTALL.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/INSTALL.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,226 +0,0 @@ -AsciiDoc Installation -===================== - -NOTE: The current version of AsciiDoc requires *Python 2.6 or 2.7* -to run. If you don't already have an up-to-date version of Python -installed it can be downloaded from the official Python website -http://www.python.org/. - - -Prerequisites -------------- -See the link:README.html[README] page. - - -Installing from the Github repository -------------------------------------- -The AsciiDoc repository is hosted by https://github.com[Github]. -To browse the repository go to https://github.com/asciidoc/asciidoc. -You can install AsciiDoc from the repository if you don't have an up to -date packaged version or want to get the latest version from the master branch: - -- Make sure you have https://git-scm.com/[Git] - installed, you can check with: - - $ git --version - -- Go to the directory you want to install AsciiDoc into and download - the repository. This example gets the {revnumber} tagged release: - -[subs="attributes"] - $ cd ~/bin - $ git clone https://github.com/asciidoc/asciidoc asciidoc-{revnumber} - $ git checkout {revnumber} - -You now have two choices: you can run asciidoc locally from your -repository or you can use 'autoconf(1)' and 'make(1)' to perform a -system-wide install. - -Running asciidoc from your local copy -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create a symlink to the AsciiDoc script in a search `PATH` directory -so it's easy to execute `asciidoc` from the command-line, for example: - -[subs="attributes"] - $ ln -s ~/bin/asciidoc-{revnumber}/asciidoc.py ~/bin/asciidoc - $ ln -s ~/bin/asciidoc-{revnumber}/a2x.py ~/bin/a2x - -Use the git `pull` command to update your local AsciiDoc repository. - -Installing asciidoc for all users -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create `configure` using 'autoconf(1)'; use `configure` to create the -`Makefile`; run 'make(1)'; build the man pages; install: - ---------------------------------------------- -$ autoconf -$ ./configure -$ make -$ sudo make install ---------------------------------------------- - -To uninstall: - ---------------------------------------------- -$ sudo make uninstall ---------------------------------------------- - - -[[X1]] -Distribution tarball installation ---------------------------------- -The distribution source tarballs can be downloaded from the -SourceForge http://sourceforge.net/projects/asciidoc/. - -NOTE: Unless you are <> you should -use the tarball and not the zip file to install the the distribution -(the tarball contains symlinks). - -If your flavor or UNIX or Linux does not have a packaged AsciiDoc -distribution or if you prefer to install the latest AsciiDoc version -from source use the `configure` shell script in the tarball root -directory. - -The `autoconf(1)` generated `configure` script creates a make file -that is tailored for your system. To install: - -[subs="attributes"] - $ tar -xzf asciidoc-{revnumber}.tar.gz - $ cd asciidoc-{revnumber} - $ ./configure - $ sudo make install - -To install the documentation: - - $ sudo make docs - -To uninstall AsciiDoc: - - $ sudo make uninstall - -If Vim is installed on your system the AsciiDoc Vim syntax highlighter -and filetype detection scripts will be install in the global Vim -configuration file directory (`asciidoc.vim` in the `syntax` directory -and `asciidoc_filetype.vim` in the `ftdetect` directory). - - -[[X3]] -Microsoft Windows installation ------------------------------- -AsciiDoc is developed and tested on Linux but there seem to be quite a -few people using it on Windows. To install AsciiDoc on Windows unzip -the distribution Zip file contents: - -[subs="attributes"] - $ unzip asciidoc-{revnumber}.zip - -This will create the folder +asciidoc-{revnumber}+ containing the -`asciidoc.py` and `a2x.py` executables along with configuration files -and documentation. - -To generate DocBook based outputs (e.g. PDFs) you will also need a -working DocBook toolchain. Installing and configuring a DocBook -toolchain on Windows can be a challenge -- this blog post explains -http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/[How -to Create Handsome PDF Documents Without Frustration] using -http://www.cygwin.com/[Cygwin], -http://dblatex.sourceforge.net/[dblatex] and AsciiDoc. - - -Testing your installation -------------------------- -Test out asciidoc by changing to the AsciiDoc application directory -and convert the User Guide document (`./doc/asciidoc.txt`) to XHTML -(`./doc/asciidoc.html`): - - $ python asciidoc.py doc/asciidoc.txt - -link:testasciidoc.html[testasciidoc] offers a more extensive set of -conformance tests, though you do need to create the test data before -running the tests (this in itself is a good post-install test): - - $ python ./tests/testasciidoc.py update - -Now you can run the tests by executing this command: - - $ python ./tests/testasciidoc.py run - -A full battery of tests can be run from the `main.aap` script in the -distribution root directory: - - $ aap test - - -Building the distribution -------------------------- -The AsciiDoc distribution is built using http://www.a-a-p.org/[A-A-P] -(a software build system written by Bram Moolenaar). The AsciiDoc -A-A-P scripts are: - -`./main.aap`:: Builds the distribution tarball and zip files, -documentation and example website. -`./doc/main.aap`:: Builds distribution documentation. -`./examples/website/main.aap`:: Builds AsciiDoc website. -`./common.aap`:: Included in all scripts. - -To build the distribution tarball and zip files, documentation and -example website run A-A-P from the distribution root directory: - - $ aap - - -[[X2]] -Prepackaged AsciiDoc installation ---------------------------------- -The following platform specific AsciiDoc packages are available: - -*Debian GNU/Linux*:: - If you use Debian or a Debian based distribution there's an - http://packages.debian.org/asciidoc[AsciiDoc Debian package] - available. Thanks to mailto:stone@debian.org[Fredrik Steen] who - built and maintains the Debian AsciiDoc package. - -*Gentoo Linux*:: - If you use Gentoo Linux there's a - http://packages.gentoo.org/package/app-text/asciidoc[Gentoo AsciiDoc - package] available. Thanks to mailto:brandon@ifup.org[Brandon - Philips] for writing the ebuild. - -*Fedora Linux*:: - With help from Terje Røsten, Chris Wright added asciidoc to Fedora - Extras which is available in the default installation. To install - asciidoc execute the following command: - - $ yum install asciidoc - -*Slackware Linux*:: - John Calixto has created a Slackware package for AsciiDoc which can - be downloaded from http://linuxpackages.net/. - -*Ark Linux*:: - mailto:bero@arklinux.org[Bernhard Rosenkraenzer] added AsciiDoc to - Ark Linux -- the package is available from the Ark Linux repository - at http://arklinux.osuosl.org/dockyard-devel/, so Ark Linux users - should just run `apt-get install asciidoc`. - -*T2 Linux*:: - mailto:cw@ixplanet.de[Christian Wiese] added AsciiDoc to the - http://www.t2-project.org/[T2 Linux] repository at - http://svn.exactcode.de/t2/trunk/package/textproc/asciidoc/. To - build and install the package on a T2 system, run - `./scripts/Emerge-Pkg asciidoc` from within your T2 source directory - (default: `/usr/src/t2-src`). - -*Red Hat Enterprise Linux, Fedora and CentOS packages*:: - Dag Wieers has built AsciiDoc RPMs for a number of Red Hat based - distributions, they can be downloaded from - http://dag.wieers.com/rpm/packages/asciidoc/. - -*CSW Package for Sun Solaris*:: - Ben Walton has created a CSW package for AsciiDoc, you can find it - here: http://opencsw.org/packages/asciidoc. - -See also link:userguide.html#X38[Packager Notes] in the 'AsciiDoc User -Guide'. - - diff -Nru asciidoc-8.6.10/examples/website/latex-backend.txt asciidoc-10.1.2/examples/website/latex-backend.txt --- asciidoc-8.6.10/examples/website/latex-backend.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/latex-backend.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,192 +0,0 @@ -LaTeX backend for Asciidoc -========================== -Benjamin Klum -v1.0, June 2006 - -== Introduction - - -LaTeX backend is a configuration file for Stuart Rackham's http://asciidoc.org/[Asciidoc]. It generates high-level LaTeX markup from Asciidoc documents. LaTeX is a document preparation system for TeX which in turn is a popular typesetting system. It is well known for producing excellently typesetted high quality printouts, especially suited for scientific text. - -== Tutorial -Getting a ready-to-print document from an Asciidoc document using the LaTeX backend involves at least two steps: - -1. Conversion of the Asciidoc document into a LaTeX document (this is done by Asciidoc using the LaTeX backend) -2. Conversion of the LaTeX document into a PDF document (this is done by the TeX system) - -Try to create a PDF document from the Asciidoc document `article.txt` which resides in the `doc` directory of Asciidoc: - -.. Make a copy of `article.txt` in a directory of your choice, let's call it `latex-test`. -.. Make sure that all images referenced in `article.txt` exist in `latex-test`. Brute force approach: Copy the whole `images` directory from Asciidoc directory into `latex-test`. -.. Change directory to `latex-test` and type following commands: -+ - asciidoc --unsafe --backend=latex article.txt - pdflatex article.tex -+ -.. Now there should be a file `article.pdf` in the `latex-test` directory. - -[IMPORTANT] -============================== -- Asciidoc has to be started in 'unsafe mode' when using LaTeX backend. -- Note that some special LaTeX packages are necessary, see <>. -============================== - -== General notes - -=== Quality of LaTeX output -High-level LaTeX is not very straightforward to generate. Therefore there's no guarantee that the generated output is valid and compiles successfully. At all, this backend should be considered as rather experimental. You should have been already in touch with LaTeX in order to use the backend effectively because LaTeX compilation errors can be really nasty. - -Nevertheless good results can be achieved by using LaTeX backend. Try for example to compile Stuart Rackham's Asciidoc documentation, a rather large document. It should compile without problems. However, the code filter might have to be reconfigured for the code filter example to work. - -=== Configuration file customization -Like every other Asciidoc backend the LaTeX backend can be customized easily to fit the user's needs. Actually it is very important to have this option since LaTeX doesn't have a companion language like CSS which allows to put styling information in a separate file. Read more about the LaTeX backend configuration file <>. - -=== Output optimization -The LaTeX output is optimized for creating PDF documents using 'pdflatex'. - -[[unicodeSupport]] -=== Unicode support -Unfortunately TeX/LaTeX does not have native unicode support. The package 'ucs' adds elementary unicode support by introducing UTF-8 input encoding recognition and by defining lookup tables which contain the corresponding LaTeX commands for unicode characters. But these lookup tables are far from being complete. When a unicode character is found which is not defined in the lookup tables an error is raised by the TeX/LaTeX compiler. Note that TeX/LaTeX compilation errors caused by missing unicode character definitions are not fatal, that means the result is probably readable but undefined unicode characters are replaced with `[U+...]`. You may (de)activate the recognition of escaped unicode characters. See the <> backend option. - -== Backend specific features - -=== Special sections - -LaTeX backend supports the following special sections and replaces them with corresponding LaTeX commands or environments: - -- Abstract (only for document type 'article') -- Dedication (only for document type 'book') -- Index -- Bibliography (only when the attribute 'latex-use-bibliography-environment' is set) -- Appendix -- Contents - -[[internalCrossReferences]] -=== Internal cross references - -Macros for internal cross references have been extended by the attribute 'style'. - - xref:[
    + + +frame + grid +valign +halign + + + + +  +  +  +all +all +top +left + + + + +AsciiDoc source +:frame: all +:grid: all +:halign: left +:valign: top + +[options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + +
    - -i.e. epub is not generating CSS borders (same for generated th elements). - -Compare this with the (correct) xhtml DocBook XSL generates the correct border -styles: - - - - - -=== epub: htmltoc is not generated -https://sourceforge.net/tracker/?func=detail&aid=2849686&group_id=21935&atid=373747 - -Environment: DocBook XSL 1.75.2; Xubuntu 8.04 - -If DocBook XSL TOC generation is specified the generated -'contents.opf' contains an 'htmltoc' element but the referenced TOC file -is not generated by DocBook XSL. For example the contents.opf contains: - - - -but the actual TOC file `OEBPS/ar01-toc.html` is missing and epubcheck -generates validation errors like: - - ERROR: doc/article.epub: OPS/XHTML file OEBPS/ar01-toc.html is missing - - -=== epub: leading dot in directory name error -https://sourceforge.net/tracker/?func=detail&aid=2849683&group_id=21935&atid=373747 - -Environment: DocBook XSL 1.75.2; Xubuntu 8.04 - -Specifying paths with a leading dot causes problems, for example: - - - -This generates validation errors like: - - ERROR: article.epub/OEBPS/index.html(4): - 'OEBPS/./docbook-xsl.css': referenced resource missing in the package - -The file is in the archive at the correct location, just doesn't -seem to like './' in the path name -- the path needs to be normalized -before being written to the contents.opf. - -It's not just the validator, the file is missing when the EPUB is viewed -(in bookworm). - -This works fine: - - - - -[[X2]] -=== epub: admonition icon images missing from contents.opf -NOTE: A workaround for this problem was added in `a2x(1)` version -8.6.5. - -https://sourceforge.net/tracker/?func=detail&aid=2849681&group_id=21935&atid=373747 - -Environment: DocBook XSL 1.75.2; Xubuntu 8.04 - -When admonition icons are specified epubcheck generates validation -errors like: - - ERROR: article.epub/OEBPS/index.html(4): - 'OEBPS/images/icons/note.png': referenced resource exists, - but not declared in the OPF file - -i.e. The admonition icon is in the EPUB file but DocBook XSL has not -been added to the content.opf manifest. Compare this with callout icons -which are processed correctly. - - -[[X3]] -=== Table width attribute validation error -https://sourceforge.net/tracker/?func=detail&aid=2848734&group_id=21935&atid=373747 - -Environment: DocBook XSL 1.75.2; Xubuntu 8.04 - -I get the following validation errors when navigation headers are in -included in the generated XHTML: - - ERROR: article.epub/OEBPS/ix01.html(3): attribute "width" not allowed - at this point; ignored - -This is because DocBook XSL has emitted invalid XHTML 1.1: tables -using the 'width' element are generated automatically in navigation -headers. - -Though, admittedly, navigation is redundant if you're reading with an -EPUB reader. Suppress by setting the suppress.navigation param to 1. - -Is this a DocBook XSL bug? - - -The Linux zip(1) command ------------------------- -If you use the Linux `zip(1)` command to update or create EPUB files -you must use the `-X`, `--no-extra` command-line option, if you do not -the platform dependent extra fields will confuse `epubcheck(1)` which -will emit errors like ``extra field length for first filename must be -0, but was 28''. diff -Nru asciidoc-8.6.10/examples/website/faq.txt asciidoc-10.1.2/examples/website/faq.txt --- asciidoc-8.6.10/examples/website/faq.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/examples/website/faq.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,1404 +0,0 @@ -AsciiDoc Frequently Asked Questions -=================================== - - -NOTE: New FAQs are appended to the bottom of this document. - -///////////////////////////////////////////////////////////////// -ADD NEW FAQS TO THE BOTTOM OF THIS DOCUMENT TO MAINTAIN NUMBERING -///////////////////////////////////////////////////////////////// - -== How do you handle spaces in included file names? -Spaces are not allowed in macro targets so this include macro will not -be processed: - - include::my document.txt[] - -The work-around is to replace the spaces with the `{sp}` (space -character) attribute, for example: - - include::my{sp}document.txt[] - - -== How do I number all paragraphs? -Some documents such as specifications and legalese require all -paragraphs to be sequentially numbered through the document, and to be -able to reference these numbers. - -This can be achieved by using the DocBook toolchain but numbering the -paragraphs with AsciiDoc using a custom config file containing the -following (see http://asciidoc.org/userguide.html#X27 -for ways to include such a file): - ---------------------------------------------------------------------- -[paragraph] -{title} -{title%} -{paracounter} | -{title%} -{title#} -{counter2:paracounter} -{empty} ---------------------------------------------------------------------- - -References to the paragraphs operate in the normal way, you label the -paragraph: - ------------------------------ -[[some_label_you_understand]] -paragraph contents ------------------------------ - -and reference it in the normal manner: - ------------------------------ -<> ------------------------------ - -The text of the reference will be the paragraph number. - -For this to work for HTML you have to generate it via the DocBook -toolchain. - - -== Sources of information on configuring DocBook toolchains -DocBook is a content and structure markup language, therefore -AsciiDoc generated DocBook markup is also limited to content and -structure. Layout and formatting definition is specific to the -DocBook toolchain. - -The dblatex toolchain can be configured by setting parameters defined -at http://dblatex.sourceforge.net/doc/manual/sec-params.html or for -more complex styling by custom Latex stylesheets described at -http://dblatex.sourceforge.net/doc/manual/sec-custom-latex.html. - -Similarly FOP can be configured by parameters described at -http://sagehill.net/docbookxsl/OptionsPart.html and with custom xsl -stylesheets generating formatting objects as described at -http://sagehill.net/docbookxsl/CustomizingPart.html. - - -[[X5]] -== How can I include embedded fonts in an EPUB document? -This is a two step process: - -1. Declare the font files and their use in your document's CSS - stylesheet. For example: -+ -[listing] -......................................... -@font-face { - font-family : LiberationSerif-Regular; - font-weight : normal; - font-style: normal; - src : url(LiberationSerif-Regular.ttf); -} - -body { - font-family: LiberationSerif-Regular, serif; -} -......................................... - -2. Declare the font file as resource when you use `a2x(1)` to - compile the EPUB. For example: - - a2x -f epub -d book --epubcheck --stylesheet epubtest.css --resource .ttf=application/x-font-ttf --resource LiberationSerif-Regular.ttf epubtest.txt - -[NOTE] -====== -- Requires AsciiDoc 8.6.5 or better. -- The True Type Font mimetype had to be declared explicitly with the - `--resource .ttf=application/x-font-ttf` option because it wasn't - registered on my Linux system. -- In the above example the font file is in the same directory as the - AsciiDoc source file and is installed to the same relative location - in the EPUB archive OEBPS directory -- if your font file resides in - a different location you'll need to adjust the `--resource` option - accordingly (see the 'RESOURCES' section in the `a2x(1)` man page - for details). -- The URL value of the CSS 'src' property is set to the destination - font file relative to the CSS file. -- The `--resource` option allows you to inject any file (not just font - files) into the EPUB output document. -- Using the CSS '@font-face' rule is a complex subject and is outside - the scope of this FAQ. -- Many EPUB readers do not process embedded fonts. -====== - - -== What's the difference between + quoted text and ` quoted monospaced text? -`+` (plus) quoted text is implemented as an AsciiDoc 'quotes' whereas -+`+ (grave accent or backtick) quoted text is implemented as an -AsciiDoc 'inline literal' passthrough macro. The semantics are -different: - -1. Inline passthrough macros are processed before any other inline - substitutions e.g. all of the following line will be processed as a - single inline passthrough and rendered as monospaced text (which is - not the intended result): -+ --- - `single quoted text' and `monospaced quoted text` - -This line works as expected: - - `single quoted text' and +monospaced quoted text+ --- - -2. Backtick quoted text is rendered literally i.e. no substitutions - are performed on the enclosed text. Here are some examples that - would have to be escaped if plus quoting were used (<>): - - The `++i` and `++j` auto-increments. - Paths `~/.vim` and `~/docs`. - The `__init__` method. - The `{id}` attribute. - - -== Why is the generated HTML title element text invalid? -Probably because your document title contains formatting that has -generated HTML title markup. You can resolve this by explicitly -defining the 'title' attribute in your document's header. - - -== AsciiDoc sometimes generates invalid output markup, why? -AsciiDoc is backend agnostic, the 'asciidoc' command has no knowledge -of the syntax or structure of the backend format that it generates. -Output document validation (syntactic and structural) should be -performed separately by external validation tools. For example, -AsciiDoc's 'a2x' toolchain command automatically performs validation -checks using 'xmllint'. - - -== The AsciiDoc toclevels attribute does not work with DocBook outputs, why? -DocBook has no provision for specifying table of contents levels but -you can set the TOC level further down the toolchain by passing the -DocBook XSL Stylesheets -http://docbook.sourceforge.net/release/xsl/current/doc/html/toc.section.depth.html[toc.section.depth] -parameter to 'dblatex' (using the `--param` option) or 'xsltproc' -(using the `--stringparam` option). For example to show only chapter -titles in the TOC of a 'book' document set 'toc.section.depth' to '0'. -Increment the 'toc.section.depth' value to show more sub-section -titles. If you are using 'a2x' you can set the options in the source -file, for example: - - // a2x: --xsltproc-opts "--stringparam toc.section.depth 0" - // a2x: --dblatex-opts "--param toc.section.depth=0" - -If the document is of type 'article' use the value '1' to show only -top level section titles in the TOC, use the value '2' for two levels -etc. - - -== How can I include chapter and section tables of contents? -DocBook outputs processed by DocBook XSL Stylesheets (either manually -or via 'a2x') can generate additional separate section and chapter -tables of contents using combinations of the -http://www.sagehill.net/docbookxsl/TOCcontrol.html[TOC parameters]. -Here are some examples using combinations of the -`generate.section.toc.level` and `toc.section.depth` DocBook XSL -Stylesheets parameters: - -[cols="2*l,4",width="90%",frame="topbot",options="header"] -|====================================================== -|generate.section.toc.level |toc.section.depth | -|1 | -|Single level book chapter TOCs or article section TOCs - -|1 | 3 -|Article section TOCs with two levels - -|1 | 2 -|Book chapter TOCs with two levels -|====================================================== - - -== How can I customize the appearance of XHTML and EPUB documents generated by a2x? -You can customize the appearance of an EPUB document with CSS. See -the link:publishing-ebooks-with-asciidoc.html[Sherlock Holmes eBook -example] on the AsciiDoc website. - - -== DocBook has many elements for document meta-data -- how can I use them from AsciiDoc? -The 'docinfo', 'docinfo1' and 'docinfo2' attributes allow you include -link:userguide.html#X97[document information files] containing DocBook -XML into the header of the output file. - - -== Do element titles automatically generate link captions? -If you go the DocBook route then yes -- just omit the caption from the -AsciiDoc 'xref' (`<<...>>`) macro. Both dblatex and DocBook XSL will -use the target element's title text. Examples: - -[listing] -.................................................................. -[[X1]] -Section One ------------ -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas -ultrices justo porttitor augue. Vestibulum pretium. Donec porta - -See also <> (this link displays the text 'A titled paragraph'). - -[id="X2",reftext="2nd section"] -Section Two ------------ -See also <> (this link displays the text 'Section One'). - -[[X3]] -.A titled paragraph -Lorem ipsum dolor sit amet, consectetuer adipiscing elit. - -See also <> (this link displays the text '2nd section'). -.................................................................. - -The AsciiDoc 'reftext' attribute has been used to explicitly set the -link text to '2nd section' for 'Section Two'. - - -== Can I define my own table styles? -In addition to the built-in styles you can define your own. This -(simplified) example for HTML backends defines a table style called -'red' which sets the background cell color to red. First put the -definition in a configuration file: - -[listing] -......................................... -[tabledef-default] -red-style=tags="red" - -[tabletags-red] -bodydata=|
    , style= -endif::linkcss[] -ifndef::disable-javascript[] -ifdef::linkcss[] - - - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::disable-javascript[] -ifdef::asciimath[] -ifdef::linkcss[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::asciimath[] -ifdef::latexmath[] -ifdef::linkcss[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::latexmath[] -ifdef::mathjax[] - - -endif::mathjax[] -{docinfo1,docinfo2#}{include:{docdir}/docinfo.html} -{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} -template::[docinfo] - - -# Article, book header. -ifndef::doctype-manpage[] - -endif::doctype-manpage[] -# Man page header. -ifdef::doctype-manpage[] - -endif::doctype-manpage[] -
    - -[footer] -
    -{disable-javascript%

    } - - - - -[footer-date] -# Default footer date is document modification time -ifeval::["{footer-style=default}"!="revdate"] - {docdate} {doctime} -endif::[] -# If set to "revdate", it'll be set to the revision date -ifeval::["{footer-style=default}"=="revdate"] - {revdate} -endif::[] - -ifdef::doctype-manpage[] -[synopsis] -template::[sect1] -endif::doctype-manpage[] - Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/10.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/10.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/11.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/11.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/12.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/12.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/13.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/13.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/14.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/14.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/15.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/15.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/1.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/1.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/2.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/2.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/3.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/3.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/4.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/4.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/5.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/5.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/6.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/6.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/7.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/7.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/8.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/8.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/callouts/9.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/callouts/9.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/caution.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/caution.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/example.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/example.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/home.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/home.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/important.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/important.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/next.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/next.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/note.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/note.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/prev.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/prev.png differ diff -Nru asciidoc-8.6.10/images/icons/README asciidoc-10.1.2/images/icons/README --- asciidoc-8.6.10/images/icons/README 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/images/icons/README 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook -icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency -from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. - -Stuart Rackham Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/tip.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/tip.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/up.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/up.png differ Binary files /tmp/tmprfebqwn1/adUs69ObZv/asciidoc-8.6.10/images/icons/warning.png and /tmp/tmprfebqwn1/GJ4HXRXCJC/asciidoc-10.1.2/images/icons/warning.png differ diff -Nru asciidoc-8.6.10/INSTALL.adoc asciidoc-10.1.2/INSTALL.adoc --- asciidoc-8.6.10/INSTALL.adoc 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/INSTALL.adoc 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,177 @@ +AsciiDoc Installation +===================== + +NOTE: The current version of AsciiDoc requires *Python 3.5 or later* +to run. If you don't already have an up-to-date version of Python +installed it can be downloaded from the official Python website +http://www.python.org/. + +Prerequisites +------------- + +- Python 3.5+ +- DocBook XSL Stylesheets +- xsltproc +- w3m +- dblatex +- FOP +- make + +Installing from PyPI +-------------------- +Starting from 10.0 release, AsciiDoc.py can be installed from PyPI repository +by doing the following: + + $ python3 -m pip install asciidoc + +Installing from the GitHub repository +------------------------------------- +The AsciiDoc repository is hosted by https://github.com[GitHub]. +To browse the repository go to https://github.com/asciidoc/asciidoc-py3. +You can install AsciiDoc from the repository if you don't have an up to +date packaged version, or you want to get the latest version from the master +branch: + +- Make sure you have https://git-scm.com/[Git] + installed; you can check with: + + $ git --version + +- Go to the directory you want to install AsciiDoc into and download + the repository. This example gets the {revnumber} tagged release: + +[subs="attributes"] + $ cd ~/bin + $ git clone https://github.com/asciidoc/asciidoc-py3 asciidoc-{revnumber} + $ cd asciidoc-{revnumber} + $ git checkout {revnumber} + +You now have two choices: you can run asciidoc locally from your +repository (e.g. `python3 -m asciidoc` or `python3 -m asciidoc.a2x`) or you +can use 'autoconf(1)' and 'make(1)' to perform a system-wide install. If you +wish to update your installation, run `git pull` and re-run `make(1)` to +re-install the updated version + +Uninstalling AsciiDoc.py +------------------------ + +To uninstall AsciiDoc.py, if you installed it via PyPI, then simply do the +following: + + $ python3 -m pip uninstall asciidoc + +If you installed it via `make(1)`, please do the following: + + $ sudo make uninstall + + +[[X1]] +Distribution tarball installation +--------------------------------- +The distribution source tarballs can be downloaded from GitHub +releases page https://github.com/asciidoc/asciidoc-py3/releases. + +If your flavor of UNIX or Linux does not have a packaged AsciiDoc +distribution or if you prefer to install the latest AsciiDoc version +from source, use the `configure` shell script in the tarball root +directory. + +The `autoconf(1)`-generated `configure` script creates a `Makefile` +that is tailored for your system. To install: + +[subs="attributes"] + $ tar -xzf asciidoc-{revnumber}.tar.gz + $ cd asciidoc-{revnumber} + $ ./configure + $ sudo make install + +To install the documentation: + + $ sudo make docs + +To uninstall AsciiDoc: + + $ sudo make uninstall + +If Vim is installed on your system the AsciiDoc Vim syntax highlighter +and filetype detection are already installed as built into the vim runtime. + + +[[X3]] +Microsoft Windows installation +------------------------------ +AsciiDoc is developed and tested on Linux but there seem to be quite a +few people using it on Windows. To install AsciiDoc on Windows unzip +the distribution zip file contents: + +[subs="attributes"] + $ unzip asciidoc-{revnumber}.zip + +This will create the folder +asciidoc-{revnumber}+ containing the +`asciidoc.py` and `a2x.py` executables along with configuration files +and documentation. + +To generate DocBook based outputs (e.g. PDFs) you will also need a +working DocBook toolchain. Installing and configuring a DocBook +toolchain on Windows can be a challenge -- this blog post explains +http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/[How +to Create Handsome PDF Documents Without Frustration] using +http://www.cygwin.com/[Cygwin], +http://dblatex.sourceforge.net/[dblatex] and AsciiDoc. + + +Testing your installation +------------------------- +To test out AsciiDoc.py, you will need to install `pytest` and `pytest-mock` +from PyPI. + +Test out asciidoc by changing to the AsciiDoc application directory +and converting the User Guide document (`./doc/asciidoc.txt`) to XHTML +(`./doc/asciidoc.html`): + + $ python3 asciidoc.py doc/asciidoc.txt + +The link:testasciidoc.html[testasciidoc] tool offers a more extensive set of +conformance tests. You can run the tests by executing this command: + + $ python3 ./tests/testasciidoc.py run + +Unit tests can be run by doing: + + $ python3 -m pytest + +Doctests can be run by doing: + + $ python3 -m asciidoc.asciidoc --doctest + +Running all three of these can be accomplished through the Makefile: + + $ make test + + +[[X2]] +Prepackaged AsciiDoc installation +--------------------------------- +The following platform-specific AsciiDoc packages are available: + +*Fedora Linux*:: + AsciiDoc is included in Fedora Extras, which is available in + the default Fedora installation. To install asciidoc, execute the + following command: + + $ yum install asciidoc + +*Ubuntu / Debian*:: + AsciiDoc is included in Ubuntu / Debian package manager. To install, + execute the following command: + + $ apt install asciidoc + +*macOS Homebrew*:: + AsciiDoc has been packaged in homebrew and is installable using the + following command: + + $ brew install asciidoc + +See also link:userguide.html#X38[Packager Notes] in the 'AsciiDoc User +Guide'. diff -Nru asciidoc-8.6.10/INSTALL.txt asciidoc-10.1.2/INSTALL.txt --- asciidoc-8.6.10/INSTALL.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/INSTALL.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,226 +0,0 @@ -AsciiDoc Installation -===================== - -NOTE: The current version of AsciiDoc requires *Python 2.6 or 2.7* -to run. If you don't already have an up-to-date version of Python -installed it can be downloaded from the official Python website -http://www.python.org/. - - -Prerequisites -------------- -See the link:README.html[README] page. - - -Installing from the Github repository -------------------------------------- -The AsciiDoc repository is hosted by https://github.com[Github]. -To browse the repository go to https://github.com/asciidoc/asciidoc. -You can install AsciiDoc from the repository if you don't have an up to -date packaged version or want to get the latest version from the master branch: - -- Make sure you have https://git-scm.com/[Git] - installed, you can check with: - - $ git --version - -- Go to the directory you want to install AsciiDoc into and download - the repository. This example gets the {revnumber} tagged release: - -[subs="attributes"] - $ cd ~/bin - $ git clone https://github.com/asciidoc/asciidoc asciidoc-{revnumber} - $ git checkout {revnumber} - -You now have two choices: you can run asciidoc locally from your -repository or you can use 'autoconf(1)' and 'make(1)' to perform a -system-wide install. - -Running asciidoc from your local copy -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create a symlink to the AsciiDoc script in a search `PATH` directory -so it's easy to execute `asciidoc` from the command-line, for example: - -[subs="attributes"] - $ ln -s ~/bin/asciidoc-{revnumber}/asciidoc.py ~/bin/asciidoc - $ ln -s ~/bin/asciidoc-{revnumber}/a2x.py ~/bin/a2x - -Use the git `pull` command to update your local AsciiDoc repository. - -Installing asciidoc for all users -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create `configure` using 'autoconf(1)'; use `configure` to create the -`Makefile`; run 'make(1)'; build the man pages; install: - ---------------------------------------------- -$ autoconf -$ ./configure -$ make -$ sudo make install ---------------------------------------------- - -To uninstall: - ---------------------------------------------- -$ sudo make uninstall ---------------------------------------------- - - -[[X1]] -Distribution tarball installation ---------------------------------- -The distribution source tarballs can be downloaded from the -SourceForge http://sourceforge.net/projects/asciidoc/. - -NOTE: Unless you are <> you should -use the tarball and not the zip file to install the the distribution -(the tarball contains symlinks). - -If your flavor or UNIX or Linux does not have a packaged AsciiDoc -distribution or if you prefer to install the latest AsciiDoc version -from source use the `configure` shell script in the tarball root -directory. - -The `autoconf(1)` generated `configure` script creates a make file -that is tailored for your system. To install: - -[subs="attributes"] - $ tar -xzf asciidoc-{revnumber}.tar.gz - $ cd asciidoc-{revnumber} - $ ./configure - $ sudo make install - -To install the documentation: - - $ sudo make docs - -To uninstall AsciiDoc: - - $ sudo make uninstall - -If Vim is installed on your system the AsciiDoc Vim syntax highlighter -and filetype detection scripts will be install in the global Vim -configuration file directory (`asciidoc.vim` in the `syntax` directory -and `asciidoc_filetype.vim` in the `ftdetect` directory). - - -[[X3]] -Microsoft Windows installation ------------------------------- -AsciiDoc is developed and tested on Linux but there seem to be quite a -few people using it on Windows. To install AsciiDoc on Windows unzip -the distribution Zip file contents: - -[subs="attributes"] - $ unzip asciidoc-{revnumber}.zip - -This will create the folder +asciidoc-{revnumber}+ containing the -`asciidoc.py` and `a2x.py` executables along with configuration files -and documentation. - -To generate DocBook based outputs (e.g. PDFs) you will also need a -working DocBook toolchain. Installing and configuring a DocBook -toolchain on Windows can be a challenge -- this blog post explains -http://blog.rainwebs.net/2010/02/25/how-to-create-handsome-pdf-documents-without-frustration/[How -to Create Handsome PDF Documents Without Frustration] using -http://www.cygwin.com/[Cygwin], -http://dblatex.sourceforge.net/[dblatex] and AsciiDoc. - - -Testing your installation -------------------------- -Test out asciidoc by changing to the AsciiDoc application directory -and convert the User Guide document (`./doc/asciidoc.txt`) to XHTML -(`./doc/asciidoc.html`): - - $ python asciidoc.py doc/asciidoc.txt - -link:testasciidoc.html[testasciidoc] offers a more extensive set of -conformance tests, though you do need to create the test data before -running the tests (this in itself is a good post-install test): - - $ python ./tests/testasciidoc.py update - -Now you can run the tests by executing this command: - - $ python ./tests/testasciidoc.py run - -A full battery of tests can be run from the `main.aap` script in the -distribution root directory: - - $ aap test - - -Building the distribution -------------------------- -The AsciiDoc distribution is built using http://www.a-a-p.org/[A-A-P] -(a software build system written by Bram Moolenaar). The AsciiDoc -A-A-P scripts are: - -`./main.aap`:: Builds the distribution tarball and zip files, -documentation and example website. -`./doc/main.aap`:: Builds distribution documentation. -`./examples/website/main.aap`:: Builds AsciiDoc website. -`./common.aap`:: Included in all scripts. - -To build the distribution tarball and zip files, documentation and -example website run A-A-P from the distribution root directory: - - $ aap - - -[[X2]] -Prepackaged AsciiDoc installation ---------------------------------- -The following platform specific AsciiDoc packages are available: - -*Debian GNU/Linux*:: - If you use Debian or a Debian based distribution there's an - http://packages.debian.org/asciidoc[AsciiDoc Debian package] - available. Thanks to mailto:stone@debian.org[Fredrik Steen] who - built and maintains the Debian AsciiDoc package. - -*Gentoo Linux*:: - If you use Gentoo Linux there's a - http://packages.gentoo.org/package/app-text/asciidoc[Gentoo AsciiDoc - package] available. Thanks to mailto:brandon@ifup.org[Brandon - Philips] for writing the ebuild. - -*Fedora Linux*:: - With help from Terje Røsten, Chris Wright added asciidoc to Fedora - Extras which is available in the default installation. To install - asciidoc execute the following command: - - $ yum install asciidoc - -*Slackware Linux*:: - John Calixto has created a Slackware package for AsciiDoc which can - be downloaded from http://linuxpackages.net/. - -*Ark Linux*:: - mailto:bero@arklinux.org[Bernhard Rosenkraenzer] added AsciiDoc to - Ark Linux -- the package is available from the Ark Linux repository - at http://arklinux.osuosl.org/dockyard-devel/, so Ark Linux users - should just run `apt-get install asciidoc`. - -*T2 Linux*:: - mailto:cw@ixplanet.de[Christian Wiese] added AsciiDoc to the - http://www.t2-project.org/[T2 Linux] repository at - http://svn.exactcode.de/t2/trunk/package/textproc/asciidoc/. To - build and install the package on a T2 system, run - `./scripts/Emerge-Pkg asciidoc` from within your T2 source directory - (default: `/usr/src/t2-src`). - -*Red Hat Enterprise Linux, Fedora and CentOS packages*:: - Dag Wieers has built AsciiDoc RPMs for a number of Red Hat based - distributions, they can be downloaded from - http://dag.wieers.com/rpm/packages/asciidoc/. - -*CSW Package for Sun Solaris*:: - Ben Walton has created a CSW package for AsciiDoc, you can find it - here: http://opencsw.org/packages/asciidoc. - -See also link:userguide.html#X38[Packager Notes] in the 'AsciiDoc User -Guide'. - - diff -Nru asciidoc-8.6.10/javascripts/asciidoc.js asciidoc-10.1.2/javascripts/asciidoc.js --- asciidoc-8.6.10/javascripts/asciidoc.js 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/javascripts/asciidoc.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,189 +0,0 @@ -var asciidoc = { // Namespace. - -///////////////////////////////////////////////////////////////////// -// Table Of Contents generator -///////////////////////////////////////////////////////////////////// - -/* Author: Mihai Bazon, September 2002 - * http://students.infoiasi.ro/~mishoo - * - * Table Of Content generator - * Version: 0.4 - * - * Feel free to use this script under the terms of the GNU General Public - * License, as long as you do not remove or alter this notice. - */ - - /* modified by Troy D. Hanson, September 2006. License: GPL */ - /* modified by Stuart Rackham, 2006, 2009. License: GPL */ - -// toclevels = 1..4. -toc: function (toclevels) { - - function getText(el) { - var text = ""; - for (var i = el.firstChild; i != null; i = i.nextSibling) { - if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants. - text += i.data; - else if (i.firstChild != null) - text += getText(i); - } - return text; - } - - function TocEntry(el, text, toclevel) { - this.element = el; - this.text = text; - this.toclevel = toclevel; - } - - function tocEntries(el, toclevels) { - var result = new Array; - var re = new RegExp('[hH]([1-'+(toclevels+1)+'])'); - // Function that scans the DOM tree for header elements (the DOM2 - // nodeIterator API would be a better technique but not supported by all - // browsers). - var iterate = function (el) { - for (var i = el.firstChild; i != null; i = i.nextSibling) { - if (i.nodeType == 1 /* Node.ELEMENT_NODE */) { - var mo = re.exec(i.tagName); - if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") { - result[result.length] = new TocEntry(i, getText(i), mo[1]-1); - } - iterate(i); - } - } - } - iterate(el); - return result; - } - - var toc = document.getElementById("toc"); - if (!toc) { - return; - } - - // Delete existing TOC entries in case we're reloading the TOC. - var tocEntriesToRemove = []; - var i; - for (i = 0; i < toc.childNodes.length; i++) { - var entry = toc.childNodes[i]; - if (entry.nodeName.toLowerCase() == 'div' - && entry.getAttribute("class") - && entry.getAttribute("class").match(/^toclevel/)) - tocEntriesToRemove.push(entry); - } - for (i = 0; i < tocEntriesToRemove.length; i++) { - toc.removeChild(tocEntriesToRemove[i]); - } - - // Rebuild TOC entries. - var entries = tocEntries(document.getElementById("content"), toclevels); - for (var i = 0; i < entries.length; ++i) { - var entry = entries[i]; - if (entry.element.id == "") - entry.element.id = "_toc_" + i; - var a = document.createElement("a"); - a.href = "#" + entry.element.id; - a.appendChild(document.createTextNode(entry.text)); - var div = document.createElement("div"); - div.appendChild(a); - div.className = "toclevel" + entry.toclevel; - toc.appendChild(div); - } - if (entries.length == 0) - toc.parentNode.removeChild(toc); -}, - - -///////////////////////////////////////////////////////////////////// -// Footnotes generator -///////////////////////////////////////////////////////////////////// - -/* Based on footnote generation code from: - * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html - */ - -footnotes: function () { - // Delete existing footnote entries in case we're reloading the footnodes. - var i; - var noteholder = document.getElementById("footnotes"); - if (!noteholder) { - return; - } - var entriesToRemove = []; - for (i = 0; i < noteholder.childNodes.length; i++) { - var entry = noteholder.childNodes[i]; - if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote") - entriesToRemove.push(entry); - } - for (i = 0; i < entriesToRemove.length; i++) { - noteholder.removeChild(entriesToRemove[i]); - } - - // Rebuild footnote entries. - var cont = document.getElementById("content"); - var spans = cont.getElementsByTagName("span"); - var refs = {}; - var n = 0; - for (i=0; i" + n + "]"; - spans[i].setAttribute("data-note", note); - } - noteholder.innerHTML += - "
    " + - "" + - n + ". " + note + "
    "; - var id =spans[i].getAttribute("id"); - if (id != null) refs["#"+id] = n; - } - } - if (n == 0) - noteholder.parentNode.removeChild(noteholder); - else { - // Process footnoterefs. - for (i=0; i" + n + "]"; - } - } - } -}, - -install: function(toclevels) { - var timerId; - - function reinstall() { - asciidoc.footnotes(); - if (toclevels) { - asciidoc.toc(toclevels); - } - } - - function reinstallAndRemoveTimer() { - clearInterval(timerId); - reinstall(); - } - - timerId = setInterval(reinstall, 500); - if (document.addEventListener) - document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false); - else - window.onload = reinstallAndRemoveTimer; -} - -} diff -Nru asciidoc-8.6.10/javascripts/ASCIIMathML.js asciidoc-10.1.2/javascripts/ASCIIMathML.js --- asciidoc-8.6.10/javascripts/ASCIIMathML.js 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/javascripts/ASCIIMathML.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,938 +0,0 @@ -/* -ASCIIMathML.js -============== -This file contains JavaScript functions to convert ASCII math notation -to Presentation MathML. The conversion is done while the (X)HTML page -loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet -Explorer 6+MathPlayer (http://www.dessci.com/en/products/mathplayer/). -Just add the next line to your (X)HTML page with this file in the same folder: -This is a convenient and inexpensive solution for authoring MathML. - -Version 1.4.7 Dec 15, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen -Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js -For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt -If you use it on a webpage, please send the URL to jipsen@chapman.edu - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License (at http://www.gnu.org/copyleft/gpl.html) -for more details. -*/ - -var checkForMathML = true; // check if browser can display MathML -var notifyIfNoMathML = true; // display note if no MathML capability -var alertIfNoMathML = false; // show alert box if no MathML capability -var mathcolor = ""; // change it to "" (to inherit) or any other color -var mathfontfamily = "serif"; // change to "" to inherit (works in IE) - // or another family (e.g. "arial") -var displaystyle = true; // puts limits above and below large operators -var showasciiformulaonhover = true; // helps students learn ASCIIMath -var decimalsign = "."; // change to "," if you like, beware of `(1,2)`! -var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters -var AMdelimiter2 = "$", AMescape2 = "\\\\\\$", AMdelimiter2regexp = "\\$"; -var doubleblankmathdelimiter = false; // if true, x+1 is equal to `x+1` - // for IE this works only in -//var separatetokens;// has been removed (email me if this is a problem) -var isIE = document.createElementNS==null; - -if (document.getElementById==null) - alert("This webpage requires a recent browser such as\ -\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer") - -// all further global variables start with "AM" - -function AMcreateElementXHTML(t) { - if (isIE) return document.createElement(t); - else return document.createElementNS("http://www.w3.org/1999/xhtml",t); -} - -function AMnoMathMLNote() { - var nd = AMcreateElementXHTML("h3"); - nd.setAttribute("align","center") - nd.appendChild(AMcreateElementXHTML("p")); - nd.appendChild(document.createTextNode("To view the ")); - var an = AMcreateElementXHTML("a"); - an.appendChild(document.createTextNode("ASCIIMathML")); - an.setAttribute("href","http://www.chapman.edu/~jipsen/asciimath.html"); - nd.appendChild(an); - nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); - an = AMcreateElementXHTML("a"); - an.appendChild(document.createTextNode("MathPlayer")); - an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); - nd.appendChild(an); - nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox")); - nd.appendChild(AMcreateElementXHTML("p")); - return nd; -} - -function AMisMathMLavailable() { - if (navigator.appName.slice(0,8)=="Netscape") - if (navigator.appVersion.slice(0,1)>="5") return null; - else return AMnoMathMLNote(); - else if (navigator.appName.slice(0,9)=="Microsoft") - try { - var ActiveX = new ActiveXObject("MathPlayer.Factory.1"); - return null; - } catch (e) { - return AMnoMathMLNote(); - } - else return AMnoMathMLNote(); -} - -// character lists for Mozilla/Netscape fonts -var AMcal = [0xEF35,0x212C,0xEF36,0xEF37,0x2130,0x2131,0xEF38,0x210B,0x2110,0xEF39,0xEF3A,0x2112,0x2133,0xEF3B,0xEF3C,0xEF3D,0xEF3E,0x211B,0xEF3F,0xEF40,0xEF41,0xEF42,0xEF43,0xEF44,0xEF45,0xEF46]; -var AMfrk = [0xEF5D,0xEF5E,0x212D,0xEF5F,0xEF60,0xEF61,0xEF62,0x210C,0x2111,0xEF63,0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0x211C,0xEF6B,0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0x2128]; -var AMbbb = [0xEF8C,0xEF8D,0x2102,0xEF8E,0xEF8F,0xEF90,0xEF91,0x210D,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0x2115,0xEF97,0x2119,0x211A,0x211D,0xEF98,0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0x2124]; - -var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, - RIGHTBRACKET = 5, SPACE = 6, UNDEROVER = 7, DEFINITION = 8, - LEFTRIGHT = 9, TEXT = 10; // token types - -var AMsqrt = {input:"sqrt", tag:"msqrt", output:"sqrt", tex:null, ttype:UNARY}, - AMroot = {input:"root", tag:"mroot", output:"root", tex:null, ttype:BINARY}, - AMfrac = {input:"frac", tag:"mfrac", output:"/", tex:null, ttype:BINARY}, - AMdiv = {input:"/", tag:"mfrac", output:"/", tex:null, ttype:INFIX}, - AMover = {input:"stackrel", tag:"mover", output:"stackrel", tex:null, ttype:BINARY}, - AMsub = {input:"_", tag:"msub", output:"_", tex:null, ttype:INFIX}, - AMsup = {input:"^", tag:"msup", output:"^", tex:null, ttype:INFIX}, - AMtext = {input:"text", tag:"mtext", output:"text", tex:null, ttype:TEXT}, - AMmbox = {input:"mbox", tag:"mtext", output:"mbox", tex:null, ttype:TEXT}, - AMquote = {input:"\"", tag:"mtext", output:"mbox", tex:null, ttype:TEXT}; - -var AMsymbols = [ -//some greek symbols -{input:"alpha", tag:"mi", output:"\u03B1", tex:null, ttype:CONST}, -{input:"beta", tag:"mi", output:"\u03B2", tex:null, ttype:CONST}, -{input:"chi", tag:"mi", output:"\u03C7", tex:null, ttype:CONST}, -{input:"delta", tag:"mi", output:"\u03B4", tex:null, ttype:CONST}, -{input:"Delta", tag:"mo", output:"\u0394", tex:null, ttype:CONST}, -{input:"epsi", tag:"mi", output:"\u03B5", tex:"epsilon", ttype:CONST}, -{input:"varepsilon", tag:"mi", output:"\u025B", tex:null, ttype:CONST}, -{input:"eta", tag:"mi", output:"\u03B7", tex:null, ttype:CONST}, -{input:"gamma", tag:"mi", output:"\u03B3", tex:null, ttype:CONST}, -{input:"Gamma", tag:"mo", output:"\u0393", tex:null, ttype:CONST}, -{input:"iota", tag:"mi", output:"\u03B9", tex:null, ttype:CONST}, -{input:"kappa", tag:"mi", output:"\u03BA", tex:null, ttype:CONST}, -{input:"lambda", tag:"mi", output:"\u03BB", tex:null, ttype:CONST}, -{input:"Lambda", tag:"mo", output:"\u039B", tex:null, ttype:CONST}, -{input:"mu", tag:"mi", output:"\u03BC", tex:null, ttype:CONST}, -{input:"nu", tag:"mi", output:"\u03BD", tex:null, ttype:CONST}, -{input:"omega", tag:"mi", output:"\u03C9", tex:null, ttype:CONST}, -{input:"Omega", tag:"mo", output:"\u03A9", tex:null, ttype:CONST}, -{input:"phi", tag:"mi", output:"\u03C6", tex:null, ttype:CONST}, -{input:"varphi", tag:"mi", output:"\u03D5", tex:null, ttype:CONST}, -{input:"Phi", tag:"mo", output:"\u03A6", tex:null, ttype:CONST}, -{input:"pi", tag:"mi", output:"\u03C0", tex:null, ttype:CONST}, -{input:"Pi", tag:"mo", output:"\u03A0", tex:null, ttype:CONST}, -{input:"psi", tag:"mi", output:"\u03C8", tex:null, ttype:CONST}, -{input:"Psi", tag:"mi", output:"\u03A8", tex:null, ttype:CONST}, -{input:"rho", tag:"mi", output:"\u03C1", tex:null, ttype:CONST}, -{input:"sigma", tag:"mi", output:"\u03C3", tex:null, ttype:CONST}, -{input:"Sigma", tag:"mo", output:"\u03A3", tex:null, ttype:CONST}, -{input:"tau", tag:"mi", output:"\u03C4", tex:null, ttype:CONST}, -{input:"theta", tag:"mi", output:"\u03B8", tex:null, ttype:CONST}, -{input:"vartheta", tag:"mi", output:"\u03D1", tex:null, ttype:CONST}, -{input:"Theta", tag:"mo", output:"\u0398", tex:null, ttype:CONST}, -{input:"upsilon", tag:"mi", output:"\u03C5", tex:null, ttype:CONST}, -{input:"xi", tag:"mi", output:"\u03BE", tex:null, ttype:CONST}, -{input:"Xi", tag:"mo", output:"\u039E", tex:null, ttype:CONST}, -{input:"zeta", tag:"mi", output:"\u03B6", tex:null, ttype:CONST}, - -//binary operation symbols -{input:"*", tag:"mo", output:"\u22C5", tex:"cdot", ttype:CONST}, -{input:"**", tag:"mo", output:"\u22C6", tex:"star", ttype:CONST}, -{input:"//", tag:"mo", output:"/", tex:null, ttype:CONST}, -{input:"\\\\", tag:"mo", output:"\\", tex:"backslash", ttype:CONST}, -{input:"setminus", tag:"mo", output:"\\", tex:null, ttype:CONST}, -{input:"xx", tag:"mo", output:"\u00D7", tex:"times", ttype:CONST}, -{input:"-:", tag:"mo", output:"\u00F7", tex:"divide", ttype:CONST}, -{input:"@", tag:"mo", output:"\u2218", tex:"circ", ttype:CONST}, -{input:"o+", tag:"mo", output:"\u2295", tex:"oplus", ttype:CONST}, -{input:"ox", tag:"mo", output:"\u2297", tex:"otimes", ttype:CONST}, -{input:"o.", tag:"mo", output:"\u2299", tex:"odot", ttype:CONST}, -{input:"sum", tag:"mo", output:"\u2211", tex:null, ttype:UNDEROVER}, -{input:"prod", tag:"mo", output:"\u220F", tex:null, ttype:UNDEROVER}, -{input:"^^", tag:"mo", output:"\u2227", tex:"wedge", ttype:CONST}, -{input:"^^^", tag:"mo", output:"\u22C0", tex:"bigwedge", ttype:UNDEROVER}, -{input:"vv", tag:"mo", output:"\u2228", tex:"vee", ttype:CONST}, -{input:"vvv", tag:"mo", output:"\u22C1", tex:"bigvee", ttype:UNDEROVER}, -{input:"nn", tag:"mo", output:"\u2229", tex:"cap", ttype:CONST}, -{input:"nnn", tag:"mo", output:"\u22C2", tex:"bigcap", ttype:UNDEROVER}, -{input:"uu", tag:"mo", output:"\u222A", tex:"cup", ttype:CONST}, -{input:"uuu", tag:"mo", output:"\u22C3", tex:"bigcup", ttype:UNDEROVER}, - -//binary relation symbols -{input:"!=", tag:"mo", output:"\u2260", tex:"ne", ttype:CONST}, -{input:":=", tag:"mo", output:":=", tex:null, ttype:CONST}, -{input:"lt", tag:"mo", output:"<", tex:null, ttype:CONST}, -{input:"<=", tag:"mo", output:"\u2264", tex:"le", ttype:CONST}, -{input:"lt=", tag:"mo", output:"\u2264", tex:"leq", ttype:CONST}, -{input:">=", tag:"mo", output:"\u2265", tex:"ge", ttype:CONST}, -{input:"geq", tag:"mo", output:"\u2265", tex:null, ttype:CONST}, -{input:"-<", tag:"mo", output:"\u227A", tex:"prec", ttype:CONST}, -{input:"-lt", tag:"mo", output:"\u227A", tex:null, ttype:CONST}, -{input:">-", tag:"mo", output:"\u227B", tex:"succ", ttype:CONST}, -{input:"-<=", tag:"mo", output:"\u2AAF", tex:"preceq", ttype:CONST}, -{input:">-=", tag:"mo", output:"\u2AB0", tex:"succeq", ttype:CONST}, -{input:"in", tag:"mo", output:"\u2208", tex:null, ttype:CONST}, -{input:"!in", tag:"mo", output:"\u2209", tex:"notin", ttype:CONST}, -{input:"sub", tag:"mo", output:"\u2282", tex:"subset", ttype:CONST}, -{input:"sup", tag:"mo", output:"\u2283", tex:"supset", ttype:CONST}, -{input:"sube", tag:"mo", output:"\u2286", tex:"subseteq", ttype:CONST}, -{input:"supe", tag:"mo", output:"\u2287", tex:"supseteq", ttype:CONST}, -{input:"-=", tag:"mo", output:"\u2261", tex:"equiv", ttype:CONST}, -{input:"~=", tag:"mo", output:"\u2245", tex:"cong", ttype:CONST}, -{input:"~~", tag:"mo", output:"\u2248", tex:"approx", ttype:CONST}, -{input:"prop", tag:"mo", output:"\u221D", tex:"propto", ttype:CONST}, - -//logical symbols -{input:"and", tag:"mtext", output:"and", tex:null, ttype:SPACE}, -{input:"or", tag:"mtext", output:"or", tex:null, ttype:SPACE}, -{input:"not", tag:"mo", output:"\u00AC", tex:"neg", ttype:CONST}, -{input:"=>", tag:"mo", output:"\u21D2", tex:"implies", ttype:CONST}, -{input:"if", tag:"mo", output:"if", tex:null, ttype:SPACE}, -{input:"<=>", tag:"mo", output:"\u21D4", tex:"iff", ttype:CONST}, -{input:"AA", tag:"mo", output:"\u2200", tex:"forall", ttype:CONST}, -{input:"EE", tag:"mo", output:"\u2203", tex:"exists", ttype:CONST}, -{input:"_|_", tag:"mo", output:"\u22A5", tex:"bot", ttype:CONST}, -{input:"TT", tag:"mo", output:"\u22A4", tex:"top", ttype:CONST}, -{input:"|--", tag:"mo", output:"\u22A2", tex:"vdash", ttype:CONST}, -{input:"|==", tag:"mo", output:"\u22A8", tex:"models", ttype:CONST}, - -//grouping brackets -{input:"(", tag:"mo", output:"(", tex:null, ttype:LEFTBRACKET}, -{input:")", tag:"mo", output:")", tex:null, ttype:RIGHTBRACKET}, -{input:"[", tag:"mo", output:"[", tex:null, ttype:LEFTBRACKET}, -{input:"]", tag:"mo", output:"]", tex:null, ttype:RIGHTBRACKET}, -{input:"{", tag:"mo", output:"{", tex:null, ttype:LEFTBRACKET}, -{input:"}", tag:"mo", output:"}", tex:null, ttype:RIGHTBRACKET}, -{input:"|", tag:"mo", output:"|", tex:null, ttype:LEFTRIGHT}, -//{input:"||", tag:"mo", output:"||", tex:null, ttype:LEFTRIGHT}, -{input:"(:", tag:"mo", output:"\u2329", tex:"langle", ttype:LEFTBRACKET}, -{input:":)", tag:"mo", output:"\u232A", tex:"rangle", ttype:RIGHTBRACKET}, -{input:"<<", tag:"mo", output:"\u2329", tex:null, ttype:LEFTBRACKET}, -{input:">>", tag:"mo", output:"\u232A", tex:null, ttype:RIGHTBRACKET}, -{input:"{:", tag:"mo", output:"{:", tex:null, ttype:LEFTBRACKET, invisible:true}, -{input:":}", tag:"mo", output:":}", tex:null, ttype:RIGHTBRACKET, invisible:true}, - -//miscellaneous symbols -{input:"int", tag:"mo", output:"\u222B", tex:null, ttype:CONST}, -{input:"dx", tag:"mi", output:"{:d x:}", tex:null, ttype:DEFINITION}, -{input:"dy", tag:"mi", output:"{:d y:}", tex:null, ttype:DEFINITION}, -{input:"dz", tag:"mi", output:"{:d z:}", tex:null, ttype:DEFINITION}, -{input:"dt", tag:"mi", output:"{:d t:}", tex:null, ttype:DEFINITION}, -{input:"oint", tag:"mo", output:"\u222E", tex:null, ttype:CONST}, -{input:"del", tag:"mo", output:"\u2202", tex:"partial", ttype:CONST}, -{input:"grad", tag:"mo", output:"\u2207", tex:"nabla", ttype:CONST}, -{input:"+-", tag:"mo", output:"\u00B1", tex:"pm", ttype:CONST}, -{input:"O/", tag:"mo", output:"\u2205", tex:"emptyset", ttype:CONST}, -{input:"oo", tag:"mo", output:"\u221E", tex:"infty", ttype:CONST}, -{input:"aleph", tag:"mo", output:"\u2135", tex:null, ttype:CONST}, -{input:"...", tag:"mo", output:"...", tex:"ldots", ttype:CONST}, -{input:":.", tag:"mo", output:"\u2234", tex:"therefore", ttype:CONST}, -{input:"/_", tag:"mo", output:"\u2220", tex:"angle", ttype:CONST}, -{input:"\\ ", tag:"mo", output:"\u00A0", tex:null, ttype:CONST}, -{input:"quad", tag:"mo", output:"\u00A0\u00A0", tex:null, ttype:CONST}, -{input:"qquad", tag:"mo", output:"\u00A0\u00A0\u00A0\u00A0", tex:null, ttype:CONST}, -{input:"cdots", tag:"mo", output:"\u22EF", tex:null, ttype:CONST}, -{input:"vdots", tag:"mo", output:"\u22EE", tex:null, ttype:CONST}, -{input:"ddots", tag:"mo", output:"\u22F1", tex:null, ttype:CONST}, -{input:"diamond", tag:"mo", output:"\u22C4", tex:null, ttype:CONST}, -{input:"square", tag:"mo", output:"\u25A1", tex:null, ttype:CONST}, -{input:"|__", tag:"mo", output:"\u230A", tex:"lfloor", ttype:CONST}, -{input:"__|", tag:"mo", output:"\u230B", tex:"rfloor", ttype:CONST}, -{input:"|~", tag:"mo", output:"\u2308", tex:"lceiling", ttype:CONST}, -{input:"~|", tag:"mo", output:"\u2309", tex:"rceiling", ttype:CONST}, -{input:"CC", tag:"mo", output:"\u2102", tex:null, ttype:CONST}, -{input:"NN", tag:"mo", output:"\u2115", tex:null, ttype:CONST}, -{input:"QQ", tag:"mo", output:"\u211A", tex:null, ttype:CONST}, -{input:"RR", tag:"mo", output:"\u211D", tex:null, ttype:CONST}, -{input:"ZZ", tag:"mo", output:"\u2124", tex:null, ttype:CONST}, -{input:"f", tag:"mi", output:"f", tex:null, ttype:UNARY, func:true}, -{input:"g", tag:"mi", output:"g", tex:null, ttype:UNARY, func:true}, - -//standard functions -{input:"lim", tag:"mo", output:"lim", tex:null, ttype:UNDEROVER}, -{input:"Lim", tag:"mo", output:"Lim", tex:null, ttype:UNDEROVER}, -{input:"sin", tag:"mo", output:"sin", tex:null, ttype:UNARY, func:true}, -{input:"cos", tag:"mo", output:"cos", tex:null, ttype:UNARY, func:true}, -{input:"tan", tag:"mo", output:"tan", tex:null, ttype:UNARY, func:true}, -{input:"sinh", tag:"mo", output:"sinh", tex:null, ttype:UNARY, func:true}, -{input:"cosh", tag:"mo", output:"cosh", tex:null, ttype:UNARY, func:true}, -{input:"tanh", tag:"mo", output:"tanh", tex:null, ttype:UNARY, func:true}, -{input:"cot", tag:"mo", output:"cot", tex:null, ttype:UNARY, func:true}, -{input:"sec", tag:"mo", output:"sec", tex:null, ttype:UNARY, func:true}, -{input:"csc", tag:"mo", output:"csc", tex:null, ttype:UNARY, func:true}, -{input:"log", tag:"mo", output:"log", tex:null, ttype:UNARY, func:true}, -{input:"ln", tag:"mo", output:"ln", tex:null, ttype:UNARY, func:true}, -{input:"det", tag:"mo", output:"det", tex:null, ttype:UNARY, func:true}, -{input:"dim", tag:"mo", output:"dim", tex:null, ttype:CONST}, -{input:"mod", tag:"mo", output:"mod", tex:null, ttype:CONST}, -{input:"gcd", tag:"mo", output:"gcd", tex:null, ttype:UNARY, func:true}, -{input:"lcm", tag:"mo", output:"lcm", tex:null, ttype:UNARY, func:true}, -{input:"lub", tag:"mo", output:"lub", tex:null, ttype:CONST}, -{input:"glb", tag:"mo", output:"glb", tex:null, ttype:CONST}, -{input:"min", tag:"mo", output:"min", tex:null, ttype:UNDEROVER}, -{input:"max", tag:"mo", output:"max", tex:null, ttype:UNDEROVER}, - -//arrows -{input:"uarr", tag:"mo", output:"\u2191", tex:"uparrow", ttype:CONST}, -{input:"darr", tag:"mo", output:"\u2193", tex:"downarrow", ttype:CONST}, -{input:"rarr", tag:"mo", output:"\u2192", tex:"rightarrow", ttype:CONST}, -{input:"->", tag:"mo", output:"\u2192", tex:"to", ttype:CONST}, -{input:"|->", tag:"mo", output:"\u21A6", tex:"mapsto", ttype:CONST}, -{input:"larr", tag:"mo", output:"\u2190", tex:"leftarrow", ttype:CONST}, -{input:"harr", tag:"mo", output:"\u2194", tex:"leftrightarrow", ttype:CONST}, -{input:"rArr", tag:"mo", output:"\u21D2", tex:"Rightarrow", ttype:CONST}, -{input:"lArr", tag:"mo", output:"\u21D0", tex:"Leftarrow", ttype:CONST}, -{input:"hArr", tag:"mo", output:"\u21D4", tex:"Leftrightarrow", ttype:CONST}, - -//commands with argument -AMsqrt, AMroot, AMfrac, AMdiv, AMover, AMsub, AMsup, -{input:"hat", tag:"mover", output:"\u005E", tex:null, ttype:UNARY, acc:true}, -{input:"bar", tag:"mover", output:"\u00AF", tex:"overline", ttype:UNARY, acc:true}, -{input:"vec", tag:"mover", output:"\u2192", tex:null, ttype:UNARY, acc:true}, -{input:"dot", tag:"mover", output:".", tex:null, ttype:UNARY, acc:true}, -{input:"ddot", tag:"mover", output:"..", tex:null, ttype:UNARY, acc:true}, -{input:"ul", tag:"munder", output:"\u0332", tex:"underline", ttype:UNARY, acc:true}, -AMtext, AMmbox, AMquote, -{input:"bb", tag:"mstyle", atname:"fontweight", atval:"bold", output:"bb", tex:null, ttype:UNARY}, -{input:"mathbf", tag:"mstyle", atname:"fontweight", atval:"bold", output:"mathbf", tex:null, ttype:UNARY}, -{input:"sf", tag:"mstyle", atname:"fontfamily", atval:"sans-serif", output:"sf", tex:null, ttype:UNARY}, -{input:"mathsf", tag:"mstyle", atname:"fontfamily", atval:"sans-serif", output:"mathsf", tex:null, ttype:UNARY}, -{input:"bbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"bbb", tex:null, ttype:UNARY, codes:AMbbb}, -{input:"mathbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", output:"mathbb", tex:null, ttype:UNARY, codes:AMbbb}, -{input:"cc", tag:"mstyle", atname:"mathvariant", atval:"script", output:"cc", tex:null, ttype:UNARY, codes:AMcal}, -{input:"mathcal", tag:"mstyle", atname:"mathvariant", atval:"script", output:"mathcal", tex:null, ttype:UNARY, codes:AMcal}, -{input:"tt", tag:"mstyle", atname:"fontfamily", atval:"monospace", output:"tt", tex:null, ttype:UNARY}, -{input:"mathtt", tag:"mstyle", atname:"fontfamily", atval:"monospace", output:"mathtt", tex:null, ttype:UNARY}, -{input:"fr", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"fr", tex:null, ttype:UNARY, codes:AMfrk}, -{input:"mathfrak", tag:"mstyle", atname:"mathvariant", atval:"fraktur", output:"mathfrak", tex:null, ttype:UNARY, codes:AMfrk} -]; - -function compareNames(s1,s2) { - if (s1.input > s2.input) return 1 - else return -1; -} - -var AMnames = []; //list of input symbols - -function AMinitSymbols() { - var texsymbols = [], i; - for (i=0; i=n where str appears or would be inserted -// assumes arr is sorted - if (n==0) { - var h,m; - n = -1; - h = arr.length; - while (n+1> 1; - if (arr[m]=str -} - -function AMgetSymbol(str) { -//return maximal initial substring of str that appears in names -//return null if there is none - var k = 0; //new pos - var j = 0; //old pos - var mk; //match pos - var st; - var tagst; - var match = ""; - var more = true; - for (var i=1; i<=str.length && more; i++) { - st = str.slice(0,i); //initial substring of length i - j = k; - k = AMposition(AMnames, st, j); - if (k=AMnames[k]; - } - AMpreviousSymbol=AMcurrentSymbol; - if (match!=""){ - AMcurrentSymbol=AMsymbols[mk].ttype; - return AMsymbols[mk]; - } -// if str[0] is a digit or - return maxsubstring of digits.digits - AMcurrentSymbol=CONST; - k = 1; - st = str.slice(0,1); - var integ = true; - while ("0"<=st && st<="9" && k<=str.length) { - st = str.slice(k,k+1); - k++; - } - if (st == decimalsign) { - st = str.slice(k,k+1); - if ("0"<=st && st<="9") { - integ = false; - k++; - while ("0"<=st && st<="9" && k<=str.length) { - st = str.slice(k,k+1); - k++; - } - } - } - if ((integ && k>1) || k>2) { - st = str.slice(0,k-1); - tagst = "mn"; - } else { - k = 2; - st = str.slice(0,1); //take 1 character - tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi"); - } - if (st=="-" && AMpreviousSymbol==INFIX) { - AMcurrentSymbol = INFIX; //trick "/" into recognizing "-" on second parse - return {input:st, tag:tagst, output:st, ttype:UNARY, func:true}; - } - return {input:st, tag:tagst, output:st, ttype:CONST}; -} - -function AMremoveBrackets(node) { - var st; - if (node.nodeName=="mrow") { - st = node.firstChild.firstChild.nodeValue; - if (st=="(" || st=="[" || st=="{") node.removeChild(node.firstChild); - } - if (node.nodeName=="mrow") { - st = node.lastChild.firstChild.nodeValue; - if (st==")" || st=="]" || st=="}") node.removeChild(node.lastChild); - } -} - -/*Parsing ASCII math expressions with the following grammar -v ::= [A-Za-z] | greek letters | numbers | other constant symbols -u ::= sqrt | text | bb | other unary symbols for font commands -b ::= frac | root | stackrel binary symbols -l ::= ( | [ | { | (: | {: left brackets -r ::= ) | ] | } | :) | :} right brackets -S ::= v | lEr | uS | bSS Simple expression -I ::= S_S | S^S | S_S^S | S Intermediate expression -E ::= IE | I/I Expression -Each terminal symbol is translated into a corresponding mathml node.*/ - -var AMnestingDepth,AMpreviousSymbol,AMcurrentSymbol; - -function AMparseSexpr(str) { //parses str and returns [node,tailstr] - var symbol, node, result, i, st,// rightvert = false, - newFrag = document.createDocumentFragment(); - str = AMremoveCharsAndBlanks(str,0); - symbol = AMgetSymbol(str); //either a token or a bracket or empty - if (symbol == null || symbol.ttype == RIGHTBRACKET && AMnestingDepth > 0) { - return [null,str]; - } - if (symbol.ttype == DEFINITION) { - str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); - symbol = AMgetSymbol(str); - } - switch (symbol.ttype) { - case UNDEROVER: - case CONST: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode(symbol.tag, //its a constant - document.createTextNode(symbol.output)),str]; - case LEFTBRACKET: //read (expr+) - AMnestingDepth++; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseExpr(str,true); - AMnestingDepth--; - if (typeof symbol.invisible == "boolean" && symbol.invisible) - node = AMcreateMmlNode("mrow",result[0]); - else { - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - node.appendChild(result[0]); - } - return [node,result[1]]; - case TEXT: - if (symbol!=AMquote) str = AMremoveCharsAndBlanks(str,symbol.input.length); - if (str.charAt(0)=="{") i=str.indexOf("}"); - else if (str.charAt(0)=="(") i=str.indexOf(")"); - else if (str.charAt(0)=="[") i=str.indexOf("]"); - else if (symbol==AMquote) i=str.slice(1).indexOf("\"")+1; - else i = 0; - if (i==-1) i = str.length; - st = str.slice(1,i); - if (st.charAt(0) == " ") { - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - } - newFrag.appendChild( - AMcreateMmlNode(symbol.tag,document.createTextNode(st))); - if (st.charAt(st.length-1) == " ") { - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - } - str = AMremoveCharsAndBlanks(str,i+1); - return [AMcreateMmlNode("mrow",newFrag),str]; - case UNARY: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseSexpr(str); - if (result[0]==null) return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str]; - if (typeof symbol.func == "boolean" && symbol.func) { // functions hack - st = str.charAt(0); - if (st=="^" || st=="_" || st=="/" || st=="|" || st==",") { - return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str]; - } else { - node = AMcreateMmlNode("mrow", - AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); - node.appendChild(result[0]); - return [node,result[1]]; - } - } - AMremoveBrackets(result[0]); - if (symbol.input == "sqrt") { // sqrt - return [AMcreateMmlNode(symbol.tag,result[0]),result[1]]; - } else if (typeof symbol.acc == "boolean" && symbol.acc) { // accent - node = AMcreateMmlNode(symbol.tag,result[0]); - node.appendChild(AMcreateMmlNode("mo",document.createTextNode(symbol.output))); - return [node,result[1]]; - } else { // font change command - if (!isIE && typeof symbol.codes != "undefined") { - for (i=0; i64 && st.charCodeAt(j)<91) newst = newst + - String.fromCharCode(symbol.codes[st.charCodeAt(j)-65]); - else newst = newst + st.charAt(j); - if (result[0].nodeName=="mi") - result[0]=AMcreateElementMathML("mo"). - appendChild(document.createTextNode(newst)); - else result[0].replaceChild(AMcreateElementMathML("mo"). - appendChild(document.createTextNode(newst)),result[0].childNodes[i]); - } - } - node = AMcreateMmlNode(symbol.tag,result[0]); - node.setAttribute(symbol.atname,symbol.atval); - return [node,result[1]]; - } - case BINARY: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseSexpr(str); - if (result[0]==null) return [AMcreateMmlNode("mo", - document.createTextNode(symbol.input)),str]; - AMremoveBrackets(result[0]); - var result2 = AMparseSexpr(result[1]); - if (result2[0]==null) return [AMcreateMmlNode("mo", - document.createTextNode(symbol.input)),str]; - AMremoveBrackets(result2[0]); - if (symbol.input=="root" || symbol.input=="stackrel") - newFrag.appendChild(result2[0]); - newFrag.appendChild(result[0]); - if (symbol.input=="frac") newFrag.appendChild(result2[0]); - return [AMcreateMmlNode(symbol.tag,newFrag),result2[1]]; - case INFIX: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode("mo",document.createTextNode(symbol.output)),str]; - case SPACE: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - newFrag.appendChild( - AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","1ex"); - newFrag.appendChild(node); - return [AMcreateMmlNode("mrow",newFrag),str]; - case LEFTRIGHT: -// if (rightvert) return [null,str]; else rightvert = true; - AMnestingDepth++; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseExpr(str,false); - AMnestingDepth--; - var st = ""; - if (result[0].lastChild!=null) - st = result[0].lastChild.firstChild.nodeValue; - if (st == "|") { // its an absolute value subterm - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - node.appendChild(result[0]); - return [node,result[1]]; - } else { // the "|" is a \mid - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - return [node,str]; - } - default: -//alert("default"); - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode(symbol.tag, //its a constant - document.createTextNode(symbol.output)),str]; - } -} - -function AMparseIexpr(str) { - var symbol, sym1, sym2, node, result, underover; - str = AMremoveCharsAndBlanks(str,0); - sym1 = AMgetSymbol(str); - result = AMparseSexpr(str); - node = result[0]; - str = result[1]; - symbol = AMgetSymbol(str); - if (symbol.ttype == INFIX && symbol.input != "/") { - str = AMremoveCharsAndBlanks(str,symbol.input.length); -// if (symbol.input == "/") result = AMparseIexpr(str); else ... - result = AMparseSexpr(str); - if (result[0] == null) // show box in place of missing argument - result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); - else AMremoveBrackets(result[0]); - str = result[1]; -// if (symbol.input == "/") AMremoveBrackets(node); - if (symbol.input == "_") { - sym2 = AMgetSymbol(str); - underover = (sym1.ttype == UNDEROVER); - if (sym2.input == "^") { - str = AMremoveCharsAndBlanks(str,sym2.input.length); - var res2 = AMparseSexpr(str); - AMremoveBrackets(res2[0]); - str = res2[1]; - node = AMcreateMmlNode((underover?"munderover":"msubsup"),node); - node.appendChild(result[0]); - node.appendChild(res2[0]); - node = AMcreateMmlNode("mrow",node); // so sum does not stretch - } else { - node = AMcreateMmlNode((underover?"munder":"msub"),node); - node.appendChild(result[0]); - } - } else { - node = AMcreateMmlNode(symbol.tag,node); - node.appendChild(result[0]); - } - } - return [node,str]; -} - -function AMparseExpr(str,rightbracket) { - var symbol, node, result, i, nodeList = [], - newFrag = document.createDocumentFragment(); - do { - str = AMremoveCharsAndBlanks(str,0); - result = AMparseIexpr(str); - node = result[0]; - str = result[1]; - symbol = AMgetSymbol(str); - if (symbol.ttype == INFIX && symbol.input == "/") { - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseIexpr(str); - if (result[0] == null) // show box in place of missing argument - result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); - else AMremoveBrackets(result[0]); - str = result[1]; - AMremoveBrackets(node); - node = AMcreateMmlNode(symbol.tag,node); - node.appendChild(result[0]); - newFrag.appendChild(node); - symbol = AMgetSymbol(str); - } - else if (node!=undefined) newFrag.appendChild(node); - } while ((symbol.ttype != RIGHTBRACKET && - (symbol.ttype != LEFTRIGHT || rightbracket) - || AMnestingDepth == 0) && symbol!=null && symbol.output!=""); - if (symbol.ttype == RIGHTBRACKET || symbol.ttype == LEFTRIGHT) { -// if (AMnestingDepth > 0) AMnestingDepth--; - var len = newFrag.childNodes.length; - if (len>0 && newFrag.childNodes[len-1].nodeName == "mrow" && len>1 && - newFrag.childNodes[len-2].nodeName == "mo" && - newFrag.childNodes[len-2].firstChild.nodeValue == ",") { //matrix - var right = newFrag.childNodes[len-1].lastChild.firstChild.nodeValue; - if (right==")" || right=="]") { - var left = newFrag.childNodes[len-1].firstChild.firstChild.nodeValue; - if (left=="(" && right==")" && symbol.output != "}" || - left=="[" && right=="]") { - var pos = []; // positions of commas - var matrix = true; - var m = newFrag.childNodes.length; - for (i=0; matrix && i1) matrix = pos[i].length == pos[i-2].length; - } - if (matrix) { - var row, frag, n, k, table = document.createDocumentFragment(); - for (i=0; i(-,-,...,-,-) - n = node.childNodes.length; - k = 0; - node.removeChild(node.firstChild); //remove ( - for (j=1; j2) { - newFrag.removeChild(newFrag.firstChild); //remove ) - newFrag.removeChild(newFrag.firstChild); //remove , - } - table.appendChild(AMcreateMmlNode("mtr",row)); - } - node = AMcreateMmlNode("mtable",table); - if (typeof symbol.invisible == "boolean" && symbol.invisible) node.setAttribute("columnalign","left"); - newFrag.replaceChild(node,newFrag.firstChild); - } - } - } - } - str = AMremoveCharsAndBlanks(str,symbol.input.length); - if (typeof symbol.invisible != "boolean" || !symbol.invisible) { - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - newFrag.appendChild(node); - } - } - return [newFrag,str]; -} - -function AMparseMath(str) { - var result, node = AMcreateElementMathML("mstyle"); - if (mathcolor != "") node.setAttribute("mathcolor",mathcolor); - if (displaystyle) node.setAttribute("displaystyle","true"); - if (mathfontfamily != "") node.setAttribute("fontfamily",mathfontfamily); - AMnestingDepth = 0; - node.appendChild(AMparseExpr(str.replace(/^\s+/g,""),false)[0]); - node = AMcreateMmlNode("math",node); - if (showasciiformulaonhover) //fixed by djhsu so newline - node.setAttribute("title",str.replace(/\s+/g," "));//does not show in Gecko - if (mathfontfamily != "" && (isIE || mathfontfamily != "serif")) { - var fnode = AMcreateElementXHTML("font"); - fnode.setAttribute("face",mathfontfamily); - fnode.appendChild(node); - return fnode; - } - return node; -} - -function AMstrarr2docFrag(arr, linebreaks) { - var newFrag=document.createDocumentFragment(); - var expr = false; - for (var i=0; i1 || mtch) { - if (checkForMathML) { - checkForMathML = false; - var nd = AMisMathMLavailable(); - AMnoMathML = nd != null; - if (AMnoMathML && notifyIfNoMathML) - if (alertIfNoMathML) - alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n\ - or Firefox/Mozilla/Netscape"); - else AMbody.insertBefore(nd,AMbody.childNodes[0]); - } - if (!AMnoMathML) { - frg = AMstrarr2docFrag(arr,n.nodeType==8); - var len = frg.childNodes.length; - n.parentNode.replaceChild(frg,n); - return len-1; - } else return 0; - } - } - } else return 0; - } else if (n.nodeName!="math") { - for (i=0; i"); - document.write(""); -} - -// GO1.1 Generic onload by Brothercake -// http://www.brothercake.com/ -//onload function (replaces the onload="translate()" in the tag) -function generic() -{ - translate(); -}; -//setup onload function -if(typeof window.addEventListener != 'undefined') -{ - //.. gecko, safari, konqueror and standard - window.addEventListener('load', generic, false); -} -else if(typeof document.addEventListener != 'undefined') -{ - //.. opera 7 - document.addEventListener('load', generic, false); -} -else if(typeof window.attachEvent != 'undefined') -{ - //.. win/ie - window.attachEvent('onload', generic); -} -//** remove this condition to degrade older browsers -else -{ - //.. mac/ie5 and anything else that gets this far - //if there's an existing onload function - if(typeof window.onload == 'function') - { - //store it - var existing = onload; - //add new onload handler - window.onload = function() - { - //call existing onload function - existing(); - //call generic onload function - generic(); - }; - } - else - { - //setup onload function - window.onload = generic; - } -} diff -Nru asciidoc-8.6.10/javascripts/LaTeXMathML.js asciidoc-10.1.2/javascripts/LaTeXMathML.js --- asciidoc-8.6.10/javascripts/LaTeXMathML.js 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/javascripts/LaTeXMathML.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,1223 +0,0 @@ -/* -LaTeXMathML.js -============== - -This file, in this form, is due to Douglas Woodall, June 2006. -It contains JavaScript functions to convert (most simple) LaTeX -math notation to Presentation MathML. It was obtained by -downloading the file ASCIIMathML.js from - http://www1.chapman.edu/~jipsen/mathml/asciimathdownload/ -and modifying it so that it carries out ONLY those conversions -that would be carried out in LaTeX. A description of the original -file, with examples, can be found at - www1.chapman.edu/~jipsen/mathml/asciimath.html - ASCIIMathML: Math on the web for everyone - -Here is the header notice from the original file: - -ASCIIMathML.js -============== -This file contains JavaScript functions to convert ASCII math notation -to Presentation MathML. The conversion is done while the (X)HTML page -loads, and should work with Firefox/Mozilla/Netscape 7+ and Internet -Explorer 6+MathPlayer (http://www.dessci.com/en/products/mathplayer/). -Just add the next line to your (X)HTML page with this file in the same folder: -This is a convenient and inexpensive solution for authoring MathML. - -Version 1.4.7 Dec 15, 2005, (c) Peter Jipsen http://www.chapman.edu/~jipsen -Latest version at http://www.chapman.edu/~jipsen/mathml/ASCIIMathML.js -For changes see http://www.chapman.edu/~jipsen/mathml/asciimathchanges.txt -If you use it on a webpage, please send the URL to jipsen@chapman.edu - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at -your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License (at http://www.gnu.org/copyleft/gpl.html) -for more details. - -LaTeXMathML.js (ctd) -============== - -The instructions for use are the same as for the original -ASCIIMathML.js, except that of course the line you add to your -file should be -Or use absolute path names if the file is not in the same folder -as your (X)HTML page. -*/ - -var checkForMathML = true; // check if browser can display MathML -var notifyIfNoMathML = true; // display note if no MathML capability -var alertIfNoMathML = false; // show alert box if no MathML capability -// was "red": -var mathcolor = ""; // change it to "" (to inherit) or any other color -// was "serif": -var mathfontfamily = ""; // change to "" to inherit (works in IE) - // or another family (e.g. "arial") -var showasciiformulaonhover = true; // helps students learn ASCIIMath -/* -// Commented out by DRW -- not now used -- see DELIMITERS (twice) near the end -var displaystyle = false; // puts limits above and below large operators -var decimalsign = "."; // change to "," if you like, beware of `(1,2)`! -var AMdelimiter1 = "`", AMescape1 = "\\\\`"; // can use other characters -var AMdelimiter2 = "$", AMescape2 = "\\\\\\$", AMdelimiter2regexp = "\\$"; -var doubleblankmathdelimiter = false; // if true, x+1 is equal to `x+1` - // for IE this works only in -//var separatetokens;// has been removed (email me if this is a problem) -*/ -var isIE = document.createElementNS==null; - -if (document.getElementById==null) - alert("This webpage requires a recent browser such as\ -\nMozilla/Netscape 7+ or Internet Explorer 6+MathPlayer") - -// all further global variables start with "AM" - -function AMcreateElementXHTML(t) { - if (isIE) return document.createElement(t); - else return document.createElementNS("http://www.w3.org/1999/xhtml",t); -} - -function AMnoMathMLNote() { - var nd = AMcreateElementXHTML("h3"); - nd.setAttribute("align","center") - nd.appendChild(AMcreateElementXHTML("p")); - nd.appendChild(document.createTextNode("To view the ")); - var an = AMcreateElementXHTML("a"); - an.appendChild(document.createTextNode("LaTeXMathML")); - an.setAttribute("href","http://www.maths.nott.ac.uk/personal/drw/lm.html"); - nd.appendChild(an); - nd.appendChild(document.createTextNode(" notation use Internet Explorer 6+")); - an = AMcreateElementXHTML("a"); - an.appendChild(document.createTextNode("MathPlayer")); - an.setAttribute("href","http://www.dessci.com/en/products/mathplayer/download.htm"); - nd.appendChild(an); - nd.appendChild(document.createTextNode(" or Netscape/Mozilla/Firefox")); - nd.appendChild(AMcreateElementXHTML("p")); - return nd; -} - -function AMisMathMLavailable() { - if (navigator.appName.slice(0,8)=="Netscape") - if (navigator.appVersion.slice(0,1)>="5") return null; - else return AMnoMathMLNote(); - else if (navigator.appName.slice(0,9)=="Microsoft") - try { - var ActiveX = new ActiveXObject("MathPlayer.Factory.1"); - return null; - } catch (e) { - return AMnoMathMLNote(); - } - else return AMnoMathMLNote(); -} - -// character lists for Mozilla/Netscape fonts -var AMcal = [0xEF35,0x212C,0xEF36,0xEF37,0x2130,0x2131,0xEF38,0x210B,0x2110,0xEF39,0xEF3A,0x2112,0x2133,0xEF3B,0xEF3C,0xEF3D,0xEF3E,0x211B,0xEF3F,0xEF40,0xEF41,0xEF42,0xEF43,0xEF44,0xEF45,0xEF46]; -var AMfrk = [0xEF5D,0xEF5E,0x212D,0xEF5F,0xEF60,0xEF61,0xEF62,0x210C,0x2111,0xEF63,0xEF64,0xEF65,0xEF66,0xEF67,0xEF68,0xEF69,0xEF6A,0x211C,0xEF6B,0xEF6C,0xEF6D,0xEF6E,0xEF6F,0xEF70,0xEF71,0x2128]; -var AMbbb = [0xEF8C,0xEF8D,0x2102,0xEF8E,0xEF8F,0xEF90,0xEF91,0x210D,0xEF92,0xEF93,0xEF94,0xEF95,0xEF96,0x2115,0xEF97,0x2119,0x211A,0x211D,0xEF98,0xEF99,0xEF9A,0xEF9B,0xEF9C,0xEF9D,0xEF9E,0x2124]; - -var CONST = 0, UNARY = 1, BINARY = 2, INFIX = 3, LEFTBRACKET = 4, - RIGHTBRACKET = 5, SPACE = 6, UNDEROVER = 7, DEFINITION = 8, - TEXT = 9, BIG = 10, LONG = 11, STRETCHY = 12, MATRIX = 13; // token types - -var AMsqrt = {input:"\\sqrt", tag:"msqrt", output:"sqrt", ttype:UNARY}, - AMroot = {input:"\\root", tag:"mroot", output:"root", ttype:BINARY}, - AMfrac = {input:"\\frac", tag:"mfrac", output:"/", ttype:BINARY}, - AMover = {input:"\\stackrel", tag:"mover", output:"stackrel", ttype:BINARY}, - AMatop = {input:"\\atop", tag:"mfrac", output:"", ttype:INFIX}, - AMchoose = {input:"\\choose", tag:"mfrac", output:"", ttype:INFIX}, - AMsub = {input:"_", tag:"msub", output:"_", ttype:INFIX}, - AMsup = {input:"^", tag:"msup", output:"^", ttype:INFIX}, - AMtext = {input:"\\mathrm", tag:"mtext", output:"text", ttype:TEXT}, - AMmbox = {input:"\\mbox", tag:"mtext", output:"mbox", ttype:TEXT}; - -// Commented out by DRW to prevent 1/2 turning into a 2-line fraction -// AMdiv = {input:"/", tag:"mfrac", output:"/", ttype:INFIX}, -// Commented out by DRW so that " prints literally in equations -// AMquote = {input:"\"", tag:"mtext", output:"mbox", ttype:TEXT}; - -var AMsymbols = [ -//Greek letters -{input:"\\alpha", tag:"mi", output:"\u03B1", ttype:CONST}, -{input:"\\beta", tag:"mi", output:"\u03B2", ttype:CONST}, -{input:"\\gamma", tag:"mi", output:"\u03B3", ttype:CONST}, -{input:"\\delta", tag:"mi", output:"\u03B4", ttype:CONST}, -{input:"\\epsilon", tag:"mi", output:"\u03B5", ttype:CONST}, -{input:"\\varepsilon", tag:"mi", output:"\u025B", ttype:CONST}, -{input:"\\zeta", tag:"mi", output:"\u03B6", ttype:CONST}, -{input:"\\eta", tag:"mi", output:"\u03B7", ttype:CONST}, -{input:"\\theta", tag:"mi", output:"\u03B8", ttype:CONST}, -{input:"\\vartheta", tag:"mi", output:"\u03D1", ttype:CONST}, -{input:"\\iota", tag:"mi", output:"\u03B9", ttype:CONST}, -{input:"\\kappa", tag:"mi", output:"\u03BA", ttype:CONST}, -{input:"\\lambda", tag:"mi", output:"\u03BB", ttype:CONST}, -{input:"\\mu", tag:"mi", output:"\u03BC", ttype:CONST}, -{input:"\\nu", tag:"mi", output:"\u03BD", ttype:CONST}, -{input:"\\xi", tag:"mi", output:"\u03BE", ttype:CONST}, -{input:"\\pi", tag:"mi", output:"\u03C0", ttype:CONST}, -{input:"\\varpi", tag:"mi", output:"\u03D6", ttype:CONST}, -{input:"\\rho", tag:"mi", output:"\u03C1", ttype:CONST}, -{input:"\\varrho", tag:"mi", output:"\u03F1", ttype:CONST}, -{input:"\\varsigma", tag:"mi", output:"\u03C2", ttype:CONST}, -{input:"\\sigma", tag:"mi", output:"\u03C3", ttype:CONST}, -{input:"\\tau", tag:"mi", output:"\u03C4", ttype:CONST}, -{input:"\\upsilon", tag:"mi", output:"\u03C5", ttype:CONST}, -{input:"\\phi", tag:"mi", output:"\u03C6", ttype:CONST}, -{input:"\\varphi", tag:"mi", output:"\u03D5", ttype:CONST}, -{input:"\\chi", tag:"mi", output:"\u03C7", ttype:CONST}, -{input:"\\psi", tag:"mi", output:"\u03C8", ttype:CONST}, -{input:"\\omega", tag:"mi", output:"\u03C9", ttype:CONST}, -{input:"\\Gamma", tag:"mo", output:"\u0393", ttype:CONST}, -{input:"\\Delta", tag:"mo", output:"\u0394", ttype:CONST}, -{input:"\\Theta", tag:"mo", output:"\u0398", ttype:CONST}, -{input:"\\Lambda", tag:"mo", output:"\u039B", ttype:CONST}, -{input:"\\Xi", tag:"mo", output:"\u039E", ttype:CONST}, -{input:"\\Pi", tag:"mo", output:"\u03A0", ttype:CONST}, -{input:"\\Sigma", tag:"mo", output:"\u03A3", ttype:CONST}, -{input:"\\Upsilon", tag:"mo", output:"\u03A5", ttype:CONST}, -{input:"\\Phi", tag:"mo", output:"\u03A6", ttype:CONST}, -{input:"\\Psi", tag:"mo", output:"\u03A8", ttype:CONST}, -{input:"\\Omega", tag:"mo", output:"\u03A9", ttype:CONST}, - -//fractions -{input:"\\frac12", tag:"mo", output:"\u00BD", ttype:CONST}, -{input:"\\frac14", tag:"mo", output:"\u00BC", ttype:CONST}, -{input:"\\frac34", tag:"mo", output:"\u00BE", ttype:CONST}, -{input:"\\frac13", tag:"mo", output:"\u2153", ttype:CONST}, -{input:"\\frac23", tag:"mo", output:"\u2154", ttype:CONST}, -{input:"\\frac15", tag:"mo", output:"\u2155", ttype:CONST}, -{input:"\\frac25", tag:"mo", output:"\u2156", ttype:CONST}, -{input:"\\frac35", tag:"mo", output:"\u2157", ttype:CONST}, -{input:"\\frac45", tag:"mo", output:"\u2158", ttype:CONST}, -{input:"\\frac16", tag:"mo", output:"\u2159", ttype:CONST}, -{input:"\\frac56", tag:"mo", output:"\u215A", ttype:CONST}, -{input:"\\frac18", tag:"mo", output:"\u215B", ttype:CONST}, -{input:"\\frac38", tag:"mo", output:"\u215C", ttype:CONST}, -{input:"\\frac58", tag:"mo", output:"\u215D", ttype:CONST}, -{input:"\\frac78", tag:"mo", output:"\u215E", ttype:CONST}, - -//binary operation symbols -{input:"\\pm", tag:"mo", output:"\u00B1", ttype:CONST}, -{input:"\\mp", tag:"mo", output:"\u2213", ttype:CONST}, -{input:"\\triangleleft",tag:"mo", output:"\u22B2", ttype:CONST}, -{input:"\\triangleright",tag:"mo",output:"\u22B3", ttype:CONST}, -{input:"\\cdot", tag:"mo", output:"\u22C5", ttype:CONST}, -{input:"\\star", tag:"mo", output:"\u22C6", ttype:CONST}, -{input:"\\ast", tag:"mo", output:"\u002A", ttype:CONST}, -{input:"\\times", tag:"mo", output:"\u00D7", ttype:CONST}, -{input:"\\div", tag:"mo", output:"\u00F7", ttype:CONST}, -{input:"\\circ", tag:"mo", output:"\u2218", ttype:CONST}, -//{input:"\\bullet", tag:"mo", output:"\u2219", ttype:CONST}, -{input:"\\bullet", tag:"mo", output:"\u2022", ttype:CONST}, -{input:"\\oplus", tag:"mo", output:"\u2295", ttype:CONST}, -{input:"\\ominus", tag:"mo", output:"\u2296", ttype:CONST}, -{input:"\\otimes", tag:"mo", output:"\u2297", ttype:CONST}, -{input:"\\bigcirc", tag:"mo", output:"\u25CB", ttype:CONST}, -{input:"\\oslash", tag:"mo", output:"\u2298", ttype:CONST}, -{input:"\\odot", tag:"mo", output:"\u2299", ttype:CONST}, -{input:"\\land", tag:"mo", output:"\u2227", ttype:CONST}, -{input:"\\wedge", tag:"mo", output:"\u2227", ttype:CONST}, -{input:"\\lor", tag:"mo", output:"\u2228", ttype:CONST}, -{input:"\\vee", tag:"mo", output:"\u2228", ttype:CONST}, -{input:"\\cap", tag:"mo", output:"\u2229", ttype:CONST}, -{input:"\\cup", tag:"mo", output:"\u222A", ttype:CONST}, -{input:"\\sqcap", tag:"mo", output:"\u2293", ttype:CONST}, -{input:"\\sqcup", tag:"mo", output:"\u2294", ttype:CONST}, -{input:"\\uplus", tag:"mo", output:"\u228E", ttype:CONST}, -{input:"\\amalg", tag:"mo", output:"\u2210", ttype:CONST}, -{input:"\\bigtriangleup",tag:"mo",output:"\u25B3", ttype:CONST}, -{input:"\\bigtriangledown",tag:"mo",output:"\u25BD", ttype:CONST}, -{input:"\\dag", tag:"mo", output:"\u2020", ttype:CONST}, -{input:"\\dagger", tag:"mo", output:"\u2020", ttype:CONST}, -{input:"\\ddag", tag:"mo", output:"\u2021", ttype:CONST}, -{input:"\\ddagger", tag:"mo", output:"\u2021", ttype:CONST}, -{input:"\\lhd", tag:"mo", output:"\u22B2", ttype:CONST}, -{input:"\\rhd", tag:"mo", output:"\u22B3", ttype:CONST}, -{input:"\\unlhd", tag:"mo", output:"\u22B4", ttype:CONST}, -{input:"\\unrhd", tag:"mo", output:"\u22B5", ttype:CONST}, - - -//BIG Operators -{input:"\\sum", tag:"mo", output:"\u2211", ttype:UNDEROVER}, -{input:"\\prod", tag:"mo", output:"\u220F", ttype:UNDEROVER}, -{input:"\\bigcap", tag:"mo", output:"\u22C2", ttype:UNDEROVER}, -{input:"\\bigcup", tag:"mo", output:"\u22C3", ttype:UNDEROVER}, -{input:"\\bigwedge", tag:"mo", output:"\u22C0", ttype:UNDEROVER}, -{input:"\\bigvee", tag:"mo", output:"\u22C1", ttype:UNDEROVER}, -{input:"\\bigsqcap", tag:"mo", output:"\u2A05", ttype:UNDEROVER}, -{input:"\\bigsqcup", tag:"mo", output:"\u2A06", ttype:UNDEROVER}, -{input:"\\coprod", tag:"mo", output:"\u2210", ttype:UNDEROVER}, -{input:"\\bigoplus", tag:"mo", output:"\u2A01", ttype:UNDEROVER}, -{input:"\\bigotimes", tag:"mo", output:"\u2A02", ttype:UNDEROVER}, -{input:"\\bigodot", tag:"mo", output:"\u2A00", ttype:UNDEROVER}, -{input:"\\biguplus", tag:"mo", output:"\u2A04", ttype:UNDEROVER}, -{input:"\\int", tag:"mo", output:"\u222B", ttype:CONST}, -{input:"\\oint", tag:"mo", output:"\u222E", ttype:CONST}, - -//binary relation symbols -{input:":=", tag:"mo", output:":=", ttype:CONST}, -{input:"\\lt", tag:"mo", output:"<", ttype:CONST}, -{input:"\\gt", tag:"mo", output:">", ttype:CONST}, -{input:"\\ne", tag:"mo", output:"\u2260", ttype:CONST}, -{input:"\\neq", tag:"mo", output:"\u2260", ttype:CONST}, -{input:"\\le", tag:"mo", output:"\u2264", ttype:CONST}, -{input:"\\leq", tag:"mo", output:"\u2264", ttype:CONST}, -{input:"\\leqslant", tag:"mo", output:"\u2264", ttype:CONST}, -{input:"\\ge", tag:"mo", output:"\u2265", ttype:CONST}, -{input:"\\geq", tag:"mo", output:"\u2265", ttype:CONST}, -{input:"\\geqslant", tag:"mo", output:"\u2265", ttype:CONST}, -{input:"\\equiv", tag:"mo", output:"\u2261", ttype:CONST}, -{input:"\\ll", tag:"mo", output:"\u226A", ttype:CONST}, -{input:"\\gg", tag:"mo", output:"\u226B", ttype:CONST}, -{input:"\\doteq", tag:"mo", output:"\u2250", ttype:CONST}, -{input:"\\prec", tag:"mo", output:"\u227A", ttype:CONST}, -{input:"\\succ", tag:"mo", output:"\u227B", ttype:CONST}, -{input:"\\preceq", tag:"mo", output:"\u227C", ttype:CONST}, -{input:"\\succeq", tag:"mo", output:"\u227D", ttype:CONST}, -{input:"\\subset", tag:"mo", output:"\u2282", ttype:CONST}, -{input:"\\supset", tag:"mo", output:"\u2283", ttype:CONST}, -{input:"\\subseteq", tag:"mo", output:"\u2286", ttype:CONST}, -{input:"\\supseteq", tag:"mo", output:"\u2287", ttype:CONST}, -{input:"\\sqsubset", tag:"mo", output:"\u228F", ttype:CONST}, -{input:"\\sqsupset", tag:"mo", output:"\u2290", ttype:CONST}, -{input:"\\sqsubseteq", tag:"mo", output:"\u2291", ttype:CONST}, -{input:"\\sqsupseteq", tag:"mo", output:"\u2292", ttype:CONST}, -{input:"\\sim", tag:"mo", output:"\u223C", ttype:CONST}, -{input:"\\simeq", tag:"mo", output:"\u2243", ttype:CONST}, -{input:"\\approx", tag:"mo", output:"\u2248", ttype:CONST}, -{input:"\\cong", tag:"mo", output:"\u2245", ttype:CONST}, -{input:"\\Join", tag:"mo", output:"\u22C8", ttype:CONST}, -{input:"\\bowtie", tag:"mo", output:"\u22C8", ttype:CONST}, -{input:"\\in", tag:"mo", output:"\u2208", ttype:CONST}, -{input:"\\ni", tag:"mo", output:"\u220B", ttype:CONST}, -{input:"\\owns", tag:"mo", output:"\u220B", ttype:CONST}, -{input:"\\propto", tag:"mo", output:"\u221D", ttype:CONST}, -{input:"\\vdash", tag:"mo", output:"\u22A2", ttype:CONST}, -{input:"\\dashv", tag:"mo", output:"\u22A3", ttype:CONST}, -{input:"\\models", tag:"mo", output:"\u22A8", ttype:CONST}, -{input:"\\perp", tag:"mo", output:"\u22A5", ttype:CONST}, -{input:"\\smile", tag:"mo", output:"\u2323", ttype:CONST}, -{input:"\\frown", tag:"mo", output:"\u2322", ttype:CONST}, -{input:"\\asymp", tag:"mo", output:"\u224D", ttype:CONST}, -{input:"\\notin", tag:"mo", output:"\u2209", ttype:CONST}, - -//matrices -{input:"\\begin{eqnarray}", output:"X", ttype:MATRIX, invisible:true}, -{input:"\\begin{array}", output:"X", ttype:MATRIX, invisible:true}, -{input:"\\\\", output:"}&{", ttype:DEFINITION}, -{input:"\\end{eqnarray}", output:"}}", ttype:DEFINITION}, -{input:"\\end{array}", output:"}}", ttype:DEFINITION}, - -//grouping and literal brackets -- ieval is for IE -{input:"\\big", tag:"mo", output:"X", atval:"1.2", ieval:"2.2", ttype:BIG}, -{input:"\\Big", tag:"mo", output:"X", atval:"1.6", ieval:"2.6", ttype:BIG}, -{input:"\\bigg", tag:"mo", output:"X", atval:"2.2", ieval:"3.2", ttype:BIG}, -{input:"\\Bigg", tag:"mo", output:"X", atval:"2.9", ieval:"3.9", ttype:BIG}, -{input:"\\left", tag:"mo", output:"X", ttype:LEFTBRACKET}, -{input:"\\right", tag:"mo", output:"X", ttype:RIGHTBRACKET}, -{input:"{", output:"{", ttype:LEFTBRACKET, invisible:true}, -{input:"}", output:"}", ttype:RIGHTBRACKET, invisible:true}, - -{input:"(", tag:"mo", output:"(", atval:"1", ttype:STRETCHY}, -{input:"[", tag:"mo", output:"[", atval:"1", ttype:STRETCHY}, -{input:"\\lbrack", tag:"mo", output:"[", atval:"1", ttype:STRETCHY}, -{input:"\\{", tag:"mo", output:"{", atval:"1", ttype:STRETCHY}, -{input:"\\lbrace", tag:"mo", output:"{", atval:"1", ttype:STRETCHY}, -{input:"\\langle", tag:"mo", output:"\u2329", atval:"1", ttype:STRETCHY}, -{input:"\\lfloor", tag:"mo", output:"\u230A", atval:"1", ttype:STRETCHY}, -{input:"\\lceil", tag:"mo", output:"\u2308", atval:"1", ttype:STRETCHY}, - -// rtag:"mi" causes space to be inserted before a following sin, cos, etc. -// (see function AMparseExpr() ) -{input:")", tag:"mo",output:")", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"]", tag:"mo",output:"]", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"\\rbrack",tag:"mo",output:"]", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"\\}", tag:"mo",output:"}", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"\\rbrace",tag:"mo",output:"}", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"\\rangle",tag:"mo",output:"\u232A", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"\\rfloor",tag:"mo",output:"\u230B", rtag:"mi",atval:"1",ttype:STRETCHY}, -{input:"\\rceil", tag:"mo",output:"\u2309", rtag:"mi",atval:"1",ttype:STRETCHY}, - -// "|", "\\|", "\\vert" and "\\Vert" modified later: lspace = rspace = 0em -{input:"|", tag:"mo", output:"\u2223", atval:"1", ttype:STRETCHY}, -{input:"\\|", tag:"mo", output:"\u2225", atval:"1", ttype:STRETCHY}, -{input:"\\vert", tag:"mo", output:"\u2223", atval:"1", ttype:STRETCHY}, -{input:"\\Vert", tag:"mo", output:"\u2225", atval:"1", ttype:STRETCHY}, -{input:"\\mid", tag:"mo", output:"\u2223", atval:"1", ttype:STRETCHY}, -{input:"\\parallel", tag:"mo", output:"\u2225", atval:"1", ttype:STRETCHY}, -{input:"/", tag:"mo", output:"/", atval:"1.01", ttype:STRETCHY}, -{input:"\\backslash", tag:"mo", output:"\u2216", atval:"1", ttype:STRETCHY}, -{input:"\\setminus", tag:"mo", output:"\\", ttype:CONST}, - -//miscellaneous symbols -{input:"\\!", tag:"mspace", atname:"width", atval:"-0.167em", ttype:SPACE}, -{input:"\\,", tag:"mspace", atname:"width", atval:"0.167em", ttype:SPACE}, -{input:"\\>", tag:"mspace", atname:"width", atval:"0.222em", ttype:SPACE}, -{input:"\\:", tag:"mspace", atname:"width", atval:"0.222em", ttype:SPACE}, -{input:"\\;", tag:"mspace", atname:"width", atval:"0.278em", ttype:SPACE}, -{input:"~", tag:"mspace", atname:"width", atval:"0.333em", ttype:SPACE}, -{input:"\\quad", tag:"mspace", atname:"width", atval:"1em", ttype:SPACE}, -{input:"\\qquad", tag:"mspace", atname:"width", atval:"2em", ttype:SPACE}, -//{input:"{}", tag:"mo", output:"\u200B", ttype:CONST}, // zero-width -{input:"\\prime", tag:"mo", output:"\u2032", ttype:CONST}, -{input:"'", tag:"mo", output:"\u02B9", ttype:CONST}, -{input:"''", tag:"mo", output:"\u02BA", ttype:CONST}, -{input:"'''", tag:"mo", output:"\u2034", ttype:CONST}, -{input:"''''", tag:"mo", output:"\u2057", ttype:CONST}, -{input:"\\ldots", tag:"mo", output:"\u2026", ttype:CONST}, -{input:"\\cdots", tag:"mo", output:"\u22EF", ttype:CONST}, -{input:"\\vdots", tag:"mo", output:"\u22EE", ttype:CONST}, -{input:"\\ddots", tag:"mo", output:"\u22F1", ttype:CONST}, -{input:"\\forall", tag:"mo", output:"\u2200", ttype:CONST}, -{input:"\\exists", tag:"mo", output:"\u2203", ttype:CONST}, -{input:"\\Re", tag:"mo", output:"\u211C", ttype:CONST}, -{input:"\\Im", tag:"mo", output:"\u2111", ttype:CONST}, -{input:"\\aleph", tag:"mo", output:"\u2135", ttype:CONST}, -{input:"\\hbar", tag:"mo", output:"\u210F", ttype:CONST}, -{input:"\\ell", tag:"mo", output:"\u2113", ttype:CONST}, -{input:"\\wp", tag:"mo", output:"\u2118", ttype:CONST}, -{input:"\\emptyset", tag:"mo", output:"\u2205", ttype:CONST}, -{input:"\\infty", tag:"mo", output:"\u221E", ttype:CONST}, -{input:"\\surd", tag:"mo", output:"\\sqrt{}", ttype:DEFINITION}, -{input:"\\partial", tag:"mo", output:"\u2202", ttype:CONST}, -{input:"\\nabla", tag:"mo", output:"\u2207", ttype:CONST}, -{input:"\\triangle", tag:"mo", output:"\u25B3", ttype:CONST}, -{input:"\\therefore", tag:"mo", output:"\u2234", ttype:CONST}, -{input:"\\angle", tag:"mo", output:"\u2220", ttype:CONST}, -//{input:"\\\\ ", tag:"mo", output:"\u00A0", ttype:CONST}, -{input:"\\diamond", tag:"mo", output:"\u22C4", ttype:CONST}, -//{input:"\\Diamond", tag:"mo", output:"\u25CA", ttype:CONST}, -{input:"\\Diamond", tag:"mo", output:"\u25C7", ttype:CONST}, -{input:"\\neg", tag:"mo", output:"\u00AC", ttype:CONST}, -{input:"\\lnot", tag:"mo", output:"\u00AC", ttype:CONST}, -{input:"\\bot", tag:"mo", output:"\u22A5", ttype:CONST}, -{input:"\\top", tag:"mo", output:"\u22A4", ttype:CONST}, -{input:"\\square", tag:"mo", output:"\u25AB", ttype:CONST}, -{input:"\\Box", tag:"mo", output:"\u25A1", ttype:CONST}, -{input:"\\wr", tag:"mo", output:"\u2240", ttype:CONST}, - -//standard functions -//Note UNDEROVER *must* have tag:"mo" to work properly -{input:"\\arccos", tag:"mi", output:"arccos", ttype:UNARY, func:true}, -{input:"\\arcsin", tag:"mi", output:"arcsin", ttype:UNARY, func:true}, -{input:"\\arctan", tag:"mi", output:"arctan", ttype:UNARY, func:true}, -{input:"\\arg", tag:"mi", output:"arg", ttype:UNARY, func:true}, -{input:"\\cos", tag:"mi", output:"cos", ttype:UNARY, func:true}, -{input:"\\cosh", tag:"mi", output:"cosh", ttype:UNARY, func:true}, -{input:"\\cot", tag:"mi", output:"cot", ttype:UNARY, func:true}, -{input:"\\coth", tag:"mi", output:"coth", ttype:UNARY, func:true}, -{input:"\\csc", tag:"mi", output:"csc", ttype:UNARY, func:true}, -{input:"\\deg", tag:"mi", output:"deg", ttype:UNARY, func:true}, -{input:"\\det", tag:"mi", output:"det", ttype:UNARY, func:true}, -{input:"\\dim", tag:"mi", output:"dim", ttype:UNARY, func:true}, //CONST? -{input:"\\exp", tag:"mi", output:"exp", ttype:UNARY, func:true}, -{input:"\\gcd", tag:"mi", output:"gcd", ttype:UNARY, func:true}, //CONST? -{input:"\\hom", tag:"mi", output:"hom", ttype:UNARY, func:true}, -{input:"\\inf", tag:"mo", output:"inf", ttype:UNDEROVER}, -{input:"\\ker", tag:"mi", output:"ker", ttype:UNARY, func:true}, -{input:"\\lg", tag:"mi", output:"lg", ttype:UNARY, func:true}, -{input:"\\lim", tag:"mo", output:"lim", ttype:UNDEROVER}, -{input:"\\liminf", tag:"mo", output:"liminf", ttype:UNDEROVER}, -{input:"\\limsup", tag:"mo", output:"limsup", ttype:UNDEROVER}, -{input:"\\ln", tag:"mi", output:"ln", ttype:UNARY, func:true}, -{input:"\\log", tag:"mi", output:"log", ttype:UNARY, func:true}, -{input:"\\max", tag:"mo", output:"max", ttype:UNDEROVER}, -{input:"\\min", tag:"mo", output:"min", ttype:UNDEROVER}, -{input:"\\Pr", tag:"mi", output:"Pr", ttype:UNARY, func:true}, -{input:"\\sec", tag:"mi", output:"sec", ttype:UNARY, func:true}, -{input:"\\sin", tag:"mi", output:"sin", ttype:UNARY, func:true}, -{input:"\\sinh", tag:"mi", output:"sinh", ttype:UNARY, func:true}, -{input:"\\sup", tag:"mo", output:"sup", ttype:UNDEROVER}, -{input:"\\tan", tag:"mi", output:"tan", ttype:UNARY, func:true}, -{input:"\\tanh", tag:"mi", output:"tanh", ttype:UNARY, func:true}, - -//arrows -{input:"\\gets", tag:"mo", output:"\u2190", ttype:CONST}, -{input:"\\leftarrow", tag:"mo", output:"\u2190", ttype:CONST}, -{input:"\\to", tag:"mo", output:"\u2192", ttype:CONST}, -{input:"\\rightarrow", tag:"mo", output:"\u2192", ttype:CONST}, -{input:"\\leftrightarrow", tag:"mo", output:"\u2194", ttype:CONST}, -{input:"\\uparrow", tag:"mo", output:"\u2191", ttype:CONST}, -{input:"\\downarrow", tag:"mo", output:"\u2193", ttype:CONST}, -{input:"\\updownarrow", tag:"mo", output:"\u2195", ttype:CONST}, -{input:"\\Leftarrow", tag:"mo", output:"\u21D0", ttype:CONST}, -{input:"\\Rightarrow", tag:"mo", output:"\u21D2", ttype:CONST}, -{input:"\\Leftrightarrow", tag:"mo", output:"\u21D4", ttype:CONST}, -{input:"\\iff", tag:"mo", output:"~\\Longleftrightarrow~", ttype:DEFINITION}, -{input:"\\Uparrow", tag:"mo", output:"\u21D1", ttype:CONST}, -{input:"\\Downarrow", tag:"mo", output:"\u21D3", ttype:CONST}, -{input:"\\Updownarrow", tag:"mo", output:"\u21D5", ttype:CONST}, -{input:"\\mapsto", tag:"mo", output:"\u21A6", ttype:CONST}, -{input:"\\longleftarrow", tag:"mo", output:"\u2190", ttype:LONG}, -{input:"\\longrightarrow", tag:"mo", output:"\u2192", ttype:LONG}, -{input:"\\longleftrightarrow", tag:"mo", output:"\u2194", ttype:LONG}, -{input:"\\Longleftarrow", tag:"mo", output:"\u21D0", ttype:LONG}, -{input:"\\Longrightarrow", tag:"mo", output:"\u21D2", ttype:LONG}, -{input:"\\Longleftrightarrow", tag:"mo", output:"\u21D4", ttype:LONG}, -{input:"\\longmapsto", tag:"mo", output:"\u21A6", ttype:CONST}, - // disaster if LONG - -//commands with argument -AMsqrt, AMroot, AMfrac, AMover, AMsub, AMsup, AMtext, AMmbox, AMatop, AMchoose, -//AMdiv, AMquote, - -//diacritical marks -{input:"\\acute", tag:"mover", output:"\u00B4", ttype:UNARY, acc:true}, -//{input:"\\acute", tag:"mover", output:"\u0317", ttype:UNARY, acc:true}, -//{input:"\\acute", tag:"mover", output:"\u0301", ttype:UNARY, acc:true}, -//{input:"\\grave", tag:"mover", output:"\u0300", ttype:UNARY, acc:true}, -//{input:"\\grave", tag:"mover", output:"\u0316", ttype:UNARY, acc:true}, -{input:"\\grave", tag:"mover", output:"\u0060", ttype:UNARY, acc:true}, -{input:"\\breve", tag:"mover", output:"\u02D8", ttype:UNARY, acc:true}, -{input:"\\check", tag:"mover", output:"\u02C7", ttype:UNARY, acc:true}, -{input:"\\dot", tag:"mover", output:".", ttype:UNARY, acc:true}, -{input:"\\ddot", tag:"mover", output:"..", ttype:UNARY, acc:true}, -//{input:"\\ddot", tag:"mover", output:"\u00A8", ttype:UNARY, acc:true}, -{input:"\\mathring", tag:"mover", output:"\u00B0", ttype:UNARY, acc:true}, -{input:"\\vec", tag:"mover", output:"\u20D7", ttype:UNARY, acc:true}, -{input:"\\overrightarrow",tag:"mover",output:"\u20D7", ttype:UNARY, acc:true}, -{input:"\\overleftarrow",tag:"mover", output:"\u20D6", ttype:UNARY, acc:true}, -{input:"\\hat", tag:"mover", output:"\u005E", ttype:UNARY, acc:true}, -{input:"\\widehat", tag:"mover", output:"\u0302", ttype:UNARY, acc:true}, -{input:"\\tilde", tag:"mover", output:"~", ttype:UNARY, acc:true}, -//{input:"\\tilde", tag:"mover", output:"\u0303", ttype:UNARY, acc:true}, -{input:"\\widetilde", tag:"mover", output:"\u02DC", ttype:UNARY, acc:true}, -{input:"\\bar", tag:"mover", output:"\u203E", ttype:UNARY, acc:true}, -{input:"\\overbrace", tag:"mover", output:"\u23B4", ttype:UNARY, acc:true}, -{input:"\\overline", tag:"mover", output:"\u00AF", ttype:UNARY, acc:true}, -{input:"\\underbrace", tag:"munder", output:"\u23B5", ttype:UNARY, acc:true}, -{input:"\\underline", tag:"munder", output:"\u00AF", ttype:UNARY, acc:true}, -//{input:"underline", tag:"munder", output:"\u0332", ttype:UNARY, acc:true}, - -//typestyles and fonts -{input:"\\displaystyle",tag:"mstyle",atname:"displaystyle",atval:"true", ttype:UNARY}, -{input:"\\textstyle",tag:"mstyle",atname:"displaystyle",atval:"false", ttype:UNARY}, -{input:"\\scriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"1", ttype:UNARY}, -{input:"\\scriptscriptstyle",tag:"mstyle",atname:"scriptlevel",atval:"2", ttype:UNARY}, -{input:"\\textrm", tag:"mstyle", output:"\\mathrm", ttype: DEFINITION}, -{input:"\\mathbf", tag:"mstyle", atname:"mathvariant", atval:"bold", ttype:UNARY}, -{input:"\\textbf", tag:"mstyle", atname:"mathvariant", atval:"bold", ttype:UNARY}, -{input:"\\mathit", tag:"mstyle", atname:"mathvariant", atval:"italic", ttype:UNARY}, -{input:"\\textit", tag:"mstyle", atname:"mathvariant", atval:"italic", ttype:UNARY}, -{input:"\\mathtt", tag:"mstyle", atname:"mathvariant", atval:"monospace", ttype:UNARY}, -{input:"\\texttt", tag:"mstyle", atname:"mathvariant", atval:"monospace", ttype:UNARY}, -{input:"\\mathsf", tag:"mstyle", atname:"mathvariant", atval:"sans-serif", ttype:UNARY}, -{input:"\\mathbb", tag:"mstyle", atname:"mathvariant", atval:"double-struck", ttype:UNARY, codes:AMbbb}, -{input:"\\mathcal",tag:"mstyle", atname:"mathvariant", atval:"script", ttype:UNARY, codes:AMcal}, -{input:"\\mathfrak",tag:"mstyle",atname:"mathvariant", atval:"fraktur",ttype:UNARY, codes:AMfrk} -]; - -function compareNames(s1,s2) { - if (s1.input > s2.input) return 1 - else return -1; -} - -var AMnames = []; //list of input symbols - -function AMinitSymbols() { - AMsymbols.sort(compareNames); - for (i=0; i=n where str appears or would be inserted -// assumes arr is sorted - if (n==0) { - var h,m; - n = -1; - h = arr.length; - while (n+1> 1; - if (arr[m]=str -} - -function AMgetSymbol(str) { -//return maximal initial substring of str that appears in names -//return null if there is none - var k = 0; //new pos - var j = 0; //old pos - var mk; //match pos - var st; - var tagst; - var match = ""; - var more = true; - for (var i=1; i<=str.length && more; i++) { - st = str.slice(0,i); //initial substring of length i - j = k; - k = AMposition(AMnames, st, j); - if (k=AMnames[k]; - } - AMpreviousSymbol=AMcurrentSymbol; - if (match!=""){ - AMcurrentSymbol=AMsymbols[mk].ttype; - return AMsymbols[mk]; - } - AMcurrentSymbol=CONST; - k = 1; - st = str.slice(0,1); //take 1 character - if ("0"<=st && st<="9") tagst = "mn"; - else tagst = (("A">st || st>"Z") && ("a">st || st>"z")?"mo":"mi"); -/* -// Commented out by DRW (not fully understood, but probably to do with -// use of "/" as an INFIX version of "\\frac", which we don't want): -//} -//if (st=="-" && AMpreviousSymbol==INFIX) { -// AMcurrentSymbol = INFIX; //trick "/" into recognizing "-" on second parse -// return {input:st, tag:tagst, output:st, ttype:UNARY, func:true}; -//} -*/ - return {input:st, tag:tagst, output:st, ttype:CONST}; -} - - -/*Parsing ASCII math expressions with the following grammar -v ::= [A-Za-z] | greek letters | numbers | other constant symbols -u ::= sqrt | text | bb | other unary symbols for font commands -b ::= frac | root | stackrel binary symbols -l ::= { | \left left brackets -r ::= } | \right right brackets -S ::= v | lEr | uS | bSS Simple expression -I ::= S_S | S^S | S_S^S | S Intermediate expression -E ::= IE | I/I Expression -Each terminal symbol is translated into a corresponding mathml node.*/ - -var AMpreviousSymbol,AMcurrentSymbol; - -function AMparseSexpr(str) { //parses str and returns [node,tailstr,(node)tag] - var symbol, node, result, result2, i, st,// rightvert = false, - newFrag = document.createDocumentFragment(); - str = AMremoveCharsAndBlanks(str,0); - symbol = AMgetSymbol(str); //either a token or a bracket or empty - if (symbol == null || symbol.ttype == RIGHTBRACKET) - return [null,str,null]; - if (symbol.ttype == DEFINITION) { - str = symbol.output+AMremoveCharsAndBlanks(str,symbol.input.length); - symbol = AMgetSymbol(str); - if (symbol == null || symbol.ttype == RIGHTBRACKET) - return [null,str,null]; - } - str = AMremoveCharsAndBlanks(str,symbol.input.length); - switch (symbol.ttype) { - case SPACE: - node = AMcreateElementMathML(symbol.tag); - node.setAttribute(symbol.atname,symbol.atval); - return [node,str,symbol.tag]; - case UNDEROVER: - if (isIE) { - if (symbol.input.substr(0,4) == "\\big") { // botch for missing symbols - str = "\\"+symbol.input.substr(4)+str; // make \bigcup = \cup etc. - symbol = AMgetSymbol(str); - symbol.ttype = UNDEROVER; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - } - } - return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str,symbol.tag]; - case CONST: - var output = symbol.output; - if (isIE) { - if (symbol.input == "'") - output = "\u2032"; - else if (symbol.input == "''") - output = "\u2033"; - else if (symbol.input == "'''") - output = "\u2033\u2032"; - else if (symbol.input == "''''") - output = "\u2033\u2033"; - else if (symbol.input == "\\square") - output = "\u25A1"; // same as \Box - else if (symbol.input.substr(0,5) == "\\frac") { - // botch for missing fractions - var denom = symbol.input.substr(6,1); - if (denom == "5" || denom == "6") { - str = symbol.input.replace(/\\frac/,"\\frac ")+str; - return [node,str,symbol.tag]; - } - } - } - node = AMcreateMmlNode(symbol.tag,document.createTextNode(output)); - return [node,str,symbol.tag]; - case LONG: // added by DRW - node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)); - node.setAttribute("minsize","1.5"); - node.setAttribute("maxsize","1.5"); - node = AMcreateMmlNode("mover",node); - node.appendChild(AMcreateElementMathML("mspace")); - return [node,str,symbol.tag]; - case STRETCHY: // added by DRW - if (isIE && symbol.input == "\\backslash") - symbol.output = "\\"; // doesn't expand, but then nor does "\u2216" - node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)); - if (symbol.input == "|" || symbol.input == "\\vert" || - symbol.input == "\\|" || symbol.input == "\\Vert") { - node.setAttribute("lspace","0em"); - node.setAttribute("rspace","0em"); - } - node.setAttribute("maxsize",symbol.atval); // don't allow to stretch here - if (symbol.rtag != null) - return [node,str,symbol.rtag]; - else - return [node,str,symbol.tag]; - case BIG: // added by DRW - var atval = symbol.atval; - if (isIE) - atval = symbol.ieval; - symbol = AMgetSymbol(str); - if (symbol == null) - return [null,str,null]; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - node = AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output)); - if (isIE) { // to get brackets to expand - var space = AMcreateElementMathML("mspace"); - space.setAttribute("height",atval+"ex"); - node = AMcreateMmlNode("mrow",node); - node.appendChild(space); - } else { // ignored in IE - node.setAttribute("minsize",atval); - node.setAttribute("maxsize",atval); - } - return [node,str,symbol.tag]; - case LEFTBRACKET: //read (expr+) - if (symbol.input == "\\left") { // left what? - symbol = AMgetSymbol(str); - if (symbol != null) { - if (symbol.input == ".") - symbol.invisible = true; - str = AMremoveCharsAndBlanks(str,symbol.input.length); - } - } - result = AMparseExpr(str,true,false); - if (symbol==null || - (typeof symbol.invisible == "boolean" && symbol.invisible)) - node = AMcreateMmlNode("mrow",result[0]); - else { - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - node = AMcreateMmlNode("mrow",node); - node.appendChild(result[0]); - } - return [node,result[1],result[2]]; - case MATRIX: //read (expr+) - if (symbol.input == "\\begin{array}") { - var mask = ""; - symbol = AMgetSymbol(str); - str = AMremoveCharsAndBlanks(str,0); - if (symbol == null) - mask = "l"; - else { - str = AMremoveCharsAndBlanks(str,symbol.input.length); - if (symbol.input != "{") - mask = "l"; - else do { - symbol = AMgetSymbol(str); - if (symbol != null) { - str = AMremoveCharsAndBlanks(str,symbol.input.length); - if (symbol.input != "}") - mask = mask+symbol.input; - } - } while (symbol != null && symbol.input != "" && symbol.input != "}"); - } - result = AMparseExpr("{"+str,true,true); -// if (result[0]==null) return [AMcreateMmlNode("mo", -// document.createTextNode(symbol.input)),str]; - node = AMcreateMmlNode("mtable",result[0]); - mask = mask.replace(/l/g,"left "); - mask = mask.replace(/r/g,"right "); - mask = mask.replace(/c/g,"center "); - node.setAttribute("columnalign",mask); - node.setAttribute("displaystyle","false"); - if (isIE) - return [node,result[1],null]; -// trying to get a *little* bit of space around the array -// (IE already includes it) - var lspace = AMcreateElementMathML("mspace"); - lspace.setAttribute("width","0.167em"); - var rspace = AMcreateElementMathML("mspace"); - rspace.setAttribute("width","0.167em"); - var node1 = AMcreateMmlNode("mrow",lspace); - node1.appendChild(node); - node1.appendChild(rspace); - return [node1,result[1],null]; - } else { // eqnarray - result = AMparseExpr("{"+str,true,true); - node = AMcreateMmlNode("mtable",result[0]); - if (isIE) - node.setAttribute("columnspacing","0.25em"); // best in practice? - else - node.setAttribute("columnspacing","0.167em"); // correct (but ignored?) - node.setAttribute("columnalign","right center left"); - node.setAttribute("displaystyle","true"); - node = AMcreateMmlNode("mrow",node); - return [node,result[1],null]; - } - case TEXT: - if (str.charAt(0)=="{") i=str.indexOf("}"); - else i = 0; - if (i==-1) - i = str.length; - st = str.slice(1,i); - if (st.charAt(0) == " ") { - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","0.33em"); // was 1ex - newFrag.appendChild(node); - } - newFrag.appendChild( - AMcreateMmlNode(symbol.tag,document.createTextNode(st))); - if (st.charAt(st.length-1) == " ") { - node = AMcreateElementMathML("mspace"); - node.setAttribute("width","0.33em"); // was 1ex - newFrag.appendChild(node); - } - str = AMremoveCharsAndBlanks(str,i+1); - return [AMcreateMmlNode("mrow",newFrag),str,null]; - case UNARY: - result = AMparseSexpr(str); - if (result[0]==null) return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str]; - if (typeof symbol.func == "boolean" && symbol.func) { // functions hack - st = str.charAt(0); -// if (st=="^" || st=="_" || st=="/" || st=="|" || st==",") { - if (st=="^" || st=="_" || st==",") { - return [AMcreateMmlNode(symbol.tag, - document.createTextNode(symbol.output)),str,symbol.tag]; - } else { - node = AMcreateMmlNode("mrow", - AMcreateMmlNode(symbol.tag,document.createTextNode(symbol.output))); - if (isIE) { - var space = AMcreateElementMathML("mspace"); - space.setAttribute("width","0.167em"); - node.appendChild(space); - } - node.appendChild(result[0]); - return [node,result[1],symbol.tag]; - } - } - if (symbol.input == "\\sqrt") { // sqrt - if (isIE) { // set minsize, for \surd - var space = AMcreateElementMathML("mspace"); - space.setAttribute("height","1.2ex"); - space.setAttribute("width","0em"); // probably no effect - node = AMcreateMmlNode(symbol.tag,result[0]) -// node.setAttribute("minsize","1"); // ignored -// node = AMcreateMmlNode("mrow",node); // hopefully unnecessary - node.appendChild(space); - return [node,result[1],symbol.tag]; - } else - return [AMcreateMmlNode(symbol.tag,result[0]),result[1],symbol.tag]; - } else if (typeof symbol.acc == "boolean" && symbol.acc) { // accent - node = AMcreateMmlNode(symbol.tag,result[0]); - var output = symbol.output; - if (isIE) { - if (symbol.input == "\\hat") - output = "\u0302"; - else if (symbol.input == "\\widehat") - output = "\u005E"; - else if (symbol.input == "\\bar") - output = "\u00AF"; - else if (symbol.input == "\\grave") - output = "\u0300"; - else if (symbol.input == "\\tilde") - output = "\u0303"; - } - var node1 = AMcreateMmlNode("mo",document.createTextNode(output)); - if (symbol.input == "\\vec" || symbol.input == "\\check") - // don't allow to stretch - node1.setAttribute("maxsize","1.2"); - // why doesn't "1" work? \vec nearly disappears in firefox - if (isIE && symbol.input == "\\bar") - node1.setAttribute("maxsize","0.5"); - if (symbol.input == "\\underbrace" || symbol.input == "\\underline") - node1.setAttribute("accentunder","true"); - else - node1.setAttribute("accent","true"); - node.appendChild(node1); - if (symbol.input == "\\overbrace" || symbol.input == "\\underbrace") - node.ttype = UNDEROVER; - return [node,result[1],symbol.tag]; - } else { // font change or displaystyle command - if (!isIE && typeof symbol.codes != "undefined") { - for (i=0; i64 && st.charCodeAt(j)<91) newst = newst + - String.fromCharCode(symbol.codes[st.charCodeAt(j)-65]); - else newst = newst + st.charAt(j); - if (result[0].nodeName=="mi") - result[0]=AMcreateElementMathML("mo"). - appendChild(document.createTextNode(newst)); - else result[0].replaceChild(AMcreateElementMathML("mo"). - appendChild(document.createTextNode(newst)),result[0].childNodes[i]); - } - } - node = AMcreateMmlNode(symbol.tag,result[0]); - node.setAttribute(symbol.atname,symbol.atval); - if (symbol.input == "\\scriptstyle" || - symbol.input == "\\scriptscriptstyle") - node.setAttribute("displaystyle","false"); - return [node,result[1],symbol.tag]; - } - case BINARY: - result = AMparseSexpr(str); - if (result[0]==null) return [AMcreateMmlNode("mo", - document.createTextNode(symbol.input)),str,null]; - result2 = AMparseSexpr(result[1]); - if (result2[0]==null) return [AMcreateMmlNode("mo", - document.createTextNode(symbol.input)),str,null]; - if (symbol.input=="\\root" || symbol.input=="\\stackrel") - newFrag.appendChild(result2[0]); - newFrag.appendChild(result[0]); - if (symbol.input=="\\frac") newFrag.appendChild(result2[0]); - return [AMcreateMmlNode(symbol.tag,newFrag),result2[1],symbol.tag]; - case INFIX: - str = AMremoveCharsAndBlanks(str,symbol.input.length); - return [AMcreateMmlNode("mo",document.createTextNode(symbol.output)), - str,symbol.tag]; - default: - return [AMcreateMmlNode(symbol.tag, //its a constant - document.createTextNode(symbol.output)),str,symbol.tag]; - } -} - -function AMparseIexpr(str) { - var symbol, sym1, sym2, node, result, tag, underover; - str = AMremoveCharsAndBlanks(str,0); - sym1 = AMgetSymbol(str); - result = AMparseSexpr(str); - node = result[0]; - str = result[1]; - tag = result[2]; - symbol = AMgetSymbol(str); - if (symbol.ttype == INFIX) { - str = AMremoveCharsAndBlanks(str,symbol.input.length); - result = AMparseSexpr(str); - if (result[0] == null) // show box in place of missing argument - result[0] = AMcreateMmlNode("mo",document.createTextNode("\u25A1")); - str = result[1]; - tag = result[2]; - if (symbol.input == "_" || symbol.input == "^") { - sym2 = AMgetSymbol(str); - tag = null; // no space between x^2 and a following sin, cos, etc. -// This is for \underbrace and \overbrace - underover = ((sym1.ttype == UNDEROVER) || (node.ttype == UNDEROVER)); -// underover = (sym1.ttype == UNDEROVER); - if (symbol.input == "_" && sym2.input == "^") { - str = AMremoveCharsAndBlanks(str,sym2.input.length); - var res2 = AMparseSexpr(str); - str = res2[1]; - tag = res2[2]; // leave space between x_1^2 and a following sin etc. - node = AMcreateMmlNode((underover?"munderover":"msubsup"),node); - node.appendChild(result[0]); - node.appendChild(res2[0]); - } else if (symbol.input == "_") { - node = AMcreateMmlNode((underover?"munder":"msub"),node); - node.appendChild(result[0]); - } else { - node = AMcreateMmlNode((underover?"mover":"msup"),node); - node.appendChild(result[0]); - } - node = AMcreateMmlNode("mrow",node); // so sum does not stretch - } else { - node = AMcreateMmlNode(symbol.tag,node); - if (symbol.input == "\\atop" || symbol.input == "\\choose") - node.setAttribute("linethickness","0ex"); - node.appendChild(result[0]); - if (symbol.input == "\\choose") - node = AMcreateMmlNode("mfenced",node); - } - } - return [node,str,tag]; -} - -function AMparseExpr(str,rightbracket,matrix) { - var symbol, node, result, i, tag, - newFrag = document.createDocumentFragment(); - do { - str = AMremoveCharsAndBlanks(str,0); - result = AMparseIexpr(str); - node = result[0]; - str = result[1]; - tag = result[2]; - symbol = AMgetSymbol(str); - if (node!=undefined) { - if ((tag == "mn" || tag == "mi") && symbol!=null && - typeof symbol.func == "boolean" && symbol.func) { - // Add space before \sin in 2\sin x or x\sin x - var space = AMcreateElementMathML("mspace"); - space.setAttribute("width","0.167em"); - node = AMcreateMmlNode("mrow",node); - node.appendChild(space); - } - newFrag.appendChild(node); - } - } while ((symbol.ttype != RIGHTBRACKET) - && symbol!=null && symbol.output!=""); - tag = null; - if (symbol.ttype == RIGHTBRACKET) { - if (symbol.input == "\\right") { // right what? - str = AMremoveCharsAndBlanks(str,symbol.input.length); - symbol = AMgetSymbol(str); - if (symbol != null && symbol.input == ".") - symbol.invisible = true; - if (symbol != null) - tag = symbol.rtag; - } - if (symbol!=null) - str = AMremoveCharsAndBlanks(str,symbol.input.length); // ready to return - var len = newFrag.childNodes.length; - if (matrix && - len>0 && newFrag.childNodes[len-1].nodeName == "mrow" && len>1 && - newFrag.childNodes[len-2].nodeName == "mo" && - newFrag.childNodes[len-2].firstChild.nodeValue == "&") { //matrix - var pos = []; // positions of ampersands - var m = newFrag.childNodes.length; - for (i=0; matrix && i -&-&...&-&- - n = node.childNodes.length; - k = 0; - for (j=0; j2) { - newFrag.removeChild(newFrag.firstChild); //remove - newFrag.removeChild(newFrag.firstChild); //remove & - } - table.appendChild(AMcreateMmlNode("mtr",row)); - } - return [table,str]; - } - if (typeof symbol.invisible != "boolean" || !symbol.invisible) { - node = AMcreateMmlNode("mo",document.createTextNode(symbol.output)); - newFrag.appendChild(node); - } - } - return [newFrag,str,tag]; -} - -function AMparseMath(str) { - var result, node = AMcreateElementMathML("mstyle"); - if (mathcolor != "") node.setAttribute("mathcolor",mathcolor); - if (mathfontfamily != "") node.setAttribute("fontfamily",mathfontfamily); - node.appendChild(AMparseExpr(str.replace(/^\s+/g,""),false,false)[0]); - node = AMcreateMmlNode("math",node); - if (showasciiformulaonhover) //fixed by djhsu so newline - node.setAttribute("title",str.replace(/\s+/g," "));//does not show in Gecko - if (mathfontfamily != "" && (isIE || mathfontfamily != "serif")) { - var fnode = AMcreateElementXHTML("font"); - fnode.setAttribute("face",mathfontfamily); - fnode.appendChild(node); - return fnode; - } - return node; -} - -function AMstrarr2docFrag(arr, linebreaks) { - var newFrag=document.createDocumentFragment(); - var expr = false; - for (var i=0; i1 || mtch) { - if (checkForMathML) { - checkForMathML = false; - var nd = AMisMathMLavailable(); - AMnoMathML = nd != null; - if (AMnoMathML && notifyIfNoMathML) - if (alertIfNoMathML) - alert("To view the ASCIIMathML notation use Internet Explorer 6 +\nMathPlayer (free from www.dessci.com)\n\ - or Firefox/Mozilla/Netscape"); - else AMbody.insertBefore(nd,AMbody.childNodes[0]); - } - if (!AMnoMathML) { - frg = AMstrarr2docFrag(arr,n.nodeType==8); - var len = frg.childNodes.length; - n.parentNode.replaceChild(frg,n); - return len-1; - } else return 0; - } - } - } else return 0; - } else if (n.nodeName!="math") { - for (i=0; i"); - document.write(""); -} - -// GO1.1 Generic onload by Brothercake -// http://www.brothercake.com/ -//onload function (replaces the onload="translate()" in the tag) -function generic() -{ - translate(); -}; -//setup onload function -if(typeof window.addEventListener != 'undefined') -{ - //.. gecko, safari, konqueror and standard - window.addEventListener('load', generic, false); -} -else if(typeof document.addEventListener != 'undefined') -{ - //.. opera 7 - document.addEventListener('load', generic, false); -} -else if(typeof window.attachEvent != 'undefined') -{ - //.. win/ie - window.attachEvent('onload', generic); -} -//** remove this condition to degrade older browsers -else -{ - //.. mac/ie5 and anything else that gets this far - //if there's an existing onload function - if(typeof window.onload == 'function') - { - //store it - var existing = onload; - //add new onload handler - window.onload = function() - { - //call existing onload function - existing(); - //call generic onload function - generic(); - }; - } - else - { - //setup onload function - window.onload = generic; - } -} diff -Nru asciidoc-8.6.10/javascripts/slidy.js asciidoc-10.1.2/javascripts/slidy.js --- asciidoc-8.6.10/javascripts/slidy.js 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/javascripts/slidy.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,2845 +0,0 @@ -/* slidy.js - - Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved. - W3C liability, trademark, document use and software licensing - rules apply, see: - - http://www.w3.org/Consortium/Legal/copyright-documents - http://www.w3.org/Consortium/Legal/copyright-software -*/ - -// the slidy object implementation -var w3c_slidy = { - // classify which kind of browser we're running under - ns_pos: (typeof window.pageYOffset!='undefined'), - khtml: ((navigator.userAgent).indexOf("KHTML") >= 0 ? true : false), - opera: ((navigator.userAgent).indexOf("Opera") >= 0 ? true : false), - ipad: ((navigator.userAgent).indexOf("iPad") >= 0 ? true : false), - iphone: ((navigator.userAgent).indexOf("iPhone") >= 0 ? true : false), - ie: (typeof document.all != "undefined" && !this.opera), - ie6: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 6") != -1), - ie7: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 7") != -1), - ie8: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 8") != -1), - ie9: (!this.ns_pos && navigator.userAgent.indexOf("MSIE 9") != -1), - keyboardless: (this.ipad || this.iphone), - - // are we running as XHTML? (doesn't work on Opera) - is_xhtml: /xml/.test(document.contentType), - - slide_number: 0, // integer slide count: 0, 1, 2, ... - slide_number_element: null, // element containing slide number - slides: [], // set to array of slide div's - notes: [], // set to array of handout div's - backgrounds: [], // set to array of background div's - toolbar: null, // element containing toolbar - title: null, // document title - last_shown: null, // last incrementally shown item - eos: null, // span element for end of slide indicator - toc: null, // table of contents - outline: null, // outline element with the focus - selected_text_len: 0, // length of drag selection on document - view_all: 0, // 1 to view all slides + handouts - want_toolbar: true, // user preference to show/hide toolbar - mouse_click_enabled: true, // enables left click for next slide - scroll_hack: 0, // IE work around for position: fixed - disable_slide_click: false, // used by clicked anchors - - lang: "en", // updated to language specified by html file - - help_anchor: null, // used for keyboard focus hack in showToolbar() - help_page: "http://www.w3.org/Talks/Tools/Slidy2/help/help.html", - help_text: "Navigate with mouse click, space bar, Cursor Left/Right, " + - "or Pg Up and Pg Dn. Use S and B to change font size.", - - size_index: 0, - size_adjustment: 0, - sizes: new Array("10pt", "12pt", "14pt", "16pt", "18pt", "20pt", - "22pt", "24pt", "26pt", "28pt", "30pt", "32pt"), - - // needed for efficient resizing - last_width: 0, - last_height: 0, - - - // Needed for cross browser support for relative width/height on - // object elements. The work around is to save width/height attributes - // and then to recompute absolute width/height dimensions on resizing - objects: [], - - // attach initialiation event handlers - set_up: function () { - var init = function() { w3c_slidy.init(); }; - if (typeof window.addEventListener != "undefined") - window.addEventListener("load", init, false); - else - window.attachEvent("onload", init); - }, - - hide_slides: function () { - if (document.body && !w3c_slidy.initialized) - document.body.style.visibility = "hidden"; - else - setTimeout(w3c_slidy.hide_slides, 50); - }, - - // hack to persuade IE to compute correct document height - // as needed for simulating fixed positioning of toolbar - ie_hack: function () { - window.resizeBy(0,-1); - window.resizeBy(0, 1); - }, - - init: function () { - //alert("slidy starting test 10"); - document.body.style.visibility = "visible"; - w3c_slidy_i18n.init(); - this.add_toolbar(); - this.wrap_implicit_slides(); - this.collect_slides(); - this.collect_notes(); - this.collect_backgrounds(); - this.objects = document.body.getElementsByTagName("object"); - this.patch_anchors(); - this.slide_number = this.find_slide_number(location.href); - window.offscreenbuffering = true; - this.size_adjustment = this.find_size_adjust(); - this.time_left = this.find_duration(); - this.hide_image_toolbar(); // suppress IE image toolbar popup - this.init_outliner(); // activate fold/unfold support - this.title = document.title; - - // work around for opera bug - this.is_xhtml = (document.body.tagName == "BODY" ? false : true); - - if (this.slides.length > 0) - { - var slide = this.slides[this.slide_number]; - - if (this.slide_number > 0) - { - this.set_visibility_all_incremental("visible"); - this.last_shown = this.previous_incremental_item(null); - this.set_eos_status(true); - } - else - { - this.last_shown = null; - this.set_visibility_all_incremental("hidden"); - this.set_eos_status(!this.next_incremental_item(this.last_shown)); - } - - this.set_location(); - this.add_class(this.slides[0], "first-slide"); - w3c_slidy.show_slide(slide); - } - - this.toc = this.table_of_contents(); - - this.add_initial_prompt(); - - // bind event handlers without interfering with custom page scripts - // Tap events behave too weirdly to support clicks reliably on - // iPhone and iPad, so exclude these from click handler - - if (!this.keyboardless) - this.add_listener(document.body, "click", this.mouse_button_click); - - this.add_listener(document, "keydown", this.key_down); - this.add_listener(document, "keypress", this.key_press); - this.add_listener(window, "resize", this.resized); - this.add_listener(window, "scroll", this.scrolled); - this.add_listener(window, "unload", this.unloaded); - - if (!document.body.onclick) - document.body.onclick = function () { }; - - this.single_slide_view(); - - //this.set_location(); - - this.resized(); - - if (this.ie7) - setTimeout(w3c_slidy.ie_hack, 100); - - this.show_toolbar(); - - // for back button detection - setInterval(function () { w3c_slidy.check_location(); }, 200); - w3c_slidy.initialized = true; - }, - - // create div element with links to each slide - table_of_contents: function () { - var toc = this.create_element("div"); - this.add_class(toc, "slidy_toc hidden"); - //toc.setAttribute("tabindex", "0"); - - var heading = this.create_element("div"); - this.add_class(heading, "toc-heading"); - heading.innerHTML = "Table of Contents".localize(); - - toc.appendChild(heading); - var previous = null; - - for (var i = 0; i < this.slides.length; ++i) - { - var title = this.has_class(this.slides[i], "title"); - var num = document.createTextNode((i + 1) + ". "); - - toc.appendChild(num); - - var a = this.create_element("a"); - a.setAttribute("href", "#(" + (i+1) + ")"); - - if (title) - this.add_class(a, "titleslide"); - - var name = document.createTextNode(this.slide_name(i)); - a.appendChild(name); - a.onclick = w3c_slidy.toc_click; - a.onkeydown = w3c_slidy.toc_keydown; - a.previous = previous; - - if (previous) - previous.next = a; - - toc.appendChild(a); - - if (i == 0) - toc.first = a; - - if (i < this.slides.length - 1) - { - var br = this.create_element("br"); - toc.appendChild(br); - } - - previous = a; - } - - toc.focus = function () { - if (this.first) - this.first.focus(); - } - - toc.onmouseup = w3c_slidy.mouse_button_up; - - toc.onclick = function (e) { - e||(e=window.event); - - if (w3c_slidy.selected_text_len <= 0) - w3c_slidy.hide_table_of_contents(); - - w3c_slidy.stop_propagation(e); - - if (e.cancel != undefined) - e.cancel = true; - - if (e.returnValue != undefined) - e.returnValue = false; - - return false; - }; - - document.body.insertBefore(toc, document.body.firstChild); - return toc; - }, - - is_shown_toc: function () { - return !w3c_slidy.has_class(w3c_slidy.toc, "hidden"); - }, - - show_table_of_contents: function () { - w3c_slidy.remove_class(w3c_slidy.toc, "hidden"); - var toc = w3c_slidy.toc; - toc.focus(); - - if (w3c_slidy.ie7 && w3c_slidy.slide_number == 0) - setTimeout(w3c_slidy.ie_hack, 100); - }, - - hide_table_of_contents: function () { - w3c_slidy.add_class(w3c_slidy.toc, "hidden"); - - if (!w3c_slidy.opera) - w3c_slidy.help_anchor.focus(); - }, - - toggle_table_of_contents: function () { - if (w3c_slidy.is_shown_toc()) - w3c_slidy.hide_table_of_contents(); - else - w3c_slidy.show_table_of_contents(); - }, - - // called on clicking toc entry - toc_click: function (e) { - if (!e) - e = window.event; - - var target = w3c_slidy.get_target(e); - - if (target && target.nodeType == 1) - { - var uri = target.getAttribute("href"); - - if (uri) - { - //alert("going to " + uri); - var slide = w3c_slidy.slides[w3c_slidy.slide_number]; - w3c_slidy.hide_slide(slide); - w3c_slidy.slide_number = w3c_slidy.find_slide_number(uri); - slide = w3c_slidy.slides[w3c_slidy.slide_number]; - w3c_slidy.last_shown = null; - w3c_slidy.set_location(); - w3c_slidy.set_visibility_all_incremental("hidden"); - w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown)); - w3c_slidy.show_slide(slide); - //target.focus(); - - try - { - if (!w3c_slidy.opera) - w3c_slidy.help_anchor.focus(); - } - catch (e) - { - } - } - } - - w3c_slidy.hide_table_of_contents(e); - if (w3c_slidy.ie7) w3c_slidy.ie_hack(); - w3c_slidy.stop_propagation(e); - return w3c_slidy.cancel(e); - }, - - // called onkeydown for toc entry - toc_keydown: function (event) { - var key; - - if (!event) - var event = window.event; - - // kludge around NS/IE differences - if (window.event) - key = window.event.keyCode; - else if (event.which) - key = event.which; - else - return true; // Yikes! unknown browser - - // ignore event if key value is zero - // as for alt on Opera and Konqueror - if (!key) - return true; - - // check for concurrent control/command/alt key - // but are these only present on mouse events? - - if (event.ctrlKey || event.altKey) - return true; - - if (key == 13) - { - var uri = this.getAttribute("href"); - - if (uri) - { - //alert("going to " + uri); - var slide = w3c_slidy.slides[w3c_slidy.slide_number]; - w3c_slidy.hide_slide(slide); - w3c_slidy.slide_number = w3c_slidy.find_slide_number(uri); - slide = w3c_slidy.slides[w3c_slidy.slide_number]; - w3c_slidy.last_shown = null; - w3c_slidy.set_location(); - w3c_slidy.set_visibility_all_incremental("hidden"); - w3c_slidy.set_eos_status(!w3c_slidy.next_incremental_item(w3c_slidy.last_shown)); - w3c_slidy.show_slide(slide); - //target.focus(); - - try - { - if (!w3c_slidy.opera) - w3c_slidy.help_anchor.focus(); - } - catch (e) - { - } - } - - w3c_slidy.hide_table_of_contents(); - - if (self.ie7) - w3c_slidy.ie_hack(); - - return w3c_slidy.cancel(event); - } - - if (key == 40 && this.next) - { - this.next.focus(); - return w3c_slidy.cancel(event); - } - - if (key == 38 && this.previous) - { - this.previous.focus(); - return w3c_slidy.cancel(event); - } - - return true; - }, - - - // ### OBSOLETE ### - before_print: function () { - this.show_all_slides(); - this.hide_toolbar(); - alert("before print"); - }, - - // ### OBSOLETE ### - after_print: function () { - if (!this.view_all) - { - this.single_slide_view(); - this.show_toolbar(); - } - alert("after print"); - }, - - // ### OBSOLETE ### - print_slides: function () { - this.before_print(); - window.print(); - this.after_print(); - }, - - // ### OBSOLETE ?? ### - toggle_view: function () { - if (this.view_all) - { - this.single_slide_view(); - this.show_toolbar(); - this.view_all = 0; - } - else - { - this.show_all_slides(); - this.hide_toolbar(); - this.view_all = 1; - } - }, - - // prepare for printing ### OBSOLETE ### - show_all_slides: function () { - this.remove_class(document.body, "single_slide"); - this.set_visibility_all_incremental("visible"); - }, - - // restore after printing ### OBSOLETE ### - single_slide_view: function () { - this.add_class(document.body, "single_slide"); - this.set_visibility_all_incremental("visible"); - this.last_shown = this.previous_incremental_item(null); - }, - - // suppress IE's image toolbar pop up - hide_image_toolbar: function () { - if (!this.ns_pos) - { - var images = document.getElementsByTagName("IMG"); - - for (var i = 0; i < images.length; ++i) - images[i].setAttribute("galleryimg", "no"); - } - }, - - unloaded: function (e) { - //alert("unloaded"); - }, - - // Safari and Konqueror don't yet support getComputedStyle() - // and they always reload page when location.href is updated - is_KHTML: function () { - var agent = navigator.userAgent; - return (agent.indexOf("KHTML") >= 0 ? true : false); - }, - - // find slide name from first h1 element - // default to document title + slide number - slide_name: function (index) { - var name = null; - var slide = this.slides[index]; - - var heading = this.find_heading(slide); - - if (heading) - name = this.extract_text(heading); - - if (!name) - name = this.title + "(" + (index + 1) + ")"; - - name.replace(/\&/g, "&"); - name.replace(/\/g, ">"); - - return name; - }, - - // find first h1 element in DOM tree - find_heading: function (node) { - if (!node || node.nodeType != 1) - return null; - - if (node.nodeName == "H1" || node.nodeName == "h1") - return node; - - var child = node.firstChild; - - while (child) - { - node = this.find_heading(child); - - if (node) - return node; - - child = child.nextSibling; - } - - return null; - }, - - // recursively extract text from DOM tree - extract_text: function (node) { - if (!node) - return ""; - - // text nodes - if (node.nodeType == 3) - return node.nodeValue; - - // elements - if (node.nodeType == 1) - { - node = node.firstChild; - var text = ""; - - while (node) - { - text = text + this.extract_text(node); - node = node.nextSibling; - } - - return text; - } - - return ""; - }, - - // find copyright text from meta element - find_copyright: function () { - var name, content; - var meta = document.getElementsByTagName("meta"); - - for (var i = 0; i < meta.length; ++i) - { - name = meta[i].getAttribute("name"); - content = meta[i].getAttribute("content"); - - if (name == "copyright") - return content; - } - - return null; - }, - - find_size_adjust: function () { - var name, content, offset; - var meta = document.getElementsByTagName("meta"); - - for (var i = 0; i < meta.length; ++i) - { - name = meta[i].getAttribute("name"); - content = meta[i].getAttribute("content"); - - if (name == "font-size-adjustment") - return 1 * content; - } - - return 1; - }, - - // for 20 minutes - find_duration: function () { - var name, content, offset; - var meta = document.getElementsByTagName("meta"); - - for (var i = 0; i < meta.length; ++i) - { - name = meta[i].getAttribute("name"); - content = meta[i].getAttribute("content"); - - if (name == "duration") - return 60000 * content; - } - - return null; - }, - - replace_by_non_breaking_space: function (str) { - for (var i = 0; i < str.length; ++i) - str[i] = 160; - }, - - // ### CHECK ME ### is use of "li" okay for text/html? - // for XHTML do we also need to specify namespace? - init_outliner: function () { - var items = document.getElementsByTagName("li"); - - for (var i = 0; i < items.length; ++i) - { - var target = items[i]; - - if (!this.has_class(target.parentNode, "outline")) - continue; - - target.onclick = this.outline_click; -/* ### more work needed for IE6 - if (!this.ns_pos) - { - target.onmouseover = this.hover_outline; - target.onmouseout = this.unhover_outline; - } -*/ - if (this.foldable(target)) - { - target.foldable = true; - target.onfocus = function () {w3c_slidy.outline = this;}; - target.onblur = function () {w3c_slidy.outline = null;}; - - if (!target.getAttribute("tabindex")) - target.setAttribute("tabindex", "0"); - - if (this.has_class(target, "expand")) - this.unfold(target); - else - this.fold(target); - } - else - { - this.add_class(target, "nofold"); - target.visible = true; - target.foldable = false; - } - } - }, - - foldable: function (item) { - if (!item || item.nodeType != 1) - return false; - - var node = item.firstChild; - - while (node) - { - if (node.nodeType == 1 && this.is_block(node)) - return true; - - node = node.nextSibling; - } - - return false; - }, - - // ### CHECK ME ### switch to add/remove "hidden" class - fold: function (item) { - if (item) - { - this.remove_class(item, "unfolded"); - this.add_class(item, "folded"); - } - - var node = item ? item.firstChild : null; - - while (node) - { - if (node.nodeType == 1 && this.is_block(node)) // element - { - w3c_slidy.add_class(node, "hidden"); - } - - node = node.nextSibling; - } - - item.visible = false; - }, - - // ### CHECK ME ### switch to add/remove "hidden" class - unfold: function (item) { - if (item) - { - this.add_class(item, "unfolded"); - this.remove_class(item, "folded"); - } - - var node = item ? item.firstChild : null; - - while (node) - { - if (node.nodeType == 1 && this.is_block(node)) // element - { - w3c_slidy.remove_class(node, "hidden"); - } - - node = node.nextSibling; - } - - item.visible = true; - }, - - outline_click: function (e) { - if (!e) - e = window.event; - - var rightclick = false; - var target = w3c_slidy.get_target(e); - - while (target && target.visible == undefined) - target = target.parentNode; - - if (!target) - return true; - - if (e.which) - rightclick = (e.which == 3); - else if (e.button) - rightclick = (e.button == 2); - - if (!rightclick && target.visible != undefined) - { - if (target.foldable) - { - if (target.visible) - w3c_slidy.fold(target); - else - w3c_slidy.unfold(target); - } - - w3c_slidy.stop_propagation(e); - e.cancel = true; - e.returnValue = false; - } - - return false; - }, - - add_initial_prompt: function () { - var prompt = this.create_element("div"); - prompt.setAttribute("class", "initial_prompt"); - - var p1 = this.create_element("p"); - prompt.appendChild(p1); - p1.setAttribute("class", "help"); - - if (this.keyboardless) - p1.innerHTML = "Tap footer to move to next slide"; - else - p1.innerHTML = "Space or Right Arrow to move to next " + - "slide, click help below for more details"; - - this.add_listener(prompt, "click", function (e) { - document.body.removeChild(prompt); - w3c_slidy.stop_propagation(e); - - if (e.cancel != undefined) - e.cancel = true; - - if (e.returnValue != undefined) - e.returnValue = false; - - return false; - }); - - document.body.appendChild(prompt); - this.initial_prompt = prompt; - setTimeout(function() {document.body.removeChild(prompt);}, 5000); - }, - - add_toolbar: function () { - var counter, page; - - this.toolbar = this.create_element("div"); - this.toolbar.setAttribute("class", "toolbar"); - - // a reasonably behaved browser - if (this.ns_pos || !this.ie6) - { - var right = this.create_element("div"); - right.setAttribute("style", "float: right; text-align: right"); - - counter = this.create_element("span") - counter.innerHTML = "slide".localize() + " n/m"; - right.appendChild(counter); - this.toolbar.appendChild(right); - - var left = this.create_element("div"); - left.setAttribute("style", "text-align: left"); - - // global end of slide indicator - this.eos = this.create_element("span"); - this.eos.innerHTML = "* "; - left.appendChild(this.eos); - - var help = this.create_element("a"); - help.setAttribute("href", this.help_page); - help.setAttribute("title", this.help_text.localize()); - help.innerHTML = "help?".localize(); - left.appendChild(help); - this.help_anchor = help; // save for focus hack - - var gap1 = document.createTextNode(" "); - left.appendChild(gap1); - - var contents = this.create_element("a"); - contents.setAttribute("href", "javascript:w3c_slidy.toggle_table_of_contents()"); - contents.setAttribute("title", "table of contents".localize()); - contents.innerHTML = "contents?".localize(); - left.appendChild(contents); - - var gap2 = document.createTextNode(" "); - left.appendChild(gap2); - - var copyright = this.find_copyright(); - - if (copyright) - { - var span = this.create_element("span"); - span.className = "copyright"; - span.innerHTML = copyright; - left.appendChild(span); - } - - this.toolbar.setAttribute("tabindex", "0"); - this.toolbar.appendChild(left); - } - else // IE6 so need to work around its poor CSS support - { - this.toolbar.style.position = (this.ie7 ? "fixed" : "absolute"); - this.toolbar.style.zIndex = "200"; - this.toolbar.style.width = "99.9%"; - this.toolbar.style.height = "1.2em"; - this.toolbar.style.top = "auto"; - this.toolbar.style.bottom = "0"; - this.toolbar.style.left = "0"; - this.toolbar.style.right = "0"; - this.toolbar.style.textAlign = "left"; - this.toolbar.style.fontSize = "60%"; - this.toolbar.style.color = "red"; - this.toolbar.borderWidth = 0; - this.toolbar.className = "toolbar"; - this.toolbar.style.background = "rgb(240,240,240)"; - - // would like to have help text left aligned - // and page counter right aligned, floating - // div's don't work, so instead use nested - // absolutely positioned div's. - - var sp = this.create_element("span"); - sp.innerHTML = "  * "; - this.toolbar.appendChild(sp); - this.eos = sp; // end of slide indicator - - var help = this.create_element("a"); - help.setAttribute("href", this.help_page); - help.setAttribute("title", this.help_text.localize()); - help.innerHTML = "help?".localize(); - this.toolbar.appendChild(help); - this.help_anchor = help; // save for focus hack - - var gap1 = document.createTextNode(" "); - this.toolbar.appendChild(gap1); - - var contents = this.create_element("a"); - contents.setAttribute("href", "javascript:toggleTableOfContents()"); - contents.setAttribute("title", "table of contents".localize()); - contents.innerHTML = "contents?".localize(); - this.toolbar.appendChild(contents); - - var gap2 = document.createTextNode(" "); - this.toolbar.appendChild(gap2); - - var copyright = this.find_copyright(); - - if (copyright) - { - var span = this.create_element("span"); - span.innerHTML = copyright; - span.style.color = "black"; - span.style.marginLeft = "0.5em"; - this.toolbar.appendChild(span); - } - - counter = this.create_element("div") - counter.style.position = "absolute"; - counter.style.width = "auto"; //"20%"; - counter.style.height = "1.2em"; - counter.style.top = "auto"; - counter.style.bottom = 0; - counter.style.right = "0"; - counter.style.textAlign = "right"; - counter.style.color = "red"; - counter.style.background = "rgb(240,240,240)"; - - counter.innerHTML = "slide".localize() + " n/m"; - this.toolbar.appendChild(counter); - } - - // ensure that click isn't passed through to the page - this.toolbar.onclick = - function (e) { - if (!e) - e = window.event; - - var target = e.target; - - if (!target && e.srcElement) - target = e.srcElement; - - // work around Safari bug - if (target && target.nodeType == 3) - target = target.parentNode; - - w3c_slidy.stop_propagation(e); - - if (target && target.nodeName.toLowerCase() != "a") - w3c_slidy.mouse_button_click(e); - }; - - this.slide_number_element = counter; - this.set_eos_status(false); - document.body.appendChild(this.toolbar); - }, - - // wysiwyg editors make it hard to use div elements - // e.g. amaya loses the div when you copy and paste - // this function wraps div elements around implicit - // slides which start with an h1 element and continue - // up to the next heading or div element - wrap_implicit_slides: function () { - var i, heading, node, next, div; - var headings = document.getElementsByTagName("h1"); - - if (!headings) - return; - - for (i = 0; i < headings.length; ++i) - { - heading = headings[i]; - - if (heading.parentNode != document.body) - continue; - - node = heading.nextSibling; - - div = document.createElement("div"); - this.add_class(div, "slide"); - document.body.replaceChild(div, heading); - div.appendChild(heading); - - while (node) - { - if (node.nodeType == 1 && // an element - (node.nodeName == "H1" || - node.nodeName == "h1" || - node.nodeName == "DIV" || - node.nodeName == "div")) - break; - - next = node.nextSibling; - node = document.body.removeChild(node); - div.appendChild(node); - node = next; - } - } - }, - -// return new array of all slides - collect_slides: function () { - var slides = new Array(); - var divs = document.body.getElementsByTagName("div"); - - for (var i = 0; i < divs.length; ++i) - { - div = divs.item(i); - - if (this.has_class(div, "slide")) - { - // add slide to collection - slides[slides.length] = div; - - // hide each slide as it is found - this.add_class(div, "hidden"); - - // add dummy
    at end for scrolling hack - var node1 = document.createElement("br"); - div.appendChild(node1); - var node2 = document.createElement("br"); - div.appendChild(node2); - } - else if (this.has_class(div, "background")) - { // work around for Firefox SVG reload bug - // which otherwise replaces 1st SVG graphic with 2nd - div.style.display = "block"; - } - } - - this.slides = slides; - }, - - // return new array of all
    - collect_notes: function () { - var notes = new Array(); - var divs = document.body.getElementsByTagName("div"); - - for (var i = 0; i < divs.length; ++i) - { - div = divs.item(i); - - if (this.has_class(div, "handout")) - { - // add note to collection - notes[notes.length] = div; - - // and hide it - this.add_class(div, "hidden"); - } - } - - this.notes = notes; - }, - - // return new array of all
    - // including named backgrounds e.g. class="background titlepage" - collect_backgrounds: function () { - var backgrounds = new Array(); - var divs = document.body.getElementsByTagName("div"); - - for (var i = 0; i < divs.length; ++i) - { - div = divs.item(i); - - if (this.has_class(div, "background")) - { - // add background to collection - backgrounds[backgrounds.length] = div; - - // and hide it - this.add_class(div, "hidden"); - } - } - - this.backgrounds = backgrounds; - }, - - // set click handlers on all anchors - patch_anchors: function () { - var self = w3c_slidy; - var handler = function (event) { - // compare this.href with location.href - // for link to another slide in this doc - - if (self.page_address(this.href) == self.page_address(location.href)) - { - // yes, so find new slide number - var newslidenum = self.find_slide_number(this.href); - - if (newslidenum != self.slide_number) - { - var slide = self.slides[self.slide_number]; - self.hide_slide(slide); - self.slide_number = newslidenum; - slide = self.slides[self.slide_number]; - self.show_slide(slide); - self.set_location(); - } - } - else if (this.target == null) - location.href = this.href; - - this.blur(); - self.disable_slide_click = true; - }; - - var anchors = document.body.getElementsByTagName("a"); - - for (var i = 0; i < anchors.length; ++i) - { - if (window.addEventListener) - anchors[i].addEventListener("click", handler, false); - else - anchors[i].attachEvent("onclick", handler); - } - }, - - // ### CHECK ME ### see which functions are invoked via setTimeout - // either directly or indirectly for use of w3c_slidy vs this - show_slide_number: function () { - var timer = w3c_slidy.get_timer(); - w3c_slidy.slide_number_element.innerHTML = timer + "slide".localize() + " " + - (w3c_slidy.slide_number + 1) + "/" + w3c_slidy.slides.length; - }, - - // every 200mS check if the location has been changed as a - // result of the user activating the Back button/menu item - // doesn't work for Opera < 9.5 - check_location: function () { - var hash = location.hash; - - if (w3c_slidy.slide_number > 0 && (hash == "" || hash == "#")) - w3c_slidy.goto_slide(0); - else if (hash.length > 2 && hash != "#("+(w3c_slidy.slide_number+1)+")") - { - var num = parseInt(location.hash.substr(2)); - - if (!isNaN(num)) - w3c_slidy.goto_slide(num-1); - } - - if (w3c_slidy.time_left && w3c_slidy.slide_number > 0) - { - w3c_slidy.show_slide_number(); - - if (w3c_slidy.time_left > 0) - w3c_slidy.time_left -= 200; - } - }, - - get_timer: function () { - var timer = ""; - if (w3c_slidy.time_left) - { - var mins, secs; - secs = Math.floor(w3c_slidy.time_left/1000); - mins = Math.floor(secs / 60); - secs = secs % 60; - timer = (mins ? mins+"m" : "") + secs + "s "; - } - - return timer; - }, - - // this doesn't push location onto history stack for IE - // for which a hidden iframe hack is needed: load page into - // the iframe with script that set's parent's location.hash - // but that won't work for standalone use unless we can - // create the page dynamically via a javascript: URL - set_location: function () { - var uri = w3c_slidy.page_address(location.href); - var hash = "#(" + (w3c_slidy.slide_number+1) + ")"; - - if (w3c_slidy.slide_number >= 0) - uri = uri + hash; - - if (w3c_slidy.ie && !w3c_slidy.ie8) - w3c_slidy.push_hash(hash); - - if (uri != location.href) // && !khtml - location.href = uri; - - if (this.khtml) - hash = "(" + (w3c_slidy.slide_number+1) + ")"; - - if (!this.ie && location.hash != hash && location.hash != "") - location.hash = hash; - - document.title = w3c_slidy.title + " (" + (w3c_slidy.slide_number+1) + ")"; - w3c_slidy.show_slide_number(); - }, - - page_address: function (uri) { - var i = uri.indexOf("#"); - - if (i < 0) - i = uri.indexOf("%23"); - - // check if anchor is entire page - - if (i < 0) - return uri; // yes - - return uri.substr(0, i); - }, - - // only used for IE6 and IE7 - on_frame_loaded: function (hash) { - location.hash = hash; - var uri = w3c_slidy.page_address(location.href); - location.href = uri + hash; - }, - - // history hack with thanks to Bertrand Le Roy - push_hash: function (hash) { - if (hash == "") hash = "#(1)"; - window.location.hash = hash; - - var doc = document.getElementById("historyFrame").contentWindow.document; - doc.open("javascript:''"); - // PWL modified this string literal to break the close script tag - // which otherwise gets parsed when incorporated - doc.write(" -endif::linkcss[] -ifndef::linkcss[] - - -endif::linkcss[] -ifdef::asciimath[] -ifdef::linkcss[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::asciimath[] -ifdef::latexmath[] -ifdef::linkcss[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::latexmath[] - - - - -[footer] - - diff -Nru asciidoc-8.6.10/stylesheets/asciidoc.css asciidoc-10.1.2/stylesheets/asciidoc.css --- asciidoc-8.6.10/stylesheets/asciidoc.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/stylesheets/asciidoc.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,527 +0,0 @@ -/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ - -/* Default font. */ -body { - font-family: Georgia,serif; -} - -/* Title font. */ -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Arial,Helvetica,sans-serif; -} - -body { - margin: 1em 5% 1em 5%; -} - -a { - color: blue; - text-decoration: underline; -} -a:visited { - color: fuchsia; -} - -em { - font-style: italic; - color: navy; -} - -strong { - font-weight: bold; - color: #083194; -} - -h1, h2, h3, h4, h5, h6 { - color: #527bbd; - margin-top: 1.2em; - margin-bottom: 0.5em; - line-height: 1.3; -} - -h1, h2, h3 { - border-bottom: 2px solid silver; -} -h2 { - padding-top: 0.5em; -} -h3 { - float: left; -} -h3 + * { - clear: left; -} -h5 { - font-size: 1.0em; -} - -div.sectionbody { - margin-left: 0; -} - -hr { - border: 1px solid silver; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -ul, ol, li > p { - margin-top: 0; -} -ul > li { color: #aaa; } -ul > li > * { color: black; } - -.monospaced, code, pre { - font-family: "Courier New", Courier, monospace; - font-size: inherit; - color: navy; - padding: 0; - margin: 0; -} -pre { - white-space: pre-wrap; -} - -#author { - color: #527bbd; - font-weight: bold; - font-size: 1.1em; -} -#email { -} -#revnumber, #revdate, #revremark { -} - -#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} -#footer-text { - float: left; - padding-bottom: 0.5em; -} -#footer-badges { - float: right; - padding-bottom: 0.5em; -} - -#preamble { - margin-top: 1.5em; - margin-bottom: 1.5em; -} -div.imageblock, div.exampleblock, div.verseblock, -div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, -div.admonitionblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.admonitionblock { - margin-top: 2.0em; - margin-bottom: 2.0em; - margin-right: 10%; - color: #606060; -} - -div.content { /* Block element content. */ - padding: 0; -} - -/* Block element titles. */ -div.title, caption.title { - color: #527bbd; - font-weight: bold; - text-align: left; - margin-top: 1.0em; - margin-bottom: 0.5em; -} -div.title + * { - margin-top: 0; -} - -td div.title:first-child { - margin-top: 0.0em; -} -div.content div.title:first-child { - margin-top: 0.0em; -} -div.content + div.title { - margin-top: 0.0em; -} - -div.sidebarblock > div.content { - background: #ffffee; - border: 1px solid #dddddd; - border-left: 4px solid #f0f0f0; - padding: 0.5em; -} - -div.listingblock > div.content { - border: 1px solid #dddddd; - border-left: 5px solid #f0f0f0; - background: #f8f8f8; - padding: 0.5em; -} - -div.quoteblock, div.verseblock { - padding-left: 1.0em; - margin-left: 1.0em; - margin-right: 10%; - border-left: 5px solid #f0f0f0; - color: #888; -} - -div.quoteblock > div.attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock > pre.content { - font-family: inherit; - font-size: inherit; -} -div.verseblock > div.attribution { - padding-top: 0.75em; - text-align: left; -} -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -} - -div.admonitionblock .icon { - vertical-align: top; - font-size: 1.1em; - font-weight: bold; - text-decoration: underline; - color: #527bbd; - padding-right: 0.5em; -} -div.admonitionblock td.content { - padding-left: 0.5em; - border-left: 3px solid #dddddd; -} - -div.exampleblock > div.content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -div.imageblock div.content { padding-left: 0; } -span.image img { border-style: none; vertical-align: text-bottom; } -a.image:visited { color: white; } - -dl { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -dt { - margin-top: 0.5em; - margin-bottom: 0; - font-style: normal; - color: navy; -} -dd > *:first-child { - margin-top: 0.1em; -} - -ul, ol { - list-style-position: outside; -} -ol.arabic { - list-style-type: decimal; -} -ol.loweralpha { - list-style-type: lower-alpha; -} -ol.upperalpha { - list-style-type: upper-alpha; -} -ol.lowerroman { - list-style-type: lower-roman; -} -ol.upperroman { - list-style-type: upper-roman; -} - -div.compact ul, div.compact ol, -div.compact p, div.compact p, -div.compact div, div.compact div { - margin-top: 0.1em; - margin-bottom: 0.1em; -} - -tfoot { - font-weight: bold; -} -td > div.verse { - white-space: pre; -} - -div.hdlist { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -div.hdlist tr { - padding-bottom: 15px; -} -dt.hdlist1.strong, td.hdlist1.strong { - font-weight: bold; -} -td.hdlist1 { - vertical-align: top; - font-style: normal; - padding-right: 0.8em; - color: navy; -} -td.hdlist2 { - vertical-align: top; -} -div.hdlist.compact tr { - margin: 0; - padding-bottom: 0; -} - -.comment { - background: yellow; -} - -.footnote, .footnoteref { - font-size: 0.8em; -} - -span.footnote, span.footnoteref { - vertical-align: super; -} - -#footnotes { - margin: 20px 0 20px 0; - padding: 7px 0 0 0; -} - -#footnotes div.footnote { - margin: 0 0 5px 0; -} - -#footnotes hr { - border: none; - border-top: 1px solid silver; - height: 1px; - text-align: left; - margin-left: 0; - width: 20%; - min-width: 100px; -} - -div.colist td { - padding-right: 0.5em; - padding-bottom: 0.3em; - vertical-align: top; -} -div.colist td img { - margin-top: 0.3em; -} - -@media print { - #footer-badges { display: none; } -} - -#toc { - margin-bottom: 2.5em; -} - -#toctitle { - color: #527bbd; - font-size: 1.1em; - font-weight: bold; - margin-top: 1.0em; - margin-bottom: 0.1em; -} - -div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { - margin-top: 0; - margin-bottom: 0; -} -div.toclevel2 { - margin-left: 2em; - font-size: 0.9em; -} -div.toclevel3 { - margin-left: 4em; - font-size: 0.9em; -} -div.toclevel4 { - margin-left: 6em; - font-size: 0.9em; -} - -span.aqua { color: aqua; } -span.black { color: black; } -span.blue { color: blue; } -span.fuchsia { color: fuchsia; } -span.gray { color: gray; } -span.green { color: green; } -span.lime { color: lime; } -span.maroon { color: maroon; } -span.navy { color: navy; } -span.olive { color: olive; } -span.purple { color: purple; } -span.red { color: red; } -span.silver { color: silver; } -span.teal { color: teal; } -span.white { color: white; } -span.yellow { color: yellow; } - -span.aqua-background { background: aqua; } -span.black-background { background: black; } -span.blue-background { background: blue; } -span.fuchsia-background { background: fuchsia; } -span.gray-background { background: gray; } -span.green-background { background: green; } -span.lime-background { background: lime; } -span.maroon-background { background: maroon; } -span.navy-background { background: navy; } -span.olive-background { background: olive; } -span.purple-background { background: purple; } -span.red-background { background: red; } -span.silver-background { background: silver; } -span.teal-background { background: teal; } -span.white-background { background: white; } -span.yellow-background { background: yellow; } - -span.big { font-size: 2em; } -span.small { font-size: 0.6em; } - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } - -div.unbreakable { page-break-inside: avoid; } - - -/* - * xhtml11 specific - * - * */ - -div.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.tableblock > table { - border: 3px solid #527bbd; -} -thead, p.table.header { - font-weight: bold; - color: #527bbd; -} -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - - -/* - * html5 specific - * - * */ - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #527bbd; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #527bbd; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #527bbd; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} - - -/* - * manpage specific - * - * */ - -body.manpage h1 { - padding-top: 0.5em; - padding-bottom: 0.5em; - border-top: 2px solid silver; - border-bottom: 2px solid silver; -} -body.manpage h2 { - border-style: none; -} -body.manpage div.sectionbody { - margin-left: 3em; -} - -@media print { - body.manpage div#toc { display: none; } -} diff -Nru asciidoc-8.6.10/stylesheets/docbook-xsl.css asciidoc-10.1.2/stylesheets/docbook-xsl.css --- asciidoc-8.6.10/stylesheets/docbook-xsl.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/stylesheets/docbook-xsl.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,329 +0,0 @@ -/* - CSS stylesheet for XHTML produced by DocBook XSL stylesheets. -*/ - -body { - font-family: Georgia,serif; -} - -code, pre { - font-family: "Courier New", Courier, monospace; -} - -span.strong { - font-weight: bold; -} - -body blockquote { - margin-top: .75em; - line-height: 1.5; - margin-bottom: .75em; -} - -html body { - margin: 1em 5% 1em 5%; - line-height: 1.2; -} - -body div { - margin: 0; -} - -h1, h2, h3, h4, h5, h6 -{ - color: #527bbd; - font-family: Arial,Helvetica,sans-serif; -} - -div.toc p:first-child, -div.list-of-figures p:first-child, -div.list-of-tables p:first-child, -div.list-of-examples p:first-child, -div.example p.title, -div.sidebar p.title -{ - font-weight: bold; - color: #527bbd; - font-family: Arial,Helvetica,sans-serif; - margin-bottom: 0.2em; -} - -body h1 { - margin: .0em 0 0 -4%; - line-height: 1.3; - border-bottom: 2px solid silver; -} - -body h2 { - margin: 0.5em 0 0 -4%; - line-height: 1.3; - border-bottom: 2px solid silver; -} - -body h3 { - margin: .8em 0 0 -3%; - line-height: 1.3; -} - -body h4 { - margin: .8em 0 0 -3%; - line-height: 1.3; -} - -body h5 { - margin: .8em 0 0 -2%; - line-height: 1.3; -} - -body h6 { - margin: .8em 0 0 -1%; - line-height: 1.3; -} - -body hr { - border: none; /* Broken on IE6 */ -} -div.footnotes hr { - border: 1px solid silver; -} - -div.navheader th, div.navheader td, div.navfooter td { - font-family: Arial,Helvetica,sans-serif; - font-size: 0.9em; - font-weight: bold; - color: #527bbd; -} -div.navheader img, div.navfooter img { - border-style: none; -} -div.navheader a, div.navfooter a { - font-weight: normal; -} -div.navfooter hr { - border: 1px solid silver; -} - -body td { - line-height: 1.2 -} - -body th { - line-height: 1.2; -} - -ol { - line-height: 1.2; -} - -ul, body dir, body menu { - line-height: 1.2; -} - -html { - margin: 0; - padding: 0; -} - -body h1, body h2, body h3, body h4, body h5, body h6 { - margin-left: 0 -} - -body pre { - margin: 0.5em 10% 0.5em 1em; - line-height: 1.0; - color: navy; -} - -tt.literal, code.literal { - color: navy; -} - -.programlisting, .screen { - border: 1px solid silver; - background: #f4f4f4; - margin: 0.5em 10% 0.5em 0; - padding: 0.5em 1em; -} - -div.sidebar { - background: #ffffee; - margin: 1.0em 10% 0.5em 0; - padding: 0.5em 1em; - border: 1px solid silver; -} -div.sidebar * { padding: 0; } -div.sidebar div { margin: 0; } -div.sidebar p.title { - margin-top: 0.5em; - margin-bottom: 0.2em; -} - -div.bibliomixed { - margin: 0.5em 5% 0.5em 1em; -} - -div.glossary dt { - font-weight: bold; -} -div.glossary dd p { - margin-top: 0.2em; -} - -dl { - margin: .8em 0; - line-height: 1.2; -} - -dt { - margin-top: 0.5em; -} - -dt span.term { - font-style: normal; - color: navy; -} - -div.variablelist dd p { - margin-top: 0; -} - -div.itemizedlist li, div.orderedlist li { - margin-left: -0.8em; - margin-top: 0.5em; -} - -ul, ol { - list-style-position: outside; -} - -div.sidebar ul, div.sidebar ol { - margin-left: 2.8em; -} - -div.itemizedlist p.title, -div.orderedlist p.title, -div.variablelist p.title -{ - margin-bottom: -0.8em; -} - -div.revhistory table { - border-collapse: collapse; - border: none; -} -div.revhistory th { - border: none; - color: #527bbd; - font-family: Arial,Helvetica,sans-serif; -} -div.revhistory td { - border: 1px solid silver; -} - -/* Keep TOC and index lines close together. */ -div.toc dl, div.toc dt, -div.list-of-figures dl, div.list-of-figures dt, -div.list-of-tables dl, div.list-of-tables dt, -div.indexdiv dl, div.indexdiv dt -{ - line-height: normal; - margin-top: 0; - margin-bottom: 0; -} - -/* - Table styling does not work because of overriding attributes in - generated HTML. -*/ -div.table table, -div.informaltable table -{ - margin-left: 0; - margin-right: 5%; - margin-bottom: 0.8em; -} -div.informaltable table -{ - margin-top: 0.4em -} -div.table thead, -div.table tfoot, -div.table tbody, -div.informaltable thead, -div.informaltable tfoot, -div.informaltable tbody -{ - /* No effect in IE6. */ - border-top: 3px solid #527bbd; - border-bottom: 3px solid #527bbd; -} -div.table thead, div.table tfoot, -div.informaltable thead, div.informaltable tfoot -{ - font-weight: bold; -} - -div.mediaobject img { - margin-bottom: 0.8em; -} -div.figure p.title, -div.table p.title -{ - margin-top: 1em; - margin-bottom: 0.4em; -} - -div.calloutlist p -{ - margin-top: 0em; - margin-bottom: 0.4em; -} - -a img { - border-style: none; -} - -@media print { - div.navheader, div.navfooter { display: none; } -} - -span.aqua { color: aqua; } -span.black { color: black; } -span.blue { color: blue; } -span.fuchsia { color: fuchsia; } -span.gray { color: gray; } -span.green { color: green; } -span.lime { color: lime; } -span.maroon { color: maroon; } -span.navy { color: navy; } -span.olive { color: olive; } -span.purple { color: purple; } -span.red { color: red; } -span.silver { color: silver; } -span.teal { color: teal; } -span.white { color: white; } -span.yellow { color: yellow; } - -span.aqua-background { background: aqua; } -span.black-background { background: black; } -span.blue-background { background: blue; } -span.fuchsia-background { background: fuchsia; } -span.gray-background { background: gray; } -span.green-background { background: green; } -span.lime-background { background: lime; } -span.maroon-background { background: maroon; } -span.navy-background { background: navy; } -span.olive-background { background: olive; } -span.purple-background { background: purple; } -span.red-background { background: red; } -span.silver-background { background: silver; } -span.teal-background { background: teal; } -span.white-background { background: white; } -span.yellow-background { background: yellow; } - -span.big { font-size: 2em; } -span.small { font-size: 0.6em; } - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } diff -Nru asciidoc-8.6.10/stylesheets/pygments.css asciidoc-10.1.2/stylesheets/pygments.css --- asciidoc-8.6.10/stylesheets/pygments.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/stylesheets/pygments.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,62 +0,0 @@ -.highlight .hll { background-color: #ffffcc } -.highlight { background: #f8f8f8; } -.highlight .c { color: #408080; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ -.highlight .k { color: #008000; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ -.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #BC7A00 } /* Comment.Preproc */ -.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #A00000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ -.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #808080 } /* Generic.Output */ -.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0040D0 } /* Generic.Traceback */ -.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #008000 } /* Keyword.Pseudo */ -.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #B00040 } /* Keyword.Type */ -.highlight .m { color: #666666 } /* Literal.Number */ -.highlight .s { color: #BA2121 } /* Literal.String */ -.highlight .na { color: #7D9029 } /* Name.Attribute */ -.highlight .nb { color: #008000 } /* Name.Builtin */ -.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -.highlight .no { color: #880000 } /* Name.Constant */ -.highlight .nd { color: #AA22FF } /* Name.Decorator */ -.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #0000FF } /* Name.Function */ -.highlight .nl { color: #A0A000 } /* Name.Label */ -.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #19177C } /* Name.Variable */ -.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #666666 } /* Literal.Number.Float */ -.highlight .mh { color: #666666 } /* Literal.Number.Hex */ -.highlight .mi { color: #666666 } /* Literal.Number.Integer */ -.highlight .mo { color: #666666 } /* Literal.Number.Oct */ -.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */ -.highlight .sc { color: #BA2121 } /* Literal.String.Char */ -.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #BA2121 } /* Literal.String.Double */ -.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */ -.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ -.highlight .sx { color: #008000 } /* Literal.String.Other */ -.highlight .sr { color: #BB6688 } /* Literal.String.Regex */ -.highlight .s1 { color: #BA2121 } /* Literal.String.Single */ -.highlight .ss { color: #19177C } /* Literal.String.Symbol */ -.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #19177C } /* Name.Variable.Class */ -.highlight .vg { color: #19177C } /* Name.Variable.Global */ -.highlight .vi { color: #19177C } /* Name.Variable.Instance */ -.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */ diff -Nru asciidoc-8.6.10/stylesheets/slidy.css asciidoc-10.1.2/stylesheets/slidy.css --- asciidoc-8.6.10/stylesheets/slidy.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/stylesheets/slidy.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,445 +0,0 @@ -/* slidy.css - - Copyright (c) 2005-2010 W3C (MIT, ERCIM, Keio), All Rights Reserved. - W3C liability, trademark, document use and software licensing - rules apply, see: - - http://www.w3.org/Consortium/Legal/copyright-documents - http://www.w3.org/Consortium/Legal/copyright-software -*/ - -/* - SJR: 2010-09-29: Modified for AsciiDoc slidy backend. - Mostly just commented out stuff that is handled by AsciiDoc's CSS files. -*/ - -body -{ - margin: 0 0 0 0; - padding: 0 0 0 0; - width: 100%; - height: 100%; - color: black; - background-color: white; -/* - font-family: "Gill Sans MT", "Gill Sans", GillSans, sans-serif; -*/ - font-size: 14pt; -} - -div.toolbar { - position: fixed; z-index: 200; - top: auto; bottom: 0; left: 0; right: 0; - height: 1.2em; text-align: right; - padding-left: 1em; - padding-right: 1em; - font-size: 60%; - color: red; - background-color: rgb(240,240,240); - border-top: solid 1px rgb(180,180,180); -} - -div.toolbar span.copyright { - color: black; - margin-left: 0.5em; -} - -div.initial_prompt { - position: absolute; - z-index: 1000; - bottom: 1.2em; - width: 90%; - background-color: rgb(200,200,200); - opacity: 0.35; - background-color: rgb(200,200,200, 0.35); - cursor: pointer; -} - -div.initial_prompt p.help { - text-align: center; -} - -div.initial_prompt p.close { - text-align: right; - font-style: italic; -} - -div.slidy_toc { - position: absolute; - z-index: 300; - width: 60%; - max-width: 30em; - height: 30em; - overflow: auto; - top: auto; - right: auto; - left: 4em; - bottom: 4em; - padding: 1em; - background: rgb(240,240,240); - border-style: solid; - border-width: 2px; - font-size: 60%; -} - -div.slidy_toc .toc_heading { - text-align: center; - width: 100%; - margin: 0; - margin-bottom: 1em; - border-bottom-style: solid; - border-bottom-color: rgb(180,180,180); - border-bottom-width: 1px; -} - -div.slide { - z-index: 20; - margin: 0 0 0 0; - padding-top: 0; - padding-bottom: 0; - padding-left: 20px; - padding-right: 20px; - border-width: 0; - clear: both; - top: 0; - bottom: 0; - left: 0; - right: 0; - line-height: 120%; - background-color: transparent; -} - -div.background { - display: none; -} - -div.handout { - margin-left: 20px; - margin-right: 20px; -} - -div.slide.titlepage { - text-align: center; -} - -div.slide.titlepage.h1 { - padding-top: 10%; -} - -div.slide h1 { - padding-left: 0; - padding-right: 20pt; - padding-top: 4pt; - padding-bottom: 4pt; - margin-top: 0; - margin-left: 0; - margin-right: 60pt; - margin-bottom: 0.5em; - display: block; - font-size: 160%; - line-height: 1.2em; - background: transparent; -} - -div.toc { - position: absolute; - top: auto; - bottom: 4em; - left: 4em; - right: auto; - width: 60%; - max-width: 30em; - height: 30em; - border: solid thin black; - padding: 1em; - background: rgb(240,240,240); - color: black; - z-index: 300; - overflow: auto; - display: block; - visibility: visible; -} - -div.toc-heading { - width: 100%; - border-bottom: solid 1px rgb(180,180,180); - margin-bottom: 1em; - text-align: center; -} - -/* -pre { - font-size: 80%; - font-weight: bold; - line-height: 120%; - padding-top: 0.2em; - padding-bottom: 0.2em; - padding-left: 1em; - padding-right: 1em; - border-style: solid; - border-left-width: 1em; - border-top-width: thin; - border-right-width: thin; - border-bottom-width: thin; - border-color: #95ABD0; - color: #00428C; - background-color: #E4E5E7; -} -*/ - -/* -li pre { margin-left: 0; } - -blockquote { font-style: italic } - -img { background-color: transparent } - -p.copyright { font-size: smaller } -*/ - -.center { text-align: center } -.footnote { font-size: smaller; margin-left: 2em; } - -/* -a img { border-width: 0; border-style: none } -*/ - -a:visited { color: navy } -a:link { color: navy } -a:hover { color: red; text-decoration: underline } -a:active { color: red; text-decoration: underline } - -a {text-decoration: none} -.navbar a:link {color: white} -.navbar a:visited {color: yellow} -.navbar a:active {color: red} -.navbar a:hover {color: red} - -/* -ul { list-style-type: square; } -ul ul { list-style-type: disc; } -ul ul ul { list-style-type: circle; } -ul ul ul ul { list-style-type: disc; } -li { margin-left: 0.5em; margin-top: 0.5em; } -li li { font-size: 85%; font-style: italic } -li li li { font-size: 85%; font-style: normal } -*/ - -div dt -{ - margin-left: 0; - margin-top: 1em; - margin-bottom: 0.5em; - font-weight: bold; -} -div dd -{ - margin-left: 2em; - margin-bottom: 0.5em; -} - - -/* -p,pre,ul,ol,blockquote,h2,h3,h4,h5,h6,dl,table { - margin-left: 1em; - margin-right: 1em; -} -*/ - -p.subhead { font-weight: bold; margin-top: 2em; } - -.smaller { font-size: smaller } -.bigger { font-size: 130% } - -/* -td,th { padding: 0.2em } -*/ - -ul { - margin: 0.5em 1.5em 0.5em 1.5em; - padding: 0; -} - -ol { - margin: 0.5em 1.5em 0.5em 1.5em; - padding: 0; -} - -ul { list-style-type: square; } -ul ul { list-style-type: disc; } -ul ul ul { list-style-type: circle; } -ul ul ul ul { list-style-type: disc; } - -/* -ul li { - list-style: square; - margin: 0.1em 0em 0.6em 0; - padding: 0 0 0 0; - line-height: 140%; -} - -ol li { - margin: 0.1em 0em 0.6em 1.5em; - padding: 0 0 0 0px; - line-height: 140%; - list-style-type: decimal; -} - -li ul li { - font-size: 85%; - font-style: italic; - list-style-type: disc; - background: transparent; - padding: 0 0 0 0; -} -li li ul li { - font-size: 85%; - font-style: normal; - list-style-type: circle; - background: transparent; - padding: 0 0 0 0; -} -li li li ul li { - list-style-type: disc; - background: transparent; - padding: 0 0 0 0; -} - -li ol li { - list-style-type: decimal; -} - - -li li ol li { - list-style-type: decimal; -} -*/ - -/* - setting class="outline" on ol or ul makes it behave as an - ouline list where blocklevel content in li elements is - hidden by default and can be expanded or collapsed with - mouse click. Set class="expand" on li to override default -*/ - -ol.outline li:hover { cursor: pointer } -ol.outline li.nofold:hover { cursor: default } - -ul.outline li:hover { cursor: pointer } -ul.outline li.nofold:hover { cursor: default } - -ol.outline { list-style:decimal; } -ol.outline ol { list-style-type:lower-alpha } - -ol.outline li.nofold { - padding: 0 0 0 20px; - background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em; -} -ol.outline li.unfolded { - padding: 0 0 0 20px; - background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em; -} -ol.outline li.folded { - padding: 0 0 0 20px; - background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em; -} -ol.outline li.unfolded:hover { - padding: 0 0 0 20px; - background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em; -} -ol.outline li.folded:hover { - padding: 0 0 0 20px; - background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em; -} - -ul.outline li.nofold { - padding: 0 0 0 20px; - background: transparent url(../graphics/nofold-dim.gif) no-repeat 0px 0.5em; -} -ul.outline li.unfolded { - padding: 0 0 0 20px; - background: transparent url(../graphics/fold-dim.gif) no-repeat 0px 0.5em; -} -ul.outline li.folded { - padding: 0 0 0 20px; - background: transparent url(../graphics/unfold-dim.gif) no-repeat 0px 0.5em; -} -ul.outline li.unfolded:hover { - padding: 0 0 0 20px; - background: transparent url(../graphics/fold.gif) no-repeat 0px 0.5em; -} -ul.outline li.folded:hover { - padding: 0 0 0 20px; - background: transparent url(../graphics/unfold.gif) no-repeat 0px 0.5em; -} - -/* for slides with class "title" in table of contents */ -a.titleslide { font-weight: bold; font-style: italic } - -/* - hide images for work around for save as bug - where browsers fail to save images used by CSS -*/ -img.hidden { display: none; visibility: hidden } -div.initial_prompt { display: none; visibility: hidden } - - div.slide { - visibility: visible; - position: inherit; - } - div.handout { - border-top-style: solid; - border-top-width: thin; - border-top-color: black; - } - -@media screen { - .hidden { display: none; visibility: visible } - - div.slide.hidden { display: block; visibility: visible } - div.handout.hidden { display: block; visibility: visible } - div.background { display: none; visibility: hidden } - body.single_slide div.initial_prompt { display: block; visibility: visible } - body.single_slide div.background { display: block; visibility: visible } - body.single_slide div.background.hidden { display: none; visibility: hidden } - body.single_slide .invisible { visibility: hidden } - body.single_slide .hidden { display: none; visibility: hidden } - body.single_slide div.slide { position: absolute } - body.single_slide div.handout { display: none; visibility: hidden } -} - -@media print { - .hidden { display: block; visibility: visible } - -/* - div.slide pre { font-size: 60%; padding-left: 0.5em; } -*/ - div.toolbar { display: none; visibility: hidden; } - div.slidy_toc { display: none; visibility: hidden; } - div.background { display: none; visibility: hidden; } - div.slide { page-break-before: always } - /* :first-child isn't reliable for print media */ - div.slide.first-slide { page-break-before: avoid } -} - - -/* SJR: AsciiDoc slidy backend tweaks */ - -ol, ul { - margin: 0.8em 1.5em 0.8em 1.8em; -} -li > ul, li > ol { - margin-top: 0.5em; -} - -.outline > li.folded, -.outline > li.unfolded { - color: #527bbd; -} -ul > li{ color: #aaa; } -ul > li > *, ol > li > * { color: black; } - -li { - margin-top: 0.5em; - margin-bottom: 0.5em; -} diff -Nru asciidoc-8.6.10/stylesheets/toc2.css asciidoc-10.1.2/stylesheets/toc2.css --- asciidoc-8.6.10/stylesheets/toc2.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/stylesheets/toc2.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -@media screen { - body { - max-width: 50em; /* approximately 80 characters wide */ - margin-left: 16em; - } - - #toc { - position: fixed; - top: 0; - left: 0; - bottom: 0; - width: 13em; - padding: 0.5em; - padding-bottom: 1.5em; - margin: 0; - overflow: auto; - border-right: 3px solid #f8f8f8; - background-color: white; - } - - #toc .toclevel1 { - margin-top: 0.5em; - } - - #toc .toclevel2 { - margin-top: 0.25em; - display: list-item; - color: #aaaaaa; - } - - #toctitle { - margin-top: 0.5em; - } -} diff -Nru asciidoc-8.6.10/stylesheets/xhtml11-quirks.css asciidoc-10.1.2/stylesheets/xhtml11-quirks.css --- asciidoc-8.6.10/stylesheets/xhtml11-quirks.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/stylesheets/xhtml11-quirks.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,43 +0,0 @@ -/* Workarounds for IE6's broken and incomplete CSS2. */ - -div.sidebar-content { - background: #ffffee; - border: 1px solid silver; - padding: 0.5em; -} -div.sidebar-title, div.image-title { - color: #527bbd; - font-family: Arial,Helvetica,sans-serif; - font-weight: bold; - margin-top: 0.0em; - margin-bottom: 0.5em; -} - -div.listingblock div.content { - border: 1px solid silver; - background: #f4f4f4; - padding: 0.5em; -} - -div.quoteblock-attribution { - padding-top: 0.5em; - text-align: right; -} - -pre.verseblock-content { - font-family: inherit; -} -div.verseblock-attribution { - padding-top: 0.75em; - text-align: left; -} - -div.exampleblock-content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -div.imageblock.latex div.image-title { margin-top: 0.5em; } - -/* IE6 sets dynamically generated links as visited. */ -div#toc a:visited { color: blue; } diff -Nru asciidoc-8.6.10/tests/asciidocapi.py asciidoc-10.1.2/tests/asciidocapi.py --- asciidoc-8.6.10/tests/asciidocapi.py 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/asciidocapi.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,259 +0,0 @@ -#!/usr/bin/env python -""" -asciidocapi - AsciiDoc API wrapper class. - -The AsciiDocAPI class provides an API for executing asciidoc. Minimal example -compiles `mydoc.txt` to `mydoc.html`: - - import asciidocapi - asciidoc = asciidocapi.AsciiDocAPI() - asciidoc.execute('mydoc.txt') - -- Full documentation in asciidocapi.txt. -- See the doctests below for more examples. - -Doctests: - -1. Check execution: - - >>> import StringIO - >>> infile = StringIO.StringIO('Hello *{author}*') - >>> outfile = StringIO.StringIO() - >>> asciidoc = AsciiDocAPI() - >>> asciidoc.options('--no-header-footer') - >>> asciidoc.attributes['author'] = 'Joe Bloggs' - >>> asciidoc.execute(infile, outfile, backend='html4') - >>> print outfile.getvalue() -

    Hello Joe Bloggs

    - - >>> asciidoc.attributes['author'] = 'Bill Smith' - >>> infile = StringIO.StringIO('Hello _{author}_') - >>> outfile = StringIO.StringIO() - >>> asciidoc.execute(infile, outfile, backend='docbook') - >>> print outfile.getvalue() - Hello Bill Smith - -2. Check error handling: - - >>> import StringIO - >>> asciidoc = AsciiDocAPI() - >>> infile = StringIO.StringIO('---------') - >>> outfile = StringIO.StringIO() - >>> asciidoc.execute(infile, outfile) - Traceback (most recent call last): - File "", line 1, in - File "asciidocapi.py", line 189, in execute - raise AsciiDocError(self.messages[-1]) - AsciiDocError: ERROR: : line 1: [blockdef-listing] missing closing delimiter - - -Copyright (C) 2009 Stuart Rackham. Free use of this software is granted -under the terms of the GNU General Public License (GPL). - -""" - -import sys,os,re,imp - -API_VERSION = '0.1.2' -MIN_ASCIIDOC_VERSION = '8.4.1' # Minimum acceptable AsciiDoc version. - - -def find_in_path(fname, path=None): - """ - Find file fname in paths. Return None if not found. - """ - if path is None: - path = os.environ.get('PATH', '') - for dir in path.split(os.pathsep): - fpath = os.path.join(dir, fname) - if os.path.isfile(fpath): - return fpath - else: - return None - - -class AsciiDocError(Exception): - pass - - -class Options(object): - """ - Stores asciidoc(1) command options. - """ - def __init__(self, values=[]): - self.values = values[:] - def __call__(self, name, value=None): - """Shortcut for append method.""" - self.append(name, value) - def append(self, name, value=None): - if type(value) in (int,float): - value = str(value) - self.values.append((name,value)) - - -class Version(object): - """ - Parse and compare AsciiDoc version numbers. Instance attributes: - - string: String version number '.[.][suffix]'. - major: Integer major version number. - minor: Integer minor version number. - micro: Integer micro version number. - suffix: Suffix (begins with non-numeric character) is ignored when - comparing. - - Doctest examples: - - >>> Version('8.2.5') < Version('8.3 beta 1') - True - >>> Version('8.3.0') == Version('8.3. beta 1') - True - >>> Version('8.2.0') < Version('8.20') - True - >>> Version('8.20').major - 8 - >>> Version('8.20').minor - 20 - >>> Version('8.20').micro - 0 - >>> Version('8.20').suffix - '' - >>> Version('8.20 beta 1').suffix - 'beta 1' - - """ - def __init__(self, version): - self.string = version - reo = re.match(r'^(\d+)\.(\d+)(\.(\d+))?\s*(.*?)\s*$', self.string) - if not reo: - raise ValueError('invalid version number: %s' % self.string) - groups = reo.groups() - self.major = int(groups[0]) - self.minor = int(groups[1]) - self.micro = int(groups[3] or '0') - self.suffix = groups[4] or '' - def __cmp__(self, other): - result = cmp(self.major, other.major) - if result == 0: - result = cmp(self.minor, other.minor) - if result == 0: - result = cmp(self.micro, other.micro) - return result - - -class AsciiDocAPI(object): - """ - AsciiDoc API class. - """ - def __init__(self, asciidoc_py=None): - """ - Locate and import asciidoc.py. - Initialize instance attributes. - """ - self.options = Options() - self.attributes = {} - self.messages = [] - # Search for the asciidoc command file. - # Try ASCIIDOC_PY environment variable first. - cmd = os.environ.get('ASCIIDOC_PY') - if cmd: - if not os.path.isfile(cmd): - raise AsciiDocError('missing ASCIIDOC_PY file: %s' % cmd) - elif asciidoc_py: - # Next try path specified by caller. - cmd = asciidoc_py - if not os.path.isfile(cmd): - raise AsciiDocError('missing file: %s' % cmd) - else: - # Try shell search paths. - for fname in ['asciidoc.py','asciidoc.pyc','asciidoc']: - cmd = find_in_path(fname) - if cmd: break - else: - # Finally try current working directory. - for cmd in ['asciidoc.py','asciidoc.pyc','asciidoc']: - if os.path.isfile(cmd): break - else: - raise AsciiDocError('failed to locate asciidoc') - self.cmd = os.path.realpath(cmd) - self.__import_asciidoc() - - def __import_asciidoc(self, reload=False): - ''' - Import asciidoc module (script or compiled .pyc). - See - http://groups.google.com/group/asciidoc/browse_frm/thread/66e7b59d12cd2f91 - for an explanation of why a seemingly straight-forward job turned out - quite complicated. - ''' - if os.path.splitext(self.cmd)[1] in ['.py','.pyc']: - sys.path.insert(0, os.path.dirname(self.cmd)) - try: - try: - if reload: - import __builtin__ # Because reload() is shadowed. - __builtin__.reload(self.asciidoc) - else: - import asciidoc - self.asciidoc = asciidoc - except ImportError: - raise AsciiDocError('failed to import ' + self.cmd) - finally: - del sys.path[0] - else: - # The import statement can only handle .py or .pyc files, have to - # use imp.load_source() for scripts with other names. - try: - imp.load_source('asciidoc', self.cmd) - import asciidoc - self.asciidoc = asciidoc - except ImportError: - raise AsciiDocError('failed to import ' + self.cmd) - if Version(self.asciidoc.VERSION) < Version(MIN_ASCIIDOC_VERSION): - raise AsciiDocError( - 'asciidocapi %s requires asciidoc %s or better' - % (API_VERSION, MIN_ASCIIDOC_VERSION)) - - def execute(self, infile, outfile=None, backend=None): - """ - Compile infile to outfile using backend format. - infile can outfile can be file path strings or file like objects. - """ - self.messages = [] - opts = Options(self.options.values) - if outfile is not None: - opts('--out-file', outfile) - if backend is not None: - opts('--backend', backend) - for k,v in self.attributes.items(): - if v == '' or k[-1] in '!@': - s = k - elif v is None: # A None value undefines the attribute. - s = k + '!' - else: - s = '%s=%s' % (k,v) - opts('--attribute', s) - args = [infile] - # The AsciiDoc command was designed to process source text then - # exit, there are globals and statics in asciidoc.py that have - # to be reinitialized before each run -- hence the reload. - self.__import_asciidoc(reload=True) - try: - try: - self.asciidoc.execute(self.cmd, opts.values, args) - finally: - self.messages = self.asciidoc.messages[:] - except SystemExit, e: - if e.code: - raise AsciiDocError(self.messages[-1]) - - -if __name__ == "__main__": - """ - Run module doctests. - """ - import doctest - options = doctest.NORMALIZE_WHITESPACE + doctest.ELLIPSIS - test_result = doctest.testmod(optionflags=options) - print(test_result) - sys.exit(test_result.failed > 0) diff -Nru asciidoc-8.6.10/tests/blocks/test_table.py asciidoc-10.1.2/tests/blocks/test_table.py --- asciidoc-8.6.10/tests/blocks/test_table.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/blocks/test_table.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,45 @@ +from asciidoc.blocks import table +import pytest + + +@pytest.mark.parametrize( + "input,expected", + ( + (None, (None, None)), + ('', (None, None)), + ('<', ('left', None)), + ('^', ('center', None)), + ('>', ('right', None)), + ('.<', (None, 'top')), + ('.^', (None, 'middle')), + ('.>', (None, 'bottom')), + ('<.<', ('left', 'top')), + ('^.<', ('center', 'top')), + ('>.<', ('right', 'top')), + ('<.^', ('left', 'middle')), + ('^.^', ('center', 'middle')), + ('>.^', ('right', 'middle')), + ('<.>', ('left', 'bottom')), + ('^.>', ('center', 'bottom')), + ('>.>', ('right', 'bottom')), + ) +) +def test_parse_align_spec(input, expected): + assert table.parse_align_spec(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + (None, (1, 1)), + ('', (1, 1)), + ('0', (1, 1)), + ('.0', (1, 1)), + ('0.0', (1, 1)), + ('2', (2, 1)), + ('.2', (1, 2)), + ('3.2', (3, 2)), + ) +) +def test_parse_table_span_spec(input, expected): + assert table.parse_table_span_spec(input) == expected diff -Nru asciidoc-8.6.10/tests/data/article-data-uri-html4.html asciidoc-10.1.2/tests/data/article-data-uri-html4.html --- asciidoc-8.6.10/tests/data/article-data-uri-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-data-uri-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,316 @@ + + + + + +The Article Title + + +

    The Article Title

    +

    +Author's Name
    +<authors@email.address>
    +version 1.0, +2003-12 +

    + +

    This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble.

    + + + +
    +Note +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections).
    +
    +

    Example Abstract

    +

    The optional abstract (one or more paragraphs) goes here.

    +

    This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes.

    +
    +

    1. The First Section

    +

    Article sections start at level 1 and can be nested up to four levels +deep. +
    [An example footnote.]

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an images/smallnew.png +example inline image followed by an example block image:

    +
    +Tiger image +

    Figure 1. Tiger block image

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. An example table

    +
    + +
    +

    Lorum ipum…

    +
    +

    Example 1. An example example

    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +

    1.1.1. A Nested Sub-section

    +

    Sub-section at level 3.

    +
    Yet another nested Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +

    2. The Second Section

    +

    Article sections are at level 1 and can contain sub-sections nested up +to four deep.

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +

    Appendix A: Example Appendix

    +

    AsciiDoc article appendices are just just article sections with +specialsection titles.

    +

    Appendix Sub-section

    +

    Appendix sub-section at level 2.

    +
    +

    Example Bibliography

    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Example Glossary

    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version 1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/article-data-uri-html5.html asciidoc-10.1.2/tests/data/article-data-uri-html5.html --- asciidoc-8.6.10/tests/data/article-data-uri-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-data-uri-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1079 @@ + + + + + +The Article Title + + + + + +
    +
    +
    +

    This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble.

    +
    + + + +
    +Note +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections).
    +
    +
    +
    +
    +

    Example Abstract

    +
    +

    The optional abstract (one or more paragraphs) goes here.

    +

    This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes.

    +
    +
    +
    +

    1. The First Section

    +
    +

    Article sections start at level 1 and can be nested up to four levels +deep. +
    [An example footnote.]

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    1.1.1. A Nested Sub-section

    +

    Sub-section at level 3.

    +
    +
    Yet another nested Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    2. The Second Section

    +
    +

    Article sections are at level 1 and can contain sub-sections nested up +to four deep.

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    AsciiDoc article appendices are just just article sections with +specialsection titles.

    +
    +

    Appendix Sub-section

    +

    Appendix sub-section at level 2.

    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/article-data-uri-xhtml11.html asciidoc-10.1.2/tests/data/article-data-uri-xhtml11.html --- asciidoc-8.6.10/tests/data/article-data-uri-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-data-uri-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1083 @@ + + + + + + +The Article Title + + + + + +
    +
    +
    +

    This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble.

    +
    + + + +
    +Note +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections).
    +
    +
    +
    +
    +

    Example Abstract

    +
    +

    The optional abstract (one or more paragraphs) goes here.

    +

    This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes.

    +
    +
    +
    +

    1. The First Section

    +
    +

    Article sections start at level 1 and can be nested up to four levels +deep. +
    [An example footnote.]

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    1.1.1. A Nested Sub-section

    +

    Sub-section at level 3.

    +
    +
    Yet another nested Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    2. The Second Section

    +
    +

    Article sections are at level 1 and can contain sub-sections nested up +to four deep.

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    AsciiDoc article appendices are just just article sections with +specialsection titles.

    +
    +

    Appendix Sub-section

    +

    Appendix sub-section at level 2.

    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/article-docbook5.xml asciidoc-10.1.2/tests/data/article-docbook5.xml --- asciidoc-8.6.10/tests/data/article-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,193 @@ + + + + +
    + + The Article Title + 2003-12 + + + Author's + Name + + authors@email.address + + AN + 1.02003-12AN + +This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble. +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections). + +The optional abstract (one or more paragraphs) goes here. +This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes. + +
    +The First Section +Article sections start at level 1 and can be nested up to four levels +deep. +An example footnote. + + Example index entry + +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +A Nested Sub-section +Sub-section at level 3. +
    +Yet another nested Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    +
    +The Second Section +Article sections are at level 1 and can contain sub-sections nested up +to four deep. +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . +
    + +Example Appendix +AsciiDoc article appendices are just just article sections with +specialsection titles. +
    +Appendix Sub-section +Appendix sub-section at level 2. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + +
    diff -Nru asciidoc-8.6.10/tests/data/article-docbook.xml asciidoc-10.1.2/tests/data/article-docbook.xml --- asciidoc-8.6.10/tests/data/article-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,195 @@ + + + + + +
    + + The Article Title + 2003-12 + + Author's + Name + authors@email.address + + AN +1.02003-12AN + +This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble. +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections). + +The optional abstract (one or more paragraphs) goes here. +This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes. + +
    +The First Section +Article sections start at level 1 and can be nested up to four levels +deep. +An example footnote. + + Example index entry + +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +A Nested Sub-section +Sub-section at level 3. +
    +Yet another nested Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    +
    +The Second Section +Article sections are at level 1 and can contain sub-sections nested up +to four deep. +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . +
    + +Example Appendix +AsciiDoc article appendices are just just article sections with +specialsection titles. +
    +Appendix Sub-section +Appendix sub-section at level 2. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Example Index + +
    diff -Nru asciidoc-8.6.10/tests/data/article-docinfo-docbook5.xml asciidoc-10.1.2/tests/data/article-docinfo-docbook5.xml --- asciidoc-8.6.10/tests/data/article-docinfo-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-docinfo-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,280 @@ + + + + +
    + + The Article Title + 2003-12 + + + Author's + Name + + authors@email.address + + AN + 1.02003-12AN + + + + + Dr + Lois + Common-Denominator + + Director, M. Behn School of Coop. Eng. + Director of Cooperative Efforts + The Marguerite Behn International School of + Cooperative Engineering + + + + + Mr + Steven + Norman + T + + ATI + Senior Application Analyst + Foobar, Inc. + Application Development + + + + + Peter + Pan + Sr. + Spiderman + + + Peter's a super hero in his spare time. + + + + + + + 2009 + Behn International + + + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + + + + 1.1 + May 2009 + PP + + Updates. + + + + 1.0 + October 2003 + PP + + First release. + + + + +This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble. +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections). + +The optional abstract (one or more paragraphs) goes here. +This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes. + +
    +The First Section +Article sections start at level 1 and can be nested up to four levels +deep. +An example footnote. + + Example index entry + +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +A Nested Sub-section +Sub-section at level 3. +
    +Yet another nested Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    +
    +The Second Section +Article sections are at level 1 and can contain sub-sections nested up +to four deep. +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . +
    + +Example Appendix +AsciiDoc article appendices are just just article sections with +specialsection titles. +
    +Appendix Sub-section +Appendix sub-section at level 2. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + +
    diff -Nru asciidoc-8.6.10/tests/data/article-docinfo-docbook.xml asciidoc-10.1.2/tests/data/article-docinfo-docbook.xml --- asciidoc-8.6.10/tests/data/article-docinfo-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-docinfo-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,282 @@ + + + + + +
    + + The Article Title + 2003-12 + + Author's + Name + authors@email.address + + AN +1.02003-12AN + + + + + Dr + Lois + Common-Denominator + + Director, M. Behn School of Coop. Eng. + Director of Cooperative Efforts + The Marguerite Behn International School of + Cooperative Engineering + + + + + Mr + Steven + Norman + T + + ATI + Senior Application Analyst + Foobar, Inc. + Application Development + + + + + Peter + Pan + Sr. + Spiderman + + + Peter's a super hero in his spare time. + + + + + + + 2009 + Behn International + + + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + + + + 1.1 + May 2009 + PP + + Updates. + + + + 1.0 + October 2003 + PP + + First release. + + + + +This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble. +The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections). + +The optional abstract (one or more paragraphs) goes here. +This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes. + +
    +The First Section +Article sections start at level 1 and can be nested up to four levels +deep. +An example footnote. + + Example index entry + +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +A Nested Sub-section +Sub-section at level 3. +
    +Yet another nested Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    +
    +The Second Section +Article sections are at level 1 and can contain sub-sections nested up +to four deep. +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . +
    + +Example Appendix +AsciiDoc article appendices are just just article sections with +specialsection titles. +
    +Appendix Sub-section +Appendix sub-section at level 2. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Example Index + +
    diff -Nru asciidoc-8.6.10/tests/data/article-html4.html asciidoc-10.1.2/tests/data/article-html4.html --- asciidoc-8.6.10/tests/data/article-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,149 @@ + + + + + +The Article Title + + +

    The Article Title

    +

    +Author's Name
    +<authors@email.address>
    +version 1.0, +2003-12 +

    + +

    This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble.

    + + + +
    +

    Note

    +
    The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections).
    +
    +

    Example Abstract

    +

    The optional abstract (one or more paragraphs) goes here.

    +

    This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes.

    +
    +

    1. The First Section

    +

    Article sections start at level 1 and can be nested up to four levels +deep. +
    [An example footnote.]

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an images/smallnew.png +example inline image followed by an example block image:

    +
    +Tiger image +

    Figure 1. Tiger block image

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. An example table

    +
    + +
    +

    Lorum ipum…

    +
    +

    Example 1. An example example

    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +

    1.1.1. A Nested Sub-section

    +

    Sub-section at level 3.

    +
    Yet another nested Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +

    2. The Second Section

    +

    Article sections are at level 1 and can contain sub-sections nested up +to four deep.

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +

    Appendix A: Example Appendix

    +

    AsciiDoc article appendices are just just article sections with +specialsection titles.

    +

    Appendix Sub-section

    +

    Appendix sub-section at level 2.

    +
    +

    Example Bibliography

    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Example Glossary

    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version 1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/article-html5.html asciidoc-10.1.2/tests/data/article-html5.html --- asciidoc-8.6.10/tests/data/article-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,912 @@ + + + + + +The Article Title + + + + + +
    +
    +
    +

    This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble.

    +
    + + + +
    +
    Note
    +
    The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections).
    +
    +
    +
    +
    +

    Example Abstract

    +
    +

    The optional abstract (one or more paragraphs) goes here.

    +

    This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes.

    +
    +
    +
    +

    1. The First Section

    +
    +

    Article sections start at level 1 and can be nested up to four levels +deep. +
    [An example footnote.]

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    1.1.1. A Nested Sub-section

    +

    Sub-section at level 3.

    +
    +
    Yet another nested Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    2. The Second Section

    +
    +

    Article sections are at level 1 and can contain sub-sections nested up +to four deep.

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    AsciiDoc article appendices are just just article sections with +specialsection titles.

    +
    +

    Appendix Sub-section

    +

    Appendix sub-section at level 2.

    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/article-xhtml11.html asciidoc-10.1.2/tests/data/article-xhtml11.html --- asciidoc-8.6.10/tests/data/article-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/article-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,916 @@ + + + + + + +The Article Title + + + + + +
    +
    +
    +

    This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble.

    +
    + + + +
    +
    Note
    +
    The abstract, preface, appendix, bibliography, glossary and +index section titles are significant (specialsections).
    +
    +
    +
    +
    +

    Example Abstract

    +
    +

    The optional abstract (one or more paragraphs) goes here.

    +

    This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes.

    +
    +
    +
    +

    1. The First Section

    +
    +

    Article sections start at level 1 and can be nested up to four levels +deep. +
    [An example footnote.]

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    1.1.1. A Nested Sub-section

    +

    Sub-section at level 3.

    +
    +
    Yet another nested Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    2. The Second Section

    +
    +

    Article sections are at level 1 and can contain sub-sections nested up +to four deep.

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    AsciiDoc article appendices are just just article sections with +specialsection titles.

    +
    +

    Appendix Sub-section

    +

    Appendix sub-section at level 2.

    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/asciidoc.1-docbook5.xml asciidoc-10.1.2/tests/data/asciidoc.1-docbook5.xml --- asciidoc-8.6.10/tests/data/asciidoc.1-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciidoc.1-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,465 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + +OPTIONS + + + +-a, --attribute=ATTRIBUTE + + + + Define or delete document attribute. ATTRIBUTE is formatted like + NAME=VALUE. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are NAME (the VALUE defaults to an empty string); + NAME! (delete the NAME attribute); NAME=VALUE@ (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This option + may be specified more than once. A special attribute named + trace controls the output of diagnostic information. + + + + + +-b, --backend=BACKEND + + + + Backend output file format: docbook45, docbook5, xhtml11, html4, + html5, slidy, wordpress or latex (the latex backend is + experimental). You can also use the backend alias names html + (aliased to xhtml11) or docbook (aliased to docbook45). + Defaults to html. The --backend option is also used to manage + backend plugins (see PLUGIN COMMANDS). + + + + + +-f, --conf-file=CONF_FILE + + + + Use configuration file CONF_FILE.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. + + + + + +--doctest + + + + Run Python doctests in asciidoc module. + + + + + +-d, --doctype=DOCTYPE + + + + Document type: article, manpage or book. The book document + type is only supported by the docbook backends. Default document + type is article. + + + + + +-c, --dump-conf + + + + Dump configuration to stdout. + + + + + +--filter=FILTER + + + + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more than + once. The --filter option is also used to manage filter plugins + (see PLUGIN COMMANDS). + + + + + +-h, --help [TOPIC] + + + + Print help TOPIC. --help topics will print a list of help + topics, --help syntax summarizes AsciiDoc syntax, + --help manpage prints the AsciiDoc manpage. + + + + + +-e, --no-conf + + + + Exclude implicitly loaded configuration files except for those + named like the input file (infile.conf and + infile-backend.conf). + + + + + +-s, --no-header-footer + + + + Suppress document header and footer output. + + + + + +-o, --out-file=OUT_FILE + + + + Write output to file OUT_FILE. Defaults to the base name of + input file with backend extension. If the input is stdin then + the outfile defaults to stdout. If OUT_FILE is - then the + standard output is used. + + + + + +-n, --section-numbers + + + + Auto-number HTML article section titles. Synonym for + --attribute numbered. + + + + + +--safe + + + + Enable safe mode. Safe mode is disabled by default. AsciiDoc + safe mode skips potentially dangerous scripted sections in + AsciiDoc source files. + + + + + +--theme=THEME + + + + Specify a theme name. Synonym for --attribute theme=THEME. + The --theme option is also used to manage theme plugins (see + PLUGIN COMMANDS). + + + + + +-v, --verbose + + + + Verbosely print processing information and configuration file + checks to stderr. + + + + + +--version + + + + Print program version number. + + + + + + +PLUGIN COMMANDS +The asciidoc(1) --filter, --backend and --theme options are used +to install, remove and list AsciiDoc filter, backend and theme +plugins. Syntax: +asciidoc OPTION install ZIP_FILE [PLUGINS_DIR] +asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR] +asciidoc OPTION list +asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE +Where: + + + +OPTION + + + + asciidoc(1) --filter, --backend or --theme option specifying + the type of plugin. + + + + + +PLUGIN_NAME + + + + A unique plugin name containing only alphanumeric or underscore + characters. + + + + + +ZIP_FILE + + + + A Zip file containing plugin resources, the name must start with the + plugin name e.g. my_filter-1.0.zip packages filter my_filter. + + + + + +PLUGINS_DIR + + + + The directory containing installed plugins. Each plugin is contained + in its own separate subdirectory which has the same name as the + plugin. + PLUGINS_DIR defaults to the $HOME/.asciidoc/filters (for + filter plugins) or $HOME/.asciidoc/backends (for backend plugins) or + $HOME/.asciidoc/themes (for theme plugins). + + + + + +PLUGIN_SOURCE + + + + The name of a directory containing the plugin source files or the + name of a single source file. + + + + +The plugin commands perform as follows: + + + +install + + + + Create a subdirectory in PLUGINS_DIR with the same name as the + plugin then extract the ZIP_FILE into it. + + + + + +remove + + + + Delete the PLUGIN_NAME plugin subdirectory and all its contents + from the PLUGINS_DIR. + + + + + +list + + + + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). + + + + + +build + + + + Create a plugin file named ZIP_FILE containing the files and + subdirectories specified by PLUGIN_SOURCE. File and directory + names starting with a period are skipped. + + + + + + +ENVIRONMENT VARIABLES + + + +SOURCE_DATE_EPOCH + + + + If the SOURCE_DATE_EPOCH environment variable is set to a UNIX + timestamp, then the {docdate}, {doctime}, {localdate}, and + {localtime} attributes are computed in the UTC time zone, with any + timestamps newer than SOURCE_DATE_EPOCH replaced by + SOURCE_DATE_EPOCH. (This helps software using AsciiDoc to build + reproducibly.) + + + + + + +EXAMPLES + + + +asciidoc asciidoc_file_name.txt + + + + Simply generate an html file from the asciidoc_file_name.txt that is in + current directory using asciidoc. + + + + + +asciidoc -b html5 asciidoc_file_name.txt + + + + Use the -b switch to use one of the proposed backend or another one you + installed on your computer. + + + + + +asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt + + + + Use the -a switch to set attributes from command-line. AsciiDoc generated + its stand-alone HTML user guide containing embedded CSS, JavaScript and + images from the AsciiDoc article template with this command. + + + + + +asciidoc -b html5 -d manpage asciidoc.1.txt + + + + Generating the asciidoc manpage using the html5 backend. + + + + + + +EXIT STATUS + + + +0 + + + + Success + + + + + +1 + + + + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). + + + + + + +BUGS +See the AsciiDoc distribution BUGS file. + + +AUTHOR +AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it. + + +RESOURCES +GitHub: https://github.com/asciidoc/asciidoc-py3/ +Main web site: https://asciidoc.org/ + + +SEE ALSO +a2x(1) + + +COPYING +Copyright (C) 2002-2013 Stuart Rackham. +Copyright (C) 2013-2020 AsciiDoc Contributors. +Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2). + + diff -Nru asciidoc-8.6.10/tests/data/asciidoc.1-docbook.xml asciidoc-10.1.2/tests/data/asciidoc.1-docbook.xml --- asciidoc-8.6.10/tests/data/asciidoc.1-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciidoc.1-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,466 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + +OPTIONS + + + +-a, --attribute=ATTRIBUTE + + + + Define or delete document attribute. ATTRIBUTE is formatted like + NAME=VALUE. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are NAME (the VALUE defaults to an empty string); + NAME! (delete the NAME attribute); NAME=VALUE@ (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This option + may be specified more than once. A special attribute named + trace controls the output of diagnostic information. + + + + + +-b, --backend=BACKEND + + + + Backend output file format: docbook45, docbook5, xhtml11, html4, + html5, slidy, wordpress or latex (the latex backend is + experimental). You can also use the backend alias names html + (aliased to xhtml11) or docbook (aliased to docbook45). + Defaults to html. The --backend option is also used to manage + backend plugins (see PLUGIN COMMANDS). + + + + + +-f, --conf-file=CONF_FILE + + + + Use configuration file CONF_FILE.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. + + + + + +--doctest + + + + Run Python doctests in asciidoc module. + + + + + +-d, --doctype=DOCTYPE + + + + Document type: article, manpage or book. The book document + type is only supported by the docbook backends. Default document + type is article. + + + + + +-c, --dump-conf + + + + Dump configuration to stdout. + + + + + +--filter=FILTER + + + + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more than + once. The --filter option is also used to manage filter plugins + (see PLUGIN COMMANDS). + + + + + +-h, --help [TOPIC] + + + + Print help TOPIC. --help topics will print a list of help + topics, --help syntax summarizes AsciiDoc syntax, + --help manpage prints the AsciiDoc manpage. + + + + + +-e, --no-conf + + + + Exclude implicitly loaded configuration files except for those + named like the input file (infile.conf and + infile-backend.conf). + + + + + +-s, --no-header-footer + + + + Suppress document header and footer output. + + + + + +-o, --out-file=OUT_FILE + + + + Write output to file OUT_FILE. Defaults to the base name of + input file with backend extension. If the input is stdin then + the outfile defaults to stdout. If OUT_FILE is - then the + standard output is used. + + + + + +-n, --section-numbers + + + + Auto-number HTML article section titles. Synonym for + --attribute numbered. + + + + + +--safe + + + + Enable safe mode. Safe mode is disabled by default. AsciiDoc + safe mode skips potentially dangerous scripted sections in + AsciiDoc source files. + + + + + +--theme=THEME + + + + Specify a theme name. Synonym for --attribute theme=THEME. + The --theme option is also used to manage theme plugins (see + PLUGIN COMMANDS). + + + + + +-v, --verbose + + + + Verbosely print processing information and configuration file + checks to stderr. + + + + + +--version + + + + Print program version number. + + + + + + +PLUGIN COMMANDS +The asciidoc(1) --filter, --backend and --theme options are used +to install, remove and list AsciiDoc filter, backend and theme +plugins. Syntax: +asciidoc OPTION install ZIP_FILE [PLUGINS_DIR] +asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR] +asciidoc OPTION list +asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE +Where: + + + +OPTION + + + + asciidoc(1) --filter, --backend or --theme option specifying + the type of plugin. + + + + + +PLUGIN_NAME + + + + A unique plugin name containing only alphanumeric or underscore + characters. + + + + + +ZIP_FILE + + + + A Zip file containing plugin resources, the name must start with the + plugin name e.g. my_filter-1.0.zip packages filter my_filter. + + + + + +PLUGINS_DIR + + + + The directory containing installed plugins. Each plugin is contained + in its own separate subdirectory which has the same name as the + plugin. + PLUGINS_DIR defaults to the $HOME/.asciidoc/filters (for + filter plugins) or $HOME/.asciidoc/backends (for backend plugins) or + $HOME/.asciidoc/themes (for theme plugins). + + + + + +PLUGIN_SOURCE + + + + The name of a directory containing the plugin source files or the + name of a single source file. + + + + +The plugin commands perform as follows: + + + +install + + + + Create a subdirectory in PLUGINS_DIR with the same name as the + plugin then extract the ZIP_FILE into it. + + + + + +remove + + + + Delete the PLUGIN_NAME plugin subdirectory and all its contents + from the PLUGINS_DIR. + + + + + +list + + + + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). + + + + + +build + + + + Create a plugin file named ZIP_FILE containing the files and + subdirectories specified by PLUGIN_SOURCE. File and directory + names starting with a period are skipped. + + + + + + +ENVIRONMENT VARIABLES + + + +SOURCE_DATE_EPOCH + + + + If the SOURCE_DATE_EPOCH environment variable is set to a UNIX + timestamp, then the {docdate}, {doctime}, {localdate}, and + {localtime} attributes are computed in the UTC time zone, with any + timestamps newer than SOURCE_DATE_EPOCH replaced by + SOURCE_DATE_EPOCH. (This helps software using AsciiDoc to build + reproducibly.) + + + + + + +EXAMPLES + + + +asciidoc asciidoc_file_name.txt + + + + Simply generate an html file from the asciidoc_file_name.txt that is in + current directory using asciidoc. + + + + + +asciidoc -b html5 asciidoc_file_name.txt + + + + Use the -b switch to use one of the proposed backend or another one you + installed on your computer. + + + + + +asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt + + + + Use the -a switch to set attributes from command-line. AsciiDoc generated + its stand-alone HTML user guide containing embedded CSS, JavaScript and + images from the AsciiDoc article template with this command. + + + + + +asciidoc -b html5 -d manpage asciidoc.1.txt + + + + Generating the asciidoc manpage using the html5 backend. + + + + + + +EXIT STATUS + + + +0 + + + + Success + + + + + +1 + + + + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). + + + + + + +BUGS +See the AsciiDoc distribution BUGS file. + + +AUTHOR +AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it. + + +RESOURCES +GitHub: https://github.com/asciidoc/asciidoc-py3/ +Main web site: https://asciidoc.org/ + + +SEE ALSO +a2x(1) + + +COPYING +Copyright (C) 2002-2013 Stuart Rackham. +Copyright (C) 2013-2020 AsciiDoc Contributors. +Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2). + + diff -Nru asciidoc-8.6.10/tests/data/asciidoc.1-html4.html asciidoc-10.1.2/tests/data/asciidoc.1-html4.html --- asciidoc-8.6.10/tests/data/asciidoc.1-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciidoc.1-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,385 @@ + + + + + +ASCIIDOC(1) + + +
    +

    + ASCIIDOC(1) Manual Page +

    +
    +

    NAME

    +

    asciidoc - + converts an AsciiDoc text file to HTML or DocBook +

    +

    SYNOPSIS

    +

    asciidoc [OPTIONS] FILE

    +

    DESCRIPTION

    +

    The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used.

    +

    OPTIONS

    +
    +
    +-a, --attribute=ATTRIBUTE +
    +
    +

    + Define or delete document attribute. ATTRIBUTE is formatted like + NAME=VALUE. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are NAME (the VALUE defaults to an empty string); + NAME! (delete the NAME attribute); NAME=VALUE@ (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This option + may be specified more than once. A special attribute named + trace controls the output of diagnostic information. +

    +
    +
    +-b, --backend=BACKEND +
    +
    +

    + Backend output file format: docbook45, docbook5, xhtml11, html4, + html5, slidy, wordpress or latex (the latex backend is + experimental). You can also use the backend alias names html + (aliased to xhtml11) or docbook (aliased to docbook45). + Defaults to html. The --backend option is also used to manage + backend plugins (see PLUGIN COMMANDS). +

    +
    +
    +-f, --conf-file=CONF_FILE +
    +
    +

    + Use configuration file CONF_FILE.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. +

    +
    +
    +--doctest +
    +
    +

    + Run Python doctests in asciidoc module. +

    +
    +
    +-d, --doctype=DOCTYPE +
    +
    +

    + Document type: article, manpage or book. The book document + type is only supported by the docbook backends. Default document + type is article. +

    +
    +
    +-c, --dump-conf +
    +
    +

    + Dump configuration to stdout. +

    +
    +
    +--filter=FILTER +
    +
    +

    + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more than + once. The --filter option is also used to manage filter plugins + (see PLUGIN COMMANDS). +

    +
    +
    +-h, --help [TOPIC] +
    +
    +

    + Print help TOPIC. --help topics will print a list of help + topics, --help syntax summarizes AsciiDoc syntax, + --help manpage prints the AsciiDoc manpage. +

    +
    +
    +-e, --no-conf +
    +
    +

    + Exclude implicitly loaded configuration files except for those + named like the input file (infile.conf and + infile-backend.conf). +

    +
    +
    +-s, --no-header-footer +
    +
    +

    + Suppress document header and footer output. +

    +
    +
    +-o, --out-file=OUT_FILE +
    +
    +

    + Write output to file OUT_FILE. Defaults to the base name of + input file with backend extension. If the input is stdin then + the outfile defaults to stdout. If OUT_FILE is - then the + standard output is used. +

    +
    +
    +-n, --section-numbers +
    +
    +

    + Auto-number HTML article section titles. Synonym for + --attribute numbered. +

    +
    +
    +--safe +
    +
    +

    + Enable safe mode. Safe mode is disabled by default. AsciiDoc + safe mode skips potentially dangerous scripted sections in + AsciiDoc source files. +

    +
    +
    +--theme=THEME +
    +
    +

    + Specify a theme name. Synonym for --attribute theme=THEME. + The --theme option is also used to manage theme plugins (see + PLUGIN COMMANDS). +

    +
    +
    +-v, --verbose +
    +
    +

    + Verbosely print processing information and configuration file + checks to stderr. +

    +
    +
    +--version +
    +
    +

    + Print program version number. +

    +
    +
    +

    PLUGIN COMMANDS

    +

    The asciidoc(1) --filter, --backend and --theme options are used +to install, remove and list AsciiDoc filter, backend and theme +plugins. Syntax:

    +
    asciidoc OPTION install ZIP_FILE [PLUGINS_DIR]
    +asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR]
    +asciidoc OPTION list
    +asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE
    +

    Where:

    +
    +
    +OPTION +
    +
    +

    + asciidoc(1) --filter, --backend or --theme option specifying + the type of plugin. +

    +
    +
    +PLUGIN_NAME +
    +
    +

    + A unique plugin name containing only alphanumeric or underscore + characters. +

    +
    +
    +ZIP_FILE +
    +
    +

    + A Zip file containing plugin resources, the name must start with the + plugin name e.g. my_filter-1.0.zip packages filter my_filter. +

    +
    +
    +PLUGINS_DIR +
    +
    +

    + The directory containing installed plugins. Each plugin is contained + in its own separate subdirectory which has the same name as the + plugin. + PLUGINS_DIR defaults to the $HOME/.asciidoc/filters (for + filter plugins) or $HOME/.asciidoc/backends (for backend plugins) or + $HOME/.asciidoc/themes (for theme plugins). +

    +
    +
    +PLUGIN_SOURCE +
    +
    +

    + The name of a directory containing the plugin source files or the + name of a single source file. +

    +
    +
    +

    The plugin commands perform as follows:

    +
    +
    +install +
    +
    +

    + Create a subdirectory in PLUGINS_DIR with the same name as the + plugin then extract the ZIP_FILE into it. +

    +
    +
    +remove +
    +
    +

    + Delete the PLUGIN_NAME plugin subdirectory and all its contents + from the PLUGINS_DIR. +

    +
    +
    +list +
    +
    +

    + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). +

    +
    +
    +build +
    +
    +

    + Create a plugin file named ZIP_FILE containing the files and + subdirectories specified by PLUGIN_SOURCE. File and directory + names starting with a period are skipped. +

    +
    +
    +

    ENVIRONMENT VARIABLES

    +
    +
    +SOURCE_DATE_EPOCH +
    +
    +

    + If the SOURCE_DATE_EPOCH environment variable is set to a UNIX + timestamp, then the {docdate}, {doctime}, {localdate}, and + {localtime} attributes are computed in the UTC time zone, with any + timestamps newer than SOURCE_DATE_EPOCH replaced by + SOURCE_DATE_EPOCH. (This helps software using AsciiDoc to build + reproducibly.) +

    +
    +
    +

    EXAMPLES

    +
    +
    +asciidoc asciidoc_file_name.txt +
    +
    +

    + Simply generate an html file from the asciidoc_file_name.txt that is in + current directory using asciidoc. +

    +
    +
    +asciidoc -b html5 asciidoc_file_name.txt +
    +
    +

    + Use the -b switch to use one of the proposed backend or another one you + installed on your computer. +

    +
    +
    +asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt +
    +
    +

    + Use the -a switch to set attributes from command-line. AsciiDoc generated + its stand-alone HTML user guide containing embedded CSS, JavaScript and + images from the AsciiDoc article template with this command. +

    +
    +
    +asciidoc -b html5 -d manpage asciidoc.1.txt +
    +
    +

    + Generating the asciidoc manpage using the html5 backend. +

    +
    +
    +

    EXIT STATUS

    +
    +
    +0 +
    +
    +

    + Success +

    +
    +
    +1 +
    +
    +

    + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). +

    +
    +
    +

    BUGS

    +

    See the AsciiDoc distribution BUGS file.

    +

    AUTHOR

    +

    AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it.

    +

    RESOURCES

    +

    GitHub: https://github.com/asciidoc/asciidoc-py3/

    +

    Main web site: https://asciidoc.org/

    +

    SEE ALSO

    +

    a2x(1)

    +

    COPYING

    +

    Copyright (C) 2002-2013 Stuart Rackham.

    +

    Copyright (C) 2013-2020 AsciiDoc Contributors.

    +

    Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2).

    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/asciidoc.1-html5.html asciidoc-10.1.2/tests/data/asciidoc.1-html5.html --- asciidoc-8.6.10/tests/data/asciidoc.1-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciidoc.1-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1166 @@ + + + + + +ASCIIDOC(1) + + + + + +
    +
    +

    SYNOPSIS

    +
    +

    asciidoc [OPTIONS] FILE

    +
    +
    +
    +

    DESCRIPTION

    +
    +

    The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used.

    +
    +
    +
    +

    OPTIONS

    +
    +
    +
    +-a, --attribute=ATTRIBUTE +
    +
    +

    + Define or delete document attribute. ATTRIBUTE is formatted like + NAME=VALUE. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are NAME (the VALUE defaults to an empty string); + NAME! (delete the NAME attribute); NAME=VALUE@ (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This option + may be specified more than once. A special attribute named + trace controls the output of diagnostic information. +

    +
    +
    +-b, --backend=BACKEND +
    +
    +

    + Backend output file format: docbook45, docbook5, xhtml11, html4, + html5, slidy, wordpress or latex (the latex backend is + experimental). You can also use the backend alias names html + (aliased to xhtml11) or docbook (aliased to docbook45). + Defaults to html. The --backend option is also used to manage + backend plugins (see PLUGIN COMMANDS). +

    +
    +
    +-f, --conf-file=CONF_FILE +
    +
    +

    + Use configuration file CONF_FILE.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. +

    +
    +
    +--doctest +
    +
    +

    + Run Python doctests in asciidoc module. +

    +
    +
    +-d, --doctype=DOCTYPE +
    +
    +

    + Document type: article, manpage or book. The book document + type is only supported by the docbook backends. Default document + type is article. +

    +
    +
    +-c, --dump-conf +
    +
    +

    + Dump configuration to stdout. +

    +
    +
    +--filter=FILTER +
    +
    +

    + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more than + once. The --filter option is also used to manage filter plugins + (see PLUGIN COMMANDS). +

    +
    +
    +-h, --help [TOPIC] +
    +
    +

    + Print help TOPIC. --help topics will print a list of help + topics, --help syntax summarizes AsciiDoc syntax, + --help manpage prints the AsciiDoc manpage. +

    +
    +
    +-e, --no-conf +
    +
    +

    + Exclude implicitly loaded configuration files except for those + named like the input file (infile.conf and + infile-backend.conf). +

    +
    +
    +-s, --no-header-footer +
    +
    +

    + Suppress document header and footer output. +

    +
    +
    +-o, --out-file=OUT_FILE +
    +
    +

    + Write output to file OUT_FILE. Defaults to the base name of + input file with backend extension. If the input is stdin then + the outfile defaults to stdout. If OUT_FILE is - then the + standard output is used. +

    +
    +
    +-n, --section-numbers +
    +
    +

    + Auto-number HTML article section titles. Synonym for + --attribute numbered. +

    +
    +
    +--safe +
    +
    +

    + Enable safe mode. Safe mode is disabled by default. AsciiDoc + safe mode skips potentially dangerous scripted sections in + AsciiDoc source files. +

    +
    +
    +--theme=THEME +
    +
    +

    + Specify a theme name. Synonym for --attribute theme=THEME. + The --theme option is also used to manage theme plugins (see + PLUGIN COMMANDS). +

    +
    +
    +-v, --verbose +
    +
    +

    + Verbosely print processing information and configuration file + checks to stderr. +

    +
    +
    +--version +
    +
    +

    + Print program version number. +

    +
    +
    +
    +
    +
    +

    PLUGIN COMMANDS

    +
    +

    The asciidoc(1) --filter, --backend and --theme options are used +to install, remove and list AsciiDoc filter, backend and theme +plugins. Syntax:

    +
    +
    +
    asciidoc OPTION install ZIP_FILE [PLUGINS_DIR]
    +asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR]
    +asciidoc OPTION list
    +asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE
    +
    +

    Where:

    +
    +
    +OPTION +
    +
    +

    + asciidoc(1) --filter, --backend or --theme option specifying + the type of plugin. +

    +
    +
    +PLUGIN_NAME +
    +
    +

    + A unique plugin name containing only alphanumeric or underscore + characters. +

    +
    +
    +ZIP_FILE +
    +
    +

    + A Zip file containing plugin resources, the name must start with the + plugin name e.g. my_filter-1.0.zip packages filter my_filter. +

    +
    +
    +PLUGINS_DIR +
    +
    +

    + The directory containing installed plugins. Each plugin is contained + in its own separate subdirectory which has the same name as the + plugin. + PLUGINS_DIR defaults to the $HOME/.asciidoc/filters (for + filter plugins) or $HOME/.asciidoc/backends (for backend plugins) or + $HOME/.asciidoc/themes (for theme plugins). +

    +
    +
    +PLUGIN_SOURCE +
    +
    +

    + The name of a directory containing the plugin source files or the + name of a single source file. +

    +
    +
    +

    The plugin commands perform as follows:

    +
    +
    +install +
    +
    +

    + Create a subdirectory in PLUGINS_DIR with the same name as the + plugin then extract the ZIP_FILE into it. +

    +
    +
    +remove +
    +
    +

    + Delete the PLUGIN_NAME plugin subdirectory and all its contents + from the PLUGINS_DIR. +

    +
    +
    +list +
    +
    +

    + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). +

    +
    +
    +build +
    +
    +

    + Create a plugin file named ZIP_FILE containing the files and + subdirectories specified by PLUGIN_SOURCE. File and directory + names starting with a period are skipped. +

    +
    +
    +
    +
    +
    +

    ENVIRONMENT VARIABLES

    +
    +
    +
    +SOURCE_DATE_EPOCH +
    +
    +

    + If the SOURCE_DATE_EPOCH environment variable is set to a UNIX + timestamp, then the {docdate}, {doctime}, {localdate}, and + {localtime} attributes are computed in the UTC time zone, with any + timestamps newer than SOURCE_DATE_EPOCH replaced by + SOURCE_DATE_EPOCH. (This helps software using AsciiDoc to build + reproducibly.) +

    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +
    +asciidoc asciidoc_file_name.txt +
    +
    +

    + Simply generate an html file from the asciidoc_file_name.txt that is in + current directory using asciidoc. +

    +
    +
    +asciidoc -b html5 asciidoc_file_name.txt +
    +
    +

    + Use the -b switch to use one of the proposed backend or another one you + installed on your computer. +

    +
    +
    +asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt +
    +
    +

    + Use the -a switch to set attributes from command-line. AsciiDoc generated + its stand-alone HTML user guide containing embedded CSS, JavaScript and + images from the AsciiDoc article template with this command. +

    +
    +
    +asciidoc -b html5 -d manpage asciidoc.1.txt +
    +
    +

    + Generating the asciidoc manpage using the html5 backend. +

    +
    +
    +
    +
    +
    +

    EXIT STATUS

    +
    +
    +
    +0 +
    +
    +

    + Success +

    +
    +
    +1 +
    +
    +

    + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). +

    +
    +
    +
    +
    +
    +

    BUGS

    +
    +

    See the AsciiDoc distribution BUGS file.

    +
    +
    +
    +

    AUTHOR

    +
    +

    AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it.

    +
    +
    +
    +

    RESOURCES

    + +
    +
    +

    SEE ALSO

    +
    +

    a2x(1)

    +
    +
    +
    +

    COPYING

    +
    +

    Copyright (C) 2002-2013 Stuart Rackham.

    +

    Copyright (C) 2013-2020 AsciiDoc Contributors.

    +

    Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2).

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/asciidoc.1-xhtml11.html asciidoc-10.1.2/tests/data/asciidoc.1-xhtml11.html --- asciidoc-8.6.10/tests/data/asciidoc.1-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciidoc.1-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1168 @@ + + + + + + +ASCIIDOC(1) + + + + + +
    +
    +

    SYNOPSIS

    +
    +

    asciidoc [OPTIONS] FILE

    +
    +
    +
    +

    DESCRIPTION

    +
    +

    The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used.

    +
    +
    +
    +

    OPTIONS

    +
    +
    +
    +-a, --attribute=ATTRIBUTE +
    +
    +

    + Define or delete document attribute. ATTRIBUTE is formatted like + NAME=VALUE. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are NAME (the VALUE defaults to an empty string); + NAME! (delete the NAME attribute); NAME=VALUE@ (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This option + may be specified more than once. A special attribute named + trace controls the output of diagnostic information. +

    +
    +
    +-b, --backend=BACKEND +
    +
    +

    + Backend output file format: docbook45, docbook5, xhtml11, html4, + html5, slidy, wordpress or latex (the latex backend is + experimental). You can also use the backend alias names html + (aliased to xhtml11) or docbook (aliased to docbook45). + Defaults to html. The --backend option is also used to manage + backend plugins (see PLUGIN COMMANDS). +

    +
    +
    +-f, --conf-file=CONF_FILE +
    +
    +

    + Use configuration file CONF_FILE.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. +

    +
    +
    +--doctest +
    +
    +

    + Run Python doctests in asciidoc module. +

    +
    +
    +-d, --doctype=DOCTYPE +
    +
    +

    + Document type: article, manpage or book. The book document + type is only supported by the docbook backends. Default document + type is article. +

    +
    +
    +-c, --dump-conf +
    +
    +

    + Dump configuration to stdout. +

    +
    +
    +--filter=FILTER +
    +
    +

    + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more than + once. The --filter option is also used to manage filter plugins + (see PLUGIN COMMANDS). +

    +
    +
    +-h, --help [TOPIC] +
    +
    +

    + Print help TOPIC. --help topics will print a list of help + topics, --help syntax summarizes AsciiDoc syntax, + --help manpage prints the AsciiDoc manpage. +

    +
    +
    +-e, --no-conf +
    +
    +

    + Exclude implicitly loaded configuration files except for those + named like the input file (infile.conf and + infile-backend.conf). +

    +
    +
    +-s, --no-header-footer +
    +
    +

    + Suppress document header and footer output. +

    +
    +
    +-o, --out-file=OUT_FILE +
    +
    +

    + Write output to file OUT_FILE. Defaults to the base name of + input file with backend extension. If the input is stdin then + the outfile defaults to stdout. If OUT_FILE is - then the + standard output is used. +

    +
    +
    +-n, --section-numbers +
    +
    +

    + Auto-number HTML article section titles. Synonym for + --attribute numbered. +

    +
    +
    +--safe +
    +
    +

    + Enable safe mode. Safe mode is disabled by default. AsciiDoc + safe mode skips potentially dangerous scripted sections in + AsciiDoc source files. +

    +
    +
    +--theme=THEME +
    +
    +

    + Specify a theme name. Synonym for --attribute theme=THEME. + The --theme option is also used to manage theme plugins (see + PLUGIN COMMANDS). +

    +
    +
    +-v, --verbose +
    +
    +

    + Verbosely print processing information and configuration file + checks to stderr. +

    +
    +
    +--version +
    +
    +

    + Print program version number. +

    +
    +
    +
    +
    +
    +

    PLUGIN COMMANDS

    +
    +

    The asciidoc(1) --filter, --backend and --theme options are used +to install, remove and list AsciiDoc filter, backend and theme +plugins. Syntax:

    +
    +
    +
    asciidoc OPTION install ZIP_FILE [PLUGINS_DIR]
    +asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR]
    +asciidoc OPTION list
    +asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE
    +
    +

    Where:

    +
    +
    +OPTION +
    +
    +

    + asciidoc(1) --filter, --backend or --theme option specifying + the type of plugin. +

    +
    +
    +PLUGIN_NAME +
    +
    +

    + A unique plugin name containing only alphanumeric or underscore + characters. +

    +
    +
    +ZIP_FILE +
    +
    +

    + A Zip file containing plugin resources, the name must start with the + plugin name e.g. my_filter-1.0.zip packages filter my_filter. +

    +
    +
    +PLUGINS_DIR +
    +
    +

    + The directory containing installed plugins. Each plugin is contained + in its own separate subdirectory which has the same name as the + plugin. + PLUGINS_DIR defaults to the $HOME/.asciidoc/filters (for + filter plugins) or $HOME/.asciidoc/backends (for backend plugins) or + $HOME/.asciidoc/themes (for theme plugins). +

    +
    +
    +PLUGIN_SOURCE +
    +
    +

    + The name of a directory containing the plugin source files or the + name of a single source file. +

    +
    +
    +

    The plugin commands perform as follows:

    +
    +
    +install +
    +
    +

    + Create a subdirectory in PLUGINS_DIR with the same name as the + plugin then extract the ZIP_FILE into it. +

    +
    +
    +remove +
    +
    +

    + Delete the PLUGIN_NAME plugin subdirectory and all its contents + from the PLUGINS_DIR. +

    +
    +
    +list +
    +
    +

    + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). +

    +
    +
    +build +
    +
    +

    + Create a plugin file named ZIP_FILE containing the files and + subdirectories specified by PLUGIN_SOURCE. File and directory + names starting with a period are skipped. +

    +
    +
    +
    +
    +
    +

    ENVIRONMENT VARIABLES

    +
    +
    +
    +SOURCE_DATE_EPOCH +
    +
    +

    + If the SOURCE_DATE_EPOCH environment variable is set to a UNIX + timestamp, then the {docdate}, {doctime}, {localdate}, and + {localtime} attributes are computed in the UTC time zone, with any + timestamps newer than SOURCE_DATE_EPOCH replaced by + SOURCE_DATE_EPOCH. (This helps software using AsciiDoc to build + reproducibly.) +

    +
    +
    +
    +
    +
    +

    EXAMPLES

    +
    +
    +
    +asciidoc asciidoc_file_name.txt +
    +
    +

    + Simply generate an html file from the asciidoc_file_name.txt that is in + current directory using asciidoc. +

    +
    +
    +asciidoc -b html5 asciidoc_file_name.txt +
    +
    +

    + Use the -b switch to use one of the proposed backend or another one you + installed on your computer. +

    +
    +
    +asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt +
    +
    +

    + Use the -a switch to set attributes from command-line. AsciiDoc generated + its stand-alone HTML user guide containing embedded CSS, JavaScript and + images from the AsciiDoc article template with this command. +

    +
    +
    +asciidoc -b html5 -d manpage asciidoc.1.txt +
    +
    +

    + Generating the asciidoc manpage using the html5 backend. +

    +
    +
    +
    +
    +
    +

    EXIT STATUS

    +
    +
    +
    +0 +
    +
    +

    + Success +

    +
    +
    +1 +
    +
    +

    + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). +

    +
    +
    +
    +
    +
    +

    BUGS

    +
    +

    See the AsciiDoc distribution BUGS file.

    +
    +
    +
    +

    AUTHOR

    +
    +

    AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it.

    +
    +
    +
    +

    RESOURCES

    + +
    +
    +

    SEE ALSO

    +
    +

    a2x(1)

    +
    +
    +
    +

    COPYING

    +
    +

    Copyright (C) 2002-2013 Stuart Rackham.

    +

    Copyright (C) 2013-2020 AsciiDoc Contributors.

    +

    Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2).

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/ascii-ids1-docbook5.xml asciidoc-10.1.2/tests/data/ascii-ids1-docbook5.xml --- asciidoc-8.6.10/tests/data/ascii-ids1-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/ascii-ids1-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ + + + + +
    + + 2002-11-25 + +
    +Wstęp żółtej łąki +
    +
    +schön Grüßen +
    +
    +Белые Мотыль +
    +
    diff -Nru asciidoc-8.6.10/tests/data/ascii-ids1-docbook.xml asciidoc-10.1.2/tests/data/ascii-ids1-docbook.xml --- asciidoc-8.6.10/tests/data/ascii-ids1-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/ascii-ids1-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,19 @@ + + + + + +
    + + 2002-11-25 + +
    +Wstęp żółtej łąki +
    +
    +schön Grüßen +
    +
    +Белые Мотыль +
    +
    diff -Nru asciidoc-8.6.10/tests/data/ascii-ids1-html4.html asciidoc-10.1.2/tests/data/ascii-ids1-html4.html --- asciidoc-8.6.10/tests/data/ascii-ids1-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/ascii-ids1-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + + + + +
    +

    Wstęp żółtej łąki

    +
    +

    schön Grüßen

    +
    +

    Белые Мотыль

    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/ascii-ids1-html5.html asciidoc-10.1.2/tests/data/ascii-ids1-html5.html --- asciidoc-8.6.10/tests/data/ascii-ids1-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/ascii-ids1-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,761 @@ + + + + + + + + + + + +
    +
    +

    Wstęp żółtej łąki

    +
    +
    +
    +
    +

    schön Grüßen

    +
    +
    +
    +
    +

    Белые Мотыль

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/ascii-ids1-xhtml11.html asciidoc-10.1.2/tests/data/ascii-ids1-xhtml11.html --- asciidoc-8.6.10/tests/data/ascii-ids1-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/ascii-ids1-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,763 @@ + + + + + + + + + + + + +
    +
    +

    Wstęp żółtej łąki

    +
    +
    +
    +
    +

    schön Grüßen

    +
    +
    +
    +
    +

    Белые Мотыль

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/asciimath-html5.html asciidoc-10.1.2/tests/data/asciimath-html5.html --- asciidoc-8.6.10/tests/data/asciimath-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciimath-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1792 @@ + + + + + +ASCIIMath Formulae + + + + + + +
    +
    +
    +

    ASCIIMath is a clever JavaScript written by +Peter Jipsen that dynamically transforms mathematical formulae +written in a wiki-like plain text markup to +MathML markup which is displayed as +standard mathematical notation by the Web Browser. See Appendix E +in the AsciiDoc User Guide for more details.

    +

    The AsciiDoc xhtml11 backend supports ASCIIMath — it links the +ASCIIMath script and escapes ASCIIMath delimiters and special +characters to yield valid XHTML. To use ASCIIMath:

    +
      +
    1. +

      +Include the -a asciimath command-line option when you run + asciidoc(1). +

      +
    2. +
    3. +

      +Enclose ASCIIMath formulas inside math or double-dollar + passthroughs or in math passthrough blocks. +

      +
    4. +
    +

    Here’s the AsciiDoc source that generated this +page.

    +
    NOTE
      +
    • +

      +When you use the asciimath:[] inline macro you need to escape ] + characters in the formulas with a backslash, escaping is unnecessary + if you use the double-dollar macro (for examples see the second + formula below). +

      +
    • +
    • +

      +See the ASCIIMath website for ASCIIMath + documentation and the latest version. +

      +
    • +
    • +

      +If the formulas don’t appear to be correct you probably need to + install the correct math fonts (see the + ASCIIMath website for details). +

      +
    • +
    • +

      +See the LaTeXMathML page if you prefer to use + LaTeX math formulas. +

      +
    • +
    +

    A list of example formulas:

    +
      +
    • +

      +`[[a,b],[c,d]]((n),(k))` +

      +
    • +
    • +

      +`x/x={(1,if x!=0),(text{undefined},if x=0):}` +

      +
    • +
    • +

      +`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` +

      +
    • +
    • +

      +`sum_(i=1)\^n i=(n(n+1))/2`$ and bold + `int_0\^(pi/2) sinx\ dx=1` +

      +
    • +
    • +

      +`(a,b]={x in RR : a < x <= b}` +

      +
    • +
    • +

      +`x^2+y_1+z_12^34` +

      +
    • +
    +
    +
    +

    The first three terms factor to give +`(x+b/(2a))^2=(b^2)/(4a^2)-c/a`.

    +

    `x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`.

    +

    Now we take square roots on both sides and get +`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`. +Finally we move the `b/(2a)` to the right and simplify to +get the two solutions: +`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`.

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/asciimath-xhtml11.html asciidoc-10.1.2/tests/data/asciimath-xhtml11.html --- asciidoc-8.6.10/tests/data/asciimath-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/asciimath-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1794 @@ + + + + + + +ASCIIMath Formulae + + + + + + +
    +
    +
    +

    ASCIIMath is a clever JavaScript written by +Peter Jipsen that dynamically transforms mathematical formulae +written in a wiki-like plain text markup to +MathML markup which is displayed as +standard mathematical notation by the Web Browser. See Appendix E +in the AsciiDoc User Guide for more details.

    +

    The AsciiDoc xhtml11 backend supports ASCIIMath — it links the +ASCIIMath script and escapes ASCIIMath delimiters and special +characters to yield valid XHTML. To use ASCIIMath:

    +
      +
    1. +

      +Include the -a asciimath command-line option when you run + asciidoc(1). +

      +
    2. +
    3. +

      +Enclose ASCIIMath formulas inside math or double-dollar + passthroughs or in math passthrough blocks. +

      +
    4. +
    +

    Here’s the AsciiDoc source that generated this +page.

    +
    NOTE
      +
    • +

      +When you use the asciimath:[] inline macro you need to escape ] + characters in the formulas with a backslash, escaping is unnecessary + if you use the double-dollar macro (for examples see the second + formula below). +

      +
    • +
    • +

      +See the ASCIIMath website for ASCIIMath + documentation and the latest version. +

      +
    • +
    • +

      +If the formulas don’t appear to be correct you probably need to + install the correct math fonts (see the + ASCIIMath website for details). +

      +
    • +
    • +

      +See the LaTeXMathML page if you prefer to use + LaTeX math formulas. +

      +
    • +
    +

    A list of example formulas:

    +
      +
    • +

      +`[[a,b],[c,d]]((n),(k))` +

      +
    • +
    • +

      +`x/x={(1,if x!=0),(text{undefined},if x=0):}` +

      +
    • +
    • +

      +`d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h` +

      +
    • +
    • +

      +`sum_(i=1)\^n i=(n(n+1))/2`$ and bold + `int_0\^(pi/2) sinx\ dx=1` +

      +
    • +
    • +

      +`(a,b]={x in RR : a < x <= b}` +

      +
    • +
    • +

      +`x^2+y_1+z_12^34` +

      +
    • +
    +
    +
    +

    The first three terms factor to give +`(x+b/(2a))^2=(b^2)/(4a^2)-c/a`.

    +

    `x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`.

    +

    Now we take square roots on both sides and get +`x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)`. +Finally we move the `b/(2a)` to the right and simplify to +get the two solutions: +`x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)`.

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/barchart.py asciidoc-10.1.2/tests/data/barchart.py --- asciidoc-8.6.10/tests/data/barchart.py 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/barchart.py 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -print("No barchart to avoid depending on Pychart for the tests.\n" - "See also: http://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents") diff -Nru asciidoc-8.6.10/tests/data/book-docbook5.xml asciidoc-10.1.2/tests/data/book-docbook5.xml --- asciidoc-8.6.10/tests/data/book-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,215 @@ + + + + + + + Book Title Goes Here + 2003-12 + + + Author's + Name + + + AN + 1.02003-12AN + + +Example Dedication +Optional dedication. +This document is an AsciiDoc book skeleton containing briefly +annotated example elements plus a couple of example index entries and +footnotes. +Books are normally used to generate DocBook markup and the titles of +the preface, appendix, bibliography, glossary and index sections are +significant (specialsections). + + +Example Preface +Optional preface. +
    +Preface Sub-section +Preface sub-section body. +
    +
    + +The First Chapter +Chapters can contain sub-sections nested up to three deep. +An example footnote. + + Example index entry + +Chapters can have their own bibliography, glossary and index. +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +Chapter Sub-section +Sub-section at level 3. +
    +Chapter Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    + +The Second Chapter +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . + + +The Third Chapter +Book chapters are at level 1 and can contain sub-sections. + + +Example Appendix +One or more optional appendixes go here at section level 1. +
    +Appendix Sub-section +Sub-section body. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. +Books + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + +Articles + + +[abc2003] Gall Anonim. An article, Whatever. 2003. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Example Colophon +Text at the end of a book describing facts about its production. + + +Example Index + +
    diff -Nru asciidoc-8.6.10/tests/data/book-docbook.xml asciidoc-10.1.2/tests/data/book-docbook.xml --- asciidoc-8.6.10/tests/data/book-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,214 @@ + + + + + + + + Book Title Goes Here + 2003-12 + + Author's + Name + + AN +1.02003-12AN + + +Example Dedication +Optional dedication. +This document is an AsciiDoc book skeleton containing briefly +annotated example elements plus a couple of example index entries and +footnotes. +Books are normally used to generate DocBook markup and the titles of +the preface, appendix, bibliography, glossary and index sections are +significant (specialsections). + + +Example Preface +Optional preface. +
    +Preface Sub-section +Preface sub-section body. +
    +
    + +The First Chapter +Chapters can contain sub-sections nested up to three deep. +An example footnote. + + Example index entry + +Chapters can have their own bibliography, glossary and index. +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +Chapter Sub-section +Sub-section at level 3. +
    +Chapter Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    + +The Second Chapter +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . + + +The Third Chapter +Book chapters are at level 1 and can contain sub-sections. + + +Example Appendix +One or more optional appendixes go here at section level 1. +
    +Appendix Sub-section +Sub-section body. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. +Books + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + +Articles + + +[abc2003] Gall Anonim. An article, Whatever. 2003. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Example Colophon +Text at the end of a book describing facts about its production. + + +Example Index + +
    diff -Nru asciidoc-8.6.10/tests/data/book-html4.html asciidoc-10.1.2/tests/data/book-html4.html --- asciidoc-8.6.10/tests/data/book-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,158 @@ + + + + + +Book Title Goes Here + + +

    Book Title Goes Here

    +

    +Author's Name
    +version 1.0, +2003-12 +

    +
    +

    1. Example Dedication

    +

    Optional dedication.

    +

    This document is an AsciiDoc book skeleton containing briefly +annotated example elements plus a couple of example index entries and +footnotes.

    +

    Books are normally used to generate DocBook markup and the titles of +the preface, appendix, bibliography, glossary and index sections are +significant (specialsections).

    +
    +

    2. Example Preface

    +

    Optional preface.

    +

    2.1. Preface Sub-section

    +

    Preface sub-section body.

    +
    +

    3. The First Chapter

    +

    Chapters can contain sub-sections nested up to three deep. +
    [An example footnote.]

    +

    Chapters can have their own bibliography, glossary and index.

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an images/smallnew.png +example inline image followed by an example block image:

    +
    +Tiger image +

    Figure 1. Tiger block image

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. An example table

    +
    + +
    +

    Lorum ipum…

    +
    +

    Example 1. An example example

    +

    3.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +

    3.1.1. Chapter Sub-section

    +

    Sub-section at level 3.

    +
    Chapter Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +

    4. The Second Chapter

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +

    5. The Third Chapter

    +

    Book chapters are at level 1 and can contain sub-sections.

    +
    +

    Appendix A: Example Appendix

    +

    One or more optional appendixes go here at section level 1.

    +

    Appendix Sub-section

    +

    Sub-section body.

    +
    +

    Example Bibliography

    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +

    Books

      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +

    Articles

      +
    • +

      +[abc2003] Gall Anonim. An article, Whatever. 2003. +

      +
    • +
    +
    +

    Example Glossary

    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +

    Example Colophon

    +

    Text at the end of a book describing facts about its production.

    +
    +

    Example Index

    +

    +

    +

    +Version 1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/book-html5.html asciidoc-10.1.2/tests/data/book-html5.html --- asciidoc-8.6.10/tests/data/book-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,930 @@ + + + + + +Book Title Goes Here + + + + + +
    +
    +

    1. Example Dedication

    +
    +

    Optional dedication.

    +

    This document is an AsciiDoc book skeleton containing briefly +annotated example elements plus a couple of example index entries and +footnotes.

    +

    Books are normally used to generate DocBook markup and the titles of +the preface, appendix, bibliography, glossary and index sections are +significant (specialsections).

    +
    +
    +
    +

    2. Example Preface

    +
    +

    Optional preface.

    +
    +

    2.1. Preface Sub-section

    +

    Preface sub-section body.

    +
    +
    +
    +
    +

    3. The First Chapter

    +
    +

    Chapters can contain sub-sections nested up to three deep. +
    [An example footnote.]

    +

    Chapters can have their own bibliography, glossary and index.

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    3.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    3.1.1. Chapter Sub-section

    +

    Sub-section at level 3.

    +
    +
    Chapter Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    4. The Second Chapter

    +
    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +
    +

    5. The Third Chapter

    +
    +

    Book chapters are at level 1 and can contain sub-sections.

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    One or more optional appendixes go here at section level 1.

    +
    +

    Appendix Sub-section

    +

    Sub-section body.

    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
    Books
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    Articles
      +
    • +

      +[abc2003] Gall Anonim. An article, Whatever. 2003. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    Example Colophon

    +
    +

    Text at the end of a book describing facts about its production.

    +
    +
    +
    +

    Example Index

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/book-multi-docbook5.xml asciidoc-10.1.2/tests/data/book-multi-docbook5.xml --- asciidoc-8.6.10/tests/data/book-multi-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-multi-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,231 @@ + + + + + + + Multi-Part Book Title Goes Here + 2003-12 + + + Author's + Name + + + AN + 1.02003-12AN + + +Example Dedication +The optional dedication goes here. +This document is an AsciiDoc multi-part book skeleton containing +briefly annotated element placeholders plus a couple of example index +entries and footnotes. Books are normally used to generate DocBook +markup and the preface, appendix, bibliography, glossary and index +section titles are significant (specialsections). +Multi-part books differ from all other AsciiDoc document formats +in that top level sections (dedication, preface, book parts, +appendices, bibliography, glossary, index) must be level zero headings +(not level one). + + +Example Preface +The optional book preface goes here at section level zero. +
    +Preface Sub-section +Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents. +
    +
    + +The First Part of the Book + +Optional part introduction title +Optional part introduction goes here. + + +The First Chapter +Chapters can be grouped by preceding them with a level 0 Book Part +title. +Book chapters are at level 1 and can contain sub-sections nested up to +three deep. +An example footnote. + + Example index entry + +It’s also worth noting that a book part can have it’s own preface, +bibliography, glossary and index. Chapters can have their own +bibliography, glossary and index. +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +Chapter Sub-section +Sub-section at level 3. +
    +Chapter Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    + +The Second Chapter +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . + +
    + +The Second Part of the Book + +The First Chapter of the Second Part +Chapters grouped into book parts are at level 1 and can contain +sub-sections. + + + +Example Appendix +One or more optional appendixes go here at section level zero. +
    +Appendix Sub-section +Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Example Colophon +Text at the end of a book describing facts about its production. + + +Example Index + +
    diff -Nru asciidoc-8.6.10/tests/data/book-multi-docbook.xml asciidoc-10.1.2/tests/data/book-multi-docbook.xml --- asciidoc-8.6.10/tests/data/book-multi-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-multi-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,230 @@ + + + + + + + + Multi-Part Book Title Goes Here + 2003-12 + + Author's + Name + + AN +1.02003-12AN + + +Example Dedication +The optional dedication goes here. +This document is an AsciiDoc multi-part book skeleton containing +briefly annotated element placeholders plus a couple of example index +entries and footnotes. Books are normally used to generate DocBook +markup and the preface, appendix, bibliography, glossary and index +section titles are significant (specialsections). +Multi-part books differ from all other AsciiDoc document formats +in that top level sections (dedication, preface, book parts, +appendices, bibliography, glossary, index) must be level zero headings +(not level one). + + +Example Preface +The optional book preface goes here at section level zero. +
    +Preface Sub-section +Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents. +
    +
    + +The First Part of the Book + +Optional part introduction title +Optional part introduction goes here. + + +The First Chapter +Chapters can be grouped by preceding them with a level 0 Book Part +title. +Book chapters are at level 1 and can contain sub-sections nested up to +three deep. +An example footnote. + + Example index entry + +It’s also worth noting that a book part can have it’s own preface, +bibliography, glossary and index. Chapters can have their own +bibliography, glossary and index. +And now for something completely different: monkeysmonkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + Big catsLions + + + Lions + + + Big catsTigersBengal Tiger + + + TigersBengal Tiger + + + Bengal Tiger + + + Big catsTigersSiberian Tiger + + + TigersSiberian Tiger + + + Siberian Tiger + +Note that multi-entry terms generate separate index entries. +Here are a couple of image examples: an + + + + images/smallnew.png + +example inline image followed by an example block image: +
    Tiger block image + + + + + Tiger image + +
    +Followed by an example table: + +An example table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    + +An example example +Lorum ipum… + +
    +Sub-section with Anchor +Sub-section at level 2. +
    +Chapter Sub-section +Sub-section at level 3. +
    +Chapter Sub-section +Sub-section at level 4. +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +A second example footnote. +
    +
    +
    +
    + +The Second Chapter +An example link to anchor at start of the first sub-section. + + Second example index entry + +An example link to a bibliography entry . + +
    + +The Second Part of the Book + +The First Chapter of the Second Part +Chapters grouped into book parts are at level 1 and can contain +sub-sections. + + + +Example Appendix +One or more optional appendixes go here at section level zero. +
    +Appendix Sub-section +Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents. +
    +
    + +Example Bibliography +The bibliography list is a style of AsciiDoc bulleted list. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Example Glossary +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Example Colophon +Text at the end of a book describing facts about its production. + + +Example Index + +
    diff -Nru asciidoc-8.6.10/tests/data/book-multi-html4.html asciidoc-10.1.2/tests/data/book-multi-html4.html --- asciidoc-8.6.10/tests/data/book-multi-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-multi-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,187 @@ + + + + + +Multi-Part Book Title Goes Here + + +

    Multi-Part Book Title Goes Here

    +

    +Author's Name
    +version 1.0, +2003-12 +

    +
    +

    Example Dedication

    +

    The optional dedication goes here.

    +

    This document is an AsciiDoc multi-part book skeleton containing +briefly annotated element placeholders plus a couple of example index +entries and footnotes. Books are normally used to generate DocBook +markup and the preface, appendix, bibliography, glossary and index +section titles are significant (specialsections).

    + + + +
    +

    Note

    +
    Multi-part books differ from all other AsciiDoc document formats +in that top level sections (dedication, preface, book parts, +appendices, bibliography, glossary, index) must be level zero headings +(not level one).
    +
    +

    Example Preface

    +

    The optional book preface goes here at section level zero.

    +

    0.1. Preface Sub-section

    + + + +
    +

    Note

    +
    Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents.
    +
    +

    The First Part of the Book

    +
    +

    Optional part introduction title

    +

    Optional part introduction goes here.

    +
    +
    +

    1. The First Chapter

    +

    Chapters can be grouped by preceding them with a level 0 Book Part +title.

    +

    Book chapters are at level 1 and can contain sub-sections nested up to +three deep. +
    [An example footnote.]

    +

    It’s also worth noting that a book part can have it’s own preface, +bibliography, glossary and index. Chapters can have their own +bibliography, glossary and index.

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an images/smallnew.png +example inline image followed by an example block image:

    +
    +Tiger image +

    Figure 1. Tiger block image

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. An example table

    +
    + +
    +

    Lorum ipum…

    +
    +

    Example 1. An example example

    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +

    1.1.1. Chapter Sub-section

    +

    Sub-section at level 3.

    +
    Chapter Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +

    2. The Second Chapter

    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +

    The Second Part of the Book

    +
    +

    1. The First Chapter of the Second Part

    +

    Chapters grouped into book parts are at level 1 and can contain +sub-sections.

    +
    +

    Appendix A: Example Appendix

    +

    One or more optional appendixes go here at section level zero.

    +

    Appendix Sub-section

    + + + +
    +

    Note

    +
    Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents.
    +
    +

    Example Bibliography

    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Example Glossary

    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +

    Example Colophon

    +

    Text at the end of a book describing facts about its production.

    +
    +

    Example Index

    +

    +

    +

    +Version 1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/book-multi-html5.html asciidoc-10.1.2/tests/data/book-multi-html5.html --- asciidoc-8.6.10/tests/data/book-multi-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-multi-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,964 @@ + + + + + +Multi-Part Book Title Goes Here + + + + + +
    +
    +

    Example Dedication

    +
    +

    The optional dedication goes here.

    +

    This document is an AsciiDoc multi-part book skeleton containing +briefly annotated element placeholders plus a couple of example index +entries and footnotes. Books are normally used to generate DocBook +markup and the preface, appendix, bibliography, glossary and index +section titles are significant (specialsections).

    +
    + + + +
    +
    Note
    +
    Multi-part books differ from all other AsciiDoc document formats +in that top level sections (dedication, preface, book parts, +appendices, bibliography, glossary, index) must be level zero headings +(not level one).
    +
    +
    +
    +
    +

    Example Preface

    +
    +

    The optional book preface goes here at section level zero.

    +
    +

    0.1. Preface Sub-section

    +
    + + + +
    +
    Note
    +
    Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents.
    +
    +
    +
    +
    +

    The First Part of the Book

    +
    +
    Optional part introduction title
    +
    +

    Optional part introduction goes here.

    +
    +
    +

    1. The First Chapter

    +
    +

    Chapters can be grouped by preceding them with a level 0 Book Part +title.

    +

    Book chapters are at level 1 and can contain sub-sections nested up to +three deep. +
    [An example footnote.]

    +

    It’s also worth noting that a book part can have it’s own preface, +bibliography, glossary and index. Chapters can have their own +bibliography, glossary and index.

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    1.1.1. Chapter Sub-section

    +

    Sub-section at level 3.

    +
    +
    Chapter Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    2. The Second Chapter

    +
    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +

    The Second Part of the Book

    +
    +

    1. The First Chapter of the Second Part

    +
    +

    Chapters grouped into book parts are at level 1 and can contain +sub-sections.

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    One or more optional appendixes go here at section level zero.

    +
    +

    Appendix Sub-section

    +
    + + + +
    +
    Note
    +
    Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents.
    +
    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    Example Colophon

    +
    +

    Text at the end of a book describing facts about its production.

    +
    +
    +
    +

    Example Index

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/book-multi-xhtml11.html asciidoc-10.1.2/tests/data/book-multi-xhtml11.html --- asciidoc-8.6.10/tests/data/book-multi-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-multi-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,968 @@ + + + + + + +Multi-Part Book Title Goes Here + + + + + +
    +
    +

    Example Dedication

    +
    +

    The optional dedication goes here.

    +

    This document is an AsciiDoc multi-part book skeleton containing +briefly annotated element placeholders plus a couple of example index +entries and footnotes. Books are normally used to generate DocBook +markup and the preface, appendix, bibliography, glossary and index +section titles are significant (specialsections).

    +
    + + + +
    +
    Note
    +
    Multi-part books differ from all other AsciiDoc document formats +in that top level sections (dedication, preface, book parts, +appendices, bibliography, glossary, index) must be level zero headings +(not level one).
    +
    +
    +
    +
    +

    Example Preface

    +
    +

    The optional book preface goes here at section level zero.

    +
    +

    0.1. Preface Sub-section

    +
    + + + +
    +
    Note
    +
    Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents.
    +
    +
    +
    +
    +

    The First Part of the Book

    +
    +
    Optional part introduction title
    +
    +

    Optional part introduction goes here.

    +
    +
    +

    1. The First Chapter

    +
    +

    Chapters can be grouped by preceding them with a level 0 Book Part +title.

    +

    Book chapters are at level 1 and can contain sub-sections nested up to +three deep. +
    [An example footnote.]

    +

    It’s also worth noting that a book part can have it’s own preface, +bibliography, glossary and index. Chapters can have their own +bibliography, glossary and index.

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    1.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    1.1.1. Chapter Sub-section

    +

    Sub-section at level 3.

    +
    +
    Chapter Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    2. The Second Chapter

    +
    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +

    The Second Part of the Book

    +
    +

    1. The First Chapter of the Second Part

    +
    +

    Chapters grouped into book parts are at level 1 and can contain +sub-sections.

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    One or more optional appendixes go here at section level zero.

    +
    +

    Appendix Sub-section

    +
    + + + +
    +
    Note
    +
    Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents.
    +
    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    Example Colophon

    +
    +

    Text at the end of a book describing facts about its production.

    +
    +
    +
    +

    Example Index

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/book-xhtml11.html asciidoc-10.1.2/tests/data/book-xhtml11.html --- asciidoc-8.6.10/tests/data/book-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/book-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,934 @@ + + + + + + +Book Title Goes Here + + + + + +
    +
    +

    1. Example Dedication

    +
    +

    Optional dedication.

    +

    This document is an AsciiDoc book skeleton containing briefly +annotated example elements plus a couple of example index entries and +footnotes.

    +

    Books are normally used to generate DocBook markup and the titles of +the preface, appendix, bibliography, glossary and index sections are +significant (specialsections).

    +
    +
    +
    +

    2. Example Preface

    +
    +

    Optional preface.

    +
    +

    2.1. Preface Sub-section

    +

    Preface sub-section body.

    +
    +
    +
    +
    +

    3. The First Chapter

    +
    +

    Chapters can contain sub-sections nested up to three deep. +
    [An example footnote.]

    +

    Chapters can have their own bibliography, glossary and index.

    +

    And now for something completely different: monkeys, lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. + + + +Note that multi-entry terms generate separate index entries.

    +

    Here are a couple of image examples: an +images/smallnew.png + +example inline image followed by an example block image:

    +
    +
    +Tiger image +
    +
    Figure 1. Tiger block image
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. An example table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +
    +
    Example 1. An example example
    +
    +

    Lorum ipum…

    +
    +
    +

    3.1. Sub-section with Anchor

    +

    Sub-section at level 2.

    +
    +

    3.1.1. Chapter Sub-section

    +

    Sub-section at level 3.

    +
    +
    Chapter Sub-section
    +

    Sub-section at level 4.

    +

    This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +
    [A second example footnote.]

    +
    +
    +
    +
    +
    +
    +

    4. The Second Chapter

    +
    +

    An example link to anchor at start of the first sub-section.

    +

    An example link to a bibliography entry [taoup].

    +
    +
    +
    +

    5. The Third Chapter

    +
    +

    Book chapters are at level 1 and can contain sub-sections.

    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    One or more optional appendixes go here at section level 1.

    +
    +

    Appendix Sub-section

    +

    Sub-section body.

    +
    +
    +
    +
    +

    Example Bibliography

    +
    +

    The bibliography list is a style of AsciiDoc bulleted list.

    +
    Books
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    Articles
      +
    • +

      +[abc2003] Gall Anonim. An article, Whatever. 2003. +

      +
    • +
    +
    +
    +
    +

    Example Glossary

    +
    +

    Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    Example Colophon

    +
    +

    Text at the end of a book describing facts about its production.

    +
    +
    +
    +

    Example Index

    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/deprecated-quotes-docbook5.xml asciidoc-10.1.2/tests/data/deprecated-quotes-docbook5.xml --- asciidoc-8.6.10/tests/data/deprecated-quotes-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/deprecated-quotes-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ + + + + +
    + + 2002-11-25 + +fun with text. +fun with text. +fun with text. +More fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text. +
    diff -Nru asciidoc-8.6.10/tests/data/deprecated-quotes-docbook.xml asciidoc-10.1.2/tests/data/deprecated-quotes-docbook.xml --- asciidoc-8.6.10/tests/data/deprecated-quotes-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/deprecated-quotes-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,19 @@ + + + + + +
    + + 2002-11-25 + +fun with text. +fun with text. +fun with text. +More fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text. +
    diff -Nru asciidoc-8.6.10/tests/data/deprecated-quotes-html4.html asciidoc-10.1.2/tests/data/deprecated-quotes-html4.html --- asciidoc-8.6.10/tests/data/deprecated-quotes-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/deprecated-quotes-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + + + + +

    fun with text. +fun with text. +fun with text. +More fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text.

    +

    Yet more fun with text.

    +

    Yet more fun with text.

    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/deprecated-quotes-html5.html asciidoc-10.1.2/tests/data/deprecated-quotes-html5.html --- asciidoc-8.6.10/tests/data/deprecated-quotes-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/deprecated-quotes-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,755 @@ + + + + + + + + + + + +
    +

    fun with text. +fun with text. +fun with text. +More fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text.

    +

    Yet more fun with text.

    +

    Yet more fun with text.

    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/deprecated-quotes.txt asciidoc-10.1.2/tests/data/deprecated-quotes.txt --- asciidoc-8.6.10/tests/data/deprecated-quotes.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/deprecated-quotes.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -// Deprecated quote attributes. -[role="foo"]##fun with text##. -["green","yellow",2,role="foo"]##fun with text##. -[green,yellow,2]##fun with text##. -More [red,black,4]*fun with text*. -Yet more [red,,1.5]**fun with text**. -Yet more [red,,1.5]+fun with text+. -Yet more [red,,1.5]'fun with text'. - -Yet more [red,,1.5]_fun with text_. - -Yet more [orange]'fun with text'. diff -Nru asciidoc-8.6.10/tests/data/deprecated-quotes-xhtml11.html asciidoc-10.1.2/tests/data/deprecated-quotes-xhtml11.html --- asciidoc-8.6.10/tests/data/deprecated-quotes-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/deprecated-quotes-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,757 @@ + + + + + + + + + + + + +
    +

    fun with text. +fun with text. +fun with text. +More fun with text. +Yet more fun with text. +Yet more fun with text. +Yet more fun with text.

    +

    Yet more fun with text.

    +

    Yet more fun with text.

    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/filters-test-docbook5.xml asciidoc-10.1.2/tests/data/filters-test-docbook5.xml --- asciidoc-8.6.10/tests/data/filters-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/filters-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,73 @@ + + + + +
    + + Filter Tests + +
    +Toy filter example from User Guide +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +
    +
    +Pychart Chart generations from FAQ +No barchart to avoid depending on Pychart for the tests. +See also: https://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents + + + + + + barchart.png + + +
    +
    +Graphviz Graphs +
    Simple graph + + + + + Graphviz->AsciiDoc->HTML + +
    +
    Not so simple graph + + + + + graphviz2.png + +
    +
    +
    +Music filter +
    A tune generated from ABC notation + + + + + music1.png + +
    +Link to following fragment. +
    A fragment generated from LilyPond source + + + + + music2.png + +
    +
    +
    diff -Nru asciidoc-8.6.10/tests/data/filters-test-docbook.xml asciidoc-10.1.2/tests/data/filters-test-docbook.xml --- asciidoc-8.6.10/tests/data/filters-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/filters-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,74 @@ + + + + + +
    + + Filter Tests + +
    +Toy filter example from User Guide +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +
    +
    +Pychart Chart generations from FAQ +No barchart to avoid depending on Pychart for the tests. +See also: https://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents + + + + + + barchart.png + + +
    +
    +Graphviz Graphs +
    Simple graph + + + + + Graphviz->AsciiDoc->HTML + +
    +
    Not so simple graph + + + + + graphviz2.png + +
    +
    +
    +Music filter +
    A tune generated from ABC notation + + + + + music1.png + +
    +Link to following fragment. +
    A fragment generated from LilyPond source + + + + + music2.png + +
    +
    +
    diff -Nru asciidoc-8.6.10/tests/data/filters-test-html4.html asciidoc-10.1.2/tests/data/filters-test-html4.html --- asciidoc-8.6.10/tests/data/filters-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/filters-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,63 @@ + + + + + +Filter Tests + + +

    Filter Tests

    +

    +

    +
    +

    Toy filter example from User Guide

    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')   # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
    +
    +

    Pychart Chart generations from FAQ

    +

    No barchart to avoid depending on Pychart for the tests. +See also: https://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents

    +
    +barchart.png +
    +
    +

    Graphviz Graphs

    +
    +Graphviz->AsciiDoc->HTML +

    Figure 1. Simple graph

    +
    +
    +graphviz2.png +

    Figure 2. Not so simple graph

    +
    +
    +

    Music filter

    +
    +music1.png +

    Figure 3. A tune generated from ABC notation

    +
    +

    Link to following fragment.

    +
    + + +music2.png + +

    Figure 4. A fragment generated from LilyPond source

    +
    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/filters-test-html5.html asciidoc-10.1.2/tests/data/filters-test-html5.html --- asciidoc-8.6.10/tests/data/filters-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/filters-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,813 @@ + + + + + +Filter Tests + + + + + +
    +
    +

    Toy filter example from User Guide

    +
    +
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')   # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
    +
    +
    +
    +

    Pychart Chart generations from FAQ

    +
    +

    No barchart to avoid depending on Pychart for the tests. +See also: https://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents

    +
    +
    +barchart.png +
    +
    +
    +
    +
    +

    Graphviz Graphs

    +
    +
    +
    +Graphviz->AsciiDoc->HTML +
    +
    Figure 1. Simple graph
    +
    +
    +
    +graphviz2.png +
    +
    Figure 2. Not so simple graph
    +
    +
    +
    +
    +

    Music filter

    +
    +
    +
    +music1.png +
    +
    Figure 3. A tune generated from ABC notation
    +
    + +
    +
    + +music2.png + +
    +
    Figure 4. A fragment generated from LilyPond source
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/filters-test.txt asciidoc-10.1.2/tests/data/filters-test.txt --- asciidoc-8.6.10/tests/data/filters-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/filters-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -Filter Tests -============ - - -== Toy filter example from User Guide - -[code,python] ----------------------------------------------- -''' A multi-line - comment.''' -def sub_word(mo): - ''' Single line comment.''' - word = mo.group('word') # Inline comment - if word in keywords[language]: - return quote + word + quote - else: - return word ----------------------------------------------- - - -== Pychart Chart generations from FAQ - -// Generate chart image file. -sys2::[python "{indir}/barchart.py" --format=png --output="{outdir={indir}}/{imagesdir=}{imagesdir?/}barchart.png" --scale=2] - -// Display chart image file. -image::barchart.png[] - - -== Graphviz Graphs - -.Simple graph -["graphviz", "graphviz1.png", alt="Graphviz->AsciiDoc->HTML"] ---------------------------------------------------------------------- -digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} ---------------------------------------------------------------------- - -.Not so simple graph -["graphviz", "graphviz2.png"] ---------------------------------------------------------------------- -digraph automata_0 { - size ="8.5, 11"; - node [shape = circle]; - 0 [ style = filled, color=lightgrey ]; - 2 [ shape = doublecircle ]; - 0 -> 2 [ label = "a " ]; - 0 -> 1 [ label = "other " ]; - 1 -> 2 [ label = "a " ]; - 1 -> 1 [ label = "other " ]; - 2 -> 2 [ label = "a " ]; - 2 -> 1 [ label = "other " ]; - "Machine: a" [ shape = plaintext ]; -} ---------------------------------------------------------------------- - - -== Music filter - -.A tune generated from ABC notation -[music,music1.png] ---------------------------------------------------------------------- -T:The Butterfly -R:slip jig -C:Tommy Potts -H:Fiddle player Tommy Potts made this tune from two older slip jigs, -H:one of which is called "Skin the Peelers" in Roche's collection. -D:Bothy Band: 1975. -M:9/8 -K:Em -vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:| -|:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):| -|:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):| ---------------------------------------------------------------------- - -<>. - -[[X1]] -.A fragment generated from LilyPond source -["music", "music2.png", "ly", link="music2.ly"] ---------------------------------------------------------------------- -\version "2.10.0" -\paper { - ragged-right = ##t -} -{ - \time 3/4 - \clef bass - c2 e4 g2. f4 e d c2 r4 -} ---------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/tests/data/filters-test-xhtml11.html asciidoc-10.1.2/tests/data/filters-test-xhtml11.html --- asciidoc-8.6.10/tests/data/filters-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/filters-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,815 @@ + + + + + + +Filter Tests + + + + + +
    +
    +

    Toy filter example from User Guide

    +
    +
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')   # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
    +
    +
    +
    +

    Pychart Chart generations from FAQ

    +
    +

    No barchart to avoid depending on Pychart for the tests. +See also: https://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents

    +
    +
    +barchart.png +
    +
    +
    +
    +
    +

    Graphviz Graphs

    +
    +
    +
    +Graphviz->AsciiDoc->HTML +
    +
    Figure 1. Simple graph
    +
    +
    +
    +graphviz2.png +
    +
    Figure 2. Not so simple graph
    +
    +
    +
    +
    +

    Music filter

    +
    +
    +
    +music1.png +
    +
    Figure 3. A tune generated from ABC notation
    +
    + +
    +
    + +music2.png + +
    +
    Figure 4. A fragment generated from LilyPond source
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/include-lines-html5.html asciidoc-10.1.2/tests/data/include-lines-html5.html --- asciidoc-8.6.10/tests/data/include-lines-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/include-lines-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,901 @@ + + + + + +include line test + + + + + +
    +
    +
    +

    The imports:

    +
    +
    +
    import difflib
    +import io
    +import os
    +from pathlib import Path
    +import re
    +import shutil
    +import sys
    +
    +sys.path.append(str(Path(__file__).resolve().parent.parent))
    +from asciidoc import asciidoc  # noqa: E402
    +

    Some random ranges:

    +
    +
    +
    def iif(condition, iftrue, iffalse=None):
    +    """
    +    Immediate if c.f. ternary ?: operator.
    +    False value defaults to '' if the true value is a string.
    +    False value defaults to 0 if the true value is a number.
    +    """
    +    if iffalse is None:
    +        if isinstance(iftrue, str):
    +            iffalse = ''
    +        if type(iftrue) in (int, float):
    +            iffalse = 0
    +    if condition:
    +        return iftrue
    +    else:
    +        return iffalse
    +
    +def normalize_data(lines):
    +    """
    +    Strip comments and trailing blank strings from lines.
    +    """
    +    result = [s for s in lines if not s.startswith('#')]
    +    strip_end(result)
    +    return result
    +
    +class AsciiDocTest(object):
    +
    +if __name__ == '__main__':
    +    # guarantee a stable timestamp matching the test fixtures
    +    os.environ['SOURCE_DATE_EPOCH'] = '1038184662'
    +    # Process command line options.
    +    from argparse import ArgumentParser
    +    parser = ArgumentParser(
    +        description='Run AsciiDoc conformance tests specified in configuration'
    +        'FILE.'
    +    )
    +    msg = 'Use configuration file CONF_FILE (default configuration file is '\
    +        'testasciidoc.conf in testasciidoc.py directory)'
    +    parser.add_argument(
    +        '-v',
    +        '--version',
    +        action='version',
    +        version='%(prog)s {}'.format(__version__)
    +    )
    +    parser.add_argument('-f', '--conf-file', help=msg)
    +
    +    subparsers = parser.add_subparsers(metavar='command', dest='command')
    +    subparsers.required = True
    +
    +    subparsers.add_parser('list', help='List tests')
    +
    +    options = ArgumentParser(add_help=False)
    +    options.add_argument('-n', '--number', type=int, help='Test number to run')
    +    options.add_argument('-b', '--backend', type=str, help='Backend to run')
    +
    +    subparsers.add_parser('run', help='Execute tests', parents=[options])
    +
    +    subparser = subparsers.add_parser(
    +        'update',
    +        help='Regenerate and update test data',
    +        parents=[options]
    +    )
    +    subparser.add_argument(
    +        '--force',
    +        action='store_true',
    +        help='Update all test data overwriting existing data'
    +    )
    +
    +    args = parser.parse_args()
    +
    +    conffile = os.path.join(os.path.dirname(sys.argv[0]), 'testasciidoc.conf')
    +    force = 'force' in args and args.force is True
    +    if args.conf_file is not None:
    +        conffile = args.conf_file
    +    if not os.path.isfile(conffile):
    +        message('missing CONF_FILE: %s' % conffile)
    +        sys.exit(1)
    +    tests = AsciiDocTests(conffile)
    +    cmd = args.command
    +    number = None
    +    backend = None
    +    if 'number' in args:
    +        number = args.number
    +    if 'backend' in args:
    +        backend = args.backend
    +    if backend and backend not in BACKENDS:
    +        message('illegal BACKEND: {:s}'.format(backend))
    +        sys.exit(1)
    +    if number is not None and (number < 1 or number > len(tests.tests)):
    +        message('illegal test NUMBER: {:d}'.format(number))
    +        sys.exit(1)
    +    if cmd == 'run':
    +        tests.run(number, backend)
    +        if tests.failed:
    +            sys.exit(1)
    +    elif cmd == 'update':
    +        tests.update(number, backend, force=force)
    +    elif cmd == 'list':
    +        tests.list()
    +

    Using ; as separator:

    +
    +
    +
    def iif(condition, iftrue, iffalse=None):
    +    """
    +    Immediate if c.f. ternary ?: operator.
    +    False value defaults to '' if the true value is a string.
    +    False value defaults to 0 if the true value is a number.
    +    """
    +    if iffalse is None:
    +        if isinstance(iftrue, str):
    +            iffalse = ''
    +        if type(iftrue) in (int, float):
    +            iffalse = 0
    +    if condition:
    +        return iftrue
    +    else:
    +        return iffalse
    +
    +def normalize_data(lines):
    +    """
    +    Strip comments and trailing blank strings from lines.
    +    """
    +    result = [s for s in lines if not s.startswith('#')]
    +    strip_end(result)
    +    return result
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-cs-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-cs-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + +
    +Abstract +Abstract special section. +
    +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    +
    +Appendice A: Example Appendix +Appendix special section. +
    +
    +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + +
    +
    +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + +
    + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-cs-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-cs-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-cs-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,119 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + +
    +Abstract +Abstract special section. +
    +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    +
    +Appendice A: Example Appendix +Appendix special section. +
    +
    +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + +
    +
    +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + +
    + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-cs-article-test-html4.html asciidoc-10.1.2/tests/data/lang-cs-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-cs-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Abstract

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Poznámka

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Varování

    +
    Lorum ipsum.
    + + + +
    +

    Pozor

    +
    Lorum ipsum.
    + + + +
    +

    Důležité

    +
    Lorum ipsum.
    +
    +Tiger image +

    Obrázek 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabulka 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Verze v1.0
    +Poslední úprava + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-article-test-html5.html asciidoc-10.1.2/tests/data/lang-cs-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-cs-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Poznámka
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varování
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Pozor
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Důležité
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Obrázek 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabulka 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-cs-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-cs-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Poznámka
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varování
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Pozor
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Důležité
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Obrázek 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabulka 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-cs-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-cs-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedica +Dedication special section. + + +Prefazione +Preface special section. + + +Colofone +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Appendice A: Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-cs-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-cs-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-cs-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedica +Dedication special section. + + +Prefazione +Preface special section. + + +Colofone +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Appendice A: Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-cs-book-test-html4.html asciidoc-10.1.2/tests/data/lang-cs-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-cs-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedica

    +

    Dedication special section.

    +
    +

    Prefazione

    +

    Preface special section.

    +
    +

    Colofone

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Poznámka

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Varování

    +
    Lorum ipsum.
    + + + +
    +

    Pozor

    +
    Lorum ipsum.
    + + + +
    +

    Důležité

    +
    Lorum ipsum.
    +
    +Tiger image +

    Obrázek 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabulka 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Verze v1.0
    +Poslední úprava + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-book-test-html5.html asciidoc-10.1.2/tests/data/lang-cs-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-cs-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedica

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefazione

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofone

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Poznámka
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varování
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Pozor
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Důležité
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Obrázek 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabulka 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-cs-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-cs-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedica

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefazione

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofone

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Poznámka
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varování
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Pozor
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Důležité
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Obrázek 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabulka 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-cs-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-cs-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +SINOSSI +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-cs-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-cs-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,29 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +SINOSSI +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-cs-man-test.txt asciidoc-10.1.2/tests/data/lang-cs-man-test.txt --- asciidoc-8.6.10/tests/data/lang-cs-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-it.conf language file. -:lang: cs - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SINOSSI -------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-cs-test.txt asciidoc-10.1.2/tests/data/lang-cs-test.txt --- asciidoc-8.6.10/tests/data/lang-cs-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-cs-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-cs.conf language file. -:lang: cs - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Abstract --------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Dedica ------- -Dedication special section. - - -Prefazione ----------- -Preface special section. - - -Colofone --------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Appendice A: Example Appendix ------------------------------ -Appendix special section. - - -Bibliografia ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glossario ---------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Index ------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-de-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-de-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-de-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Literaturverzeichnis +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossar +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Stichwortverzeichnis + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-de-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-de-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-de-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Literaturverzeichnis +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossar +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Stichwortverzeichnis + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-de-article-test-html4.html asciidoc-10.1.2/tests/data/lang-de-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-de-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Zusammenfassung

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Anmerkung

    +
    Lorum ipsum.
    + + + +
    +

    Tipp

    +
    Lorum ipsum.
    + + + +
    +

    Warnung

    +
    Lorum ipsum.
    + + + +
    +

    Achtung

    +
    Lorum ipsum.
    + + + +
    +

    Wichtig

    +
    Lorum ipsum.
    +
    +Tiger image +

    Abbildung 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabelle 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Anhang A: Example Appendix

    +

    Appendix special section.

    +
    +

    Literaturverzeichnis

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossar

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Letzte Änderung + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-article-test-html5.html asciidoc-10.1.2/tests/data/lang-de-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-de-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Zusammenfassung

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Anmerkung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warnung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Achtung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Wichtig
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Abbildung 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabelle 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Anhang A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Literaturverzeichnis

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossar

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-de-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-de-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Zusammenfassung

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Anmerkung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warnung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Achtung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Wichtig
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Abbildung 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabelle 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Anhang A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Literaturverzeichnis

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossar

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-de-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-de-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Widmung +Dedication special section. + + +Vorwort +Preface special section. + + +Kolophon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Literaturverzeichnis +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossar +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Stichwortverzeichnis + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-de-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-de-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-de-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Widmung +Dedication special section. + + +Vorwort +Preface special section. + + +Kolophon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Literaturverzeichnis +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossar +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Stichwortverzeichnis + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-de-book-test-html4.html asciidoc-10.1.2/tests/data/lang-de-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-de-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Widmung

    +

    Dedication special section.

    +
    +

    Vorwort

    +

    Preface special section.

    +
    +

    Kolophon

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Anmerkung

    +
    Lorum ipsum.
    + + + +
    +

    Tipp

    +
    Lorum ipsum.
    + + + +
    +

    Warnung

    +
    Lorum ipsum.
    + + + +
    +

    Achtung

    +
    Lorum ipsum.
    + + + +
    +

    Wichtig

    +
    Lorum ipsum.
    +
    +Tiger image +

    Abbildung 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabelle 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Anhang A: Example Appendix

    +

    Appendix special section.

    +
    +

    Literaturverzeichnis

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossar

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Letzte Änderung + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-book-test-html5.html asciidoc-10.1.2/tests/data/lang-de-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-de-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Widmung

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Vorwort

    +
    +

    Preface special section.

    +
    +
    +
    +

    Kolophon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Anmerkung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warnung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Achtung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Wichtig
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Abbildung 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabelle 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Anhang A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Literaturverzeichnis

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossar

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-de-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-de-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Widmung

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Vorwort

    +
    +

    Preface special section.

    +
    +
    +
    +

    Kolophon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Anmerkung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warnung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Achtung
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Wichtig
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Abbildung 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabelle 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Anhang A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Literaturverzeichnis

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossar

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-de-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-de-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-de-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-de-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-de-man-test.txt asciidoc-10.1.2/tests/data/lang-de-man-test.txt --- asciidoc-8.6.10/tests/data/lang-de-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-de.conf language file. -:lang: de - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -ÃœBERSICHT ---------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-de-test.txt asciidoc-10.1.2/tests/data/lang-de-test.txt --- asciidoc-8.6.10/tests/data/lang-de-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-de-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-de.conf language file. -:lang: de - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Zusammenfassung ---------------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Widmung -------- -Dedication special section. - - -Vorwort -------- -Preface special section. - - -Kolophon --------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Anhang A: Example Appendix --------------------------- -Appendix special section. - - -Literaturverzeichnis --------------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glossar -------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Stichwortverzeichnis --------------------- -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-en-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-en-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-en-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliography +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossary +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-en-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-en-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-en-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliography +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossary +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-en-article-test-html4.html asciidoc-10.1.2/tests/data/lang-en-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-en-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Abstract

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Warning

    +
    Lorum ipsum.
    + + + +
    +

    Caution

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figure 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendix A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliography

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossary

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-article-test-html5.html asciidoc-10.1.2/tests/data/lang-en-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-en-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-en-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-en-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-en-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-en-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedication +Dedication special section. + + +Preface +Preface special section. + + +Colophon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliography +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossary +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-en-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-en-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-en-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedication +Dedication special section. + + +Preface +Preface special section. + + +Colophon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliography +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossary +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-en-book-test-html4.html asciidoc-10.1.2/tests/data/lang-en-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-en-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedication

    +

    Dedication special section.

    +
    +

    Preface

    +

    Preface special section.

    +
    +

    Colophon

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Warning

    +
    Lorum ipsum.
    + + + +
    +

    Caution

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figure 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendix A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliography

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossary

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-book-test-html5.html asciidoc-10.1.2/tests/data/lang-en-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-en-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedication

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Preface

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colophon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-en-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-en-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedication

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Preface

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colophon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-last-updated-is-revdate-test-html4.html asciidoc-10.1.2/tests/data/lang-en-last-updated-is-revdate-test-html4.html --- asciidoc-8.6.10/tests/data/lang-en-last-updated-is-revdate-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-last-updated-is-revdate-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Abstract

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Warning

    +
    Lorum ipsum.
    + + + +
    +

    Caution

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figure 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendix A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliography

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossary

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Last updated + 2003-12-21 +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-last-updated-is-revdate-test-html5.html asciidoc-10.1.2/tests/data/lang-en-last-updated-is-revdate-test-html5.html --- asciidoc-8.6.10/tests/data/lang-en-last-updated-is-revdate-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-last-updated-is-revdate-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,890 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-last-updated-is-revdate-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-en-last-updated-is-revdate-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-en-last-updated-is-revdate-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-last-updated-is-revdate-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-en-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-en-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-en-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-en-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-man-test.txt asciidoc-10.1.2/tests/data/lang-en-man-test.txt --- asciidoc-8.6.10/tests/data/lang-en-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-en.conf language file. -:lang: en - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SYNOPSIS --------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-en-no-last-updated-test-html4.html asciidoc-10.1.2/tests/data/lang-en-no-last-updated-test-html4.html --- asciidoc-8.6.10/tests/data/lang-en-no-last-updated-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-no-last-updated-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Abstract

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Warning

    +
    Lorum ipsum.
    + + + +
    +

    Caution

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figure 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Table 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendix A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliography

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossary

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-no-last-updated-test-html5.html asciidoc-10.1.2/tests/data/lang-en-no-last-updated-test-html5.html --- asciidoc-8.6.10/tests/data/lang-en-no-last-updated-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-no-last-updated-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,885 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-no-last-updated-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-en-no-last-updated-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-en-no-last-updated-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-no-last-updated-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,889 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Table 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliography

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossary

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-en-test.txt asciidoc-10.1.2/tests/data/lang-en-test.txt --- asciidoc-8.6.10/tests/data/lang-en-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-en-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -// Test for lang-en.conf language file. -:lang: en - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -// Translate title. -Abstract --------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -// Translate title. -Dedication ----------- -Dedication special section. - - -// Translate title. -Preface -------- -Preface special section. - - -// Translate title. -Colophon --------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -// Translate title. -Appendix A: Example Appendix ----------------------------- -Appendix special section. - - -// Translate title. -Bibliography ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -// Translate title. -Glossary --------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -// Translate title. -Index ------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-es-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-es-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-es-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografía +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glosario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-es-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-es-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-es-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografía +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glosario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-es-article-test-html4.html asciidoc-10.1.2/tests/data/lang-es-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-es-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Resumen

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Sugerencia

    +
    Lorum ipsum.
    + + + +
    +

    Aviso

    +
    Lorum ipsum.
    + + + +
    +

    Atención

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabla 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Apéndice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografía

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glosario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-article-test-html5.html asciidoc-10.1.2/tests/data/lang-es-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-es-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Resumen

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugerencia
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atención
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabla 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Apéndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografía

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glosario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-es-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-es-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Resumen

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugerencia
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atención
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabla 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Apéndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografía

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glosario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-es-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-es-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedicación +Dedication special section. + + +Prefacio +Preface special section. + + +Colofón +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografía +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glosario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-es-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-es-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-es-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedicación +Dedication special section. + + +Prefacio +Preface special section. + + +Colofón +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografía +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glosario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-es-book-test-html4.html asciidoc-10.1.2/tests/data/lang-es-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-es-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedicación

    +

    Dedication special section.

    +
    +

    Prefacio

    +

    Preface special section.

    +
    +

    Colofón

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Sugerencia

    +
    Lorum ipsum.
    + + + +
    +

    Aviso

    +
    Lorum ipsum.
    + + + +
    +

    Atención

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabla 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Apéndice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografía

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glosario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-book-test-html5.html asciidoc-10.1.2/tests/data/lang-es-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-es-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedicación

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefacio

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofón

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugerencia
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atención
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabla 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Apéndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografía

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glosario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-es-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-es-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedicación

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefacio

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofón

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugerencia
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atención
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabla 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Apéndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografía

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glosario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-es-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-es-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-es-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-es-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-es-man-test.txt asciidoc-10.1.2/tests/data/lang-es-man-test.txt --- asciidoc-8.6.10/tests/data/lang-es-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-es.conf language file. -:lang: es - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SINOPSIS --------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-es-test.txt asciidoc-10.1.2/tests/data/lang-es-test.txt --- asciidoc-8.6.10/tests/data/lang-es-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-es-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-es.conf language file. -:lang: es - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Resumen -------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Dedicación ----------- -Dedication special section. - - -Prefacio --------- -Preface special section. - - -Colofón -------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Apéndice A: Example Appendix ----------------------------- -Appendix special section. - - -Bibliografía ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glosario --------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Ãndice ------- -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-fr-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-fr-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-fr-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliographie +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossaire +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-fr-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-fr-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-fr-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliographie +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossaire +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-fr-article-test-html4.html asciidoc-10.1.2/tests/data/lang-fr-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-fr-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Résumé

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Astuce

    +
    Lorum ipsum.
    + + + +
    +

    Attention

    +
    Lorum ipsum.
    + + + +
    +

    Avertissement

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figure 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tableau 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliographie

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossaire

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Dernière mise à jour + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-article-test-html5.html asciidoc-10.1.2/tests/data/lang-fr-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-fr-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Résumé

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Astuce
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attention
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avertissement
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tableau 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliographie

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossaire

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-fr-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-fr-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Résumé

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Astuce
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attention
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avertissement
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tableau 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliographie

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossaire

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-fr-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-fr-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dédicace +Dedication special section. + + +Préface +Preface special section. + + +Colophon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliographie +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossaire +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-fr-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-fr-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-fr-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dédicace +Dedication special section. + + +Préface +Preface special section. + + +Colophon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliographie +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossaire +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-fr-book-test-html4.html asciidoc-10.1.2/tests/data/lang-fr-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-fr-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dédicace

    +

    Dedication special section.

    +
    +

    Préface

    +

    Preface special section.

    +
    +

    Colophon

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Astuce

    +
    Lorum ipsum.
    + + + +
    +

    Attention

    +
    Lorum ipsum.
    + + + +
    +

    Avertissement

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figure 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tableau 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliographie

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossaire

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Dernière mise à jour + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-book-test-html5.html asciidoc-10.1.2/tests/data/lang-fr-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-fr-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dédicace

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Préface

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colophon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Astuce
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attention
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avertissement
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tableau 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliographie

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossaire

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-fr-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-fr-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dédicace

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Préface

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colophon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Astuce
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attention
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avertissement
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figure 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tableau 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliographie

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossaire

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-fr-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-fr-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-fr-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-fr-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-fr-man-test.txt asciidoc-10.1.2/tests/data/lang-fr-man-test.txt --- asciidoc-8.6.10/tests/data/lang-fr-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-fr.conf language file. -:lang: fr - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SYNOPSIS --------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-fr-test.txt asciidoc-10.1.2/tests/data/lang-fr-test.txt --- asciidoc-8.6.10/tests/data/lang-fr-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-fr-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-fr.conf language file. -:lang: fr - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Résumé ------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Dédicace --------- -Dedication special section. - - -Préface -------- -Preface special section. - - -Colophon --------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Appendice A: Example Appendix ------------------------------ -Appendix special section. - - -Bibliographie -------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glossaire ---------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Index ------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-hu-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-hu-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-hu-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliográfia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Szójegyzék +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-hu-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-hu-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-hu-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliográfia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Szójegyzék +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-hu-article-test-html4.html asciidoc-10.1.2/tests/data/lang-hu-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-hu-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Kivonat

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Megjegyzés

    +
    Lorum ipsum.
    + + + +
    +

    Tipp

    +
    Lorum ipsum.
    + + + +
    +

    Figyelem

    +
    Lorum ipsum.
    + + + +
    +

    Figyelmeztetés

    +
    Lorum ipsum.
    + + + +
    +

    Fontos

    +
    Lorum ipsum.
    +
    +Tiger image +

    Ãbra 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Táblázat 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    A függelék: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliográfia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Szójegyzék

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Verzió v1.0
    +Utolsó frissítés: + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-article-test-html5.html asciidoc-10.1.2/tests/data/lang-hu-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-hu-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Kivonat

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Megjegyzés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelem
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelmeztetés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Fontos
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Ãbra 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Táblázat 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    A függelék: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliográfia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Szójegyzék

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-hu-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-hu-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Kivonat

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Megjegyzés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelem
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelmeztetés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Fontos
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Ãbra 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Táblázat 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    A függelék: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliográfia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Szójegyzék

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-hu-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-hu-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Ajánlás +Dedication special section. + + +Előszó +Preface special section. + + +Utószó +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliográfia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Szójegyzék +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-hu-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-hu-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-hu-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Ajánlás +Dedication special section. + + +Előszó +Preface special section. + + +Utószó +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliográfia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Szójegyzék +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-hu-book-test-html4.html asciidoc-10.1.2/tests/data/lang-hu-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-hu-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Ajánlás

    +

    Dedication special section.

    +
    +

    Előszó

    +

    Preface special section.

    +
    +

    Utószó

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Megjegyzés

    +
    Lorum ipsum.
    + + + +
    +

    Tipp

    +
    Lorum ipsum.
    + + + +
    +

    Figyelem

    +
    Lorum ipsum.
    + + + +
    +

    Figyelmeztetés

    +
    Lorum ipsum.
    + + + +
    +

    Fontos

    +
    Lorum ipsum.
    +
    +Tiger image +

    Ãbra 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Táblázat 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    A függelék: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliográfia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Szójegyzék

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Verzió v1.0
    +Utolsó frissítés: + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-book-test-html5.html asciidoc-10.1.2/tests/data/lang-hu-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-hu-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Ajánlás

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Előszó

    +
    +

    Preface special section.

    +
    +
    +
    +

    Utószó

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Megjegyzés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelem
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelmeztetés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Fontos
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Ãbra 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Táblázat 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    A függelék: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliográfia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Szójegyzék

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-hu-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-hu-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Ajánlás

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Előszó

    +
    +

    Preface special section.

    +
    +
    +
    +

    Utószó

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Megjegyzés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tipp
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelem
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Figyelmeztetés
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Fontos
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Ãbra 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Táblázat 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    A függelék: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliográfia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Szójegyzék

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-hu-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-hu-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-hu-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-hu-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-hu-man-test.txt asciidoc-10.1.2/tests/data/lang-hu-man-test.txt --- asciidoc-8.6.10/tests/data/lang-hu-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-hu.conf language file. -:lang: hu - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -ÃTTEKINTÉS ----------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-hu-test.txt asciidoc-10.1.2/tests/data/lang-hu-test.txt --- asciidoc-8.6.10/tests/data/lang-hu-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-hu-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-hu.conf language file. -:lang: hu - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Kivonat -------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Ajánlás --------- -Dedication special section. - - -ElÅ‘szó ------- -Preface special section. - - -Utószó ------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -A függelék: Example Appendix ----------------------------- -Appendix special section. - - -Bibliográfia ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Szójegyzék ----------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Index ------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-it-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-it-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-it-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-it-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-it-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-it-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-it-article-test-html4.html asciidoc-10.1.2/tests/data/lang-it-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-it-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Abstract

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Suggerimento

    +
    Lorum ipsum.
    + + + +
    +

    Avvertenza

    +
    Lorum ipsum.
    + + + +
    +

    Attenzione

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabella 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Versione v1.0
    +Ultimo aggiornamento + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-article-test-html5.html asciidoc-10.1.2/tests/data/lang-it-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-it-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-it-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-it-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-it-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-it-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedica +Dedication special section. + + +Prefazione +Preface special section. + + +Colofone +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-it-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-it-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-it-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedica +Dedication special section. + + +Prefazione +Preface special section. + + +Colofone +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-it-book-test-html4.html asciidoc-10.1.2/tests/data/lang-it-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-it-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedica

    +

    Dedication special section.

    +
    +

    Prefazione

    +

    Preface special section.

    +
    +

    Colofone

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Suggerimento

    +
    Lorum ipsum.
    + + + +
    +

    Avvertenza

    +
    Lorum ipsum.
    + + + +
    +

    Attenzione

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabella 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Versione v1.0
    +Ultimo aggiornamento + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-book-test-html5.html asciidoc-10.1.2/tests/data/lang-it-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-it-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedica

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefazione

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofone

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-it-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-it-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedica

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefazione

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofone

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-it-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-it-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-it-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-it-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-it-man-test.txt asciidoc-10.1.2/tests/data/lang-it-man-test.txt --- asciidoc-8.6.10/tests/data/lang-it-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-it.conf language file. -:lang: it - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SINOSSI -------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-it-test.txt asciidoc-10.1.2/tests/data/lang-it-test.txt --- asciidoc-8.6.10/tests/data/lang-it-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-it-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-it.conf language file. -:lang: it - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Abstract --------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Dedica ------- -Dedication special section. - - -Prefazione ----------- -Preface special section. - - -Colofone --------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Appendice A: Example Appendix ------------------------------ -Appendix special section. - - -Bibliografia ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glossario ---------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Index ------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-ja-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ja-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ja-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,115 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³ + +
    +第一セクション +
    +警告 +以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。 +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + 虎ã®çµµ + +
    +続ã„ã¦è¡¨ã®ä¾‹ã€‚ + +Table + + + + + + + + + オプション + 説明 + + + + +-a USER GROUP +USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹ + + +-R GROUP +GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ + + + +
    +ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚ +
    +
    + +付録ã®ä¾‹ +付録セクション + + +å‚考文献 +å‚考文献セクション + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +用語集 +用語集セクション + + +用語 + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +別ã®ç”¨èªž + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +索引 + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ja-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ja-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ja-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,116 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³ + +
    +第一セクション +
    +警告 +以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。 +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + 虎ã®çµµ + +
    +続ã„ã¦è¡¨ã®ä¾‹ã€‚ + +Table + + + + + + + + + オプション + 説明 + + + + +-a USER GROUP +USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹ + + +-R GROUP +GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ + + + +
    +ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚ +
    +
    + +付録ã®ä¾‹ +付録セクション + + +å‚考文献 +å‚考文献セクション + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +用語集 +用語集セクション + + +用語 + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +別ã®ç”¨èªž + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +索引 + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ja-article-test-html4.html asciidoc-10.1.2/tests/data/lang-ja-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-ja-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,131 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    概è¦

    +

    概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³

    +
    +

    第一セクション

    +

    警告

    +

    以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。

    + + + +
    +

    注

    +
    Lorum ipsum.
    + + + +
    +

    補足

    +
    Lorum ipsum.
    + + + +
    +

    警告

    +
    Lorum ipsum.
    + + + +
    +

    注æ„

    +
    Lorum ipsum.
    + + + +
    +

    é‡è¦

    +
    Lorum ipsum.
    +
    +虎ã®çµµ +

    図 1. Tiger

    +
    +

    続ã„ã¦è¡¨ã®ä¾‹ã€‚

    +
    + + + + + + + + + + + + + + + + + +
    オプション 説明

    -a USER GROUP

    USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹

    -R GROUP

    GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹

    +

    表 1. Table

    +
    +

    ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚

    +
    +

    付録 A: 付録ã®ä¾‹

    +

    付録セクション

    +
    +

    å‚考文献

    +

    å‚考文献セクション

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    用語集

    +

    用語集セクション

    +
    +
    +用語 +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +別ã®ç”¨èªž +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +

    +

    +

    +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ v1.0
    + 2002-11-25 00:37:42 UTC + æ›´æ–° +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-article-test-html5.html asciidoc-10.1.2/tests/data/lang-ja-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-ja-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,892 @@ + + + + + +Languages Test + + + + + +
    +
    +

    概è¦

    +
    +

    概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³

    +
    +
    +
    +

    第一セクション

    +
    +
    +

    警告

    +

    以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。

    +
    + + + +
    +
    注
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    補足
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    警告
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    注æ„
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    é‡è¦
    +
    Lorum ipsum.
    +
    +
    +
    +虎ã®çµµ +
    +
    図 1. Tiger
    +
    +

    続ã„ã¦è¡¨ã®ä¾‹ã€‚

    + + +++ + + + + + + + + + + + + + + + +
    表 1. Table
    オプション 説明

    -a USER GROUP

    USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹

    -R GROUP

    GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹

    +

    ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚

    +
    +
    +
    +
    +

    付録 A: 付録ã®ä¾‹

    +
    +

    付録セクション

    +
    +
    +
    +

    å‚考文献

    +
    +

    å‚考文献セクション

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    用語集

    +
    +

    用語集セクション

    +
    +
    +用語 +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +別ã®ç”¨èªž +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-ja-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-ja-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,896 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    概è¦

    +
    +

    概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³

    +
    +
    +
    +

    第一セクション

    +
    +
    +

    警告

    +

    以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。

    +
    + + + +
    +
    注
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    補足
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    警告
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    注æ„
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    é‡è¦
    +
    Lorum ipsum.
    +
    +
    +
    +虎ã®çµµ +
    +
    図 1. Tiger
    +
    +

    続ã„ã¦è¡¨ã®ä¾‹ã€‚

    +
    + + +++ + + + + + + + + + + + + + + + +
    表 1. Table
    オプション 説明

    -a USER GROUP

    USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹

    -R GROUP

    GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹

    +
    +

    ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚

    +
    +
    +
    +
    +

    付録 A: 付録ã®ä¾‹

    +
    +

    付録セクション

    +
    +
    +
    +

    å‚考文献

    +
    +

    å‚考文献セクション

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    用語集

    +
    +

    用語集セクション

    +
    +
    +用語 +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +別ã®ç”¨èªž +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ja-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ja-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,124 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +献辞 +献辞セクション + + +å‰æ›¸ +å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³ + + +奥付 +奥付セクション + + +第一セクション +
    +警告 +以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。 +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + 虎ã®çµµ + +
    +続ã„ã¦è¡¨ã®ä¾‹ã€‚ + +Table + + + + + + + + + オプション + 説明 + + + + +-a USER GROUP +USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹ + + +-R GROUP +GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ + + + +
    +ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚ +
    +
    + +付録ã®ä¾‹ +付録セクション + + +å‚考文献 +å‚考文献セクション + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +用語集 +用語集セクション + + +用語 + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +別ã®ç”¨èªž + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +索引 + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ja-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ja-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ja-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +献辞 +献辞セクション + + +å‰æ›¸ +å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³ + + +奥付 +奥付セクション + + +第一セクション +
    +警告 +以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。 +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + 虎ã®çµµ + +
    +続ã„ã¦è¡¨ã®ä¾‹ã€‚ + +Table + + + + + + + + + オプション + 説明 + + + + +-a USER GROUP +USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹ + + +-R GROUP +GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ + + + +
    +ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚ +
    +
    + +付録ã®ä¾‹ +付録セクション + + +å‚考文献 +å‚考文献セクション + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +用語集 +用語集セクション + + +用語 + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +別ã®ç”¨èªž + + + + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + + + + +索引 + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ja-book-test-html4.html asciidoc-10.1.2/tests/data/lang-ja-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-ja-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,137 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    献辞

    +

    献辞セクション

    +
    +

    å‰æ›¸

    +

    å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³

    +
    +

    奥付

    +

    奥付セクション

    +
    +

    第一セクション

    +

    警告

    +

    以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。

    + + + +
    +

    注

    +
    Lorum ipsum.
    + + + +
    +

    補足

    +
    Lorum ipsum.
    + + + +
    +

    警告

    +
    Lorum ipsum.
    + + + +
    +

    注æ„

    +
    Lorum ipsum.
    + + + +
    +

    é‡è¦

    +
    Lorum ipsum.
    +
    +虎ã®çµµ +

    図 1. Tiger

    +
    +

    続ã„ã¦è¡¨ã®ä¾‹ã€‚

    +
    + + + + + + + + + + + + + + + + + +
    オプション 説明

    -a USER GROUP

    USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹

    -R GROUP

    GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹

    +

    表 1. Table

    +
    +

    ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚

    +
    +

    付録 A: 付録ã®ä¾‹

    +

    付録セクション

    +
    +

    å‚考文献

    +

    å‚考文献セクション

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    用語集

    +

    用語集セクション

    +
    +
    +用語 +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +別ã®ç”¨èªž +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +

    +

    +

    +ãƒãƒ¼ã‚¸ãƒ§ãƒ³ v1.0
    + 2002-11-25 00:37:42 UTC + æ›´æ–° +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-book-test-html5.html asciidoc-10.1.2/tests/data/lang-ja-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-ja-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,904 @@ + + + + + +Languages Test + + + + + +
    +
    +

    献辞

    +
    +

    献辞セクション

    +
    +
    +
    +

    å‰æ›¸

    +
    +

    å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³

    +
    +
    +
    +

    奥付

    +
    +

    奥付セクション

    +
    +
    +
    +

    第一セクション

    +
    +
    +

    警告

    +

    以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。

    +
    + + + +
    +
    注
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    補足
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    警告
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    注æ„
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    é‡è¦
    +
    Lorum ipsum.
    +
    +
    +
    +虎ã®çµµ +
    +
    図 1. Tiger
    +
    +

    続ã„ã¦è¡¨ã®ä¾‹ã€‚

    + + +++ + + + + + + + + + + + + + + + +
    表 1. Table
    オプション 説明

    -a USER GROUP

    USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹

    -R GROUP

    GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹

    +

    ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚

    +
    +
    +
    +
    +

    付録 A: 付録ã®ä¾‹

    +
    +

    付録セクション

    +
    +
    +
    +

    å‚考文献

    +
    +

    å‚考文献セクション

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    用語集

    +
    +

    用語集セクション

    +
    +
    +用語 +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +別ã®ç”¨èªž +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-ja-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-ja-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,908 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    献辞

    +
    +

    献辞セクション

    +
    +
    +
    +

    å‰æ›¸

    +
    +

    å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³

    +
    +
    +
    +

    奥付

    +
    +

    奥付セクション

    +
    +
    +
    +

    第一セクション

    +
    +
    +

    警告

    +

    以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。

    +
    + + + +
    +
    注
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    補足
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    警告
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    注æ„
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    é‡è¦
    +
    Lorum ipsum.
    +
    +
    +
    +虎ã®çµµ +
    +
    図 1. Tiger
    +
    +

    続ã„ã¦è¡¨ã®ä¾‹ã€‚

    +
    + + +++ + + + + + + + + + + + + + + + +
    表 1. Table
    オプション 説明

    -a USER GROUP

    USER ã‚’ GROUP ã«è¿½åŠ ã™ã‚‹

    -R GROUP

    GROUP ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹

    +
    +

    ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: 猿ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚

    +
    +
    +
    +
    +

    付録 A: 付録ã®ä¾‹

    +
    +

    付録セクション

    +
    +
    +
    +

    å‚考文献

    +
    +

    å‚考文献セクション

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    用語集

    +
    +

    用語集セクション

    +
    +
    +用語 +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +別ã®ç”¨èªž +
    +
    +

    + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ja-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ja-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + AsciiDoc テキストファイルを HTML ã‚„ DocBook ã«å¤‰æ›ã™ã‚‹ + + +asciidoc [OPTIONS] FILE + + +説明 +asciidoc(1) コマンド㯠AsciiDoc テキストファイル FILE ã‚’ DocBook +ã‚„ HTML ã«å¤‰æ›ã™ã‚‹ã€‚ FILE ㌠- ãªã‚‰ã°æ¨™æº–入力を使用ã™ã‚‹ã€‚ + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ja-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ja-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + AsciiDoc テキストファイルを HTML ã‚„ DocBook ã«å¤‰æ›ã™ã‚‹ + + +asciidoc [OPTIONS] FILE + + +説明 +asciidoc(1) コマンド㯠AsciiDoc テキストファイル FILE ã‚’ DocBook +ã‚„ HTML ã«å¤‰æ›ã™ã‚‹ã€‚ FILE ㌠- ãªã‚‰ã°æ¨™æº–入力を使用ã™ã‚‹ã€‚ + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ja-man-test.txt asciidoc-10.1.2/tests/data/lang-ja-man-test.txt --- asciidoc-8.6.10/tests/data/lang-ja-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -// Test for lang-ja.conf language file. -:lang: ja - -ASCIIDOC(1) -=========== -:doctype: manpage - -== åå‰ -asciidoc - AsciiDoc テキストファイルを HTML ã‚„ DocBook ã«å¤‰æ›ã™ã‚‹ - -== æ›¸å¼ -*asciidoc* ['OPTIONS'] 'FILE' - -== 説明 -asciidoc(1) コマンド㯠AsciiDoc テキストファイル 'FILE' ã‚’ DocBook -ã‚„ HTML ã«å¤‰æ›ã™ã‚‹ã€‚ 'FILE' ㌠'-' ãªã‚‰ã°æ¨™æº–入力を使用ã™ã‚‹ã€‚ - -... diff -Nru asciidoc-8.6.10/tests/data/lang-ja-test.txt asciidoc-10.1.2/tests/data/lang-ja-test.txt --- asciidoc-8.6.10/tests/data/lang-ja-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ja-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -// Test for lang-ja.conf language file. -:lang: ja - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -== æ¦‚è¦ -概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³ - -endif::doctype-article[] - - -ifdef::doctype-book[] -== 献辞 -献辞セクション - - -== å‰æ›¸ -å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³ - - -== 奥付 -奥付セクション - -endif::doctype-book[] - - -== 第一セクション -=== 警告 -以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。 - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[虎ã®çµµ] - -続ã„ã¦è¡¨ã®ä¾‹ã€‚ - -.Table -[width="60%",options="header"] -|================================================= -| オプション | 説明 -| -a 'USER GROUP' | 'USER' ã‚’ 'GROUP' ã«è¿½åŠ ã™ã‚‹ -| -R 'GROUP' | 'GROUP' ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ -|================================================= - -ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: ((猿))ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚ - - -== 付録 A: 付録ã®ä¾‹ -付録セクション - - -== å‚考文献 -å‚考文献セクション - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -== 用語集 -用語集セクション - -[glossary] -用語:: - (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© - -別ã®ç”¨èªž:: - (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© - - -ifdef::basebackend-docbook[] -== 索引 -//////////////////////////////////////////////////////////////// -索引セクション。 -内容㯠DocBook ツールãƒã‚§ãƒ¼ãƒ³ãŒè‡ªå‹•ç”Ÿæˆã™ã‚‹ã®ã§ã€ -通常ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ç©ºã§ã‚る。 -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-nl-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-nl-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-nl-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,116 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Bijzonder abstract sectie. + +
    +Het Eerste Hoofdstuk +
    +Vermaningen +Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Gevolgd door een voorbeeld tabel: + +Table + + + + + + + + + Optie + Beschrijving + + + + +-a USER GROUP +Voeg USER toe aan GROUP. + + +-R GROUP +Schakel toegang uit tot GROUP. + + + +
    +En nu iets totaal anders: apenapen, leeuwen en tijgers. +
    +
    + +Voorbeeld Bijlage +Bijzonder appendix sectie. + + +Literatuurlijst +Bijzonder bibliography sectie. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Woordenlijst +Bijzonder glossary sectie. + + +Een woordenlijst term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Een tweede term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Register + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-nl-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-nl-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-nl-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Bijzonder abstract sectie. + +
    +Het Eerste Hoofdstuk +
    +Vermaningen +Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Gevolgd door een voorbeeld tabel: + +Table + + + + + + + + + Optie + Beschrijving + + + + +-a USER GROUP +Voeg USER toe aan GROUP. + + +-R GROUP +Schakel toegang uit tot GROUP. + + + +
    +En nu iets totaal anders: apenapen, leeuwen en tijgers. +
    +
    + +Voorbeeld Bijlage +Bijzonder appendix sectie. + + +Literatuurlijst +Bijzonder bibliography sectie. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Woordenlijst +Bijzonder glossary sectie. + + +Een woordenlijst term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Een tweede term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Register + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-nl-article-test-html4.html asciidoc-10.1.2/tests/data/lang-nl-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-nl-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,132 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Samenvatting

    +

    Bijzonder abstract sectie.

    +
    +

    Het Eerste Hoofdstuk

    +

    Vermaningen

    +

    Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand

    + + + +
    +

    Opmerking

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Waarschuwing

    +
    Lorum ipsum.
    + + + +
    +

    Let op

    +
    Lorum ipsum.
    + + + +
    +

    Belangrijk

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figuur 1. Tiger

    +
    +

    Gevolgd door een voorbeeld tabel:

    +
    + + + + + + + + + + + + + + + + + +
    Optie Beschrijving

    -a USER GROUP

    Voeg USER toe aan GROUP.

    -R GROUP

    Schakel toegang uit tot GROUP.

    +

    Tabel 1. Table

    +
    +

    En nu iets totaal anders: apen, leeuwen en tijgers.

    +
    +

    Bijlage A: Voorbeeld Bijlage

    +

    Bijzonder appendix sectie.

    +
    +

    Literatuurlijst

    +

    Bijzonder bibliography sectie.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Woordenlijst

    +

    Bijzonder glossary sectie.

    +
    +
    +Een woordenlijst term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +Een tweede term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +

    +

    +

    +Versie v1.0
    +Laatst bijgewerkt + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-article-test-html5.html asciidoc-10.1.2/tests/data/lang-nl-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-nl-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,893 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Samenvatting

    +
    +

    Bijzonder abstract sectie.

    +
    +
    +
    +

    Het Eerste Hoofdstuk

    +
    +
    +

    Vermaningen

    +

    Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand

    +
    + + + +
    +
    Opmerking
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Waarschuwing
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Let op
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Belangrijk
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figuur 1. Tiger
    +
    +

    Gevolgd door een voorbeeld tabel:

    + + +++ + + + + + + + + + + + + + + + +
    Tabel 1. Table
    Optie Beschrijving

    -a USER GROUP

    Voeg USER toe aan GROUP.

    -R GROUP

    Schakel toegang uit tot GROUP.

    +

    En nu iets totaal anders: apen, leeuwen en tijgers.

    +
    +
    +
    +
    +

    Bijlage A: Voorbeeld Bijlage

    +
    +

    Bijzonder appendix sectie.

    +
    +
    +
    +

    Literatuurlijst

    +
    +

    Bijzonder bibliography sectie.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Woordenlijst

    +
    +

    Bijzonder glossary sectie.

    +
    +
    +Een woordenlijst term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +Een tweede term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-nl-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-nl-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,897 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Samenvatting

    +
    +

    Bijzonder abstract sectie.

    +
    +
    +
    +

    Het Eerste Hoofdstuk

    +
    +
    +

    Vermaningen

    +

    Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand

    +
    + + + +
    +
    Opmerking
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Waarschuwing
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Let op
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Belangrijk
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figuur 1. Tiger
    +
    +

    Gevolgd door een voorbeeld tabel:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabel 1. Table
    Optie Beschrijving

    -a USER GROUP

    Voeg USER toe aan GROUP.

    -R GROUP

    Schakel toegang uit tot GROUP.

    +
    +

    En nu iets totaal anders: apen, leeuwen en tijgers.

    +
    +
    +
    +
    +

    Bijlage A: Voorbeeld Bijlage

    +
    +

    Bijzonder appendix sectie.

    +
    +
    +
    +

    Literatuurlijst

    +
    +

    Bijzonder bibliography sectie.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Woordenlijst

    +
    +

    Bijzonder glossary sectie.

    +
    +
    +Een woordenlijst term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +Een tweede term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-nl-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-nl-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,125 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Opdracht +Bijzonder dedication sectie. + + +Voorwoord +Bijzonder preface sectie. + + +Colofon +Bijzonder colophon sectie. + + +Het Eerste Hoofdstuk +
    +Vermaningen +Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Gevolgd door een voorbeeld tabel: + +Table + + + + + + + + + Optie + Beschrijving + + + + +-a USER GROUP +Voeg USER toe aan GROUP. + + +-R GROUP +Schakel toegang uit tot GROUP. + + + +
    +En nu iets totaal anders: apenapen, leeuwen en tijgers. +
    +
    + +Voorbeeld Bijlage +Bijzonder appendix sectie. + + +Literatuurlijst +Bijzonder bibliography sectie. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Woordenlijst +Bijzonder glossary sectie. + + +Een woordenlijst term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Een tweede term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Register + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-nl-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-nl-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-nl-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Opdracht +Bijzonder dedication sectie. + + +Voorwoord +Bijzonder preface sectie. + + +Colofon +Bijzonder colophon sectie. + + +Het Eerste Hoofdstuk +
    +Vermaningen +Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Gevolgd door een voorbeeld tabel: + +Table + + + + + + + + + Optie + Beschrijving + + + + +-a USER GROUP +Voeg USER toe aan GROUP. + + +-R GROUP +Schakel toegang uit tot GROUP. + + + +
    +En nu iets totaal anders: apenapen, leeuwen en tijgers. +
    +
    + +Voorbeeld Bijlage +Bijzonder appendix sectie. + + +Literatuurlijst +Bijzonder bibliography sectie. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Woordenlijst +Bijzonder glossary sectie. + + +Een woordenlijst term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Een tweede term + + + + De bijhorende (ingesprongen) definitie. + + + + + +Register + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-nl-book-test-html4.html asciidoc-10.1.2/tests/data/lang-nl-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-nl-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,138 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Opdracht

    +

    Bijzonder dedication sectie.

    +
    +

    Voorwoord

    +

    Bijzonder preface sectie.

    +
    +

    Colofon

    +

    Bijzonder colophon sectie.

    +
    +

    Het Eerste Hoofdstuk

    +

    Vermaningen

    +

    Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand

    + + + +
    +

    Opmerking

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Waarschuwing

    +
    Lorum ipsum.
    + + + +
    +

    Let op

    +
    Lorum ipsum.
    + + + +
    +

    Belangrijk

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figuur 1. Tiger

    +
    +

    Gevolgd door een voorbeeld tabel:

    +
    + + + + + + + + + + + + + + + + + +
    Optie Beschrijving

    -a USER GROUP

    Voeg USER toe aan GROUP.

    -R GROUP

    Schakel toegang uit tot GROUP.

    +

    Tabel 1. Table

    +
    +

    En nu iets totaal anders: apen, leeuwen en tijgers.

    +
    +

    Bijlage A: Voorbeeld Bijlage

    +

    Bijzonder appendix sectie.

    +
    +

    Literatuurlijst

    +

    Bijzonder bibliography sectie.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Woordenlijst

    +

    Bijzonder glossary sectie.

    +
    +
    +Een woordenlijst term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +Een tweede term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +

    +

    +

    +Versie v1.0
    +Laatst bijgewerkt + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-book-test-html5.html asciidoc-10.1.2/tests/data/lang-nl-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-nl-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,905 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Opdracht

    +
    +

    Bijzonder dedication sectie.

    +
    +
    +
    +

    Voorwoord

    +
    +

    Bijzonder preface sectie.

    +
    +
    +
    +

    Colofon

    +
    +

    Bijzonder colophon sectie.

    +
    +
    +
    +

    Het Eerste Hoofdstuk

    +
    +
    +

    Vermaningen

    +

    Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand

    +
    + + + +
    +
    Opmerking
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Waarschuwing
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Let op
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Belangrijk
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figuur 1. Tiger
    +
    +

    Gevolgd door een voorbeeld tabel:

    + + +++ + + + + + + + + + + + + + + + +
    Tabel 1. Table
    Optie Beschrijving

    -a USER GROUP

    Voeg USER toe aan GROUP.

    -R GROUP

    Schakel toegang uit tot GROUP.

    +

    En nu iets totaal anders: apen, leeuwen en tijgers.

    +
    +
    +
    +
    +

    Bijlage A: Voorbeeld Bijlage

    +
    +

    Bijzonder appendix sectie.

    +
    +
    +
    +

    Literatuurlijst

    +
    +

    Bijzonder bibliography sectie.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Woordenlijst

    +
    +

    Bijzonder glossary sectie.

    +
    +
    +Een woordenlijst term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +Een tweede term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-nl-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-nl-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,909 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Opdracht

    +
    +

    Bijzonder dedication sectie.

    +
    +
    +
    +

    Voorwoord

    +
    +

    Bijzonder preface sectie.

    +
    +
    +
    +

    Colofon

    +
    +

    Bijzonder colophon sectie.

    +
    +
    +
    +

    Het Eerste Hoofdstuk

    +
    +
    +

    Vermaningen

    +

    Vertaal ze niet in the broncode — ze worden vanzelf vertaald in het +output bestand

    +
    + + + +
    +
    Opmerking
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Waarschuwing
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Let op
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Belangrijk
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figuur 1. Tiger
    +
    +

    Gevolgd door een voorbeeld tabel:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabel 1. Table
    Optie Beschrijving

    -a USER GROUP

    Voeg USER toe aan GROUP.

    -R GROUP

    Schakel toegang uit tot GROUP.

    +
    +

    En nu iets totaal anders: apen, leeuwen en tijgers.

    +
    +
    +
    +
    +

    Bijlage A: Voorbeeld Bijlage

    +
    +

    Bijzonder appendix sectie.

    +
    +
    +
    +

    Literatuurlijst

    +
    +

    Bijzonder bibliography sectie.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Woordenlijst

    +
    +

    Bijzonder glossary sectie.

    +
    +
    +Een woordenlijst term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +Een tweede term +
    +
    +

    + De bijhorende (ingesprongen) definitie. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-nl-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-nl-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-nl-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-nl-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-nl-man-test.txt asciidoc-10.1.2/tests/data/lang-nl-man-test.txt --- asciidoc-8.6.10/tests/data/lang-nl-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-nl.conf language file. -:lang: nl - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SYNOPSIS --------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-nl-test.txt asciidoc-10.1.2/tests/data/lang-nl-test.txt --- asciidoc-8.6.10/tests/data/lang-nl-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-nl-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,94 +0,0 @@ -// Test for lang-nl.conf language file. -:lang: nl - -= Languages Test -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -== Samenvatting -Bijzonder 'abstract' sectie. - -endif::doctype-article[] - - -ifdef::doctype-book[] -== Opdracht -Bijzonder 'dedication' sectie. - - -== Voorwoord -Bijzonder 'preface' sectie. - - -== Colofon -Bijzonder 'colophon' sectie. - -endif::doctype-book[] - - -== Het Eerste Hoofdstuk -=== Vermaningen -Vertaal ze niet in the broncode -- ze worden vanzelf vertaald in het -output bestand - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Gevolgd door een voorbeeld tabel: - -.Table -[width="60%",options="header"] -|============================================== -| Optie | Beschrijving -| -a 'USER GROUP' | Voeg 'USER' toe aan 'GROUP'. -| -R 'GROUP' | Schakel toegang uit tot 'GROUP'. -|============================================== - -En nu iets totaal anders: ((apen)), leeuwen en tijgers. - - -== Bijlage A: Voorbeeld Bijlage -Bijzonder 'appendix' sectie. - - -== Literatuurlijst -Bijzonder 'bibliography' sectie. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -== Woordenlijst -Bijzonder 'glossary' sectie. - -[glossary] -Een woordenlijst term:: - De bijhorende (ingesprongen) definitie. - -Een tweede term:: - De bijhorende (ingesprongen) definitie. - - -ifdef::basebackend-docbook[] -== Register -//////////////////////////////////////////////////////////////// -Bijzonder 'index' sectie. -Het register wordt normaal leeg gehouden, de inhoud wordt -automatisch gegenereerd door de DocBook hulpmiddelen. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    +
    +Appêndice A: Example Appendix +Appendix special section. +
    + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossário +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    +
    +Appêndice A: Example Appendix +Appendix special section. +
    + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossário +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-html4.html asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Resumo

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Sugestão

    +
    Lorum ipsum.
    + + + +
    +

    Aviso

    +
    Lorum ipsum.
    + + + +
    +

    Atenção

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabela 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appêndice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossário

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Versão v1.0
    +Última Atualização + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-html5.html asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Resumo

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugestão
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atenção
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabela 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appêndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossário

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-pt-BR-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Resumo

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugestão
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atenção
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabela 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appêndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossário

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedicação +Dedication special section. + + +Prefácio +Preface special section. + + +Cólofon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Appêndice A: Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossário +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedicação +Dedication special section. + + +Prefácio +Preface special section. + + +Cólofon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Appêndice A: Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossário +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Ãndice + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-html4.html asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedicação

    +

    Dedication special section.

    +
    +

    Prefácio

    +

    Preface special section.

    +
    +

    Cólofon

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Sugestão

    +
    Lorum ipsum.
    + + + +
    +

    Aviso

    +
    Lorum ipsum.
    + + + +
    +

    Atenção

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabela 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appêndice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossário

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Versão v1.0
    +Última Atualização + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-html5.html asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedicação

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefácio

    +
    +

    Preface special section.

    +
    +
    +
    +

    Cólofon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugestão
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atenção
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabela 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appêndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossário

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-pt-BR-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedicação

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefácio

    +
    +

    Preface special section.

    +
    +
    +
    +

    Cólofon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Sugestão
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Aviso
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Atenção
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabela 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appêndice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossário

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-pt-BR-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-pt-BR-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-pt-BR-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-pt-BR-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-man-test.txt asciidoc-10.1.2/tests/data/lang-pt-BR-man-test.txt --- asciidoc-8.6.10/tests/data/lang-pt-BR-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-pt-BR.conf language file. -:lang: pt-BR - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SINOPSE -------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-pt-BR-test.txt asciidoc-10.1.2/tests/data/lang-pt-BR-test.txt --- asciidoc-8.6.10/tests/data/lang-pt-BR-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-pt-BR-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-pt-BR.conf language file. -:lang: pt-BR - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Resumo ------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Dedicação ---------- -Dedication special section. - - -Prefácio --------- -Preface special section. - - -Cólofon -------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Appêndice A: Example Appendix ------------------------------ -Appendix special section. - - -Bibliografia ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glossário ---------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Ãndice ------- -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-ro-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ro-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ro-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ro-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ro-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ro-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ro-article-test-html4.html asciidoc-10.1.2/tests/data/lang-ro-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-ro-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Abstract

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Suggerimento

    +
    Lorum ipsum.
    + + + +
    +

    Avvertenza

    +
    Lorum ipsum.
    + + + +
    +

    Attenzione

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabella 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Versione v1.0
    +Ultimo aggiornamento + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-article-test-html5.html asciidoc-10.1.2/tests/data/lang-ro-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-ro-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-ro-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-ro-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Abstract

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ro-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ro-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedica +Dedication special section. + + +Prefazione +Preface special section. + + +Colofone +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ro-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ro-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ro-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedica +Dedication special section. + + +Prefazione +Preface special section. + + +Colofone +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Bibliografia +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Glossario +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Index + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ro-book-test-html4.html asciidoc-10.1.2/tests/data/lang-ro-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-ro-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedica

    +

    Dedication special section.

    +
    +

    Prefazione

    +

    Preface special section.

    +
    +

    Colofone

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Nota

    +
    Lorum ipsum.
    + + + +
    +

    Suggerimento

    +
    Lorum ipsum.
    + + + +
    +

    Avvertenza

    +
    Lorum ipsum.
    + + + +
    +

    Attenzione

    +
    Lorum ipsum.
    + + + +
    +

    Importante

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figura 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabella 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendice A: Example Appendix

    +

    Appendix special section.

    +
    +

    Bibliografia

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Glossario

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Versione v1.0
    +Ultimo aggiornamento + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-book-test-html5.html asciidoc-10.1.2/tests/data/lang-ro-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-ro-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedica

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefazione

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofone

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-ro-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-ro-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedica

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Prefazione

    +
    +

    Preface special section.

    +
    +
    +
    +

    Colofone

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Nota
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Suggerimento
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Avvertenza
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Attenzione
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Importante
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figura 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabella 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendice A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Bibliografia

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Glossario

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ro-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ro-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ro-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ro-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ro-man-test.txt asciidoc-10.1.2/tests/data/lang-ro-man-test.txt --- asciidoc-8.6.10/tests/data/lang-ro-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-it.conf language file. -:lang: it - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -SINOSSI -------- -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-ro-test.txt asciidoc-10.1.2/tests/data/lang-ro-test.txt --- asciidoc-8.6.10/tests/data/lang-ro-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ro-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-it.conf language file. -:lang: it - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -Abstract --------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -Dedica ------- -Dedication special section. - - -Prefazione ----------- -Preface special section. - - -Colofone --------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Appendice A: Example Appendix ------------------------------ -Appendix special section. - - -Bibliografia ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Glossario ---------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Index ------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-ru-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ru-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ru-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Ð‘Ð¸Ð±Ð»Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словарь терминов +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметный указатель + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ru-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ru-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ru-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Ð‘Ð¸Ð±Ð»Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словарь терминов +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметный указатель + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ru-article-test-html4.html asciidoc-10.1.2/tests/data/lang-ru-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-ru-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    ÐннотациÑ

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Замечание

    +
    Lorum ipsum.
    + + + +
    +

    ПодÑказка

    +
    Lorum ipsum.
    + + + +
    +

    Внимание

    +
    Lorum ipsum.
    + + + +
    +

    ПредоÑтережение

    +
    Lorum ipsum.
    + + + +
    +

    Важно

    +
    Lorum ipsum.
    +
    +Tiger image +

    РиÑунок 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Таблица 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Приложение A: Example Appendix

    +

    Appendix special section.

    +
    +

    БиблиографиÑ

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Словарь терминов

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Ð ÐµÐ´Ð°ÐºÑ†Ð¸Ñ v1.0
    +ПоÑледнее обновление + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-article-test-html5.html asciidoc-10.1.2/tests/data/lang-ru-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-ru-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    ÐннотациÑ

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Замечание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПодÑказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Внимание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПредоÑтережение
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важно
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Таблица 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Приложение A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БиблиографиÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словарь терминов

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-ru-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-ru-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    ÐннотациÑ

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Замечание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПодÑказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Внимание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПредоÑтережение
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важно
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Таблица 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Приложение A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БиблиографиÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словарь терминов

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ru-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ru-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +ПоÑвÑщение +Dedication special section. + + +Введение +Preface special section. + + +Колофон +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Ð‘Ð¸Ð±Ð»Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словарь терминов +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметный указатель + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ru-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ru-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ru-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +ПоÑвÑщение +Dedication special section. + + +Введение +Preface special section. + + +Колофон +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Example Appendix +Appendix special section. + + +Ð‘Ð¸Ð±Ð»Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словарь терминов +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметный указатель + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-ru-book-test-html4.html asciidoc-10.1.2/tests/data/lang-ru-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-ru-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    ПоÑвÑщение

    +

    Dedication special section.

    +
    +

    Введение

    +

    Preface special section.

    +
    +

    Колофон

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Замечание

    +
    Lorum ipsum.
    + + + +
    +

    ПодÑказка

    +
    Lorum ipsum.
    + + + +
    +

    Внимание

    +
    Lorum ipsum.
    + + + +
    +

    ПредоÑтережение

    +
    Lorum ipsum.
    + + + +
    +

    Важно

    +
    Lorum ipsum.
    +
    +Tiger image +

    РиÑунок 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Таблица 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Приложение A: Example Appendix

    +

    Appendix special section.

    +
    +

    БиблиографиÑ

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Словарь терминов

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Ð ÐµÐ´Ð°ÐºÑ†Ð¸Ñ v1.0
    +ПоÑледнее обновление + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-book-test-html5.html asciidoc-10.1.2/tests/data/lang-ru-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-ru-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    ПоÑвÑщение

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Введение

    +
    +

    Preface special section.

    +
    +
    +
    +

    Колофон

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Замечание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПодÑказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Внимание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПредоÑтережение
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важно
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Таблица 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Приложение A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БиблиографиÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словарь терминов

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-ru-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-ru-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    ПоÑвÑщение

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Введение

    +
    +

    Preface special section.

    +
    +
    +
    +

    Колофон

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Замечание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПодÑказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Внимание
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПредоÑтережение
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важно
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Таблица 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Приложение A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БиблиографиÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словарь терминов

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-ru-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-ru-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-ru-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-ru-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-ru-man-test.txt asciidoc-10.1.2/tests/data/lang-ru-man-test.txt --- asciidoc-8.6.10/tests/data/lang-ru-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-ru.conf language file. -:lang: ru - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -ОБЗОР ------ -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-ru-test.txt asciidoc-10.1.2/tests/data/lang-ru-test.txt --- asciidoc-8.6.10/tests/data/lang-ru-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-ru-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-ru.conf language file. -:lang: ru - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ ---------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -ПоÑвÑщение ----------- -Dedication special section. - - -Введение --------- -Preface special section. - - -Колофон -------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Приложение A: Example Appendix ------------------------------- -Appendix special section. - - -Ð‘Ð¸Ð±Ð»Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Словарь терминов ----------------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Предметный указатель --------------------- -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-sv-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-sv-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-sv-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Exempel-appendix +Appendix special section. + + +Referenser +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Ordlista +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Sakregister + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-sv-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-sv-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-sv-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Exempel-appendix +Appendix special section. + + +Referenser +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Ordlista +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Sakregister + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-sv-article-test-html4.html asciidoc-10.1.2/tests/data/lang-sv-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-sv-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Sammanfattning

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Not

    +
    Lorum ipsum.
    + + + +
    +

    Tips

    +
    Lorum ipsum.
    + + + +
    +

    Varning

    +
    Lorum ipsum.
    + + + +
    +

    Varning

    +
    Lorum ipsum.
    + + + +
    +

    Viktigt

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figur 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabell 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendix A: Exempel-appendix

    +

    Appendix special section.

    +
    +

    Referenser

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Ordlista

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Senast uppdaterad + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-article-test-html5.html asciidoc-10.1.2/tests/data/lang-sv-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-sv-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Sammanfattning

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Not
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tips
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Viktigt
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figur 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabell 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Exempel-appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Referenser

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Ordlista

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-sv-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-sv-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Sammanfattning

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Not
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tips
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Viktigt
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figur 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabell 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Exempel-appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Referenser

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Ordlista

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-sv-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-sv-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2003-12-21 + v1.02003-12-21 + + +Dedikation +Dedication special section. + + +Förord +Preface special section. + + +Kolofon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Exempel-appendix +Appendix special section. + + +Referenser +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Ordlista +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Sakregister + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-sv-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-sv-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-sv-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2003-12-21 +v1.02003-12-21 + + +Dedikation +Dedication special section. + + +Förord +Preface special section. + + +Kolofon +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Exempel-appendix +Appendix special section. + + +Referenser +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Ordlista +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Sakregister + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-sv-book-test-html4.html asciidoc-10.1.2/tests/data/lang-sv-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-sv-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2003-12-21 +

    +
    +

    Dedikation

    +

    Dedication special section.

    +
    +

    Förord

    +

    Preface special section.

    +
    +

    Kolofon

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    Not

    +
    Lorum ipsum.
    + + + +
    +

    Tips

    +
    Lorum ipsum.
    + + + +
    +

    Varning

    +
    Lorum ipsum.
    + + + +
    +

    Varning

    +
    Lorum ipsum.
    + + + +
    +

    Viktigt

    +
    Lorum ipsum.
    +
    +Tiger image +

    Figur 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Tabell 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Appendix A: Exempel-appendix

    +

    Appendix special section.

    +
    +

    Referenser

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Ordlista

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +Version v1.0
    +Senast uppdaterad + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-book-test-html5.html asciidoc-10.1.2/tests/data/lang-sv-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-sv-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    Dedikation

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Förord

    +
    +

    Preface special section.

    +
    +
    +
    +

    Kolofon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Not
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tips
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Viktigt
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figur 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Tabell 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Exempel-appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Referenser

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Ordlista

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-sv-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-sv-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    Dedikation

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Förord

    +
    +

    Preface special section.

    +
    +
    +
    +

    Kolofon

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    Not
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tips
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Varning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Viktigt
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    Figur 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Tabell 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Appendix A: Exempel-appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    Referenser

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Ordlista

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-sv-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-sv-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +BESKRIVNING +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-sv-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-sv-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +BESKRIVNING +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-sv-man-test.txt asciidoc-10.1.2/tests/data/lang-sv-man-test.txt --- asciidoc-8.6.10/tests/data/lang-sv-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-sv.conf language file. -:lang: sv - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAMN ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -ÖVERSIKT --------- -*asciidoc* ['OPTIONS'] 'FILE' - -BESKRIVNING ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-sv-test.txt asciidoc-10.1.2/tests/data/lang-sv-test.txt --- asciidoc-8.6.10/tests/data/lang-sv-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-sv-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,114 +0,0 @@ -// Test for lang-sv.conf language file. -:lang: sv - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2003-12-21 - -ifdef::doctype-article[] -// Translate title. -Sammanfattning --------------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -// Translate title. -Dedikation ----------- -Dedication special section. - - -// Translate title. -Förord ------- -Preface special section. - - -// Translate title. -Kolofon -------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -// Translate title. -Appendix A: Exempel-appendix ----------------------------- -Appendix special section. - - -// Translate title. -Referenser ----------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -// Translate title. -Ordlista --------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -// Translate title. -Sakregister ------------ -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/lang-uk-article-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-uk-article-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-uk-article-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-article-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ + + + + +
    + + Languages Test + 2011-01-30 + v1.02011-01-30 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    +
    +Додаток A: Example Appendix +Appendix special section. +
    + +Ð‘Ñ–Ð±Ð»Ñ–Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словник термінів +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметний покажчик + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-uk-article-test-docbook.xml asciidoc-10.1.2/tests/data/lang-uk-article-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-uk-article-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-article-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,118 @@ + + + + + +
    + + Languages Test + 2011-01-30 +v1.02011-01-30 + + +Abstract special section. + +
    +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    +
    +Додаток A: Example Appendix +Appendix special section. +
    + +Ð‘Ñ–Ð±Ð»Ñ–Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словник термінів +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметний покажчик + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-uk-article-test-html4.html asciidoc-10.1.2/tests/data/lang-uk-article-test-html4.html --- asciidoc-8.6.10/tests/data/lang-uk-article-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-article-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,133 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2011-01-30 +

    +
    +

    ÐнотаціÑ

    +

    Abstract special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    ЗауваженнÑ

    +
    Lorum ipsum.
    + + + +
    +

    Підказка

    +
    Lorum ipsum.
    + + + +
    +

    Увага

    +
    Lorum ipsum.
    + + + +
    +

    ПопередженнÑ

    +
    Lorum ipsum.
    + + + +
    +

    Важливо

    +
    Lorum ipsum.
    +
    +Tiger image +

    РиÑунок 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Додаток A: Example Appendix

    +

    Appendix special section.

    +
    +

    БібліографіÑ

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Словник термінів

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +ВерÑÑ–Ñ v1.0
    +ВоÑтаннє оновлено + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-article-test-html5.html asciidoc-10.1.2/tests/data/lang-uk-article-test-html5.html --- asciidoc-8.6.10/tests/data/lang-uk-article-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-article-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,894 @@ + + + + + +Languages Test + + + + + +
    +
    +

    ÐнотаціÑ

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    ЗауваженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Підказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Увага
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПопередженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важливо
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Додаток A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БібліографіÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словник термінів

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-article-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-uk-article-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-uk-article-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-article-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,898 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    ÐнотаціÑ

    +
    +

    Abstract special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    ЗауваженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Підказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Увага
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПопередженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важливо
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Додаток A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БібліографіÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словник термінів

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-book-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-uk-book-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-uk-book-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-book-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,126 @@ + + + + + + + Languages Test + 2011-01-30 + v1.02011-01-30 + + +ПриÑвÑÑ‡ÐµÐ½Ð½Ñ +Dedication special section. + + +Ð’Ñтуп +Preface special section. + + +Колофон +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Додаток A: Example Appendix +Appendix special section. + + +Ð‘Ñ–Ð±Ð»Ñ–Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словник термінів +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметний покажчик + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-uk-book-test-docbook.xml asciidoc-10.1.2/tests/data/lang-uk-book-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-uk-book-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-book-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,127 @@ + + + + + + + + Languages Test + 2011-01-30 +v1.02011-01-30 + + +ПриÑвÑÑ‡ÐµÐ½Ð½Ñ +Dedication special section. + + +Ð’Ñтуп +Preface special section. + + +Колофон +Colophon special section. + + +The First Section +
    +Admonishments +Do not translate in the source file — they are translated to the +output file +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    Tiger + + + + + Tiger image + +
    +Followed by an example table: + +Table + + + + + + + + + Option + Description + + + + +-a USER GROUP +Add USER to GROUP. + + +-R GROUP +Disables access to GROUP. + + + +
    +And now for something completely different: monkeysmonkeys, lions and +tigers. +
    +
    + +Додаток A: Example Appendix +Appendix special section. + + +Ð‘Ñ–Ð±Ð»Ñ–Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ +Bibliography special section. + + + +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. + + + + +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + + + + +Словник термінів +Glossary special section. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +Предметний покажчик + +
    diff -Nru asciidoc-8.6.10/tests/data/lang-uk-book-test-html4.html asciidoc-10.1.2/tests/data/lang-uk-book-test-html4.html --- asciidoc-8.6.10/tests/data/lang-uk-book-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-book-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ + + + + + +Languages Test + + +

    Languages Test

    +

    +version v1.0, +2011-01-30 +

    +
    +

    ПриÑвÑченнÑ

    +

    Dedication special section.

    +
    +

    Ð’Ñтуп

    +

    Preface special section.

    +
    +

    Колофон

    +

    Colophon special section.

    +
    +

    The First Section

    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    + + + +
    +

    ЗауваженнÑ

    +
    Lorum ipsum.
    + + + +
    +

    Підказка

    +
    Lorum ipsum.
    + + + +
    +

    Увага

    +
    Lorum ipsum.
    + + + +
    +

    ПопередженнÑ

    +
    Lorum ipsum.
    + + + +
    +

    Важливо

    +
    Lorum ipsum.
    +
    +Tiger image +

    РиÑунок 1. Tiger

    +
    +

    Followed by an example table:

    +
    + + + + + + + + + + + + + + + + + +
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ 1. Table

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +

    Додаток A: Example Appendix

    +

    Appendix special section.

    +
    +

    БібліографіÑ

    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +

    Словник термінів

    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +

    +

    +

    +ВерÑÑ–Ñ v1.0
    +ВоÑтаннє оновлено + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-book-test-html5.html asciidoc-10.1.2/tests/data/lang-uk-book-test-html5.html --- asciidoc-8.6.10/tests/data/lang-uk-book-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-book-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,906 @@ + + + + + +Languages Test + + + + + +
    +
    +

    ПриÑвÑченнÑ

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Ð’Ñтуп

    +
    +

    Preface special section.

    +
    +
    +
    +

    Колофон

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    ЗауваженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Підказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Увага
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПопередженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важливо
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    + + +++ + + + + + + + + + + + + + + + +
    Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Додаток A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БібліографіÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словник термінів

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-book-test-xhtml11.html asciidoc-10.1.2/tests/data/lang-uk-book-test-xhtml11.html --- asciidoc-8.6.10/tests/data/lang-uk-book-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-book-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,910 @@ + + + + + + +Languages Test + + + + + +
    +
    +

    ПриÑвÑченнÑ

    +
    +

    Dedication special section.

    +
    +
    +
    +

    Ð’Ñтуп

    +
    +

    Preface special section.

    +
    +
    +
    +

    Колофон

    +
    +

    Colophon special section.

    +
    +
    +
    +

    The First Section

    +
    +
    +

    Admonishments

    +

    Do not translate in the source file — they are translated to the +output file

    +
    + + + +
    +
    ЗауваженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Підказка
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Увага
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    ПопередженнÑ
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Важливо
    +
    Lorum ipsum.
    +
    +
    +
    +Tiger image +
    +
    РиÑунок 1. Tiger
    +
    +

    Followed by an example table:

    +
    + + +++ + + + + + + + + + + + + + + + +
    Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ 1. Table
    Option Description

    -a USER GROUP

    Add USER to GROUP.

    -R GROUP

    Disables access to GROUP.

    +
    +

    And now for something completely different: monkeys, lions and +tigers.

    +
    +
    +
    +
    +

    Додаток A: Example Appendix

    +
    +

    Appendix special section.

    +
    +
    +
    +

    БібліографіÑ

    +
    +

    Bibliography special section.

    +
      +
    • +

      +[taoup] Eric Steven Raymond. The Art of Unix + Programming. Addison-Wesley. ISBN 0-13-142901-9. +

      +
    • +
    • +

      +[walsh-muellner] Norman Walsh & Leonard Muellner. + DocBook - The Definitive Guide. O’Reilly & Associates. 1999. + ISBN 1-56592-580-7. +

      +
    • +
    +
    +
    +
    +

    Словник термінів

    +
    +

    Glossary special section.

    +
    +
    +A glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +A second glossary term +
    +
    +

    + The corresponding (indented) definition. +

    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-man-test-docbook5.xml asciidoc-10.1.2/tests/data/lang-uk-man-test-docbook5.xml --- asciidoc-8.6.10/tests/data/lang-uk-man-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-man-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-man-test-docbook.xml asciidoc-10.1.2/tests/data/lang-uk-man-test-docbook.xml --- asciidoc-8.6.10/tests/data/lang-uk-man-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-man-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,28 @@ + + + + + + + ASCIIDOC(1) + + +asciidoc +1 +  +  + + + asciidoc + converts an AsciiDoc text file to HTML or DocBook + + +asciidoc [OPTIONS] FILE + + +DESCRIPTION +The asciidoc(1) command translates the AsciiDoc text file FILE to +DocBook or HTML. If FILE is - then the standard input is used. + + + diff -Nru asciidoc-8.6.10/tests/data/lang-uk-man-test.txt asciidoc-10.1.2/tests/data/lang-uk-man-test.txt --- asciidoc-8.6.10/tests/data/lang-uk-man-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-man-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -// Test for lang-uk.conf language file. -:lang: uk - -ASCIIDOC(1) -=========== -:doctype: manpage - -NAME ----- -asciidoc - converts an AsciiDoc text file to HTML or DocBook - -ОГЛЯД ------ -*asciidoc* ['OPTIONS'] 'FILE' - -DESCRIPTION ------------ -The asciidoc(1) command translates the AsciiDoc text file 'FILE' to -DocBook or HTML. If 'FILE' is '-' then the standard input is used. - -... diff -Nru asciidoc-8.6.10/tests/data/lang-uk-test.txt asciidoc-10.1.2/tests/data/lang-uk-test.txt --- asciidoc-8.6.10/tests/data/lang-uk-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/lang-uk-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,106 +0,0 @@ -// Test for lang-uk.conf language file. -:lang: uk - -Languages Test -============== -:revnumber: v1.0 -:revdate: 2011-01-30 - -ifdef::doctype-article[] -ÐÐ½Ð¾Ñ‚Ð°Ñ†Ñ–Ñ --------- -Abstract special section. - -endif::doctype-article[] - - -ifdef::doctype-book[] -ПриÑвÑÑ‡ÐµÐ½Ð½Ñ ------------ -Dedication special section. - - -Ð’Ñтуп ------ -Preface special section. - - -Колофон -------- -Colophon special section. - -endif::doctype-book[] - - -The First Section ------------------ -Admonishments -~~~~~~~~~~~~~ -Do not translate in the source file -- they are translated to the -output file - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -.Tiger -image::../../images/tiger.png[Tiger image] - -Followed by an example table: - -.Table -[width="60%",options="header"] -|============================================== -| Option | Description -| -a 'USER GROUP' | Add 'USER' to 'GROUP'. -| -R 'GROUP' | Disables access to 'GROUP'. -|============================================== - -And now for something completely different: ((monkeys)), lions and -tigers. - - -Додаток A: Example Appendix ---------------------------- -Appendix special section. - - -Ð‘Ñ–Ð±Ð»Ñ–Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ ------------- -Bibliography special section. - -[bibliography] -- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix - Programming'. Addison-Wesley. ISBN 0-13-142901-9. -- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. - 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. - ISBN 1-56592-580-7. - - -Словник термінів ----------------- -Glossary special section. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - - -ifdef::basebackend-docbook[] -Предметний покажчик -------------------- -//////////////////////////////////////////////////////////////// -Index special section. -The index is normally left completely empty, it's contents being -generated automatically by the DocBook toolchain. -//////////////////////////////////////////////////////////////// -endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/data/latex-filter-docbook5.xml asciidoc-10.1.2/tests/data/latex-filter-docbook5.xml --- asciidoc-8.6.10/tests/data/latex-filter-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latex-filter-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,206 @@ + + + + +
    + + LaTeX Filter + +The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source +to an image which is automatically inserted into the AsciiDoc output document. +Although it can accept any LaTeX source, the primary use is to render +mathematical formulae (see the examples below). The filter implements the +latex Listing block and Paragraph styles. +Two image formats are supported; PNG and SVG. PNG is the default since that +was the first format that this filter supported. However, SVG is a better +format since it’s scalable. Using SVG make formulas look good in both PDFs +and on web pages. SVG will also scale well when zooming in on a web page for +example. It is recommended to always use the SVG format. This can be done by +setting the imgfmt parameter to svg, as is done below. An even better way +is to set the global attribute latex-imgfmt to svg. Then SVG will be used +for all formulas. +This LaTeX paragraph: +["latex", imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- +Renders: + + + + + + latex-filter__1.svg + + +Compare the formula above, which is rendered as an SVG image, to the formula +below which has been rendered as a PNG image. The difference will be most +notable if zooming in on a web page, printing the web page or when rendering +the document as a PDF. +["latex", "latex2.png", 140, imgfmt="png"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- +Renders: + + + + + + latex2.png + + +This LaTeX block: +["latex","latex1.svg",imgfmt="svg",align="center"] +--------------------------------------------------------------------- +\begin{equation*} +\displaystyle{ V_i = C_0 - C_3 +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} } +\end{equation*} +--------------------------------------------------------------------- +Renders: + + + + + + latex1.svg + + +This LaTeX block: +.LaTeX filter example +[latex] +["latex","latex3.svg",imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation} +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{ +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2} +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}. +\end{equation} + +\begin{equation} +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))} +\end{equation} + +\begin{equation}\label{first} +a=b+c +\end{equation} + +\begin{subequations}\label{grp} +\begin{align} +a&=b+c\label{second}\\ +d&=e+f+g\label{third}\\ +h&=i+j\label{fourth} +\end{align} +\end{subequations} +--------------------------------------------------------------------- +Renders: +
    LaTeX filter example + + + + + latex3.svg + +
    +This LaTeX paragraph: +.A LaTeX table +["latex",imgfmt="svg"] +\begin{tabular}{c r @{.} l} +Pi expression & +\multicolumn{2}{c}{Value} \\ +\hline +$\pi$ & 3&1416 \\ +$\pi^{\pi}$ & 36&46 \\ +$(\pi^{\pi})^{\pi}$ & 80662&7 \\ +\end{tabular} +Renders: +
    A LaTeX table + + + + + latex-filter__2.svg + +
    +
    +Using the Filter + + + +The LaTeX filter is invoked by setting the Listing block or + Paragraph style (the first positional block attribute) to latex. + + + + +The second positional attribute (named target is optional, it sets + the name of the generated image file. If this is not supplied a + file name like {docname}__{target-number}.{imgfmt} is synthesised + (where {docname} is the document file name, {target-number} + is an integer number and {imgfmt} is the image format (png or svg). + + + + +The third positional attribute, named dpi, is also optional; it is + an integer number that sets the output resolution in dots per inch + for a PNG image. It is ignored for an SVG image. + + + + +The image format to use can be selected by setting the imgfmt + parameter or by globally setting the latex-imgfmt attribute. + Setting it to svg will render SVG images and setting it to png + will render PNG images. The default is png. + + + +Because the LaTeX images are rendered using the image block templates +you can also use the optional named image block attributes (see +Image macro attributes in the AsciiDoc User +Guide). + +You can also change the image size using the following LaTeX commands: +\tiny +\scriptsize +\footnotesize +\small +\normalsize +\large +\Large +\LARGE +\huge +For example: +[latex] +\Large $y = \int_0^\infty \gamma^2 \cos(x) dx$ +The \Large command is outside the $ math delimiters. + +The filter (./filters/latex/latex2img.py) can be used outside +AsciiDoc to convert LaTeX source to images. +Execute the following command to see how to use it: +$ ./filters/latex/latex2img.py --help +
    +
    +Limitations + + + +The asciidoc(1) input and output files cannot both be - (stdin + and stdout), either the input or output files (or both) must be a + named file. + + + +
    +
    +Installation +In addition to AsciiDoc you will need to have latex(1), +dvipng(1) (for PNG) and/or dvisvgm(1) (for SVG) installed. +
    +
    diff -Nru asciidoc-8.6.10/tests/data/latex-filter-docbook.xml asciidoc-10.1.2/tests/data/latex-filter-docbook.xml --- asciidoc-8.6.10/tests/data/latex-filter-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latex-filter-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,207 @@ + + + + + +
    + + LaTeX Filter + +The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source +to an image which is automatically inserted into the AsciiDoc output document. +Although it can accept any LaTeX source, the primary use is to render +mathematical formulae (see the examples below). The filter implements the +latex Listing block and Paragraph styles. +Two image formats are supported; PNG and SVG. PNG is the default since that +was the first format that this filter supported. However, SVG is a better +format since it’s scalable. Using SVG make formulas look good in both PDFs +and on web pages. SVG will also scale well when zooming in on a web page for +example. It is recommended to always use the SVG format. This can be done by +setting the imgfmt parameter to svg, as is done below. An even better way +is to set the global attribute latex-imgfmt to svg. Then SVG will be used +for all formulas. +This LaTeX paragraph: +["latex", imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- +Renders: + + + + + + latex-filter__1.svg + + +Compare the formula above, which is rendered as an SVG image, to the formula +below which has been rendered as a PNG image. The difference will be most +notable if zooming in on a web page, printing the web page or when rendering +the document as a PDF. +["latex", "latex2.png", 140, imgfmt="png"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- +Renders: + + + + + + latex2.png + + +This LaTeX block: +["latex","latex1.svg",imgfmt="svg",align="center"] +--------------------------------------------------------------------- +\begin{equation*} +\displaystyle{ V_i = C_0 - C_3 +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} } +\end{equation*} +--------------------------------------------------------------------- +Renders: + + + + + + latex1.svg + + +This LaTeX block: +.LaTeX filter example +[latex] +["latex","latex3.svg",imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation} +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{ +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2} +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}. +\end{equation} + +\begin{equation} +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))} +\end{equation} + +\begin{equation}\label{first} +a=b+c +\end{equation} + +\begin{subequations}\label{grp} +\begin{align} +a&=b+c\label{second}\\ +d&=e+f+g\label{third}\\ +h&=i+j\label{fourth} +\end{align} +\end{subequations} +--------------------------------------------------------------------- +Renders: +
    LaTeX filter example + + + + + latex3.svg + +
    +This LaTeX paragraph: +.A LaTeX table +["latex",imgfmt="svg"] +\begin{tabular}{c r @{.} l} +Pi expression & +\multicolumn{2}{c}{Value} \\ +\hline +$\pi$ & 3&1416 \\ +$\pi^{\pi}$ & 36&46 \\ +$(\pi^{\pi})^{\pi}$ & 80662&7 \\ +\end{tabular} +Renders: +
    A LaTeX table + + + + + latex-filter__2.svg + +
    +
    +Using the Filter + + + +The LaTeX filter is invoked by setting the Listing block or + Paragraph style (the first positional block attribute) to latex. + + + + +The second positional attribute (named target is optional, it sets + the name of the generated image file. If this is not supplied a + file name like {docname}__{target-number}.{imgfmt} is synthesised + (where {docname} is the document file name, {target-number} + is an integer number and {imgfmt} is the image format (png or svg). + + + + +The third positional attribute, named dpi, is also optional; it is + an integer number that sets the output resolution in dots per inch + for a PNG image. It is ignored for an SVG image. + + + + +The image format to use can be selected by setting the imgfmt + parameter or by globally setting the latex-imgfmt attribute. + Setting it to svg will render SVG images and setting it to png + will render PNG images. The default is png. + + + +Because the LaTeX images are rendered using the image block templates +you can also use the optional named image block attributes (see +Image macro attributes in the AsciiDoc User +Guide). + +You can also change the image size using the following LaTeX commands: +\tiny +\scriptsize +\footnotesize +\small +\normalsize +\large +\Large +\LARGE +\huge +For example: +[latex] +\Large $y = \int_0^\infty \gamma^2 \cos(x) dx$ +The \Large command is outside the $ math delimiters. + +The filter (./filters/latex/latex2img.py) can be used outside +AsciiDoc to convert LaTeX source to images. +Execute the following command to see how to use it: +$ ./filters/latex/latex2img.py --help +
    +
    +Limitations + + + +The asciidoc(1) input and output files cannot both be - (stdin + and stdout), either the input or output files (or both) must be a + named file. + + + +
    +
    +Installation +In addition to AsciiDoc you will need to have latex(1), +dvipng(1) (for PNG) and/or dvisvgm(1) (for SVG) installed. +
    +
    diff -Nru asciidoc-8.6.10/tests/data/latex-filter-html4.html asciidoc-10.1.2/tests/data/latex-filter-html4.html --- asciidoc-8.6.10/tests/data/latex-filter-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latex-filter-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,206 @@ + + + + + +LaTeX Filter + + +

    LaTeX Filter

    +

    +

    + +

    The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source +to an image which is automatically inserted into the AsciiDoc output document. +Although it can accept any LaTeX source, the primary use is to render +mathematical formulae (see the examples below). The filter implements the +latex Listing block and Paragraph styles.

    +

    Two image formats are supported; PNG and SVG. PNG is the default since that +was the first format that this filter supported. However, SVG is a better +format since it’s scalable. Using SVG make formulas look good in both PDFs +and on web pages. SVG will also scale well when zooming in on a web page for +example. It is recommended to always use the SVG format. This can be done by +setting the imgfmt parameter to svg, as is done below. An even better way +is to set the global attribute latex-imgfmt to svg. Then SVG will be used +for all formulas.

    +

    This LaTeX paragraph:

    +
    +
    ["latex", imgfmt="svg"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +y = \int_0^\infty \gamma^2 \cos(x) dx
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +latex-filter__1.svg +
    +

    Compare the formula above, which is rendered as an SVG image, to the formula +below which has been rendered as a PNG image. The difference will be most +notable if zooming in on a web page, printing the web page or when rendering +the document as a PDF.

    +
    +
    ["latex", "latex2.png", 140, imgfmt="png"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +y = \int_0^\infty \gamma^2 \cos(x) dx
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +latex2.png +
    +

    This LaTeX block:

    +
    +
    ["latex","latex1.svg",imgfmt="svg",align="center"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +\displaystyle{ V_i = C_0 - C_3
    +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +latex1.svg +
    +

    This LaTeX block:

    +
    +
    .LaTeX filter example
    +[latex]
    +["latex","latex3.svg",imgfmt="svg"]
    +---------------------------------------------------------------------
    +\begin{equation}
    +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{
    +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}
    +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}.
    +\end{equation}
    +
    +\begin{equation}
    +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
    +\end{equation}
    +
    +\begin{equation}\label{first}
    +a=b+c
    +\end{equation}
    +
    +\begin{subequations}\label{grp}
    +\begin{align}
    +a&=b+c\label{second}\\
    +d&=e+f+g\label{third}\\
    +h&=i+j\label{fourth}
    +\end{align}
    +\end{subequations}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +latex3.svg +

    Figure 1. LaTeX filter example

    +
    +

    This LaTeX paragraph:

    +
    +
    .A LaTeX table
    +["latex",imgfmt="svg"]
    +\begin{tabular}{c r @{.} l}
    +Pi expression &
    +\multicolumn{2}{c}{Value} \\
    +\hline
    +$\pi$ & 3&1416 \\
    +$\pi^{\pi}$ & 36&46 \\
    +$(\pi^{\pi})^{\pi}$ & 80662&7 \\
    +\end{tabular}
    +
    +

    Renders:

    +
    +latex-filter__2.svg +

    Figure 2. A LaTeX table

    +
    +
    +

    Using the Filter

    +
      +
    • +

      +The LaTeX filter is invoked by setting the Listing block or + Paragraph style (the first positional block attribute) to latex. +

      +
    • +
    • +

      +The second positional attribute (named target is optional, it sets + the name of the generated image file. If this is not supplied a + file name like {docname}__{target-number}.{imgfmt} is synthesised + (where {docname} is the document file name, {target-number} + is an integer number and {imgfmt} is the image format (png or svg). +

      +
    • +
    • +

      +The third positional attribute, named dpi, is also optional; it is + an integer number that sets the output resolution in dots per inch + for a PNG image. It is ignored for an SVG image. +

      +
    • +
    • +

      +The image format to use can be selected by setting the imgfmt + parameter or by globally setting the latex-imgfmt attribute. + Setting it to svg will render SVG images and setting it to png + will render PNG images. The default is png. +

      +
    • +
    +

    Because the LaTeX images are rendered using the image block templates +you can also use the optional named image block attributes (see +Image macro attributes in the AsciiDoc User +Guide).

    + + + +
    +

    Tip

    +
    +

    You can also change the image size using the following LaTeX commands:

    +
    \tiny
    +\scriptsize
    +\footnotesize
    +\small
    +\normalsize
    +\large
    +\Large
    +\LARGE
    +\huge
    +

    For example:

    +
    [latex]
    +\Large $y = \int_0^\infty \gamma^2 \cos(x) dx$
    +

    The \Large command is outside the $ math delimiters.

    +
    +

    The filter (./filters/latex/latex2img.py) can be used outside +AsciiDoc to convert LaTeX source to images.

    +

    Execute the following command to see how to use it:

    +
    $ ./filters/latex/latex2img.py --help
    +
    +

    Limitations

    +
      +
    • +

      +The asciidoc(1) input and output files cannot both be - (stdin + and stdout), either the input or output files (or both) must be a + named file. +

      +
    • +
    +
    +

    Installation

    +

    In addition to AsciiDoc you will need to have latex(1), +dvipng(1) (for PNG) and/or dvisvgm(1) (for SVG) installed.

    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/latex-filter-html5.html asciidoc-10.1.2/tests/data/latex-filter-html5.html --- asciidoc-8.6.10/tests/data/latex-filter-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latex-filter-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,972 @@ + + + + + +LaTeX Filter + + + + + +
    +
    +
    +

    The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source +to an image which is automatically inserted into the AsciiDoc output document. +Although it can accept any LaTeX source, the primary use is to render +mathematical formulae (see the examples below). The filter implements the +latex Listing block and Paragraph styles.

    +

    Two image formats are supported; PNG and SVG. PNG is the default since that +was the first format that this filter supported. However, SVG is a better +format since it’s scalable. Using SVG make formulas look good in both PDFs +and on web pages. SVG will also scale well when zooming in on a web page for +example. It is recommended to always use the SVG format. This can be done by +setting the imgfmt parameter to svg, as is done below. An even better way +is to set the global attribute latex-imgfmt to svg. Then SVG will be used +for all formulas.

    +

    This LaTeX paragraph:

    +
    +
    +
    ["latex", imgfmt="svg"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +y = \int_0^\infty \gamma^2 \cos(x) dx
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex-filter__1.svg +
    +
    +

    Compare the formula above, which is rendered as an SVG image, to the formula +below which has been rendered as a PNG image. The difference will be most +notable if zooming in on a web page, printing the web page or when rendering +the document as a PDF.

    +
    +
    +
    ["latex", "latex2.png", 140, imgfmt="png"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +y = \int_0^\infty \gamma^2 \cos(x) dx
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex2.png +
    +
    +

    This LaTeX block:

    +
    +
    +
    ["latex","latex1.svg",imgfmt="svg",align="center"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +\displaystyle{ V_i = C_0 - C_3
    +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex1.svg +
    +
    +

    This LaTeX block:

    +
    +
    +
    .LaTeX filter example
    +[latex]
    +["latex","latex3.svg",imgfmt="svg"]
    +---------------------------------------------------------------------
    +\begin{equation}
    +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{
    +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}
    +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}.
    +\end{equation}
    +
    +\begin{equation}
    +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
    +\end{equation}
    +
    +\begin{equation}\label{first}
    +a=b+c
    +\end{equation}
    +
    +\begin{subequations}\label{grp}
    +\begin{align}
    +a&=b+c\label{second}\\
    +d&=e+f+g\label{third}\\
    +h&=i+j\label{fourth}
    +\end{align}
    +\end{subequations}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex3.svg +
    +
    Figure 1. LaTeX filter example
    +
    +

    This LaTeX paragraph:

    +
    +
    +
    .A LaTeX table
    +["latex",imgfmt="svg"]
    +\begin{tabular}{c r @{.} l}
    +Pi expression &
    +\multicolumn{2}{c}{Value} \\
    +\hline
    +$\pi$ & 3&1416 \\
    +$\pi^{\pi}$ & 36&46 \\
    +$(\pi^{\pi})^{\pi}$ & 80662&7 \\
    +\end{tabular}
    +
    +

    Renders:

    +
    +
    +latex-filter__2.svg +
    +
    Figure 2. A LaTeX table
    +
    +
    +
    +
    +

    Using the Filter

    +
    +
      +
    • +

      +The LaTeX filter is invoked by setting the Listing block or + Paragraph style (the first positional block attribute) to latex. +

      +
    • +
    • +

      +The second positional attribute (named target is optional, it sets + the name of the generated image file. If this is not supplied a + file name like {docname}__{target-number}.{imgfmt} is synthesised + (where {docname} is the document file name, {target-number} + is an integer number and {imgfmt} is the image format (png or svg). +

      +
    • +
    • +

      +The third positional attribute, named dpi, is also optional; it is + an integer number that sets the output resolution in dots per inch + for a PNG image. It is ignored for an SVG image. +

      +
    • +
    • +

      +The image format to use can be selected by setting the imgfmt + parameter or by globally setting the latex-imgfmt attribute. + Setting it to svg will render SVG images and setting it to png + will render PNG images. The default is png. +

      +
    • +
    +

    Because the LaTeX images are rendered using the image block templates +you can also use the optional named image block attributes (see +Image macro attributes in the AsciiDoc User +Guide).

    +
    + + + +
    +
    Tip
    +
    +

    You can also change the image size using the following LaTeX commands:

    +
    +
    +
    \tiny
    +\scriptsize
    +\footnotesize
    +\small
    +\normalsize
    +\large
    +\Large
    +\LARGE
    +\huge
    +
    +

    For example:

    +
    +
    +
    [latex]
    +\Large $y = \int_0^\infty \gamma^2 \cos(x) dx$
    +
    +

    The \Large command is outside the $ math delimiters.

    +
    +
    +

    The filter (./filters/latex/latex2img.py) can be used outside +AsciiDoc to convert LaTeX source to images.

    +

    Execute the following command to see how to use it:

    +
    +
    +
    $ ./filters/latex/latex2img.py --help
    +
    +
    +
    +
    +

    Limitations

    +
    +
      +
    • +

      +The asciidoc(1) input and output files cannot both be - (stdin + and stdout), either the input or output files (or both) must be a + named file. +

      +
    • +
    +
    +
    +
    +

    Installation

    +
    +

    In addition to AsciiDoc you will need to have latex(1), +dvipng(1) (for PNG) and/or dvisvgm(1) (for SVG) installed.

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/latex-filter-xhtml11.html asciidoc-10.1.2/tests/data/latex-filter-xhtml11.html --- asciidoc-8.6.10/tests/data/latex-filter-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latex-filter-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,974 @@ + + + + + + +LaTeX Filter + + + + + +
    +
    +
    +

    The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source +to an image which is automatically inserted into the AsciiDoc output document. +Although it can accept any LaTeX source, the primary use is to render +mathematical formulae (see the examples below). The filter implements the +latex Listing block and Paragraph styles.

    +

    Two image formats are supported; PNG and SVG. PNG is the default since that +was the first format that this filter supported. However, SVG is a better +format since it’s scalable. Using SVG make formulas look good in both PDFs +and on web pages. SVG will also scale well when zooming in on a web page for +example. It is recommended to always use the SVG format. This can be done by +setting the imgfmt parameter to svg, as is done below. An even better way +is to set the global attribute latex-imgfmt to svg. Then SVG will be used +for all formulas.

    +

    This LaTeX paragraph:

    +
    +
    +
    ["latex", imgfmt="svg"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +y = \int_0^\infty \gamma^2 \cos(x) dx
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex-filter__1.svg +
    +
    +

    Compare the formula above, which is rendered as an SVG image, to the formula +below which has been rendered as a PNG image. The difference will be most +notable if zooming in on a web page, printing the web page or when rendering +the document as a PDF.

    +
    +
    +
    ["latex", "latex2.png", 140, imgfmt="png"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +y = \int_0^\infty \gamma^2 \cos(x) dx
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex2.png +
    +
    +

    This LaTeX block:

    +
    +
    +
    ["latex","latex1.svg",imgfmt="svg",align="center"]
    +---------------------------------------------------------------------
    +\begin{equation*}
    +\displaystyle{ V_i = C_0 - C_3
    +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }
    +\end{equation*}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex1.svg +
    +
    +

    This LaTeX block:

    +
    +
    +
    .LaTeX filter example
    +[latex]
    +["latex","latex3.svg",imgfmt="svg"]
    +---------------------------------------------------------------------
    +\begin{equation}
    +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{
    +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2}
    +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}.
    +\end{equation}
    +
    +\begin{equation}
    +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))}
    +\end{equation}
    +
    +\begin{equation}\label{first}
    +a=b+c
    +\end{equation}
    +
    +\begin{subequations}\label{grp}
    +\begin{align}
    +a&=b+c\label{second}\\
    +d&=e+f+g\label{third}\\
    +h&=i+j\label{fourth}
    +\end{align}
    +\end{subequations}
    +---------------------------------------------------------------------
    +
    +

    Renders:

    +
    +
    +latex3.svg +
    +
    Figure 1. LaTeX filter example
    +
    +

    This LaTeX paragraph:

    +
    +
    +
    .A LaTeX table
    +["latex",imgfmt="svg"]
    +\begin{tabular}{c r @{.} l}
    +Pi expression &
    +\multicolumn{2}{c}{Value} \\
    +\hline
    +$\pi$ & 3&1416 \\
    +$\pi^{\pi}$ & 36&46 \\
    +$(\pi^{\pi})^{\pi}$ & 80662&7 \\
    +\end{tabular}
    +
    +

    Renders:

    +
    +
    +latex-filter__2.svg +
    +
    Figure 2. A LaTeX table
    +
    +
    +
    +
    +

    Using the Filter

    +
    +
      +
    • +

      +The LaTeX filter is invoked by setting the Listing block or + Paragraph style (the first positional block attribute) to latex. +

      +
    • +
    • +

      +The second positional attribute (named target is optional, it sets + the name of the generated image file. If this is not supplied a + file name like {docname}__{target-number}.{imgfmt} is synthesised + (where {docname} is the document file name, {target-number} + is an integer number and {imgfmt} is the image format (png or svg). +

      +
    • +
    • +

      +The third positional attribute, named dpi, is also optional; it is + an integer number that sets the output resolution in dots per inch + for a PNG image. It is ignored for an SVG image. +

      +
    • +
    • +

      +The image format to use can be selected by setting the imgfmt + parameter or by globally setting the latex-imgfmt attribute. + Setting it to svg will render SVG images and setting it to png + will render PNG images. The default is png. +

      +
    • +
    +

    Because the LaTeX images are rendered using the image block templates +you can also use the optional named image block attributes (see +Image macro attributes in the AsciiDoc User +Guide).

    +
    + + + +
    +
    Tip
    +
    +

    You can also change the image size using the following LaTeX commands:

    +
    +
    +
    \tiny
    +\scriptsize
    +\footnotesize
    +\small
    +\normalsize
    +\large
    +\Large
    +\LARGE
    +\huge
    +
    +

    For example:

    +
    +
    +
    [latex]
    +\Large $y = \int_0^\infty \gamma^2 \cos(x) dx$
    +
    +

    The \Large command is outside the $ math delimiters.

    +
    +
    +

    The filter (./filters/latex/latex2img.py) can be used outside +AsciiDoc to convert LaTeX source to images.

    +

    Execute the following command to see how to use it:

    +
    +
    +
    $ ./filters/latex/latex2img.py --help
    +
    +
    +
    +
    +

    Limitations

    +
    +
      +
    • +

      +The asciidoc(1) input and output files cannot both be - (stdin + and stdout), either the input or output files (or both) must be a + named file. +

      +
    • +
    +
    +
    +
    +

    Installation

    +
    +

    In addition to AsciiDoc you will need to have latex(1), +dvipng(1) (for PNG) and/or dvisvgm(1) (for SVG) installed.

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/latexmath-docbook5.xml asciidoc-10.1.2/tests/data/latexmath-docbook5.xml --- asciidoc-8.6.10/tests/data/latexmath-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latexmath-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,98 @@ + + + + +
    + + Embedding LaTeX Math in AsciiDoc dblatex documents + +You can include LaTeX math equations in AsciiDoc documents that are +processed by dblatex. The AsciiDoc +latexmath macros and passthrough blocks generate DocBook +inlineequation, informalequation and equation elements +containing the LaTeX markup which is processed by dblatex. +
    +Inline equations +This markup: +An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] +using the 'latexmath' inline macro. +Renders: +An inline equation + + + +using the latexmath inline macro. +
    +
    +Informal equations +Informal (untitled) equations are generated with a latexmath style +passthrough delimited block. This markup: +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ +Renders: + + + + +Functionally identical block macro syntax: +latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]] +Renders: + + + + +
    +
    +Formal equations +Formal equations are titled and are generated with a latexmath style +passthrough delimited block. +This markup: +.First equation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ +Renders: +First equation + + + +This markup: +.Matrix +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[ P^{e \rightarrow c}= \left[ + \begin{array}{*{3}{r@{}l}} + & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\ + + & \sin \theta \sin \psi + & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi + & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\ + + - & \sin \theta \cos \psi + & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi + & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\ + \end{array} +\right] \] +++++++++++++++++++++++++++++++++++++++++++++ +Renders: +Matrix + + + +
    +
    diff -Nru asciidoc-8.6.10/tests/data/latexmath-docbook.xml asciidoc-10.1.2/tests/data/latexmath-docbook.xml --- asciidoc-8.6.10/tests/data/latexmath-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latexmath-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,99 @@ + + + + + +
    + + Embedding LaTeX Math in AsciiDoc dblatex documents + +You can include LaTeX math equations in AsciiDoc documents that are +processed by dblatex. The AsciiDoc +latexmath macros and passthrough blocks generate DocBook +inlineequation, informalequation and equation elements +containing the LaTeX markup which is processed by dblatex. +
    +Inline equations +This markup: +An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] +using the 'latexmath' inline macro. +Renders: +An inline equation + + + +using the latexmath inline macro. +
    +
    +Informal equations +Informal (untitled) equations are generated with a latexmath style +passthrough delimited block. This markup: +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ +Renders: + + + + +Functionally identical block macro syntax: +latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]] +Renders: + + + + +
    +
    +Formal equations +Formal equations are titled and are generated with a latexmath style +passthrough delimited block. +This markup: +.First equation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ +Renders: +First equation + + + +This markup: +.Matrix +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[ P^{e \rightarrow c}= \left[ + \begin{array}{*{3}{r@{}l}} + & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\ + + & \sin \theta \sin \psi + & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi + & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\ + + - & \sin \theta \cos \psi + & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi + & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\ + \end{array} +\right] \] +++++++++++++++++++++++++++++++++++++++++++++ +Renders: +Matrix + + + +
    +
    diff -Nru asciidoc-8.6.10/tests/data/latexmathml-html5.html asciidoc-10.1.2/tests/data/latexmathml-html5.html --- asciidoc-8.6.10/tests/data/latexmathml-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latexmathml-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,2031 @@ + + + + + +LaTeXMathML Formulae + + + + + + +
    +
    +
    +

    LaTeXMathML +capability has been added to AsciiDoc for users who are more familar +with or prefer LaTeX math formulas to the +ASCIIMath +notation.

    +

    LaTeXMathML is a derivative of +ASCIIMath — in +terms of usage the only difference it that you use the latexmath +attribute instead of the asciimath attribute.

    +

    LaTeXMathML processes LaTeX math formulas not arbitrary LaTeX (as +dblatex(1) does). See the +LaTeXMathML +website for details.

    +

    Here’s the AsciiDoc source that generated this +page.

    +

    Some example LaTeXMathML formulas:

    +
      +
    • +

      +$R_x = 10.0 \times \sin(R_\phi)$ +

      +
    • +
    • +

      +$\sum_{n=1}^\infty \frac{1}{2^n}$ +

      +
    • +
    • +

      +$\lim_{x\to\infty} f(x) = k \choose r + \frac ab + \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13} + \sum_{n=1}^\infty b_n \right\} }$ +

      +
    • +
    • +

      +$\$\alpha + \$\beta = \$(\alpha + \beta)$ +

      +
    • +
    • +

      +$\begin{eqnarray} x & = & \frac{-7 \pm + \sqrt{49 - 24}}{6} \\ & = & -2 \textrm{ or } -\frac13. + \end{eqnarray}$ +

      +
    • +
    • +

      +$\displaystyle{ V_i = C_0 - C_3 + \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$ +

      +
    • +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/latexmathml-xhtml11.html asciidoc-10.1.2/tests/data/latexmathml-xhtml11.html --- asciidoc-8.6.10/tests/data/latexmathml-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/latexmathml-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,2033 @@ + + + + + + +LaTeXMathML Formulae + + + + + + +
    +
    +
    +

    LaTeXMathML +capability has been added to AsciiDoc for users who are more familar +with or prefer LaTeX math formulas to the +ASCIIMath +notation.

    +

    LaTeXMathML is a derivative of +ASCIIMath — in +terms of usage the only difference it that you use the latexmath +attribute instead of the asciimath attribute.

    +

    LaTeXMathML processes LaTeX math formulas not arbitrary LaTeX (as +dblatex(1) does). See the +LaTeXMathML +website for details.

    +

    Here’s the AsciiDoc source that generated this +page.

    +

    Some example LaTeXMathML formulas:

    +
      +
    • +

      +$R_x = 10.0 \times \sin(R_\phi)$ +

      +
    • +
    • +

      +$\sum_{n=1}^\infty \frac{1}{2^n}$ +

      +
    • +
    • +

      +$\lim_{x\to\infty} f(x) = k \choose r + \frac ab + \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13} + \sum_{n=1}^\infty b_n \right\} }$ +

      +
    • +
    • +

      +$\$\alpha + \$\beta = \$(\alpha + \beta)$ +

      +
    • +
    • +

      +$\begin{eqnarray} x & = & \frac{-7 \pm + \sqrt{49 - 24}}{6} \\ & = & -2 \textrm{ or } -\frac13. + \end{eqnarray}$ +

      +
    • +
    • +

      +$\displaystyle{ V_i = C_0 - C_3 + \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$ +

      +
    • +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/newline-dos-html5.html asciidoc-10.1.2/tests/data/newline-dos-html5.html --- asciidoc-8.6.10/tests/data/newline-dos-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newline-dos-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,785 @@ + + + + + +Newline Tests + + + + + +
    +
    +
    +

    These are tests about newlines. +See details on the history.

    +
    + + + +
    +
    Note
    +
    Each section in the source file has the newline style from the + description.
    +
    +
    +
    +
    +

    UNIX Newlines

    +
    +

    Uses \n.

    +
    +
    +
    +

    DOS Newlines

    +
    +

    Uses \r\n.

    +
    +
    +
    +

    MAC Newlines

    +
    +

    Uses \r.

    +

    Only used prior to Mac OS X.

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/newline-mac-html5.html asciidoc-10.1.2/tests/data/newline-mac-html5.html --- asciidoc-8.6.10/tests/data/newline-mac-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newline-mac-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1 @@ + Newline Tests

    These are tests about newlines. See details on the history.

    Note
    Each section in the source file has the newline style from the description.

    UNIX Newlines

    Uses \n.

    DOS Newlines

    Uses \r\n.

    MAC Newlines

    Uses \r.

    Only used prior to Mac OS X.


    \ No newline at end of file diff -Nru asciidoc-8.6.10/tests/data/newline-unix-html5.html asciidoc-10.1.2/tests/data/newline-unix-html5.html --- asciidoc-8.6.10/tests/data/newline-unix-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newline-unix-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,785 @@ + + + + + +Newline Tests + + + + + +
    +
    +
    +

    These are tests about newlines. +See details on the history.

    +
    + + + +
    +
    Note
    +
    Each section in the source file has the newline style from the + description.
    +
    +
    +
    +
    +

    UNIX Newlines

    +
    +

    Uses \n.

    +
    +
    +
    +

    DOS Newlines

    +
    +

    Uses \r\n.

    +
    +
    +
    +

    MAC Newlines

    +
    +

    Uses \r.

    +

    Only used prior to Mac OS X.

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/newtables-docbook5.xml asciidoc-10.1.2/tests/data/newtables-docbook5.xml --- asciidoc-8.6.10/tests/data/newtables-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newtables-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1312 @@ + + + + +
    + + AsciiDoc New tables + +New in version 8.3.0 +I’ve finally come up with a new tables syntax that I’m happy with +and can at last remove this footnote from the User Guide: “The +current table syntax is overly complicated and unwieldy to edit, +hopefully a more usable syntax will appear in future versions of +AsciiDoc.” + +Update +The following additions were made at AsciiDoc 8.4.4: + + + +Cell column and row spanning. + + + + +Styles can be applied per cell. + + + + +Vertical cell alignment can be applied to columns and cells. + + + +See the examples at the end of this document. + +At first glance it doesn’t look much different to the old syntax but +it’s a lot more flexible, easier to enter and supports a lot of column +styles (for example the asciidoc style supports AsciiDoc block and +inline elements). The old tables syntax has been deprecated but is +currently still processed. Here are some examples of AsciiDoc new +tables: + +Simple table + + + + + + + + + +1 +2 +A + + +3 +4 +B + + +5 +6 +C + + + +
    +AsciiDoc source +[width="15%"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= + + +Table with title, header and footer + + + + + + + + +Column 1 +Column 2 + + + + +6 +Three items + + + + +1 +Item 1 + + +2 +Item 2 + + +3 +Item 3 + + + +
    +AsciiDoc source +.An example table +[width="40%",frame="topbot",options="header,footer"] +|====================== +|Column 1 |Column 2 +|1 |Item 1 +|2 |Item 2 +|3 |Item 3 +|6 |Three items +|====================== + + +Columns formatted with strong, monospaced and emphasis styles + + + + + + + + + + +Columns 2 and 3 + + + + +footer 1 +footer 2 +footer 3 + + + + +1 +Item 1 +Item 1 + + +2 +Item 2 +Item 2 + + +3 +Item 3 +Item 3 + + +4 +Item 4 +Item 4 + + + +
    +AsciiDoc source +.An example table +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"] +|========================== +| 2+|Columns 2 and 3 +|1 |Item 1 |Item 1 +|2 |Item 2 |Item 2 +|3 |Item 3 |Item 3 +|4 |Item 4 |Item 4 +|footer 1|footer 2|footer 3 +|========================== + + +A table with externally sourced CSV data + + + + + + + + +ID +Customer Name +Contact Name +Customer Address +Phone + + + + +AROUT +Around the Horn +Thomas Hardy +120 Hanover Sq. +London +(171) 555-7788 + + +BERGS +Berglunds snabbkop +Christina Berglund +Berguvsvagen 8 +Lulea +0921-12 34 65 + + +BLAUS +Blauer See Delikatessen +Hanna Moos +Forsterstr. 57 +Mannheim +0621-08460 + + +BLONP +Blondel pere et fils +Frederique Citeaux +24, place Kleber +Strasbourg +88.60.15.31 + + +BOLID +Bolido Comidas preparadas +Martin Sommer +C/ Araquil, 67 +Madrid +(91) 555 22 82 + + +BONAP +Bon app' +Laurence Lebihan +12, rue des Bouchers +Marseille +91.24.45.40 + + +BOTTM +Bottom-Dollar Markets +Elizabeth Lincoln +23 Tsawassen Blvd. +Tsawassen +(604) 555-4729 + + +BSBEV +B’s Beverages +Victoria Ashworth +Fauntleroy Circus +London +(171) 555-1212 + + +CACTU +Cactus Comidas para llevar +Patricio Simpson +Cerrito 333 +Buenos Aires +(1) 135-5555 + + + +
    +AsciiDoc source + [format="csv",cols="^1,4*2",options="header"] + |=================================================== + ID,Customer Name,Contact Name,Customer Address,Phone + include::customers.csv[] + |=================================================== + + +DVS formatted table + + + + + + + + + + + + + +root +x +0 +0 +root +/root +/bin/bash + + +daemon +x +1 +1 +daemon +/usr/sbin +/bin/sh + + +bin +x +2 +2 +bin +/bin +/bin/sh + + +sys +x +3 +3 +sys +/dev +/bin/sh + + +sync +x +4 +65534 +sync +/bin +/bin/sync + + +games +x +5 +60 +games +/usr/games +/bin/sh + + + +
    +AsciiDoc source +[width="70%",format="dsv"] +|==================================== +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +|==================================== + + +Horizontal and vertical source data + + + + + + + + + + +Date +Duration +Avg HR +Notes + + + + +22-Aug-08 +10:24 +157 +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + + +22-Aug-08 +23:03 +152 +Back-to-back with previous interval. + + +24-Aug-08 +40:00 +145 +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + + + +
    +Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry. +AsciiDoc source +.Windtrainer workouts +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= + + +Default and verse styles + + + + + +Default paragraphs +Centered verses + + + + +Per id. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Per id. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + + + +
    +AsciiDoc source +[cols=",^v",options="header"] +|=================================== +|Default paragraphs |Centered verses +2*|Per id. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +|=================================== + + +Horizontal and vertial headings + + + + + + + + + + + + +West +Central +East + Total + + + + +Q1 +270 +292 +342 +904 + + +Q2 +322 +276 +383 +981 + + +Q3 +298 +252 +274 +824 + + +Q4 +344 +247 +402 +993 + + + +
    +AsciiDoc source +.Horizontal and vertial headings +[cols="h,4*",options="header",width="50%"] +|================================== +| |West |Central |East | Total +|Q1 |270 |292 |342 | 904 +|Q2 |322 |276 |383 | 981 +|Q3 |298 |252 |274 | 824 +|Q4 |344 |247 |402 | 993 +|================================== + + +AsciiDoc style in first column, Literal in second + + + + + +Output markup +AsciiDoc source + + + + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Code filter example +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word + + + + +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + + + + +Fusce euismod commodo velit. + + + + +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + + + + +Vivamus fringilla mi eu lacus. + + + + +Donec eget arcu bibendum nunc + consequat lobortis. + + + + + + +Nulla porttitor vulputate libero. + + + + +Fusce euismod commodo velit. + + + + +Vivamus fringilla mi eu lacus. + + + + + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + + + +
    +AsciiDoc source +[cols="asciidoc,literal",options="header",grid="cols"] +|================================== +|Output markup |AsciiDoc source +2*| +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== + + +Cell containing lots of example markup elements + + + + +URLs: +The AsciiDoc home page, +https://asciidoc.org/, +email Joe Bloggs, +joe.bloggs@example.com, +joe.bloggs. +Link: See AsciiDoc source. +Emphasized text, Strong text, Monospaced text, “Quoted text”. +Subscripts and superscripts: eπi+1 = 0. H2O and x10. +Some super text and some sub text +Replacements: © copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right +double arrow, ⇐ left double arrow. + + + +
    +AsciiDoc source +|==================================================================== +|'URLs': +https://asciidoc.org/[The AsciiDoc home page], +https://asciidoc.org/, +mailto:joe.bloggs@example.com[email Joe Bloggs], +joe.bloggs@example.com, +callto:joe.bloggs[]. + +'Link': See <<X1,AsciiDoc source>>. + +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''. + +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^. +Some ^super text^ and ~some sub text~ + +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark, +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right +double arrow, <= left double arrow. +|==================================================================== + + +Nested table + + + + + + + + +Normal cell +Cell with nested table + + + + + + +Nested table cell 1 +Nested table cell 2 + + + + + + + +
    +AsciiDoc source +[width="75%",cols="1,2a"] +|============================================== +|Normal cell + +|Cell with nested table + +[cols="2,1"] +!============================================== +!Nested table cell 1 !Nested table cell 2 +!============================================== + +|============================================== + + +Spans, alignments and styles + + + + + + + + + + +1 +2 +3 +4 + + +5 +6 +7 + + +8 + + +9 +10 + + + +
    +AsciiDoc source +.Spans, alignments and styles +[cols="e,m,^,>s",width="25%"] +|================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +^|8 +|9 2+>|10 +|================ + + +Three panes + + + + + +Top Left Pane +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Right Pane +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Code filter example +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word + + + + +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + + + + +Fusce euismod commodo velit. + + + + +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + + + + +Vivamus fringilla mi eu lacus. + + + + +Donec eget arcu bibendum nunc + consequat lobortis. + + + + + + +Nulla porttitor vulputate libero. + + + + +Fusce euismod commodo velit. + + + + +Vivamus fringilla mi eu lacus. + + + + + + + +Bottom Left Pane +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + + + +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + + + + +Fusce euismod commodo velit. + + + + +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + + + + +Vivamus fringilla mi eu lacus. + + + + +Donec eget arcu bibendum nunc + consequat lobortis. + + + + + + +Nulla porttitor vulputate libero. + + + + +Fusce euismod commodo velit. + + + + +Vivamus fringilla mi eu lacus. + + + + + + + + +
    +AsciiDoc source +.Three panes +[cols="a,2a"] +|================================== +| +[float] +Top Left Pane +~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +.2+| +[float] +Right Pane +~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +| +[float] +Bottom Left Pane +~~~~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== + +
    +Combinations of <emphasis>align</emphasis>, <emphasis>frame</emphasis>, <emphasis>grid</emphasis>, <emphasis>valign</emphasis> and <emphasis>halign</emphasis> attributes + + + + + + + +
    +Table test + + + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +sides +rows +middle +center + + + +
    +AsciiDoc source +:frame: sides +:grid: rows +:halign: center +:valign: middle + +.Table test +[width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + + + + + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +topbot +cols +bottom +right + + + + +AsciiDoc source +:frame: topbot +:grid: cols +:halign: right +:valign: bottom + +[align="right",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + + + + + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +none +none +top +left + + + + +AsciiDoc source +:frame: none +:grid: none +:halign: left +:valign: top + +[align="center",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + + + diff -Nru asciidoc-8.6.10/tests/data/newtables-docbook.xml asciidoc-10.1.2/tests/data/newtables-docbook.xml --- asciidoc-8.6.10/tests/data/newtables-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newtables-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1313 @@ + + + + + +
    + + AsciiDoc New tables + +New in version 8.3.0 +I’ve finally come up with a new tables syntax that I’m happy with +and can at last remove this footnote from the User Guide: “The +current table syntax is overly complicated and unwieldy to edit, +hopefully a more usable syntax will appear in future versions of +AsciiDoc.” + +Update +The following additions were made at AsciiDoc 8.4.4: + + + +Cell column and row spanning. + + + + +Styles can be applied per cell. + + + + +Vertical cell alignment can be applied to columns and cells. + + + +See the examples at the end of this document. + +At first glance it doesn’t look much different to the old syntax but +it’s a lot more flexible, easier to enter and supports a lot of column +styles (for example the asciidoc style supports AsciiDoc block and +inline elements). The old tables syntax has been deprecated but is +currently still processed. Here are some examples of AsciiDoc new +tables: + +Simple table + + + + + + + + + +1 +2 +A + + +3 +4 +B + + +5 +6 +C + + + +
    +AsciiDoc source +[width="15%"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= + + +Table with title, header and footer + + + + + + + + +Column 1 +Column 2 + + + + +6 +Three items + + + + +1 +Item 1 + + +2 +Item 2 + + +3 +Item 3 + + + +
    +AsciiDoc source +.An example table +[width="40%",frame="topbot",options="header,footer"] +|====================== +|Column 1 |Column 2 +|1 |Item 1 +|2 |Item 2 +|3 |Item 3 +|6 |Three items +|====================== + + +Columns formatted with strong, monospaced and emphasis styles + + + + + + + + + + +Columns 2 and 3 + + + + +footer 1 +footer 2 +footer 3 + + + + +1 +Item 1 +Item 1 + + +2 +Item 2 +Item 2 + + +3 +Item 3 +Item 3 + + +4 +Item 4 +Item 4 + + + +
    +AsciiDoc source +.An example table +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"] +|========================== +| 2+|Columns 2 and 3 +|1 |Item 1 |Item 1 +|2 |Item 2 |Item 2 +|3 |Item 3 |Item 3 +|4 |Item 4 |Item 4 +|footer 1|footer 2|footer 3 +|========================== + + +A table with externally sourced CSV data + + + + + + + + +ID +Customer Name +Contact Name +Customer Address +Phone + + + + +AROUT +Around the Horn +Thomas Hardy +120 Hanover Sq. +London +(171) 555-7788 + + +BERGS +Berglunds snabbkop +Christina Berglund +Berguvsvagen 8 +Lulea +0921-12 34 65 + + +BLAUS +Blauer See Delikatessen +Hanna Moos +Forsterstr. 57 +Mannheim +0621-08460 + + +BLONP +Blondel pere et fils +Frederique Citeaux +24, place Kleber +Strasbourg +88.60.15.31 + + +BOLID +Bolido Comidas preparadas +Martin Sommer +C/ Araquil, 67 +Madrid +(91) 555 22 82 + + +BONAP +Bon app' +Laurence Lebihan +12, rue des Bouchers +Marseille +91.24.45.40 + + +BOTTM +Bottom-Dollar Markets +Elizabeth Lincoln +23 Tsawassen Blvd. +Tsawassen +(604) 555-4729 + + +BSBEV +B’s Beverages +Victoria Ashworth +Fauntleroy Circus +London +(171) 555-1212 + + +CACTU +Cactus Comidas para llevar +Patricio Simpson +Cerrito 333 +Buenos Aires +(1) 135-5555 + + + +
    +AsciiDoc source + [format="csv",cols="^1,4*2",options="header"] + |=================================================== + ID,Customer Name,Contact Name,Customer Address,Phone + include::customers.csv[] + |=================================================== + + +DVS formatted table + + + + + + + + + + + + + +root +x +0 +0 +root +/root +/bin/bash + + +daemon +x +1 +1 +daemon +/usr/sbin +/bin/sh + + +bin +x +2 +2 +bin +/bin +/bin/sh + + +sys +x +3 +3 +sys +/dev +/bin/sh + + +sync +x +4 +65534 +sync +/bin +/bin/sync + + +games +x +5 +60 +games +/usr/games +/bin/sh + + + +
    +AsciiDoc source +[width="70%",format="dsv"] +|==================================== +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +|==================================== + + +Horizontal and vertical source data + + + + + + + + + + +Date +Duration +Avg HR +Notes + + + + +22-Aug-08 +10:24 +157 +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + + +22-Aug-08 +23:03 +152 +Back-to-back with previous interval. + + +24-Aug-08 +40:00 +145 +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + + + +
    +Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry. +AsciiDoc source +.Windtrainer workouts +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= + + +Default and verse styles + + + + + +Default paragraphs +Centered verses + + + + +Per id. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Per id. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + + + +
    +AsciiDoc source +[cols=",^v",options="header"] +|=================================== +|Default paragraphs |Centered verses +2*|Per id. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +|=================================== + + +Horizontal and vertial headings + + + + + + + + + + + + +West +Central +East + Total + + + + +Q1 +270 +292 +342 +904 + + +Q2 +322 +276 +383 +981 + + +Q3 +298 +252 +274 +824 + + +Q4 +344 +247 +402 +993 + + + +
    +AsciiDoc source +.Horizontal and vertial headings +[cols="h,4*",options="header",width="50%"] +|================================== +| |West |Central |East | Total +|Q1 |270 |292 |342 | 904 +|Q2 |322 |276 |383 | 981 +|Q3 |298 |252 |274 | 824 +|Q4 |344 |247 |402 | 993 +|================================== + + +AsciiDoc style in first column, Literal in second + + + + + +Output markup +AsciiDoc source + + + + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Code filter example +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word + + + + +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + + + + +Fusce euismod commodo velit. + + + + +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + + + + +Vivamus fringilla mi eu lacus. + + + + +Donec eget arcu bibendum nunc + consequat lobortis. + + + + + + +Nulla porttitor vulputate libero. + + + + +Fusce euismod commodo velit. + + + + +Vivamus fringilla mi eu lacus. + + + + + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + + + +
    +AsciiDoc source +[cols="asciidoc,literal",options="header",grid="cols"] +|================================== +|Output markup |AsciiDoc source +2*| +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== + + +Cell containing lots of example markup elements + + + + +URLs: +The AsciiDoc home page, +https://asciidoc.org/, +email Joe Bloggs, +joe.bloggs@example.com, +joe.bloggs. +Link: See AsciiDoc source. +Emphasized text, Strong text, Monospaced text, “Quoted text”. +Subscripts and superscripts: eπi+1 = 0. H2O and x10. +Some super text and some sub text +Replacements: © copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right +double arrow, ⇐ left double arrow. + + + +
    +AsciiDoc source +|==================================================================== +|'URLs': +https://asciidoc.org/[The AsciiDoc home page], +https://asciidoc.org/, +mailto:joe.bloggs@example.com[email Joe Bloggs], +joe.bloggs@example.com, +callto:joe.bloggs[]. + +'Link': See <<X1,AsciiDoc source>>. + +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''. + +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^. +Some ^super text^ and ~some sub text~ + +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark, +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right +double arrow, <= left double arrow. +|==================================================================== + + +Nested table + + + + + + + + +Normal cell +Cell with nested table + + + + + + +Nested table cell 1 +Nested table cell 2 + + + + + + + +
    +AsciiDoc source +[width="75%",cols="1,2a"] +|============================================== +|Normal cell + +|Cell with nested table + +[cols="2,1"] +!============================================== +!Nested table cell 1 !Nested table cell 2 +!============================================== + +|============================================== + + +Spans, alignments and styles + + + + + + + + + + +1 +2 +3 +4 + + +5 +6 +7 + + +8 + + +9 +10 + + + +
    +AsciiDoc source +.Spans, alignments and styles +[cols="e,m,^,>s",width="25%"] +|================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +^|8 +|9 2+>|10 +|================ + + +Three panes + + + + + +Top Left Pane +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Right Pane +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Code filter example +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word + + + + +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + + + + +Fusce euismod commodo velit. + + + + +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + + + + +Vivamus fringilla mi eu lacus. + + + + +Donec eget arcu bibendum nunc + consequat lobortis. + + + + + + +Nulla porttitor vulputate libero. + + + + +Fusce euismod commodo velit. + + + + +Vivamus fringilla mi eu lacus. + + + + + + + +Bottom Left Pane +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + + + +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + + + + +Fusce euismod commodo velit. + + + + +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + + + + +Vivamus fringilla mi eu lacus. + + + + +Donec eget arcu bibendum nunc + consequat lobortis. + + + + + + +Nulla porttitor vulputate libero. + + + + +Fusce euismod commodo velit. + + + + +Vivamus fringilla mi eu lacus. + + + + + + + + +
    +AsciiDoc source +.Three panes +[cols="a,2a"] +|================================== +| +[float] +Top Left Pane +~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +.2+| +[float] +Right Pane +~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +| +[float] +Bottom Left Pane +~~~~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== + +
    +Combinations of <emphasis>align</emphasis>, <emphasis>frame</emphasis>, <emphasis>grid</emphasis>, <emphasis>valign</emphasis> and <emphasis>halign</emphasis> attributes + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +all +all +top +left + + + + +AsciiDoc source +:frame: all +:grid: all +:halign: left +:valign: top + +[options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + + +Table test + + + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +sides +rows +middle +center + + + +
    +AsciiDoc source +:frame: sides +:grid: rows +:halign: center +:valign: middle + +.Table test +[width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + + + + + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +topbot +cols +bottom +right + + + + +AsciiDoc source +:frame: topbot +:grid: cols +:halign: right +:valign: bottom + +[align="right",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + + + + + + + + + + + + + + +frame + grid +valign +halign + + + + +  +  +  +none +none +top +left + + + + +AsciiDoc source +:frame: none +:grid: none +:halign: left +:valign: top + +[align="center",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|&nbsp; +&nbsp; +&nbsp; +|{frame} | {grid} |{valign} |{halign} +|==== + +
    +
    diff -Nru asciidoc-8.6.10/tests/data/newtables-html4.html asciidoc-10.1.2/tests/data/newtables-html4.html --- asciidoc-8.6.10/tests/data/newtables-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newtables-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1254 @@ + + + + + +AsciiDoc New tables + + +

    AsciiDoc New tables

    +

    +

    +
    +

    New in version 8.3.0

    +

    I’ve finally come up with a new tables syntax that I’m happy with +and can at last remove this footnote from the User Guide: “The +current table syntax is overly complicated and unwieldy to edit, +hopefully a more usable syntax will appear in future versions of +AsciiDoc.”

    + +
    +

    Update

    +

    The following additions were made at AsciiDoc 8.4.4:

    +
      +
    • +

      +Cell column and row spanning. +

      +
    • +
    • +

      +Styles can be applied per cell. +

      +
    • +
    • +

      +Vertical cell alignment can be applied to columns and cells. +

      +
    • +
    +

    See the examples at the end of this document.

    +
    +

    At first glance it doesn’t look much different to the old syntax but +it’s a lot more flexible, easier to enter and supports a lot of column +styles (for example the asciidoc style supports AsciiDoc block and +inline elements). The old tables syntax has been deprecated but is +currently still processed. Here are some examples of AsciiDoc new +tables:

    +
    + + + + + + + + + + + + + + + + + + +

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +

    Table 1. Simple table

    +
    +

    AsciiDoc source

    +
    +
    [width="15%"]
    +|=======
    +|1 |2 |A
    +|3 |4 |B
    +|5 |6 |C
    +|=======
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Column 1 Column 2

    6

    Three items

    1

    Item 1

    2

    Item 2

    3

    Item 3

    +

    Table 2. Table with title, header and footer

    +
    +

    AsciiDoc source

    +
    +
    .An example table
    +[width="40%",frame="topbot",options="header,footer"]
    +|======================
    +|Column 1 |Column 2
    +|1        |Item 1
    +|2        |Item 2
    +|3        |Item 3
    +|6        |Three items
    +|======================
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Columns 2 and 3

    footer 1

    footer 2

    footer 3

    1

    Item 1

    Item 1

    2

    Item 2

    Item 2

    3

    Item 3

    Item 3

    4

    Item 4

    Item 4

    +

    Table 3. Columns formatted with strong, monospaced and emphasis styles

    +
    +

    AsciiDoc source

    +
    +
    .An example table
    +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"]
    +|==========================
    +|      2+|Columns 2 and 3
    +|1       |Item 1  |Item 1
    +|2       |Item 2  |Item 2
    +|3       |Item 3  |Item 3
    +|4       |Item 4  |Item 4
    +|footer 1|footer 2|footer 3
    +|==========================
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    IDCustomer NameContact NameCustomer AddressPhone

    AROUT

    Around the Horn

    Thomas Hardy

    120 Hanover Sq. +London

    (171) 555-7788

    BERGS

    Berglunds snabbkop

    Christina Berglund

    Berguvsvagen 8 +Lulea

    0921-12 34 65

    BLAUS

    Blauer See Delikatessen

    Hanna Moos

    Forsterstr. 57 +Mannheim

    0621-08460

    BLONP

    Blondel pere et fils

    Frederique Citeaux

    24, place Kleber +Strasbourg

    88.60.15.31

    BOLID

    Bolido Comidas preparadas

    Martin Sommer

    C/ Araquil, 67 +Madrid

    (91) 555 22 82

    BONAP

    Bon app'

    Laurence Lebihan

    12, rue des Bouchers +Marseille

    91.24.45.40

    BOTTM

    Bottom-Dollar Markets

    Elizabeth Lincoln

    23 Tsawassen Blvd. +Tsawassen

    (604) 555-4729

    BSBEV

    B’s Beverages

    Victoria Ashworth

    Fauntleroy Circus +London

    (171) 555-1212

    CACTU

    Cactus Comidas para llevar

    Patricio Simpson

    Cerrito 333 +Buenos Aires

    (1) 135-5555

    +

    Table 4. A table with externally sourced CSV data

    +
    +

    AsciiDoc source

    +
    +
     [format="csv",cols="^1,4*2",options="header"]
    + |===================================================
    + ID,Customer Name,Contact Name,Customer Address,Phone
    + include::customers.csv[]
    + |===================================================
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    root

    x

    0

    0

    root

    /root

    /bin/bash

    daemon

    x

    1

    1

    daemon

    /usr/sbin

    /bin/sh

    bin

    x

    2

    2

    bin

    /bin

    /bin/sh

    sys

    x

    3

    3

    sys

    /dev

    /bin/sh

    sync

    x

    4

    65534

    sync

    /bin

    /bin/sync

    games

    x

    5

    60

    games

    /usr/games

    /bin/sh

    +

    Table 5. DVS formatted table

    +
    +

    AsciiDoc source

    +
    +
    [width="70%",format="dsv"]
    +|====================================
    +root:x:0:0:root:/root:/bin/bash
    +daemon:x:1:1:daemon:/usr/sbin:/bin/sh
    +bin:x:2:2:bin:/bin:/bin/sh
    +sys:x:3:3:sys:/dev:/bin/sh
    +sync:x:4:65534:sync:/bin:/bin/sync
    +games:x:5:60:games:/usr/games:/bin/sh
    +|====================================
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +

    Table 6. Horizontal and vertical source data

    +
    +

    Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry.

    +

    AsciiDoc source

    +
    +
    .Windtrainer workouts
    +[width="80%",cols="3,^2,^2,10",options="header"]
    +|=========================================================
    +|Date |Duration |Avg HR |Notes
    +
    +|22-Aug-08 |10:24 | 157 |
    +Worked out MSHR (max sustainable heart rate) by going hard
    +for this interval.
    +
    +|22-Aug-08 |23:03 | 152 |
    +Back-to-back with previous interval.
    +
    +|24-Aug-08 |40:00 | 145 |
    +Moderately hard interspersed with 3x 3min intervals (2min
    +hard + 1min really hard taking the HR up to 160).
    +
    +|=========================================================
    +
    +
    + + + + + + + + + + + + + +
    Default paragraphs Centered verses

    Per id.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    Per id.
    +
    +Consul necessitatibus per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul necessitatibus per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +

    Table 7. Default and verse styles

    +
    +

    AsciiDoc source

    +
    +
    [cols=",^v",options="header"]
    +|===================================
    +|Default paragraphs |Centered verses
    +2*|Per id.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +|===================================
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    West Central East Total

    Q1

    270

    292

    342

    904

    Q2

    322

    276

    383

    981

    Q3

    298

    252

    274

    824

    Q4

    344

    247

    402

    993

    +

    Table 8. Horizontal and vertial headings

    +
    +

    AsciiDoc source

    +
    +
    .Horizontal and vertial headings
    +[cols="h,4*",options="header",width="50%"]
    +|==================================
    +|      |West |Central |East | Total
    +|Q1    |270  |292     |342  | 904
    +|Q2    |322  |276     |383  | 981
    +|Q3    |298  |252     |274  | 824
    +|Q4    |344  |247     |402  | 993
    +|==================================
    +
    +
    + + + + + + + + + + + + + +
    Output markup AsciiDoc source

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
    +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +

    Code filter example

    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +

    Table 9. AsciiDoc style in first column, Literal in second

    +
    +

    AsciiDoc source

    +
    +
    [cols="asciidoc,literal",options="header",grid="cols"]
    +|==================================
    +|Output markup |AsciiDoc source
    +2*|
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +   ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|==================================
    +
    +
    + + + + + + +

    URLs: +The AsciiDoc home page, +https://asciidoc.org/, +email Joe Bloggs, +joe.bloggs@example.com, +joe.bloggs.

    +

    Link: See AsciiDoc source.

    +

    Emphasized text, Strong text, Monospaced text, “Quoted text”.

    +

    Subscripts and superscripts: eπi+1 = 0. H2O and x10. +Some super text and some sub text

    +

    Replacements: © copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right +double arrow, ⇐ left double arrow.

    +

    Table 10. Cell containing lots of example markup elements

    +
    + +

    AsciiDoc source

    +
    +
    |====================================================================
    +|'URLs':
    +https://asciidoc.org/[The AsciiDoc home page],
    +https://asciidoc.org/,
    +mailto:joe.bloggs@example.com[email Joe Bloggs],
    +joe.bloggs@example.com,
    +callto:joe.bloggs[].
    +
    +'Link': See <<X1,AsciiDoc source>>.
    +
    +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''.
    +
    +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^.
    +Some ^super text^ and ~some sub text~
    +
    +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark,
    +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right
    +double arrow, <= left double arrow.
    +|====================================================================
    +
    +
    + + + + + + + +

    Normal cell

    Cell with nested table

    +
    + + + + + + + +

    Nested table cell 1

    Nested table cell 2

    +
    +

    Table 11. Nested table

    +
    +

    AsciiDoc source

    +
    +
    [width="75%",cols="1,2a"]
    +|==============================================
    +|Normal cell
    +
    +|Cell with nested table
    +
    +[cols="2,1"]
    +!==============================================
    +!Nested table cell 1 !Nested table cell 2
    +!==============================================
    +
    +|==============================================
    +
    +
    + + + + + + + + + + + + + + + + + + + + + +

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    +

    Table 12. Spans, alignments and styles

    +
    +

    AsciiDoc source

    +
    +
    .Spans, alignments and styles
    +[cols="e,m,^,>s",width="25%"]
    +|================
    +|1 >s|2 |3 |4
    +^|5 2.2+^.^|6 .3+<.>m|7
    +^|8
    +|9 2+>|10
    +|================
    +
    +
    + + + + + + + + + + +

    Top Left Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    Right Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
    +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +

    Code filter example

    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +

    Bottom Left Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +
    +

    Table 13. Three panes

    +
    +

    AsciiDoc source

    +
    +
    .Three panes
    +[cols="a,2a"]
    +|==================================
    +|
    +[float]
    +Top Left Pane
    +~~~~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +.2+|
    +[float]
    +Right Pane
    +~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|
    +[float]
    +Bottom Left Pane
    +~~~~~~~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|==================================
    +
    +
    +

    Combinations of align, frame, grid, valign and halign attributes

    +
    + + + + + + + + + + + + + + + + + + + +
    frame grid valign halign
     
    + 
    + 

    all

    all

    top

    left

    +
    +

    AsciiDoc source

    +
    +
    :frame: all
    +:grid: all
    +:halign: left
    +:valign: top
    +
    +[options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    + + + + + + + + + + + + + + + + + + + +
    frame grid valign halign
     
    + 
    + 

    sides

    rows

    middle

    center

    +

    Table 14. Table test

    +
    +

    AsciiDoc source

    +
    +
    :frame: sides
    +:grid: rows
    +:halign: center
    +:valign: middle
    +
    +.Table test
    +[width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    + + + + + + + + + + + + + + + + + + + +
    frame grid valign halign
     
    + 
    + 

    topbot

    cols

    bottom

    right

    +
    +

    AsciiDoc source

    +
    +
    :frame: topbot
    +:grid: cols
    +:halign: right
    +:valign: bottom
    +
    +[align="right",width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    + + + + + + + + + + + + + + + + + + + +
    frame grid valign halign
     
    + 
    + 

    none

    none

    top

    left

    +
    +

    AsciiDoc source

    +
    +
    :frame: none
    +:grid: none
    +:halign: left
    +:valign: top
    +
    +[align="center",width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/newtables-html5.html asciidoc-10.1.2/tests/data/newtables-html5.html --- asciidoc-8.6.10/tests/data/newtables-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newtables-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,2038 @@ + + + + + +AsciiDoc New tables + + + + + +
    +
    +
    +

    New in version 8.3.0

    +

    I’ve finally come up with a new tables syntax that I’m happy with +and can at last remove this footnote from the User Guide: “The +current table syntax is overly complicated and unwieldy to edit, +hopefully a more usable syntax will appear in future versions of +AsciiDoc.”

    +
    +
    +
    Update
    +

    The following additions were made at AsciiDoc 8.4.4:

    +
      +
    • +

      +Cell column and row spanning. +

      +
    • +
    • +

      +Styles can be applied per cell. +

      +
    • +
    • +

      +Vertical cell alignment can be applied to columns and cells. +

      +
    • +
    +

    See the examples at the end of this document.

    +
    +

    At first glance it doesn’t look much different to the old syntax but +it’s a lot more flexible, easier to enter and supports a lot of column +styles (for example the asciidoc style supports AsciiDoc block and +inline elements). The old tables syntax has been deprecated but is +currently still processed. Here are some examples of AsciiDoc new +tables:

    + + ++++ + + + + + + + + + + + + + + + + +
    Table 1. Simple table

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +
    +
    AsciiDoc source
    +
    +
    [width="15%"]
    +|=======
    +|1 |2 |A
    +|3 |4 |B
    +|5 |6 |C
    +|=======
    +
    + + +++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 2. Table with title, header and footer
    Column 1 Column 2

    6

    Three items

    1

    Item 1

    2

    Item 2

    3

    Item 3

    +
    +
    AsciiDoc source
    +
    +
    .An example table
    +[width="40%",frame="topbot",options="header,footer"]
    +|======================
    +|Column 1 |Column 2
    +|1        |Item 1
    +|2        |Item 2
    +|3        |Item 3
    +|6        |Three items
    +|======================
    +
    + + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 3. Columns formatted with strong, monospaced and emphasis styles
    Columns 2 and 3

    footer 1

    footer 2

    footer 3

    1

    Item 1

    Item 1

    2

    Item 2

    Item 2

    3

    Item 3

    Item 3

    4

    Item 4

    Item 4

    +
    +
    AsciiDoc source
    +
    +
    .An example table
    +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"]
    +|==========================
    +|      2+|Columns 2 and 3
    +|1       |Item 1  |Item 1
    +|2       |Item 2  |Item 2
    +|3       |Item 3  |Item 3
    +|4       |Item 4  |Item 4
    +|footer 1|footer 2|footer 3
    +|==========================
    +
    + + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 4. A table with externally sourced CSV data
    IDCustomer NameContact NameCustomer AddressPhone

    AROUT

    Around the Horn

    Thomas Hardy

    120 Hanover Sq. +London

    (171) 555-7788

    BERGS

    Berglunds snabbkop

    Christina Berglund

    Berguvsvagen 8 +Lulea

    0921-12 34 65

    BLAUS

    Blauer See Delikatessen

    Hanna Moos

    Forsterstr. 57 +Mannheim

    0621-08460

    BLONP

    Blondel pere et fils

    Frederique Citeaux

    24, place Kleber +Strasbourg

    88.60.15.31

    BOLID

    Bolido Comidas preparadas

    Martin Sommer

    C/ Araquil, 67 +Madrid

    (91) 555 22 82

    BONAP

    Bon app'

    Laurence Lebihan

    12, rue des Bouchers +Marseille

    91.24.45.40

    BOTTM

    Bottom-Dollar Markets

    Elizabeth Lincoln

    23 Tsawassen Blvd. +Tsawassen

    (604) 555-4729

    BSBEV

    B’s Beverages

    Victoria Ashworth

    Fauntleroy Circus +London

    (171) 555-1212

    CACTU

    Cactus Comidas para llevar

    Patricio Simpson

    Cerrito 333 +Buenos Aires

    (1) 135-5555

    +
    +
    AsciiDoc source
    +
    +
     [format="csv",cols="^1,4*2",options="header"]
    + |===================================================
    + ID,Customer Name,Contact Name,Customer Address,Phone
    + include::customers.csv[]
    + |===================================================
    +
    + + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 5. DVS formatted table

    root

    x

    0

    0

    root

    /root

    /bin/bash

    daemon

    x

    1

    1

    daemon

    /usr/sbin

    /bin/sh

    bin

    x

    2

    2

    bin

    /bin

    /bin/sh

    sys

    x

    3

    3

    sys

    /dev

    /bin/sh

    sync

    x

    4

    65534

    sync

    /bin

    /bin/sync

    games

    x

    5

    60

    games

    /usr/games

    /bin/sh

    +
    +
    AsciiDoc source
    +
    +
    [width="70%",format="dsv"]
    +|====================================
    +root:x:0:0:root:/root:/bin/bash
    +daemon:x:1:1:daemon:/usr/sbin:/bin/sh
    +bin:x:2:2:bin:/bin:/bin/sh
    +sys:x:3:3:sys:/dev:/bin/sh
    +sync:x:4:65534:sync:/bin:/bin/sync
    +games:x:5:60:games:/usr/games:/bin/sh
    +|====================================
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 6. Horizontal and vertical source data
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +

    Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry.

    +
    +
    AsciiDoc source
    +
    +
    .Windtrainer workouts
    +[width="80%",cols="3,^2,^2,10",options="header"]
    +|=========================================================
    +|Date |Duration |Avg HR |Notes
    +
    +|22-Aug-08 |10:24 | 157 |
    +Worked out MSHR (max sustainable heart rate) by going hard
    +for this interval.
    +
    +|22-Aug-08 |23:03 | 152 |
    +Back-to-back with previous interval.
    +
    +|24-Aug-08 |40:00 | 145 |
    +Moderately hard interspersed with 3x 3min intervals (2min
    +hard + 1min really hard taking the HR up to 160).
    +
    +|=========================================================
    +
    + + +++ + + + + + + + + + + + +
    Table 7. Default and verse styles
    Default paragraphs Centered verses

    Per id.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    Per id. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.
    +
    +
    AsciiDoc source
    +
    +
    [cols=",^v",options="header"]
    +|===================================
    +|Default paragraphs |Centered verses
    +2*|Per id.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +|===================================
    +
    + + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 8. Horizontal and vertial headings
    West Central East Total

    Q1

    270

    292

    342

    904

    Q2

    322

    276

    383

    981

    Q3

    298

    252

    274

    824

    Q4

    344

    247

    402

    993

    +
    +
    AsciiDoc source
    +
    +
    .Horizontal and vertial headings
    +[cols="h,4*",options="header",width="50%"]
    +|==================================
    +|      |West |Central |East | Total
    +|Q1    |270  |292     |342  | 904
    +|Q2    |322  |276     |383  | 981
    +|Q3    |298  |252     |274  | 824
    +|Q4    |344  |247     |402  | 993
    +|==================================
    +
    + + +++ + + + + + + + + + + + +
    Table 9. AsciiDoc style in first column, Literal in second
    Output markup AsciiDoc source

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
    +
    +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +
    +
    Code filter example
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +
    AsciiDoc source
    +
    +
    [cols="asciidoc,literal",options="header",grid="cols"]
    +|==================================
    +|Output markup |AsciiDoc source
    +2*|
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +   ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|==================================
    +
    + + ++ + + + + +
    Table 10. Cell containing lots of example markup elements

    URLs: +The AsciiDoc home page, +https://asciidoc.org/, +email Joe Bloggs, +joe.bloggs@example.com, +joe.bloggs.

    +

    Link: See AsciiDoc source.

    +

    Emphasized text, Strong text, Monospaced text, “Quoted text”.

    +

    Subscripts and superscripts: eπi+1 = 0. H2O and x10. +Some super text and some sub text

    +

    Replacements: © copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right +double arrow, ⇐ left double arrow.

    +
    +
    AsciiDoc source
    +
    +
    |====================================================================
    +|'URLs':
    +https://asciidoc.org/[The AsciiDoc home page],
    +https://asciidoc.org/,
    +mailto:joe.bloggs@example.com[email Joe Bloggs],
    +joe.bloggs@example.com,
    +callto:joe.bloggs[].
    +
    +'Link': See <<X1,AsciiDoc source>>.
    +
    +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''.
    +
    +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^.
    +Some ^super text^ and ~some sub text~
    +
    +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark,
    +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right
    +double arrow, <= left double arrow.
    +|====================================================================
    +
    + + +++ + + + + + +
    Table 11. Nested table

    Normal cell

    Cell with nested table

    + +++ + + + + + +

    Nested table cell 1

    Nested table cell 2

    +
    +
    AsciiDoc source
    +
    +
    [width="75%",cols="1,2a"]
    +|==============================================
    +|Normal cell
    +
    +|Cell with nested table
    +
    +[cols="2,1"]
    +!==============================================
    +!Nested table cell 1 !Nested table cell 2
    +!==============================================
    +
    +|==============================================
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + +
    Table 12. Spans, alignments and styles

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    +
    +
    AsciiDoc source
    +
    +
    .Spans, alignments and styles
    +[cols="e,m,^,>s",width="25%"]
    +|================
    +|1 >s|2 |3 |4
    +^|5 2.2+^.^|6 .3+<.>m|7
    +^|8
    +|9 2+>|10
    +|================
    +
    + + +++ + + + + + + + + +
    Table 13. Three panes

    Top Left Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    Right Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
    +
    +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +
    +
    Code filter example
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +

    Bottom Left Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +
    +
    +
    AsciiDoc source
    +
    +
    .Three panes
    +[cols="a,2a"]
    +|==================================
    +|
    +[float]
    +Top Left Pane
    +~~~~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +.2+|
    +[float]
    +Right Pane
    +~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|
    +[float]
    +Bottom Left Pane
    +~~~~~~~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|==================================
    +
    +
    +
    +
    +

    Combinations of align, frame, grid, valign and halign attributes

    +
    + ++++++ + + + + + + + + + + + + + + + + + +
    frame grid valign halign
      +  + 

    all

    all

    top

    left

    +
    +
    AsciiDoc source
    +
    +
    :frame: all
    +:grid: all
    +:halign: left
    +:valign: top
    +
    +[options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    + + ++++++ + + + + + + + + + + + + + + + + + +
    Table 14. Table test
    frame grid valign halign
      +  + 

    sides

    rows

    middle

    center

    +
    +
    AsciiDoc source
    +
    +
    :frame: sides
    +:grid: rows
    +:halign: center
    +:valign: middle
    +
    +.Table test
    +[width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    + ++++++ + + + + + + + + + + + + + + + + + +
    frame grid valign halign
      +  + 

    topbot

    cols

    bottom

    right

    +
    +
    AsciiDoc source
    +
    +
    :frame: topbot
    +:grid: cols
    +:halign: right
    +:valign: bottom
    +
    +[align="right",width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    + ++++++ + + + + + + + + + + + + + + + + + +
    frame grid valign halign
      +  + 

    none

    none

    top

    left

    +
    +
    AsciiDoc source
    +
    +
    :frame: none
    +:grid: none
    +:halign: left
    +:valign: top
    +
    +[align="center",width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/newtables-xhtml11.html asciidoc-10.1.2/tests/data/newtables-xhtml11.html --- asciidoc-8.6.10/tests/data/newtables-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/newtables-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,2076 @@ + + + + + + +AsciiDoc New tables + + + + + +
    +
    +
    +

    New in version 8.3.0

    +

    I’ve finally come up with a new tables syntax that I’m happy with +and can at last remove this footnote from the User Guide: “The +current table syntax is overly complicated and unwieldy to edit, +hopefully a more usable syntax will appear in future versions of +AsciiDoc.”

    +
    +
    +
    Update
    +

    The following additions were made at AsciiDoc 8.4.4:

    +
      +
    • +

      +Cell column and row spanning. +

      +
    • +
    • +

      +Styles can be applied per cell. +

      +
    • +
    • +

      +Vertical cell alignment can be applied to columns and cells. +

      +
    • +
    +

    See the examples at the end of this document.

    +
    +

    At first glance it doesn’t look much different to the old syntax but +it’s a lot more flexible, easier to enter and supports a lot of column +styles (for example the asciidoc style supports AsciiDoc block and +inline elements). The old tables syntax has been deprecated but is +currently still processed. Here are some examples of AsciiDoc new +tables:

    +
    + + ++++ + + + + + + + + + + + + + + + + +
    Table 1. Simple table

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +
    +
    +
    AsciiDoc source
    +
    +
    [width="15%"]
    +|=======
    +|1 |2 |A
    +|3 |4 |B
    +|5 |6 |C
    +|=======
    +
    +
    + + +++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 2. Table with title, header and footer
    Column 1 Column 2

    6

    Three items

    1

    Item 1

    2

    Item 2

    3

    Item 3

    +
    +
    +
    AsciiDoc source
    +
    +
    .An example table
    +[width="40%",frame="topbot",options="header,footer"]
    +|======================
    +|Column 1 |Column 2
    +|1        |Item 1
    +|2        |Item 2
    +|3        |Item 3
    +|6        |Three items
    +|======================
    +
    +
    + + ++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 3. Columns formatted with strong, monospaced and emphasis styles
    Columns 2 and 3

    footer 1

    footer 2

    footer 3

    1

    Item 1

    Item 1

    2

    Item 2

    Item 2

    3

    Item 3

    Item 3

    4

    Item 4

    Item 4

    +
    +
    +
    AsciiDoc source
    +
    +
    .An example table
    +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"]
    +|==========================
    +|      2+|Columns 2 and 3
    +|1       |Item 1  |Item 1
    +|2       |Item 2  |Item 2
    +|3       |Item 3  |Item 3
    +|4       |Item 4  |Item 4
    +|footer 1|footer 2|footer 3
    +|==========================
    +
    +
    + + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 4. A table with externally sourced CSV data
    IDCustomer NameContact NameCustomer AddressPhone

    AROUT

    Around the Horn

    Thomas Hardy

    120 Hanover Sq. +London

    (171) 555-7788

    BERGS

    Berglunds snabbkop

    Christina Berglund

    Berguvsvagen 8 +Lulea

    0921-12 34 65

    BLAUS

    Blauer See Delikatessen

    Hanna Moos

    Forsterstr. 57 +Mannheim

    0621-08460

    BLONP

    Blondel pere et fils

    Frederique Citeaux

    24, place Kleber +Strasbourg

    88.60.15.31

    BOLID

    Bolido Comidas preparadas

    Martin Sommer

    C/ Araquil, 67 +Madrid

    (91) 555 22 82

    BONAP

    Bon app'

    Laurence Lebihan

    12, rue des Bouchers +Marseille

    91.24.45.40

    BOTTM

    Bottom-Dollar Markets

    Elizabeth Lincoln

    23 Tsawassen Blvd. +Tsawassen

    (604) 555-4729

    BSBEV

    B’s Beverages

    Victoria Ashworth

    Fauntleroy Circus +London

    (171) 555-1212

    CACTU

    Cactus Comidas para llevar

    Patricio Simpson

    Cerrito 333 +Buenos Aires

    (1) 135-5555

    +
    +
    +
    AsciiDoc source
    +
    +
     [format="csv",cols="^1,4*2",options="header"]
    + |===================================================
    + ID,Customer Name,Contact Name,Customer Address,Phone
    + include::customers.csv[]
    + |===================================================
    +
    +
    + + ++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 5. DVS formatted table

    root

    x

    0

    0

    root

    /root

    /bin/bash

    daemon

    x

    1

    1

    daemon

    /usr/sbin

    /bin/sh

    bin

    x

    2

    2

    bin

    /bin

    /bin/sh

    sys

    x

    3

    3

    sys

    /dev

    /bin/sh

    sync

    x

    4

    65534

    sync

    /bin

    /bin/sync

    games

    x

    5

    60

    games

    /usr/games

    /bin/sh

    +
    +
    +
    AsciiDoc source
    +
    +
    [width="70%",format="dsv"]
    +|====================================
    +root:x:0:0:root:/root:/bin/bash
    +daemon:x:1:1:daemon:/usr/sbin:/bin/sh
    +bin:x:2:2:bin:/bin:/bin/sh
    +sys:x:3:3:sys:/dev:/bin/sh
    +sync:x:4:65534:sync:/bin:/bin/sync
    +games:x:5:60:games:/usr/games:/bin/sh
    +|====================================
    +
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 6. Horizontal and vertical source data
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +
    +

    Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry.

    +
    +
    AsciiDoc source
    +
    +
    .Windtrainer workouts
    +[width="80%",cols="3,^2,^2,10",options="header"]
    +|=========================================================
    +|Date |Duration |Avg HR |Notes
    +
    +|22-Aug-08 |10:24 | 157 |
    +Worked out MSHR (max sustainable heart rate) by going hard
    +for this interval.
    +
    +|22-Aug-08 |23:03 | 152 |
    +Back-to-back with previous interval.
    +
    +|24-Aug-08 |40:00 | 145 |
    +Moderately hard interspersed with 3x 3min intervals (2min
    +hard + 1min really hard taking the HR up to 160).
    +
    +|=========================================================
    +
    +
    + + +++ + + + + + + + + + + + +
    Table 7. Default and verse styles
    Default paragraphs Centered verses

    Per id.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    Per id. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.
    +
    +
    +
    AsciiDoc source
    +
    +
    [cols=",^v",options="header"]
    +|===================================
    +|Default paragraphs |Centered verses
    +2*|Per id.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +|===================================
    +
    +
    + + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 8. Horizontal and vertial headings
    West Central East Total

    Q1

    270

    292

    342

    904

    Q2

    322

    276

    383

    981

    Q3

    298

    252

    274

    824

    Q4

    344

    247

    402

    993

    +
    +
    +
    AsciiDoc source
    +
    +
    .Horizontal and vertial headings
    +[cols="h,4*",options="header",width="50%"]
    +|==================================
    +|      |West |Central |East | Total
    +|Q1    |270  |292     |342  | 904
    +|Q2    |322  |276     |383  | 981
    +|Q3    |298  |252     |274  | 824
    +|Q4    |344  |247     |402  | 993
    +|==================================
    +
    +
    + + +++ + + + + + + + + + + + +
    Table 9. AsciiDoc style in first column, Literal in second
    Output markup AsciiDoc source

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
    +
    +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +
    +
    Code filter example
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +
    +
    AsciiDoc source
    +
    +
    [cols="asciidoc,literal",options="header",grid="cols"]
    +|==================================
    +|Output markup |AsciiDoc source
    +2*|
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +   ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|==================================
    +
    +
    + + ++ + + + + +
    Table 10. Cell containing lots of example markup elements

    URLs: +The AsciiDoc home page, +https://asciidoc.org/, +email Joe Bloggs, +joe.bloggs@example.com, +joe.bloggs.

    +

    Link: See AsciiDoc source.

    +

    Emphasized text, Strong text, Monospaced text, “Quoted text”.

    +

    Subscripts and superscripts: eπi+1 = 0. H2O and x10. +Some super text and some sub text

    +

    Replacements: © copyright, ™ trademark, ® registered trademark, — em dash, … ellipsis, → right arrow, ← left arrow, ⇒ right +double arrow, ⇐ left double arrow.

    +
    +
    +
    AsciiDoc source
    +
    +
    |====================================================================
    +|'URLs':
    +https://asciidoc.org/[The AsciiDoc home page],
    +https://asciidoc.org/,
    +mailto:joe.bloggs@example.com[email Joe Bloggs],
    +joe.bloggs@example.com,
    +callto:joe.bloggs[].
    +
    +'Link': See <<X1,AsciiDoc source>>.
    +
    +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''.
    +
    +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^.
    +Some ^super text^ and ~some sub text~
    +
    +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark,
    +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right
    +double arrow, <= left double arrow.
    +|====================================================================
    +
    +
    + + +++ + + + + + +
    Table 11. Nested table

    Normal cell

    Cell with nested table

    +
    + +++ + + + + + +

    Nested table cell 1

    Nested table cell 2

    +
    +
    +
    +
    AsciiDoc source
    +
    +
    [width="75%",cols="1,2a"]
    +|==============================================
    +|Normal cell
    +
    +|Cell with nested table
    +
    +[cols="2,1"]
    +!==============================================
    +!Nested table cell 1 !Nested table cell 2
    +!==============================================
    +
    +|==============================================
    +
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + +
    Table 12. Spans, alignments and styles

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    +
    +
    +
    AsciiDoc source
    +
    +
    .Spans, alignments and styles
    +[cols="e,m,^,>s",width="25%"]
    +|================
    +|1 >s|2 |3 |4
    +^|5 2.2+^.^|6 .3+<.>m|7
    +^|8
    +|9 2+>|10
    +|================
    +
    +
    + + +++ + + + + + + + + +
    Table 13. Three panes

    Top Left Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    Right Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
    +
    +
    Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +
    +
    Code filter example
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +

    Bottom Left Pane

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +

    Consul necessitatibus per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui.

    +
      +
    • +

      +Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. +

      +
        +
      • +

        +Fusce euismod commodo velit. +

        +
      • +
      • +

        +Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. +

        +
      • +
      • +

        +Vivamus fringilla mi eu lacus. +

        +
      • +
      • +

        +Donec eget arcu bibendum nunc + consequat lobortis. +

        +
      • +
      +
    • +
    • +

      +Nulla porttitor vulputate libero. +

      +
        +
      1. +

        +Fusce euismod commodo velit. +

        +
      2. +
      3. +

        +Vivamus fringilla mi eu lacus. +

        +
      4. +
      +
    • +
    +
    +
    +
    AsciiDoc source
    +
    +
    .Three panes
    +[cols="a,2a"]
    +|==================================
    +|
    +[float]
    +Top Left Pane
    +~~~~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +.2+|
    +[float]
    +Right Pane
    +~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +-----------------------------------
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +-----------------------------------
    +
    +.Code filter example
    +[source,python]
    +-----------------------------------
    +''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +-----------------------------------
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|
    +[float]
    +Bottom Left Pane
    +~~~~~~~~~~~~~~~~
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +Consul *necessitatibus* per id,
    +consetetur, eu pro everti postulant
    +homero verear ea mea, qui.
    +
    +- Lorem ipsum dolor sit amet,
    +  consectetuer adipiscing elit.
    +  * Fusce euismod commodo velit.
    +  * Qui in magna commodo, est labitur
    +    dolorum an. Est ne magna primis
    +    adolescens. Sit munere ponderum
    +    dignissim et. Minim luptatum et vel.
    +  * Vivamus fringilla mi eu lacus.
    +  * Donec eget arcu bibendum nunc
    +    consequat lobortis.
    +- Nulla porttitor vulputate libero.
    +  . Fusce euismod commodo velit.
    +  . Vivamus fringilla mi eu lacus.
    +
    +|==================================
    +
    +
    +
    +
    +

    Combinations of align, frame, grid, valign and halign attributes

    +
    +
    + ++++++ + + + + + + + + + + + + + + + + + +
    frame grid valign halign
      +  + 

    all

    all

    top

    left

    +
    +
    +
    AsciiDoc source
    +
    +
    :frame: all
    +:grid: all
    +:halign: left
    +:valign: top
    +
    +[options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    + + ++++++ + + + + + + + + + + + + + + + + + +
    Table 14. Table test
    frame grid valign halign
      +  + 

    sides

    rows

    middle

    center

    +
    +
    +
    AsciiDoc source
    +
    +
    :frame: sides
    +:grid: rows
    +:halign: center
    +:valign: middle
    +
    +.Table test
    +[width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    + ++++++ + + + + + + + + + + + + + + + + + +
    frame grid valign halign
      +  + 

    topbot

    cols

    bottom

    right

    +
    +
    +
    AsciiDoc source
    +
    +
    :frame: topbot
    +:grid: cols
    +:halign: right
    +:valign: bottom
    +
    +[align="right",width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    + ++++++ + + + + + + + + + + + + + + + + + +
    frame grid valign halign
      +  + 

    none

    none

    top

    left

    +
    +
    +
    AsciiDoc source
    +
    +
    :frame: none
    +:grid: none
    +:halign: left
    +:valign: top
    +
    +[align="center",width="50%",options="header"]
    +|====
    +||frame | grid |valign |halign
    +v|&nbsp;
    +&nbsp;
    +&nbsp;
    +|{frame} | {grid} |{valign} |{halign}
    +|====
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/oldtables-docbook5.xml asciidoc-10.1.2/tests/data/oldtables-docbook5.xml --- asciidoc-8.6.10/tests/data/oldtables-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/oldtables-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,366 @@ + + + + +
    + + AsciiDoc Old Tables + +Examples of the AsciiDoc old tables syntax. This syntax was used in +AsciiDoc versions up to 8.2.7 and has since been deprecated in favor +of the new tables syntax. +Simple table: + + + + + + + + 1 + + + 2 + + + + + 3 + + + 4 + + + + + 5 + + + 6 + + + + + +Table with title, header and footer: + +An example table + + + + + + + Column 1 + + + Column 2 + + + + + + + 6 + + + Three items + + + + + + + 1 + + + Item 1 + + + + + 2 + + + Item 2 + + + + + 3 + + + Item 3 + + + + +
    +Four columns totaling 15% of the pagewidth, CSV data: + + + + + + + + + + 1 + + + 2 + + + 3 + + + 4 + + + + + a + + + b + + + c + + + d + + + + + A + + + B + + + C + + + D + + + + + +A table with a numeric ruler and externally sourced CSV data: + + + + + + + + + + + ID + + + Customer Name + + + Contact Name + + + Customer Address + + + Phone + + + + + + + AROUT + + + Around the Horn + + + Thomas Hardy + + + 120 Hanover Sq. + + London + + + (171) 555-7788 + + + + + BERGS + + + Berglunds snabbkop + + + Christina Berglund + + + Berguvsvagen 8 + + Lulea + + + 0921-12 34 65 + + + + + BLAUS + + + Blauer See Delikatessen + + + Hanna Moos + + + Forsterstr. 57 + + Mannheim + + + 0621-08460 + + + + + BLONP + + + Blondel pere et fils + + + Frederique Citeaux + + + 24, place Kleber + + Strasbourg + + + 88.60.15.31 + + + + + BOLID + + + Bolido Comidas preparadas + + + Martin Sommer + + + C/ Araquil, 67 + + Madrid + + + (91) 555 22 82 + + + + + BONAP + + + Bon app' + + + Laurence Lebihan + + + 12, rue des Bouchers + + Marseille + + + 91.24.45.40 + + + + + BOTTM + + + Bottom-Dollar Markets + + + Elizabeth Lincoln + + + 23 Tsawassen Blvd. + + Tsawassen + + + (604) 555-4729 + + + + + BSBEV + + + B’s Beverages + + + Victoria Ashworth + + + Fauntleroy Circus + + London + + + (171) 555-1212 + + + + + CACTU + + + Cactus Comidas para llevar + + + Patricio Simpson + + + Cerrito 333 + + Buenos Aires + + + (1) 135-5555 + + + + + +
    diff -Nru asciidoc-8.6.10/tests/data/oldtables-docbook.xml asciidoc-10.1.2/tests/data/oldtables-docbook.xml --- asciidoc-8.6.10/tests/data/oldtables-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/oldtables-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,367 @@ + + + + + +
    + + AsciiDoc Old Tables + +Examples of the AsciiDoc old tables syntax. This syntax was used in +AsciiDoc versions up to 8.2.7 and has since been deprecated in favor +of the new tables syntax. +Simple table: + + + + + + + + 1 + + + 2 + + + + + 3 + + + 4 + + + + + 5 + + + 6 + + + + + +Table with title, header and footer: + +An example table + + + + + + + Column 1 + + + Column 2 + + + + + + + 6 + + + Three items + + + + + + + 1 + + + Item 1 + + + + + 2 + + + Item 2 + + + + + 3 + + + Item 3 + + + + +
    +Four columns totaling 15% of the pagewidth, CSV data: + + + + + + + + + + 1 + + + 2 + + + 3 + + + 4 + + + + + a + + + b + + + c + + + d + + + + + A + + + B + + + C + + + D + + + + + +A table with a numeric ruler and externally sourced CSV data: + + + + + + + + + + + ID + + + Customer Name + + + Contact Name + + + Customer Address + + + Phone + + + + + + + AROUT + + + Around the Horn + + + Thomas Hardy + + + 120 Hanover Sq. + + London + + + (171) 555-7788 + + + + + BERGS + + + Berglunds snabbkop + + + Christina Berglund + + + Berguvsvagen 8 + + Lulea + + + 0921-12 34 65 + + + + + BLAUS + + + Blauer See Delikatessen + + + Hanna Moos + + + Forsterstr. 57 + + Mannheim + + + 0621-08460 + + + + + BLONP + + + Blondel pere et fils + + + Frederique Citeaux + + + 24, place Kleber + + Strasbourg + + + 88.60.15.31 + + + + + BOLID + + + Bolido Comidas preparadas + + + Martin Sommer + + + C/ Araquil, 67 + + Madrid + + + (91) 555 22 82 + + + + + BONAP + + + Bon app' + + + Laurence Lebihan + + + 12, rue des Bouchers + + Marseille + + + 91.24.45.40 + + + + + BOTTM + + + Bottom-Dollar Markets + + + Elizabeth Lincoln + + + 23 Tsawassen Blvd. + + Tsawassen + + + (604) 555-4729 + + + + + BSBEV + + + B’s Beverages + + + Victoria Ashworth + + + Fauntleroy Circus + + London + + + (171) 555-1212 + + + + + CACTU + + + Cactus Comidas para llevar + + + Patricio Simpson + + + Cerrito 333 + + Buenos Aires + + + (1) 135-5555 + + + + + +
    diff -Nru asciidoc-8.6.10/tests/data/oldtables-html4.html asciidoc-10.1.2/tests/data/oldtables-html4.html --- asciidoc-8.6.10/tests/data/oldtables-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/oldtables-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,352 @@ + + + + + +AsciiDoc Old Tables + + +

    AsciiDoc Old Tables

    +

    +

    + +

    Examples of the AsciiDoc old tables syntax. This syntax was used in +AsciiDoc versions up to 8.2.7 and has since been deprecated in favor +of the new tables syntax.

    +

    Simple table:

    + + + + + + + + + + + + + + + +
    + 1 + + 2 +
    + 3 + + 4 +
    + 5 + + 6 +
    +

    Table with title, header and footer:

    +

    TableAn example table

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Column 1 + + Column 2 +
    + 6 + + Three items +
    + 1 + + Item 1 +
    + 2 + + Item 2 +
    + 3 + + Item 3 +
    +

    Four columns totaling 15% of the pagewidth, CSV data:

    + + + + + + + + + + + + + + + + + + + + + +
    + 1 + + 2 + + 3 + + 4 +
    + a + + b + + c + + d +
    + A + + B + + C + + D +
    +

    A table with a numeric ruler and externally sourced CSV data:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ID + + Customer Name + + Contact Name + + Customer Address + + Phone +
    + AROUT + + Around the Horn + + Thomas Hardy + + 120 Hanover Sq. +
    + London +
    + (171) 555-7788 +
    + BERGS + + Berglunds snabbkop + + Christina Berglund + + Berguvsvagen 8 +
    + Lulea +
    + 0921-12 34 65 +
    + BLAUS + + Blauer See Delikatessen + + Hanna Moos + + Forsterstr. 57 +
    + Mannheim +
    + 0621-08460 +
    + BLONP + + Blondel pere et fils + + Frederique Citeaux + + 24, place Kleber +
    + Strasbourg +
    + 88.60.15.31 +
    + BOLID + + Bolido Comidas preparadas + + Martin Sommer + + C/ Araquil, 67 +
    + Madrid +
    + (91) 555 22 82 +
    + BONAP + + Bon app' + + Laurence Lebihan + + 12, rue des Bouchers +
    + Marseille +
    + 91.24.45.40 +
    + BOTTM + + Bottom-Dollar Markets + + Elizabeth Lincoln + + 23 Tsawassen Blvd. +
    + Tsawassen +
    + (604) 555-4729 +
    + BSBEV + + B’s Beverages + + Victoria Ashworth + + Fauntleroy Circus +
    + London +
    + (171) 555-1212 +
    + CACTU + + Cactus Comidas para llevar + + Patricio Simpson + + Cerrito 333 +
    + Buenos Aires +
    + (1) 135-5555 +
    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/oldtables-html5.html asciidoc-10.1.2/tests/data/oldtables-html5.html --- asciidoc-8.6.10/tests/data/oldtables-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/oldtables-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1088 @@ + + + + + +AsciiDoc Old Tables + + + + + +
    +
    +
    +

    Examples of the AsciiDoc old tables syntax. This syntax was used in +AsciiDoc versions up to 8.2.7 and has since been deprecated in favor +of the new tables syntax.

    +

    Simple table:

    + +++ + + + + + + + + + + + + + +
    + 1 + + 2 +
    + 3 + + 4 +
    + 5 + + 6 +
    +

    Table with title, header and footer:

    + + +++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    TableAn example table
    + Column 1 + + Column 2 +
    + 6 + + Three items +
    + 1 + + Item 1 +
    + 2 + + Item 2 +
    + 3 + + Item 3 +
    +

    Four columns totaling 15% of the pagewidth, CSV data:

    + +++++ + + + + + + + + + + + + + + + + + + + +
    + 1 + + 2 + + 3 + + 4 +
    + a + + b + + c + + d +
    + A + + B + + C + + D +
    +

    A table with a numeric ruler and externally sourced CSV data:

    + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ID + + Customer Name + + Contact Name + + Customer Address + + Phone +
    + AROUT + + Around the Horn + + Thomas Hardy + + 120 Hanover Sq. +
    + London +
    + (171) 555-7788 +
    + BERGS + + Berglunds snabbkop + + Christina Berglund + + Berguvsvagen 8 +
    + Lulea +
    + 0921-12 34 65 +
    + BLAUS + + Blauer See Delikatessen + + Hanna Moos + + Forsterstr. 57 +
    + Mannheim +
    + 0621-08460 +
    + BLONP + + Blondel pere et fils + + Frederique Citeaux + + 24, place Kleber +
    + Strasbourg +
    + 88.60.15.31 +
    + BOLID + + Bolido Comidas preparadas + + Martin Sommer + + C/ Araquil, 67 +
    + Madrid +
    + (91) 555 22 82 +
    + BONAP + + Bon app' + + Laurence Lebihan + + 12, rue des Bouchers +
    + Marseille +
    + 91.24.45.40 +
    + BOTTM + + Bottom-Dollar Markets + + Elizabeth Lincoln + + 23 Tsawassen Blvd. +
    + Tsawassen +
    + (604) 555-4729 +
    + BSBEV + + B’s Beverages + + Victoria Ashworth + + Fauntleroy Circus +
    + London +
    + (171) 555-1212 +
    + CACTU + + Cactus Comidas para llevar + + Patricio Simpson + + Cerrito 333 +
    + Buenos Aires +
    + (1) 135-5555 +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/oldtables.txt asciidoc-10.1.2/tests/data/oldtables.txt --- asciidoc-8.6.10/tests/data/oldtables.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/oldtables.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -AsciiDoc Old Tables -=================== - -Examples of the AsciiDoc 'old tables' syntax. This syntax was used in -AsciiDoc versions up to 8.2.7 and has since been deprecated in favor -of the 'new tables' syntax. - -Simple table: - -`---`--- -1 2 -3 4 -5 6 --------- - -Table with title, header and footer: - -.An example table -[grid="all"] -`-----------.-------------- -Column 1 Column 2 ---------------------------- -1 Item 1 -2 Item 2 -3 Item 3 ---------------------------- -6 Three items ---------------------------- - -Four columns totaling 15% of the 'pagewidth', CSV data: - -[frame="all"] -````~15 -1,2,3,4 -a,b,c,d -A,B,C,D -~~~~~~~~ - -A table with a numeric ruler and externally sourced CSV data: - -[frame="all", grid="all"] -`15`20`25`20`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -ID,Customer Name,Contact Name,Customer Address,Phone -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -"AROUT","Around the Horn","Thomas Hardy","120 Hanover Sq. -London","(171) 555-7788" -"BERGS","Berglunds snabbkop","Christina Berglund","Berguvsvagen 8 -Lulea","0921-12 34 65" -"BLAUS","Blauer See Delikatessen","Hanna Moos","Forsterstr. 57 -Mannheim","0621-08460" -"BLONP","Blondel pere et fils","Frederique Citeaux","24, place Kleber -Strasbourg","88.60.15.31" -"BOLID","Bolido Comidas preparadas","Martin Sommer","C/ Araquil, 67 -Madrid","(91) 555 22 82" -"BONAP","Bon app'","Laurence Lebihan","12, rue des Bouchers -Marseille","91.24.45.40" -"BOTTM","Bottom-Dollar Markets","Elizabeth Lincoln","23 Tsawassen Blvd. -Tsawassen","(604) 555-4729" -"BSBEV","B's Beverages","Victoria Ashworth","Fauntleroy Circus -London","(171) 555-1212" -"CACTU","Cactus Comidas para llevar","Patricio Simpson","Cerrito 333 -Buenos Aires","(1) 135-5555" -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - diff -Nru asciidoc-8.6.10/tests/data/oldtables-xhtml11.html asciidoc-10.1.2/tests/data/oldtables-xhtml11.html --- asciidoc-8.6.10/tests/data/oldtables-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/oldtables-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1106 @@ + + + + + + +AsciiDoc Old Tables + + + + + +
    +
    +
    +

    Examples of the AsciiDoc old tables syntax. This syntax was used in +AsciiDoc versions up to 8.2.7 and has since been deprecated in favor +of the new tables syntax.

    +

    Simple table:

    +
    + +++ + + + + + + + + + + + + + +
    + 1 + + 2 +
    + 3 + + 4 +
    + 5 + + 6 +
    +
    +

    Table with title, header and footer:

    +
    + + +++ + + + + + + + + + + + + + + + + + + + + + + + + + +
    TableAn example table
    + Column 1 + + Column 2 +
    + 6 + + Three items +
    + 1 + + Item 1 +
    + 2 + + Item 2 +
    + 3 + + Item 3 +
    +
    +

    Four columns totaling 15% of the pagewidth, CSV data:

    +
    + +++++ + + + + + + + + + + + + + + + + + + + +
    + 1 + + 2 + + 3 + + 4 +
    + a + + b + + c + + d +
    + A + + B + + C + + D +
    +
    +

    A table with a numeric ruler and externally sourced CSV data:

    +
    + ++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + ID + + Customer Name + + Contact Name + + Customer Address + + Phone +
    + AROUT + + Around the Horn + + Thomas Hardy + + 120 Hanover Sq. +
    + London +
    + (171) 555-7788 +
    + BERGS + + Berglunds snabbkop + + Christina Berglund + + Berguvsvagen 8 +
    + Lulea +
    + 0921-12 34 65 +
    + BLAUS + + Blauer See Delikatessen + + Hanna Moos + + Forsterstr. 57 +
    + Mannheim +
    + 0621-08460 +
    + BLONP + + Blondel pere et fils + + Frederique Citeaux + + 24, place Kleber +
    + Strasbourg +
    + 88.60.15.31 +
    + BOLID + + Bolido Comidas preparadas + + Martin Sommer + + C/ Araquil, 67 +
    + Madrid +
    + (91) 555 22 82 +
    + BONAP + + Bon app' + + Laurence Lebihan + + 12, rue des Bouchers +
    + Marseille +
    + 91.24.45.40 +
    + BOTTM + + Bottom-Dollar Markets + + Elizabeth Lincoln + + 23 Tsawassen Blvd. +
    + Tsawassen +
    + (604) 555-4729 +
    + BSBEV + + B’s Beverages + + Victoria Ashworth + + Fauntleroy Circus +
    + London +
    + (171) 555-1212 +
    + CACTU + + Cactus Comidas para llevar + + Patricio Simpson + + Cerrito 333 +
    + Buenos Aires +
    + (1) 135-5555 +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/open-block-test-docbook5.xml asciidoc-10.1.2/tests/data/open-block-test-docbook5.xml --- asciidoc-8.6.10/tests/data/open-block-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/open-block-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,95 @@ + + + + +
    + + Additional Open Block and Paragraph styles + + +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… + + +A title +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + +
    + +Sir Arthur Conan Doyle +The Adventures of Sherlock Holmes + +As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled. +"A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There’s money in +this case, Watson, if there is nothing else." +
    +
    + +William Blake +from Auguries of Innocence + +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +
    +y = 15 + +if y == 24: + x = 42 + + + + + + open-block-test__1.png + + + + + + + + open-block-test__2.png + + + + + + + + open-block-test__3.png + + +
    diff -Nru asciidoc-8.6.10/tests/data/open-block-test-docbook.xml asciidoc-10.1.2/tests/data/open-block-test-docbook.xml --- asciidoc-8.6.10/tests/data/open-block-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/open-block-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,96 @@ + + + + + +
    + + Additional Open Block and Paragraph styles + + +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… + + +A title +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + + +Lorum ipsum… +Lorum ipsum… + +
    + +Sir Arthur Conan Doyle +The Adventures of Sherlock Holmes + +As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled. +"A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There’s money in +this case, Watson, if there is nothing else." +
    +
    + +William Blake +from Auguries of Innocence + +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +
    +y = 15 + +if y == 24: + x = 42 + + + + + + open-block-test__1.png + + + + + + + + open-block-test__2.png + + + + + + + + open-block-test__3.png + + +
    diff -Nru asciidoc-8.6.10/tests/data/open-block-test-html4.html asciidoc-10.1.2/tests/data/open-block-test-html4.html --- asciidoc-8.6.10/tests/data/open-block-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/open-block-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,120 @@ + + + + + +Additional Open Block and Paragraph styles + + +

    Additional Open Block and Paragraph styles

    +

    +

    + + +
    Lorum ipsum…
    + +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    + +
    Lorum ipsum…
    + +
    +

    A title

    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    + + + +
    +

    Note

    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    + + + +
    +

    Caution

    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    + + + +
    +

    Important

    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    + + + +
    +

    Warning

    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    + + + +
    +

    Tip

    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +

    As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled.

    +

    "A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There’s money in +this case, Watson, if there is nothing else."

    +

    +The Adventures of Sherlock Holmes
    +— Sir Arthur Conan Doyle +

    +
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +

    +from Auguries of Innocence
    +— William Blake +

    +
    +
    +
    y = 15
    +
    +if y == 24:
    +    x = 42
    +
    +open-block-test__1.png +
    +
    +open-block-test__2.png +
    +
    +open-block-test__3.png +
    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/open-block-test-html5.html asciidoc-10.1.2/tests/data/open-block-test-html5.html --- asciidoc-8.6.10/tests/data/open-block-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/open-block-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,868 @@ + + + + + +Additional Open Block and Paragraph styles + + + + + +
    +
    +
    +
    +
    Lorum ipsum…
    +
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    Lorum ipsum…
    +
    +
    +
    A title
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    + + + +
    +
    Note
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Caution
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Important
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Warning
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Tip
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    +
    +

    As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled.

    +

    "A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There’s money in +this case, Watson, if there is nothing else."

    +
    +
    +The Adventures of Sherlock Holmes
    +— Sir Arthur Conan Doyle +
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +
    +from Auguries of Innocence
    +— William Blake +
    +
    +
    +
    y = 15
    +
    +if y == 24:
    +    x = 42
    +
    +
    +open-block-test__1.png +
    +
    +
    +
    +open-block-test__2.png +
    +
    +
    +
    +open-block-test__3.png +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/open-block-test.txt asciidoc-10.1.2/tests/data/open-block-test.txt --- asciidoc-8.6.10/tests/data/open-block-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/open-block-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,117 +0,0 @@ -= Additional Open Block and Paragraph styles - - -[comment] -Lorum ipsum... - -[comment] --- -Lorum ipsum... --- - -[example] -Lorum ipsum... - -[example] --- -Lorum ipsum... - -Lorum ipsum... --- - -[sidebar] -Lorum ipsum... - -[sidebar] -.A title --- -Lorum ipsum... - -Lorum ipsum... --- - -[NOTE] --- -Lorum ipsum... - -Lorum ipsum... --- - -[CAUTION] --- -Lorum ipsum... - -Lorum ipsum... --- - -[IMPORTANT] --- -Lorum ipsum... - -Lorum ipsum... --- - -[WARNING] --- -Lorum ipsum... - -Lorum ipsum... --- - -[TIP] --- -Lorum ipsum... - -Lorum ipsum... --- - -[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] --- -As he spoke there was the sharp sound of horses' hoofs and -grating wheels against the curb, followed by a sharp pull at the -bell. Holmes whistled. - -"A pair, by the sound," said he. "Yes," he continued, glancing -out of the window. "A nice little brougham and a pair of -beauties. A hundred and fifty guineas apiece. There's money in -this case, Watson, if there is nothing else." --- - -[verse, William Blake, from Auguries of Innocence] --- -To see a world in a grain of sand, -And a heaven in a wild flower, -Hold infinity in the palm of your hand, -And eternity in an hour. --- - -[source,python] --- -y = 15 - -if y == 24: - x = 42 --- - -[latex] --- -$y = \int_0^\infty \gamma^2 \cos(x) dx$ --- - -[graphviz] --- -digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} --- - -[music] --- -\version "2.10.0" -\paper { - ragged-right = ##t -} -{ - \time 3/4 - \clef bass - c2 e4 g2. f4 e d c2 r4 -} --- diff -Nru asciidoc-8.6.10/tests/data/open-block-test-xhtml11.html asciidoc-10.1.2/tests/data/open-block-test-xhtml11.html --- asciidoc-8.6.10/tests/data/open-block-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/open-block-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,870 @@ + + + + + + +Additional Open Block and Paragraph styles + + + + + +
    +
    +
    +
    +
    Lorum ipsum…
    +
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    Lorum ipsum…
    +
    +
    +
    A title
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    + + + +
    +
    Note
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Caution
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Important
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Warning
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    + + + +
    +
    Tip
    +
    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    +
    +

    As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled.

    +

    "A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There’s money in +this case, Watson, if there is nothing else."

    +
    +
    +The Adventures of Sherlock Holmes
    +— Sir Arthur Conan Doyle +
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +
    +from Auguries of Innocence
    +— William Blake +
    +
    +
    +
    y = 15
    +
    +if y == 24:
    +    x = 42
    +
    +
    +open-block-test__1.png +
    +
    +
    +
    +open-block-test__2.png +
    +
    +
    +
    +open-block-test__3.png +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/rcs-id-marker-test-docbook5.xml asciidoc-10.1.2/tests/data/rcs-id-marker-test-docbook5.xml --- asciidoc-8.6.10/tests/data/rcs-id-marker-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/rcs-id-marker-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ + + + + +
    + + RCS $Id$ Marker Test + 2009/05/17 + + + jbloggs + + + J + 1.52009/05/17J + +Lorum ipsum… +
    diff -Nru asciidoc-8.6.10/tests/data/rcs-id-marker-test-docbook.xml asciidoc-10.1.2/tests/data/rcs-id-marker-test-docbook.xml --- asciidoc-8.6.10/tests/data/rcs-id-marker-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/rcs-id-marker-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,17 @@ + + + + + +
    + + RCS $Id$ Marker Test + 2009/05/17 + + jbloggs + + J +1.52009/05/17J + +Lorum ipsum… +
    diff -Nru asciidoc-8.6.10/tests/data/rcs-id-marker-test-html4.html asciidoc-10.1.2/tests/data/rcs-id-marker-test-html4.html --- asciidoc-8.6.10/tests/data/rcs-id-marker-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/rcs-id-marker-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,25 @@ + + + + + +RCS $Id$ Marker Test + + +

    RCS $Id$ Marker Test

    +

    +jbloggs
    +version 1.5, +2009/05/17 +

    + +

    Lorum ipsum…

    +

    +

    +

    +Version 1.5
    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/rcs-id-marker-test-html5.html asciidoc-10.1.2/tests/data/rcs-id-marker-test-html5.html --- asciidoc-8.6.10/tests/data/rcs-id-marker-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/rcs-id-marker-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,756 @@ + + + + + +RCS $Id$ Marker Test + + + + + +
    +
    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/rcs-id-marker-test.txt asciidoc-10.1.2/tests/data/rcs-id-marker-test.txt --- asciidoc-8.6.10/tests/data/rcs-id-marker-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/rcs-id-marker-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,6 +0,0 @@ -RCS $Id$ Marker Test -==================== -$Id: mydoc.txt,v 1.5 2009/05/17 17:58:44 jbloggs Exp $ - - -Lorum ipsum... diff -Nru asciidoc-8.6.10/tests/data/rcs-id-marker-test-xhtml11.html asciidoc-10.1.2/tests/data/rcs-id-marker-test-xhtml11.html --- asciidoc-8.6.10/tests/data/rcs-id-marker-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/rcs-id-marker-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,758 @@ + + + + + + +RCS $Id$ Marker Test + + + + + +
    +
    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/slidy-example-slidy.html asciidoc-10.1.2/tests/data/slidy-example-slidy.html --- asciidoc-8.6.10/tests/data/slidy-example-slidy.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/slidy-example-slidy.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,4511 @@ + + + + +Slidy Example Slideshow + + + + + + + + +
    +
    +

    This preamble will appear on a separate slide.

    +
    +
    +
    +

    AsciiDoc Elements

    +
    +

    Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla. Odio +sed pede litora.

    +

    Titles inside delimited blocks must be floated

    +

    Porta nisl metus. Justo porttitor vel. Cras consequat tincidunt id sed +conubia. Feugiat felis justo. Nunc amet nulla. Eu ac orci mollis.

    +
    +
    +images/tiger.png +
    +
    Figure 1. Tiger
    +
    +
    +
    +
    +

    Incremental Elements

    +
    +

    The remaining elements on this page are incremental, press the space +bar to reveal them.

    +
      +
    • + +Rhoncus pede justo. + +
    • +
    • + +Velit pede dolor. + +
    • +
    • + +Iaculis commodo et. + +
    • +
    • + +Volutpat tristique nec. + +
    • +
    +
    +
    +

    Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla. Odio +sed pede litora.

    +
    +
      +
    1. + +Rhoncus pede justo. + +
    2. +
    3. + +Velit pede dolor. + +
    4. +
    5. + +Iaculis commodo et. + +
    6. +
    7. + +Volutpat tristique nec. + +
    8. +
    +
    +
    +
    +

    Outline Elements

    +
    +

    The following list is a Slidy outline list — nested bulleted or +numbered lists are expanded when the enclosing list item (the ones +with blue bullet points or numbers) are clicked.

    +
      +
    • + +Rhoncus pede justo. + +
        +
      • + +Rhoncus pede justo. + +
      • +
      • + +Velit pede dolor. + +
      • +
      +
    • +
    • + +Velit pede dolor. + +
        +
      • + +Iaculis commodo et. + +
        + + + +
        +Note +Note admonition paragraph.
        +
        +
      • +
      • + +Volutpat tristique nec. + +
        +
        +images/tiger.png +
        +
        +
      • +
      • + +Iaculis commodo et. + +
      • +
      • + +Volutpat tristique nec. + +
      • +
      +
    • +
    • + +Iaculis commodo et. + +
        +
      1. + +Rhoncus pede justo. + +
          +
        • + +Velit pede dolor. + +
        • +
        • + +Iaculis commodo et. + +
        • +
        +
      2. +
      3. + +Volutpat tristique nec. + +
      4. +
      +
    • +
    • + +Volutpat tristique nec. + +
    • +
    +
    +
    +
    +

    AsciiDoc Elements

    +
    +
    + + + +
    +Note +Note admonition paragraph.
    +
    +
    + + + +
    +Important +Important admonition paragraph.
    +
    +
    +
    +
    Sidebar
    +

    Faucibus sagittis commodo sed et eu. Quam nullam ornare. Sed vel est. +Mauris urna lobortis interdum placerat per id magnis enim.

    +
    +
    +
    +
    +

    AsciiDoc Elements

    +
    +

    A quote block:

    +
    +
    +

    A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher.

    +
    +
    +The World of Mathematics (1956)
    +— Bertrand Russell +
    +

    A verse block:

    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +
    +from Auguries of Innocence
    +— William Blake +
    +
    +
    +
    +

    AsciiDoc Elements

    +
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 1. Horizontal and vertical source data
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +
    +
    +
    +
    +

    Filters

    +
    +
    +
    Python source
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')     # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
    +
    + + diff -Nru asciidoc-8.6.10/tests/data/source-highlight-filter-docbook5.xml asciidoc-10.1.2/tests/data/source-highlight-filter-docbook5.xml --- asciidoc-8.6.10/tests/data/source-highlight-filter-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/source-highlight-filter-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,347 @@ + + + + +
    + + Source Code Highlight Filter + +The AsciiDoc distribution includes a source filter for highlighting +code syntax. +
    +DocBook Outputs +AsciiDoc encloses the source code in a DocBook programlisting +element and leaves source code highlighting to the DocBook toolchain +(dblatex has a particularly nice programlisting highlighter). The +DocBook programlisting element is assigned two attributes: + + + +The language attribute is set to the AsciiDoc language + attribute. + + + + +The linenumbering attribute is set to the AsciiDoc src_numbered + attribute (numbered or unnumbered). + + + +
    +
    +HTML Outputs +You have the choice of three HTML source code highlighters, your +selection is determined by the source-highlighter attribute (defaults +to source-highlight): +Set the source-highlighter attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time). +
    +GNU Source Highlight +The default highlighter is the +GNU source-highlight which +can highlight html4, html5 and xhtml11 outputs. The GNU +source-highlight must be installed and the source-highlight command +must reside in the shell search PATH. +
    +
    +Highlight +You can use +Highlight +syntax highlighter for xhtml11, html5 and html4 outputs (set the +source-highlighter attribute to highlighter). + + + +The highlight command must reside in the shell search PATH. + + + + +To make Highlighter your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: + +source-highlighter=highlight + + + +The AsciiDoc encoding attribute is passed to Highlighter using the + --encoding command-line option. + + + +
    +
    +Pygments +The Pygments syntax highlighter can be used for +xhtml11 and html5 outputs (set the source-highlighter attribute +to pygments). + + + +The pygmentize command must reside in the shell search PATH. + + + + +You can customize Pygments CSS styles by editing + ./stylesheets/pygments.css. The pygments.css CSS file was + generated with: + +from pygments.formatters import HtmlFormatter +print HtmlFormatter().get_style_defs('.highlight') + + + +To make Pygments your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: + +source-highlighter=pygments + + + +The AsciiDoc encoding attribute is passed to Pygments using the + -O command-line option. + + + +
    +
    +
    +Block attributes +The following attributes can be included in source code block +attribute lists. + + + +style and language are mandatory. + + + + +style, language and src_numbered are the first three + positional attributes in that order. + + + + +The args attribute allows the inclusion of arbitrary (highlighter + dependent) command options. + + + + + + +style + + + + Set to source. + + + + + +language + + + + The source code language name. + +The language names vary between highlighters — consult the +selected highlighter manual. + + + + +src_numbered + + + + Set to numbered to include line numbers. + + + + + +src_tab + + + + Set tab size (GNU source-highlight only). + + + + + +args + + + + Include this attribute value in the highlighter command-line (HTML + outputs) or in the programlisting element (DocBook). + + + + +
    +
    +Testing +Test the filter by converting the test file to HTML with AsciiDoc: +$ asciidoc -v ./filters/source/source-highlight-filter-test.txt +$ firefox ./filters/source/source-highlight-filter-test.html & +
    +
    +Examples +
    +Source code paragraphs +The source paragraph style will highlight a paragraph of source +code. These three code paragraphs: +[source,python] +if n < 0: print 'Hello World!' + +:language: python + +[source] +if n < 0: print 'Hello World!' + +[source,ruby,numbered] +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" +Render this highlighted source code: +if n < 0: print 'Hello World!' +if n < 0: print 'Hello World!' +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" +
    +
    +Unnumbered source code listing +This source-highlight filtered block: + [source,python] + --------------------------------------------------------------------- + ''' A multi-line + comment.''' + def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word + --------------------------------------------------------------------- +Renders this highlighted source code: +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +
    +
    +Numbered source code listing with callouts +This source-highlight filtered block: + [source,ruby,numbered] + --------------------------------------------------------------------- + # + # Useful Ruby base class extensions. + # + + class Array + + # Execute a block passing it corresponding items in + # +self+ and +other_array+. + # If self has less items than other_array it is repeated. + + def cycle(other_array) # :yields: item, other_item + other_array.each_with_index do |item, index| + yield(self[index % self.length], item) + end + end + + end + + if $0 == __FILE__ # <1> + # Array#cycle test + # true => 0 + # false => 1 + # true => 2 + # false => 3 + # true => 4 + puts 'Array#cycle test' # <2> + [true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + end + end + --------------------------------------------------------------------- + + <1> First callout. + <2> Second callout. +Renders this highlighted source code: +# +# Useful Ruby base class extensions. +# + +class Array + + # Execute a block passing it corresponding items in + # +self+ and +other_array+. + # If self has less items than other_array it is repeated. + + def cycle(other_array) # :yields: item, other_item + other_array.each_with_index do |item, index| + yield(self[index % self.length], item) + end + end + +end + +if $0 == __FILE__ # + # Array#cycle test + # true => 0 + # false => 1 + # true => 2 + # false => 3 + # true => 4 + puts 'Array#cycle test' # + [true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + end +end + + + +First callout. + + + + +Second callout. + + + + + + + +If the source language attribute has been set (using an + AttributeEntry or from the command-line) you don’t have to specify + it in each source code block. + + + + +You should place callout markers inside source code comments to + ensure they are not misinterpreted and mangled by the highlighter. + + + + +
    +
    +
    diff -Nru asciidoc-8.6.10/tests/data/source-highlight-filter-docbook.xml asciidoc-10.1.2/tests/data/source-highlight-filter-docbook.xml --- asciidoc-8.6.10/tests/data/source-highlight-filter-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/source-highlight-filter-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,348 @@ + + + + + +
    + + Source Code Highlight Filter + +The AsciiDoc distribution includes a source filter for highlighting +code syntax. +
    +DocBook Outputs +AsciiDoc encloses the source code in a DocBook programlisting +element and leaves source code highlighting to the DocBook toolchain +(dblatex has a particularly nice programlisting highlighter). The +DocBook programlisting element is assigned two attributes: + + + +The language attribute is set to the AsciiDoc language + attribute. + + + + +The linenumbering attribute is set to the AsciiDoc src_numbered + attribute (numbered or unnumbered). + + + +
    +
    +HTML Outputs +You have the choice of three HTML source code highlighters, your +selection is determined by the source-highlighter attribute (defaults +to source-highlight): +Set the source-highlighter attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time). +
    +GNU Source Highlight +The default highlighter is the +GNU source-highlight which +can highlight html4, html5 and xhtml11 outputs. The GNU +source-highlight must be installed and the source-highlight command +must reside in the shell search PATH. +
    +
    +Highlight +You can use +Highlight +syntax highlighter for xhtml11, html5 and html4 outputs (set the +source-highlighter attribute to highlighter). + + + +The highlight command must reside in the shell search PATH. + + + + +To make Highlighter your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: + +source-highlighter=highlight + + + +The AsciiDoc encoding attribute is passed to Highlighter using the + --encoding command-line option. + + + +
    +
    +Pygments +The Pygments syntax highlighter can be used for +xhtml11 and html5 outputs (set the source-highlighter attribute +to pygments). + + + +The pygmentize command must reside in the shell search PATH. + + + + +You can customize Pygments CSS styles by editing + ./stylesheets/pygments.css. The pygments.css CSS file was + generated with: + +from pygments.formatters import HtmlFormatter +print HtmlFormatter().get_style_defs('.highlight') + + + +To make Pygments your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: + +source-highlighter=pygments + + + +The AsciiDoc encoding attribute is passed to Pygments using the + -O command-line option. + + + +
    +
    +
    +Block attributes +The following attributes can be included in source code block +attribute lists. + + + +style and language are mandatory. + + + + +style, language and src_numbered are the first three + positional attributes in that order. + + + + +The args attribute allows the inclusion of arbitrary (highlighter + dependent) command options. + + + + + + +style + + + + Set to source. + + + + + +language + + + + The source code language name. + +The language names vary between highlighters — consult the +selected highlighter manual. + + + + +src_numbered + + + + Set to numbered to include line numbers. + + + + + +src_tab + + + + Set tab size (GNU source-highlight only). + + + + + +args + + + + Include this attribute value in the highlighter command-line (HTML + outputs) or in the programlisting element (DocBook). + + + + +
    +
    +Testing +Test the filter by converting the test file to HTML with AsciiDoc: +$ asciidoc -v ./filters/source/source-highlight-filter-test.txt +$ firefox ./filters/source/source-highlight-filter-test.html & +
    +
    +Examples +
    +Source code paragraphs +The source paragraph style will highlight a paragraph of source +code. These three code paragraphs: +[source,python] +if n < 0: print 'Hello World!' + +:language: python + +[source] +if n < 0: print 'Hello World!' + +[source,ruby,numbered] +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" +Render this highlighted source code: +if n < 0: print 'Hello World!' +if n < 0: print 'Hello World!' +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" +
    +
    +Unnumbered source code listing +This source-highlight filtered block: + [source,python] + --------------------------------------------------------------------- + ''' A multi-line + comment.''' + def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word + --------------------------------------------------------------------- +Renders this highlighted source code: +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +
    +
    +Numbered source code listing with callouts +This source-highlight filtered block: + [source,ruby,numbered] + --------------------------------------------------------------------- + # + # Useful Ruby base class extensions. + # + + class Array + + # Execute a block passing it corresponding items in + # +self+ and +other_array+. + # If self has less items than other_array it is repeated. + + def cycle(other_array) # :yields: item, other_item + other_array.each_with_index do |item, index| + yield(self[index % self.length], item) + end + end + + end + + if $0 == __FILE__ # <1> + # Array#cycle test + # true => 0 + # false => 1 + # true => 2 + # false => 3 + # true => 4 + puts 'Array#cycle test' # <2> + [true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + end + end + --------------------------------------------------------------------- + + <1> First callout. + <2> Second callout. +Renders this highlighted source code: +# +# Useful Ruby base class extensions. +# + +class Array + + # Execute a block passing it corresponding items in + # +self+ and +other_array+. + # If self has less items than other_array it is repeated. + + def cycle(other_array) # :yields: item, other_item + other_array.each_with_index do |item, index| + yield(self[index % self.length], item) + end + end + +end + +if $0 == __FILE__ # + # Array#cycle test + # true => 0 + # false => 1 + # true => 2 + # false => 3 + # true => 4 + puts 'Array#cycle test' # + [true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + end +end + + + +First callout. + + + + +Second callout. + + + + + + + +If the source language attribute has been set (using an + AttributeEntry or from the command-line) you don’t have to specify + it in each source code block. + + + + +You should place callout markers inside source code comments to + ensure they are not misinterpreted and mangled by the highlighter. + + + + +
    +
    +
    diff -Nru asciidoc-8.6.10/tests/data/source-highlight-filter-html4.html asciidoc-10.1.2/tests/data/source-highlight-filter-html4.html --- asciidoc-8.6.10/tests/data/source-highlight-filter-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/source-highlight-filter-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,372 @@ + + + + + +Source Code Highlight Filter + + +

    Source Code Highlight Filter

    +

    +

    + +

    The AsciiDoc distribution includes a source filter for highlighting +code syntax.

    +
    +

    DocBook Outputs

    +

    AsciiDoc encloses the source code in a DocBook programlisting +element and leaves source code highlighting to the DocBook toolchain +(dblatex has a particularly nice programlisting highlighter). The +DocBook programlisting element is assigned two attributes:

    +
      +
    1. +

      +The language attribute is set to the AsciiDoc language + attribute. +

      +
    2. +
    3. +

      +The linenumbering attribute is set to the AsciiDoc src_numbered + attribute (numbered or unnumbered). +

      +
    4. +
    +
    +

    HTML Outputs

    +

    You have the choice of three HTML source code highlighters, your +selection is determined by the source-highlighter attribute (defaults +to source-highlight):

    + + + +
    +

    Note

    +
    Set the source-highlighter attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time).
    +

    GNU Source Highlight

    +

    The default highlighter is the +GNU source-highlight which +can highlight html4, html5 and xhtml11 outputs. The GNU +source-highlight must be installed and the source-highlight command +must reside in the shell search PATH.

    +

    Highlight

    +

    You can use +Highlight +syntax highlighter for xhtml11, html5 and html4 outputs (set the +source-highlighter attribute to highlighter).

    +
      +
    • +

      +The highlight command must reside in the shell search PATH. +

      +
    • +
    • +

      +To make Highlighter your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: +

      +
      source-highlighter=highlight
      +
    • +
    • +

      +The AsciiDoc encoding attribute is passed to Highlighter using the + --encoding command-line option. +

      +
    • +
    +

    Pygments

    +

    The Pygments syntax highlighter can be used for +xhtml11 and html5 outputs (set the source-highlighter attribute +to pygments).

    +
      +
    • +

      +The pygmentize command must reside in the shell search PATH. +

      +
    • +
    • +

      +You can customize Pygments CSS styles by editing + ./stylesheets/pygments.css. The pygments.css CSS file was + generated with: +

      +
      from pygments.formatters import HtmlFormatter
      +print HtmlFormatter().get_style_defs('.highlight')
      +
    • +
    • +

      +To make Pygments your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: +

      +
      source-highlighter=pygments
      +
    • +
    • +

      +The AsciiDoc encoding attribute is passed to Pygments using the + -O command-line option. +

      +
    • +
    +
    +

    Block attributes

    +

    The following attributes can be included in source code block +attribute lists.

    +
      +
    • +

      +style and language are mandatory. +

      +
    • +
    • +

      +style, language and src_numbered are the first three + positional attributes in that order. +

      +
    • +
    • +

      +The args attribute allows the inclusion of arbitrary (highlighter + dependent) command options. +

      +
    • +
    +
    +
    +style +
    +
    +

    + Set to source. +

    +
    +
    +language +
    +
    +

    + The source code language name. +

    + + + +
    +

    Note

    +
    The language names vary between highlighters — consult the +selected highlighter manual.
    +
    +
    +src_numbered +
    +
    +

    + Set to numbered to include line numbers. +

    +
    +
    +src_tab +
    +
    +

    + Set tab size (GNU source-highlight only). +

    +
    +
    +args +
    +
    +

    + Include this attribute value in the highlighter command-line (HTML + outputs) or in the programlisting element (DocBook). +

    +
    +
    +
    +

    Testing

    +

    Test the filter by converting the test file to HTML with AsciiDoc:

    +
    $ asciidoc -v ./filters/source/source-highlight-filter-test.txt
    +$ firefox ./filters/source/source-highlight-filter-test.html &
    +
    +

    Examples

    +

    Source code paragraphs

    +

    The source paragraph style will highlight a paragraph of source +code. These three code paragraphs:

    +
    +
    [source,python]
    +if n < 0: print 'Hello World!'
    +
    +:language: python
    +
    +[source]
    +if n < 0: print 'Hello World!'
    +
    +[source,ruby,numbered]
    +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +    puts "#{a.inspect} => #{b.inspect}"
    +
    +

    Render this highlighted source code:

    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
        1: [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +    2:     puts "#{a.inspect} => #{b.inspect}"
    +

    Unnumbered source code listing

    +

    This source-highlight filtered block:

    +
    +
     [source,python]
    + ---------------------------------------------------------------------
    + ''' A multi-line
    +     comment.'''
    + def sub_word(mo):
    +     ''' Single line comment.'''
    +     word = mo.group('word')   # Inline comment
    +     if word in keywords[language]:
    +         return quote + word + quote
    +     else:
    +         return word
    + ---------------------------------------------------------------------
    +
    +

    Renders this highlighted source code:

    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')     # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +

    Numbered source code listing with callouts

    +

    This source-highlight filtered block:

    +
    +
     [source,ruby,numbered]
    + ---------------------------------------------------------------------
    + #
    + # Useful Ruby base class extensions.
    + #
    +
    + class Array
    +
    +   # Execute a block passing it corresponding items in
    +   # +self+ and +other_array+.
    +   # If self has less items than other_array it is repeated.
    +
    +   def cycle(other_array)  # :yields: item, other_item
    +     other_array.each_with_index do |item, index|
    +       yield(self[index % self.length], item)
    +     end
    +   end
    +
    + end
    +
    + if $0 == __FILE__                                 # <1>
    +   # Array#cycle test
    +   # true => 0
    +   # false => 1
    +   # true => 2
    +   # false => 3
    +   # true => 4
    +   puts 'Array#cycle test'                         # <2>
    +   [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +     puts "#{a.inspect} => #{b.inspect}"
    +   end
    + end
    + ---------------------------------------------------------------------
    +
    + <1> First callout.
    + <2> Second callout.
    +
    +

    Renders this highlighted source code:

    +
    +
        1: #
    +    2: # Useful Ruby base class extensions.
    +    3: #
    +    4:
    +    5: class Array
    +    6:
    +    7:   # Execute a block passing it corresponding items in
    +    8:   # +self+ and +other_array+.
    +    9:   # If self has less items than other_array it is repeated.
    +   10:
    +   11:   def cycle(other_array)  # :yields: item, other_item
    +   12:     other_array.each_with_index do |item, index|
    +   13:       yield(self[index % self.length], item)
    +   14:     end
    +   15:   end
    +   16:
    +   17: end
    +   18:
    +   19: if $0 == __FILE__                                 # <1>
    +   20:   # Array#cycle test
    +   21:   # true => 0
    +   22:   # false => 1
    +   23:   # true => 2
    +   24:   # false => 3
    +   25:   # true => 4
    +   26:   puts 'Array#cycle test'                         # <2>
    +   27:   [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +   28:     puts "#{a.inspect} => #{b.inspect}"
    +   29:   end
    +   30: end
    +
      +
    1. +

      +First callout. +

      +
    2. +
    3. +

      +Second callout. +

      +
    4. +
    + + + +
    +

    Tip

    +
    +
      +
    • +

      +If the source language attribute has been set (using an + AttributeEntry or from the command-line) you don’t have to specify + it in each source code block. +

      +
    • +
    • +

      +You should place callout markers inside source code comments to + ensure they are not misinterpreted and mangled by the highlighter. +

      +
    • +
    +
    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/source-highlight-filter-html5.html asciidoc-10.1.2/tests/data/source-highlight-filter-html5.html --- asciidoc-8.6.10/tests/data/source-highlight-filter-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/source-highlight-filter-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1156 @@ + + + + + +Source Code Highlight Filter + + + + + +
    +
    +
    +

    The AsciiDoc distribution includes a source filter for highlighting +code syntax.

    +
    +
    +
    +

    DocBook Outputs

    +
    +

    AsciiDoc encloses the source code in a DocBook programlisting +element and leaves source code highlighting to the DocBook toolchain +(dblatex has a particularly nice programlisting highlighter). The +DocBook programlisting element is assigned two attributes:

    +
      +
    1. +

      +The language attribute is set to the AsciiDoc language + attribute. +

      +
    2. +
    3. +

      +The linenumbering attribute is set to the AsciiDoc src_numbered + attribute (numbered or unnumbered). +

      +
    4. +
    +
    +
    +
    +

    HTML Outputs

    +
    +

    You have the choice of three HTML source code highlighters, your +selection is determined by the source-highlighter attribute (defaults +to source-highlight):

    +
    + + + +
    +
    Note
    +
    Set the source-highlighter attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time).
    +
    +
    +

    GNU Source Highlight

    +

    The default highlighter is the +GNU source-highlight which +can highlight html4, html5 and xhtml11 outputs. The GNU +source-highlight must be installed and the source-highlight command +must reside in the shell search PATH.

    +
    +
    +

    Highlight

    +

    You can use +Highlight +syntax highlighter for xhtml11, html5 and html4 outputs (set the +source-highlighter attribute to highlighter).

    +
      +
    • +

      +The highlight command must reside in the shell search PATH. +

      +
    • +
    • +

      +To make Highlighter your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: +

      +
      +
      +
      source-highlighter=highlight
      +
      +
    • +
    • +

      +The AsciiDoc encoding attribute is passed to Highlighter using the + --encoding command-line option. +

      +
    • +
    +
    +
    +

    Pygments

    +

    The Pygments syntax highlighter can be used for +xhtml11 and html5 outputs (set the source-highlighter attribute +to pygments).

    +
      +
    • +

      +The pygmentize command must reside in the shell search PATH. +

      +
    • +
    • +

      +You can customize Pygments CSS styles by editing + ./stylesheets/pygments.css. The pygments.css CSS file was + generated with: +

      +
      +
      +
      from pygments.formatters import HtmlFormatter
      +print HtmlFormatter().get_style_defs('.highlight')
      +
      +
    • +
    • +

      +To make Pygments your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: +

      +
      +
      +
      source-highlighter=pygments
      +
      +
    • +
    • +

      +The AsciiDoc encoding attribute is passed to Pygments using the + -O command-line option. +

      +
    • +
    +
    +
    +
    +
    +

    Block attributes

    +
    +

    The following attributes can be included in source code block +attribute lists.

    +
      +
    • +

      +style and language are mandatory. +

      +
    • +
    • +

      +style, language and src_numbered are the first three + positional attributes in that order. +

      +
    • +
    • +

      +The args attribute allows the inclusion of arbitrary (highlighter + dependent) command options. +

      +
    • +
    +
    +
    +style +
    +
    +

    + Set to source. +

    +
    +
    +language +
    +
    +

    + The source code language name. +

    +
    + + + +
    +
    Note
    +
    The language names vary between highlighters — consult the +selected highlighter manual.
    +
    +
    +
    +src_numbered +
    +
    +

    + Set to numbered to include line numbers. +

    +
    +
    +src_tab +
    +
    +

    + Set tab size (GNU source-highlight only). +

    +
    +
    +args +
    +
    +

    + Include this attribute value in the highlighter command-line (HTML + outputs) or in the programlisting element (DocBook). +

    +
    +
    +
    +
    +
    +

    Testing

    +
    +

    Test the filter by converting the test file to HTML with AsciiDoc:

    +
    +
    +
    $ asciidoc -v ./filters/source/source-highlight-filter-test.txt
    +$ firefox ./filters/source/source-highlight-filter-test.html &
    +
    +
    +
    +
    +

    Examples

    +
    +
    +

    Source code paragraphs

    +

    The source paragraph style will highlight a paragraph of source +code. These three code paragraphs:

    +
    +
    +
    [source,python]
    +if n < 0: print 'Hello World!'
    +
    +:language: python
    +
    +[source]
    +if n < 0: print 'Hello World!'
    +
    +[source,ruby,numbered]
    +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +    puts "#{a.inspect} => #{b.inspect}"
    +
    +

    Render this highlighted source code:

    +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    +
        1: [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +    2:     puts "#{a.inspect} => #{b.inspect}"
    +
    +
    +

    Unnumbered source code listing

    +

    This source-highlight filtered block:

    +
    +
    +
     [source,python]
    + ---------------------------------------------------------------------
    + ''' A multi-line
    +     comment.'''
    + def sub_word(mo):
    +     ''' Single line comment.'''
    +     word = mo.group('word')   # Inline comment
    +     if word in keywords[language]:
    +         return quote + word + quote
    +     else:
    +         return word
    + ---------------------------------------------------------------------
    +
    +

    Renders this highlighted source code:

    +
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')     # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
    +
    +

    Numbered source code listing with callouts

    +

    This source-highlight filtered block:

    +
    +
    +
     [source,ruby,numbered]
    + ---------------------------------------------------------------------
    + #
    + # Useful Ruby base class extensions.
    + #
    +
    + class Array
    +
    +   # Execute a block passing it corresponding items in
    +   # +self+ and +other_array+.
    +   # If self has less items than other_array it is repeated.
    +
    +   def cycle(other_array)  # :yields: item, other_item
    +     other_array.each_with_index do |item, index|
    +       yield(self[index % self.length], item)
    +     end
    +   end
    +
    + end
    +
    + if $0 == __FILE__                                 # <1>
    +   # Array#cycle test
    +   # true => 0
    +   # false => 1
    +   # true => 2
    +   # false => 3
    +   # true => 4
    +   puts 'Array#cycle test'                         # <2>
    +   [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +     puts "#{a.inspect} => #{b.inspect}"
    +   end
    + end
    + ---------------------------------------------------------------------
    +
    + <1> First callout.
    + <2> Second callout.
    +
    +

    Renders this highlighted source code:

    +
    +
    +
        1: #
    +    2: # Useful Ruby base class extensions.
    +    3: #
    +    4:
    +    5: class Array
    +    6:
    +    7:   # Execute a block passing it corresponding items in
    +    8:   # +self+ and +other_array+.
    +    9:   # If self has less items than other_array it is repeated.
    +   10:
    +   11:   def cycle(other_array)  # :yields: item, other_item
    +   12:     other_array.each_with_index do |item, index|
    +   13:       yield(self[index % self.length], item)
    +   14:     end
    +   15:   end
    +   16:
    +   17: end
    +   18:
    +   19: if $0 == __FILE__                                 # <1>
    +   20:   # Array#cycle test
    +   21:   # true => 0
    +   22:   # false => 1
    +   23:   # true => 2
    +   24:   # false => 3
    +   25:   # true => 4
    +   26:   puts 'Array#cycle test'                         # <2>
    +   27:   [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +   28:     puts "#{a.inspect} => #{b.inspect}"
    +   29:   end
    +   30: end
    +
      +
    1. +

      +First callout. +

      +
    2. +
    3. +

      +Second callout. +

      +
    4. +
    +
    + + + +
    +
    Tip
    +
    +
      +
    • +

      +If the source language attribute has been set (using an + AttributeEntry or from the command-line) you don’t have to specify + it in each source code block. +

      +
    • +
    • +

      +You should place callout markers inside source code comments to + ensure they are not misinterpreted and mangled by the highlighter. +

      +
    • +
    +
    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/source-highlight-filter-xhtml11.html asciidoc-10.1.2/tests/data/source-highlight-filter-xhtml11.html --- asciidoc-8.6.10/tests/data/source-highlight-filter-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/source-highlight-filter-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1158 @@ + + + + + + +Source Code Highlight Filter + + + + + +
    +
    +
    +

    The AsciiDoc distribution includes a source filter for highlighting +code syntax.

    +
    +
    +
    +

    DocBook Outputs

    +
    +

    AsciiDoc encloses the source code in a DocBook programlisting +element and leaves source code highlighting to the DocBook toolchain +(dblatex has a particularly nice programlisting highlighter). The +DocBook programlisting element is assigned two attributes:

    +
      +
    1. +

      +The language attribute is set to the AsciiDoc language + attribute. +

      +
    2. +
    3. +

      +The linenumbering attribute is set to the AsciiDoc src_numbered + attribute (numbered or unnumbered). +

      +
    4. +
    +
    +
    +
    +

    HTML Outputs

    +
    +

    You have the choice of three HTML source code highlighters, your +selection is determined by the source-highlighter attribute (defaults +to source-highlight):

    +
    + + + +
    +
    Note
    +
    Set the source-highlighter attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time).
    +
    +
    +

    GNU Source Highlight

    +

    The default highlighter is the +GNU source-highlight which +can highlight html4, html5 and xhtml11 outputs. The GNU +source-highlight must be installed and the source-highlight command +must reside in the shell search PATH.

    +
    +
    +

    Highlight

    +

    You can use +Highlight +syntax highlighter for xhtml11, html5 and html4 outputs (set the +source-highlighter attribute to highlighter).

    +
      +
    • +

      +The highlight command must reside in the shell search PATH. +

      +
    • +
    • +

      +To make Highlighter your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: +

      +
      +
      +
      source-highlighter=highlight
      +
      +
    • +
    • +

      +The AsciiDoc encoding attribute is passed to Highlighter using the + --encoding command-line option. +

      +
    • +
    +
    +
    +

    Pygments

    +

    The Pygments syntax highlighter can be used for +xhtml11 and html5 outputs (set the source-highlighter attribute +to pygments).

    +
      +
    • +

      +The pygmentize command must reside in the shell search PATH. +

      +
    • +
    • +

      +You can customize Pygments CSS styles by editing + ./stylesheets/pygments.css. The pygments.css CSS file was + generated with: +

      +
      +
      +
      from pygments.formatters import HtmlFormatter
      +print HtmlFormatter().get_style_defs('.highlight')
      +
      +
    • +
    • +

      +To make Pygments your default highlighter put the following line + your ~/.asciidoc/asciidoc.conf file: +

      +
      +
      +
      source-highlighter=pygments
      +
      +
    • +
    • +

      +The AsciiDoc encoding attribute is passed to Pygments using the + -O command-line option. +

      +
    • +
    +
    +
    +
    +
    +

    Block attributes

    +
    +

    The following attributes can be included in source code block +attribute lists.

    +
      +
    • +

      +style and language are mandatory. +

      +
    • +
    • +

      +style, language and src_numbered are the first three + positional attributes in that order. +

      +
    • +
    • +

      +The args attribute allows the inclusion of arbitrary (highlighter + dependent) command options. +

      +
    • +
    +
    +
    +style +
    +
    +

    + Set to source. +

    +
    +
    +language +
    +
    +

    + The source code language name. +

    +
    + + + +
    +
    Note
    +
    The language names vary between highlighters — consult the +selected highlighter manual.
    +
    +
    +
    +src_numbered +
    +
    +

    + Set to numbered to include line numbers. +

    +
    +
    +src_tab +
    +
    +

    + Set tab size (GNU source-highlight only). +

    +
    +
    +args +
    +
    +

    + Include this attribute value in the highlighter command-line (HTML + outputs) or in the programlisting element (DocBook). +

    +
    +
    +
    +
    +
    +

    Testing

    +
    +

    Test the filter by converting the test file to HTML with AsciiDoc:

    +
    +
    +
    $ asciidoc -v ./filters/source/source-highlight-filter-test.txt
    +$ firefox ./filters/source/source-highlight-filter-test.html &
    +
    +
    +
    +
    +

    Examples

    +
    +
    +

    Source code paragraphs

    +

    The source paragraph style will highlight a paragraph of source +code. These three code paragraphs:

    +
    +
    +
    [source,python]
    +if n < 0: print 'Hello World!'
    +
    +:language: python
    +
    +[source]
    +if n < 0: print 'Hello World!'
    +
    +[source,ruby,numbered]
    +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +    puts "#{a.inspect} => #{b.inspect}"
    +
    +

    Render this highlighted source code:

    +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    +
        1: [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +    2:     puts "#{a.inspect} => #{b.inspect}"
    +
    +
    +

    Unnumbered source code listing

    +

    This source-highlight filtered block:

    +
    +
    +
     [source,python]
    + ---------------------------------------------------------------------
    + ''' A multi-line
    +     comment.'''
    + def sub_word(mo):
    +     ''' Single line comment.'''
    +     word = mo.group('word')   # Inline comment
    +     if word in keywords[language]:
    +         return quote + word + quote
    +     else:
    +         return word
    + ---------------------------------------------------------------------
    +
    +

    Renders this highlighted source code:

    +
    +
    +
    ''' A multi-line
    +    comment.'''
    +def sub_word(mo):
    +    ''' Single line comment.'''
    +    word = mo.group('word')     # Inline comment
    +    if word in keywords[language]:
    +        return quote + word + quote
    +    else:
    +        return word
    +
    +
    +

    Numbered source code listing with callouts

    +

    This source-highlight filtered block:

    +
    +
    +
     [source,ruby,numbered]
    + ---------------------------------------------------------------------
    + #
    + # Useful Ruby base class extensions.
    + #
    +
    + class Array
    +
    +   # Execute a block passing it corresponding items in
    +   # +self+ and +other_array+.
    +   # If self has less items than other_array it is repeated.
    +
    +   def cycle(other_array)  # :yields: item, other_item
    +     other_array.each_with_index do |item, index|
    +       yield(self[index % self.length], item)
    +     end
    +   end
    +
    + end
    +
    + if $0 == __FILE__                                 # <1>
    +   # Array#cycle test
    +   # true => 0
    +   # false => 1
    +   # true => 2
    +   # false => 3
    +   # true => 4
    +   puts 'Array#cycle test'                         # <2>
    +   [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +     puts "#{a.inspect} => #{b.inspect}"
    +   end
    + end
    + ---------------------------------------------------------------------
    +
    + <1> First callout.
    + <2> Second callout.
    +
    +

    Renders this highlighted source code:

    +
    +
    +
        1: #
    +    2: # Useful Ruby base class extensions.
    +    3: #
    +    4:
    +    5: class Array
    +    6:
    +    7:   # Execute a block passing it corresponding items in
    +    8:   # +self+ and +other_array+.
    +    9:   # If self has less items than other_array it is repeated.
    +   10:
    +   11:   def cycle(other_array)  # :yields: item, other_item
    +   12:     other_array.each_with_index do |item, index|
    +   13:       yield(self[index % self.length], item)
    +   14:     end
    +   15:   end
    +   16:
    +   17: end
    +   18:
    +   19: if $0 == __FILE__                                 # <1>
    +   20:   # Array#cycle test
    +   21:   # true => 0
    +   22:   # false => 1
    +   23:   # true => 2
    +   24:   # false => 3
    +   25:   # true => 4
    +   26:   puts 'Array#cycle test'                         # <2>
    +   27:   [true, false].cycle([0, 1, 2, 3, 4]) do |a, b|
    +   28:     puts "#{a.inspect} => #{b.inspect}"
    +   29:   end
    +   30: end
    +
      +
    1. +

      +First callout. +

      +
    2. +
    3. +

      +Second callout. +

      +
    4. +
    +
    + + + +
    +
    Tip
    +
    +
      +
    • +

      +If the source language attribute has been set (using an + AttributeEntry or from the command-line) you don’t have to specify + it in each source code block. +

      +
    • +
    • +

      +You should place callout markers inside source code comments to + ensure they are not misinterpreted and mangled by the highlighter. +

      +
    • +
    +
    +
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/testcases.conf asciidoc-10.1.2/tests/data/testcases.conf --- asciidoc-8.6.10/tests/data/testcases.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -[replacements] -test-replacement=TEST_REPLACEMENT - -[test-template] -This template is overriden and should not be displayed. - -[test-template] -Template line 1. - -[+test-template] -Template line 2. - diff -Nru asciidoc-8.6.10/tests/data/testcases-docbook5.xml asciidoc-10.1.2/tests/data/testcases-docbook5.xml --- asciidoc-8.6.10/tests/data/testcases-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1028 @@ + + + + +
    + + Test <emphasis>Cases</emphasis> + + + Joe + Bloggs + + + JB + +
    +Passthrough attributes +*lorum ipsum* +<emphasis>*lorum ipsum*</emphasis> +
    +
    +Author attributes +{eval:expression}, {sys:command} and {sys2:command}, {counter:c1} +Hello Joe Bloggs (Joe Bloggs, JB). +first name or last name or surname. + +first name and last name. +
    +
    +System attributes +1 99 A +1 = 1, 99 = 99, A = A +2 100 B +2 100 B +2 = 2, 100 = 100, B = B +y: Foobar + + +3, 7 + +3, 3 +
    +
    +Quoted text attributes +A=X, (X), X, [X] X +A=X, (_X_), X, [X] X X +[*X*] +X+ + intro intro +fun with text. +fun with text. +fun with text. +fun with text. +fun with text. +“fun with text”. +‘fun with text’. +fun with text. +fun with text. +Obvious and very obvious. +Underline text, overline text +and line-through text. +Testing 123 … +(“+1\n+”) if (usually “+-1\n+”) +(“1\n”) if (usually “-1\n”) +(‘Joe Bloggs’) and ‘Joe Bloggs’ +
    +
    +Configuration attribute entries + + + + +term + + + + +definition + + + + + + + +term + + + +definition + + + + +
    +
    +role attribute +Paragraph with a role attribute. + + + +first + + + + +second + + + + +third + + + +
    +
    +Break list nesting + + + +List 1. + + + + +List 1. + + + + + + +List 2. + + + + +List 2. + + + +
    +
    +Listing Blocks +$ ls -al +[subs="quotes"] +------------------------------------------ +$ ls *-al* +------------------------------------------ +Listing +$ ls -al + + +Listing example +$ ls -al + +Python paragraph +if n < 0: print 'Hello World!' + +Titled Python listing +if n < 0: print 'Hello World!' + + +Python listing example +if n < 0: print 'Hello World!' + +
    +
    +Links +An inline anchor. +An inline anchor with reftext. +; captioned link to this test case. + link to inline anchor; captioned link to inline anchor. +Link to anchor. +An example link to a bibliography entry . + + + + +[Test::Unit] + + + + +http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html + + + + +
    +
    +Titles +Level 4 +Level 3 +Level 2 +Level 1 +Level 4 +Level 3 +Level 2 +Level 1 +Block titleLorum ipsum. +
    +
    +Lists +Bulleted: + + + +item text + + + + +item text + + + + +item text + + + + +item text + + + + +item text + + + + +item text + + + + + + + + + + + + + +Numbered: + + + +arabic (decimal) numbering + + + + +loweralpha numbering + + + + +upperalpha numbering + + + + +lowerroman numbering + + + + +upperroman numbering + + + + +arabic (decimal) numbering + + + + +loweralpha numbering + + + + +lowerroman numbering + + + + +upperalpha numbering + + + + +upperroman numbering + + + + + + + + + + + + + + + + + + + + + +Labeled: + + + +label + + + +item text + + + + +label + + + +item text + + + + +label + + + +item text + + + + +label + + + +item text + + + + + + + + + + + + + +With item anchor: + + + +one + + + +Item one. + + + + + +two + + + +Item two. + + + + + +three + + + +Item three. + + + + +
    +
    +Inline passthroughs + + + +Test `ABC`. + + + + +Test ABC. + + + + +The ++i and ++j auto-increments. + + + + +Paths ~/.vim and ~/docs. + + + + +The __init__ method. + + + + +The {id} attribute. + + + +List start number test: + + + +List item 7. + + + + +List item 8. + + + +
    +
    +Images +
    +Block images +
    Tyger tyger + + + + + Tyger tyger + +
    +
    Tyger tyger two + + + + + Tiger + +
    + + + + + + music2.png + + +Lorum ipsum. +
    +
    +Inline images +Inline image + + + + smallnew.png + +Inline image + + + + NEW! + +Inline image + + + + NEW! + +
    +
    +
    +Admonishments +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    +
    +Backslash escapes +ApostropheDon’t vs don't. +ExceptionsThere are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples: + + + + + + + + + +AsciiDoc + Renders + + + + +\joe.bloggs@example.com +<\joe.bloggs@example.com> +\mailto:[\joe.bloggs@example.com] +joe.bloggs@example.com +<joe.bloggs@example.com> +mailto:[joe.bloggs@example.com] + + +\http://www.example.com +\\http://www.example.com[] +\\http://www.example.com[Foobar Limited] +http://www.example.com +http://www.example.com[] +http://www.example.com[Foobar Limited] + + +A C\++ Library for C++ +\\``double-quotes'' +\*\*F**ile Open\... +A C++ Library for C++ +``double-quotes'' +**F**ile Open... + + + + +
    +
    +Paragraphs +Normal paragraphThis is a bold a line +This is a strong line +This is another strong line +Literal paragraph +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +
    +Verse paragraph +This is a bold a line +This is a strong line +This is another strong line +
    +Indented (literal) paragraph +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +Indented with quotes substitution +This is a bold a line +This is a strong line +This is another strong line + +Literal paragraph with quotes substitution +This is a bold a line +This is a strong line +This is another strong line + +Literal block with quotes substitution +This is a bold a line +This is a strong line +This is another strong line + +
    + +William Blake +from Auguries of Innocence + +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +
    +
    + +Bertrand Russell +The World of Mathematics (1956) + +A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher. +
    +
    +
    +URLs +
    +Mail Addresses +joe_bloggs@mail_server.com_ +joe-bloggs@mail-server.com. +joe-bloggs@mail-server.com,joe-bloggs@mail-server.com, +Mail +Mail +Mail +joe.bloggs@mail.server.com +lorum ipsum. +
    +
    +
    +Comments +Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + +adolescens. Sit munere ponderum dignissim et. Minim luptatum et. + This comment line will be displayed in the output. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + Visible inline comment line. +adolescens. Sit munere ponderum dignissim et. Minim luptatum et. +Block titleLorum ipsum. +Block titleLorum ipsum. +
    + +List of terms +Using positional attribute to specify section template. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +List of terms +Using named template attribute to specify section template. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + +
    +Index Terms +Test 1 test1test1. +Test 2 + test2 +. +Test 3 + test3secondary + + + secondary +. +Test 4 + test4secondarytertiary + + + secondarytertiary + + + tertiary +. +Test 5 test5test5. +Test 6 + test6 +. +Test 7 + test7secondary + + + secondary +. +Test 8 + test8secondarytertiary + + + secondarytertiary + + + tertiary +. +Multi-passthough substitution (see +http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) +foofoo + + foobar + + + bar + + + foobartwo + + + bartwo + + + two + +
    +
    +Table with fractional column width units +pagewidth and pageunits only apply to DocBook outputs. + +Horizontal and vertical source data + + + + + + + + + + +Date +Duration +Avg HR +Notes + + + + +22-Aug-08 +10:24 +157 +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + + +22-Aug-08 +23:03 +152 +Back-to-back with previous interval. + + +24-Aug-08 +40:00 +145 +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + + + +
    +
    +
    +Table with parent configuration file and header attribute entry + + + + + + + + +Attribute entry from header: TEST_ATTRIBUTE + + + + +Replacement from testcases.conf configuration file: TEST_REPLACEMENT + + + + + + + +
    +
    +Table column specifiers with merged cells +See +http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a + + + + + + + + + +1- A +2- B + + +i- a +ii- b + + +Values 1 +v1 +v2 +v3 + + +Values 2 +v4 +v5 +v6 + + + + +
    +
    +Floating tables and images + +Simple table + + + + + + + + + +1 +2 +A + + +3 +4 +B + + +5 +6 +C + + + +
    +
    Tiger + + + + + Tiger image + +
    +
    +
    +Section level offsets +At level 1 +
    +Section title +At level 2 +
    +
    +Section title +At level 2 +
    +Section title +At level 3 +
    +
    +
    +
    +Section level offsets +At level 1 +
    +
    +Single-quoted attributes +
    + +Samuel Johnson + +Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +
    +
    + +Samuel Johnson + +Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +
    +
    +
    +Footnotes +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote two. Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel + + + + + images/smallnew.png + +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +https://asciidoc.org/ +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel AsciiDoc website.. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +A footnote, "with an image" images/smallnew.png . +With [square brackets] Qui in magna commodo, est labitur +dolorum an. Est ne magna primis. +
    +
    +Rulers and page breaks +Lorum ipsum… + +Lorum ipsum… + +Lorum ipsum… +
    +
    +这是一个测试 +Double-with character titles. +link to auto-generated section ID. +
    +
    +Block macros +RS458 is 2. +
    +Template line 1. +Template line 2. +
    +àn îd without accénts +Lorum ipsum… +
    +
    +àn îd with accénts +Lorum ipsum… +
    +
    +Inline macros +A URL with [square +brackets]. +
    +
    +Equation +Equation + + + +
    +
    +Example +Formal figures, tables, equations and examples can float in docbook backend +
    +
    diff -Nru asciidoc-8.6.10/tests/data/testcases-docbook.xml asciidoc-10.1.2/tests/data/testcases-docbook.xml --- asciidoc-8.6.10/tests/data/testcases-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1027 @@ + + + + + +
    + + Test <emphasis>Cases</emphasis> + + Joe + Bloggs + + JB + +
    +Passthrough attributes +*lorum ipsum* +<emphasis>*lorum ipsum*</emphasis> +
    +
    +Author attributes +{eval:expression}, {sys:command} and {sys2:command}, {counter:c1} +Hello Joe Bloggs (Joe Bloggs, JB). +first name or last name or surname. + +first name and last name. +
    +
    +System attributes +1 99 A +1 = 1, 99 = 99, A = A +2 100 B +2 100 B +2 = 2, 100 = 100, B = B +y: Foobar + + +3, 7 + +3, 3 +
    +
    +Quoted text attributes +A=X, (X), X, [X] X +A=X, (_X_), X, [X] X X +[*X*] +X+ + intro intro +fun with text. +fun with text. +fun with text. +fun with text. +fun with text. +“fun with text”. +‘fun with text’. +fun with text. +fun with text. +Obvious and very obvious. +Underline text, overline text +and line-through text. +Testing 123 … +(“+1\n+”) if (usually “+-1\n+”) +(“1\n”) if (usually “-1\n”) +(‘Joe Bloggs’) and ‘Joe Bloggs’ +
    +
    +Configuration attribute entries + + + + +term + + + + +definition + + + + + + + +term + + + +definition + + + + +
    +
    +role attribute +Paragraph with a role attribute. + + + +first + + + + +second + + + + +third + + + +
    +
    +Break list nesting + + + +List 1. + + + + +List 1. + + + + + + +List 2. + + + + +List 2. + + + +
    +
    +Listing Blocks +$ ls -al +[subs="quotes"] +------------------------------------------ +$ ls *-al* +------------------------------------------ +Listing +$ ls -al + + +Listing example +$ ls -al + +Python paragraph +if n < 0: print 'Hello World!' + +Titled Python listing +if n < 0: print 'Hello World!' + + +Python listing example +if n < 0: print 'Hello World!' + +
    +
    +Links +An inline anchor. +An inline anchor with reftext. +; captioned link to this test case. + link to inline anchor; captioned link to inline anchor. +Link to anchor. +An example link to a bibliography entry . + + + + +[Test::Unit] + + + + +http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html + + + + +
    +
    +Titles +Level 4 +Level 3 +Level 2 +Level 1 +Level 4 +Level 3 +Level 2 +Level 1 +Block titleLorum ipsum. +
    +
    +Lists +Bulleted: + + + +item text + + + + +item text + + + + +item text + + + + +item text + + + + +item text + + + + +item text + + + + + + + + + + + + + +Numbered: + + + +arabic (decimal) numbering + + + + +loweralpha numbering + + + + +upperalpha numbering + + + + +lowerroman numbering + + + + +upperroman numbering + + + + +arabic (decimal) numbering + + + + +loweralpha numbering + + + + +lowerroman numbering + + + + +upperalpha numbering + + + + +upperroman numbering + + + + + + + + + + + + + + + + + + + + + +Labeled: + + + +label + + + +item text + + + + +label + + + +item text + + + + +label + + + +item text + + + + +label + + + +item text + + + + + + + + + + + + + +With item anchor: + + + +one + + + +Item one. + + + + + +two + + + +Item two. + + + + + +three + + + +Item three. + + + + +
    +
    +Inline passthroughs + + + +Test `ABC`. + + + + +Test ABC. + + + + +The ++i and ++j auto-increments. + + + + +Paths ~/.vim and ~/docs. + + + + +The __init__ method. + + + + +The {id} attribute. + + + +List start number test: + + + +List item 7. + + + + +List item 8. + + + +
    +
    +Images +
    +Block images +
    Tyger tyger + + + + + Tyger tyger + +
    +
    Tyger tyger two + + + + + Tiger + +
    + + + + + + music2.png + + +Lorum ipsum. +
    +
    +Inline images +Inline image + + + + smallnew.png + +Inline image + + + + NEW! + +Inline image + + + + NEW! + +
    +
    +
    +Admonishments +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +Lorum ipsum. +
    +
    +Backslash escapes +ApostropheDon’t vs don't. +ExceptionsThere are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples: + + + + + + + + + +AsciiDoc + Renders + + + + +\joe.bloggs@example.com +<\joe.bloggs@example.com> +\mailto:[\joe.bloggs@example.com] +joe.bloggs@example.com +<joe.bloggs@example.com> +mailto:[joe.bloggs@example.com] + + +\http://www.example.com +\\http://www.example.com[] +\\http://www.example.com[Foobar Limited] +http://www.example.com +http://www.example.com[] +http://www.example.com[Foobar Limited] + + +A C\++ Library for C++ +\\``double-quotes'' +\*\*F**ile Open\... +A C++ Library for C++ +``double-quotes'' +**F**ile Open... + + + + +
    +
    +Paragraphs +Normal paragraphThis is a bold a line +This is a strong line +This is another strong line +Literal paragraph +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +
    +Verse paragraph +This is a bold a line +This is a strong line +This is another strong line +
    +Indented (literal) paragraph +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +Indented with quotes substitution +This is a bold a line +This is a strong line +This is another strong line + +Literal paragraph with quotes substitution +This is a bold a line +This is a strong line +This is another strong line + +Literal block with quotes substitution +This is a bold a line +This is a strong line +This is another strong line + +
    + +William Blake +from Auguries of Innocence + +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +
    +
    + +Bertrand Russell +The World of Mathematics (1956) + +A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher. +
    +
    +
    +URLs +
    +Mail Addresses +joe_bloggs@mail_server.com_ +joe-bloggs@mail-server.com. +joe-bloggs@mail-server.com,joe-bloggs@mail-server.com, +Mail +Mail +Mail +joe.bloggs@mail.server.com +lorum ipsum. +
    +
    +
    +Comments +Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + +adolescens. Sit munere ponderum dignissim et. Minim luptatum et. + This comment line will be displayed in the output. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + Visible inline comment line. +adolescens. Sit munere ponderum dignissim et. Minim luptatum et. +Block titleLorum ipsum. +Block titleLorum ipsum. +
    + +List of terms +Using positional attribute to specify section template. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + + +List of terms +Using named template attribute to specify section template. + + +A glossary term + + + + The corresponding (indented) definition. + + + + + +A second glossary term + + + + The corresponding (indented) definition. + + + + +
    +Index Terms +Test 1 test1test1. +Test 2 + test2 +. +Test 3 + test3secondary + + + secondary +. +Test 4 + test4secondarytertiary + + + secondarytertiary + + + tertiary +. +Test 5 test5test5. +Test 6 + test6 +. +Test 7 + test7secondary + + + secondary +. +Test 8 + test8secondarytertiary + + + secondarytertiary + + + tertiary +. +Multi-passthough substitution (see +http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) +foofoo + + foobar + + + bar + + + foobartwo + + + bartwo + + + two + +
    +
    +Table with fractional column width units +pagewidth and pageunits only apply to DocBook outputs. + +Horizontal and vertical source data + + + + + + + + + + +Date +Duration +Avg HR +Notes + + + + +22-Aug-08 +10:24 +157 +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + + +22-Aug-08 +23:03 +152 +Back-to-back with previous interval. + + +24-Aug-08 +40:00 +145 +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + + + +
    +
    +
    +Table with parent configuration file and header attribute entry + + + + + + + + +Attribute entry from header: TEST_ATTRIBUTE + + + + +Replacement from testcases.conf configuration file: TEST_REPLACEMENT + + + + + + + +
    +
    +Table column specifiers with merged cells +See +http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a + + + + + + + + + +1- A +2- B + + +i- a +ii- b + + +Values 1 +v1 +v2 +v3 + + +Values 2 +v4 +v5 +v6 + + + + +
    +
    +Floating tables and images + +Simple table + + + + + + + + + +1 +2 +A + + +3 +4 +B + + +5 +6 +C + + + +
    +
    Tiger + + + + + Tiger image + +
    +
    +
    +Section level offsets +At level 1 +
    +Section title +At level 2 +
    +
    +Section title +At level 2 +
    +Section title +At level 3 +
    +
    +
    +
    +Section level offsets +At level 1 +
    +
    +Single-quoted attributes +
    + +Samuel Johnson + +Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +
    +
    + +Samuel Johnson + +Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +
    +
    +
    +Footnotes +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote two. Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel + + + + + images/smallnew.png + +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +https://asciidoc.org/ +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel AsciiDoc website.. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +A footnote, "with an image" images/smallnew.png . +With [square brackets] Qui in magna commodo, est labitur +dolorum an. Est ne magna primis. +
    +
    +Rulers and page breaks +Lorum ipsum… + +Lorum ipsum… + +Lorum ipsum… +
    +
    +这是一个测试 +Double-with character titles. +link to auto-generated section ID. +
    +
    +Block macros +RS458 is 2. +
    +Template line 1. +Template line 2. +
    +àn îd without accénts +Lorum ipsum… +
    +
    +àn îd with accénts +Lorum ipsum… +
    +
    +Inline macros +A URL with [square +brackets]. +
    +
    +Equation +Equation + + + +
    +
    +Example +Formal figures, tables, equations and examples can float in docbook backend +
    +
    diff -Nru asciidoc-8.6.10/tests/data/testcases.html asciidoc-10.1.2/tests/data/testcases.html --- asciidoc-8.6.10/tests/data/testcases.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,890 @@ + + + + + + + +Test Cases + + +

    Test Cases

    +

    +Joe Bloggs
    +

    +
    +

    Passthrough attributes

    +

    *lorum ipsum*

    +

    <b>*lorum ipsum*</b>

    +
    +

    Author attributes

    +

    {eval:expression}, {sys:command} and {sys2:command}, {counter:c1}

    +

    Hello Joe Bloggs (Joe Bloggs, JB).

    +

    first name or last name or surname.

    +

    +

    first name and last name.

    +
    +

    System attributes

    +

    1 99 A

    +

    1 = 1, 99 = 99, A = A

    +

    2 100 B +2 100 B

    +

    2 = 2, 100 = 100, B = B

    +

    y: Foobar

    +

    +

    +

    3, 7

    +

    +

    3, 3

    +
    +

    Quoted text attributes

    +

    A=X, (X), X, [X] X

    +

    A=X, (_X_), X, [X] X X

    +

    [*X*] +X+

    +

    [_intro] intro [_intro] intro

    +

    fun with text. +fun with text. +fun with text. +fun with text. +fun with text. +“fun with text”. +‘fun with text’.

    +

    fun with text.

    +

    fun with text.

    +

    Obvious and very obvious.

    +

    Underline text, overline text +and line-through text.

    +

    Testing 123 …

    +

    (“+1\n+”) if (usually “+-1\n+”)

    +

    (“1\n”) if (usually “-1\n”)

    +

    (‘Joe Bloggs’) and ‘Joe Bloggs’

    +
    +

    Configuration attribute entries

    + + + + + +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +

    role attribute

    +

    Paragraph with a role attribute.

    +
      +
    • +

      +first +

      +
    • +
    • +

      +second +

      +
    • +
    • +

      +third +

      +
    • +
    +
    +

    Break list nesting

    +
      +
    1. +

      +List 1. +

      +
    2. +
    3. +

      +List 1. +

      +
    4. +
    +
      +
    1. +

      +List 2. +

      +
    2. +
    3. +

      +List 2. +

      +
    4. +
    +
    +

    Listing Blocks

    +
    +
    $ ls -al
    +
    +
    +
    [subs="quotes"]
    +------------------------------------------
    +$ ls *-al*
    +------------------------------------------
    +
    +

    Listing

    +
    +
    $ ls -al
    +
    + +
    +
    +
    $ ls -al
    +
    +
    +

    Example 1. Listing example

    +

    Python paragraph

    +
    +
    if n < 0: print 'Hello World!'
    +

    Titled Python listing

    +
    +
    if n < 0: print 'Hello World!'
    + +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +

    Example 2. Python listing example

    +
    +

    Links

    +

    An inline anchor. +An inline anchor with reftext.

    +

    [X1]; captioned link to this test case.

    +

    [X2] link to inline anchor; captioned link to inline anchor.

    +

    Link to [X3] anchor.

    +

    An example link to a bibliography entry [Test::Unit].

    + + + + + +
    +[Test::Unit] +
    +
    +

    +http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html +

    +
    +
    +

    Titles

    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +

    Block title
    Lorum ipsum.

    +
    +

    Lists

    +

    Bulleted:

    +
      +
    • +

      +item text +

      +
        +
      • +

        +item text +

        +
          +
        • +

          +item text +

          +
            +
          • +

            +item text +

            +
              +
            • +

              +item text +

              +
                +
              • +

                +item text +

                +
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +

    Numbered:

    +
      +
    1. +

      +arabic (decimal) numbering +

      +
        +
      1. +

        +loweralpha numbering +

        +
          +
        1. +

          +upperalpha numbering +

          +
            +
          1. +

            +lowerroman numbering +

            +
              +
            1. +

              +upperroman numbering +

              +
                +
              1. +

                +arabic (decimal) numbering +

                +
                  +
                1. +

                  +loweralpha numbering +

                  +
                    +
                  1. +

                    +lowerroman numbering +

                    +
                      +
                    1. +

                      +upperalpha numbering +

                      +
                        +
                      1. +

                        +upperroman numbering +

                        +
                      2. +
                      +
                    2. +
                    +
                  2. +
                  +
                2. +
                +
              2. +
              +
            2. +
            +
          2. +
          +
        2. +
        +
      2. +
      +
    2. +
    +

    Labeled:

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    With item anchor:

    +
    +
    +one +
    +
    +

    +Item one. +

    +
    +
    +two +
    +
    +

    +Item two. +

    +
    +
    +three +
    +
    +

    +Item three. +

    +
    +
    +
    +

    Inline passthroughs

    +
      +
    • +

      +Test `ABC`. +

      +
    • +
    • +

      +Test ABC. +

      +
    • +
    • +

      +The ++i and ++j auto-increments. +

      +
    • +
    • +

      +Paths ~/.vim and ~/docs. +

      +
    • +
    • +

      +The __init__ method. +

      +
    • +
    • +

      +The {id} attribute. +

      +
    • +
    +

    List start number test:

    +
      +
    1. +

      +List item 7. +

      +
    2. +
    3. +

      +List item 8. +

      +
    4. +
    +
    +

    Images

    +

    Block images

    +
    + +Tyger tyger +

    Figure 1. Tyger tyger

    +
    +
    +Tiger +

    Figure 2: Tyger tyger two

    +
    +
    +music2.png +
    + + + +
    +Note +Lorum ipsum.
    +

    Inline images

    +

    Inline image smallnew.png

    +

    Inline image NEW!

    +

    Inline image NEW!

    +
    +

    Admonishments

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Warning

    +
    Lorum ipsum.
    + + + +
    +

    Caution

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    + + + +
    +Note +Lorum ipsum.
    + + + +
    +Tip +Lorum ipsum.
    + + + +
    +Warning +Lorum ipsum.
    + + + +
    +Caution +Lorum ipsum.
    + + + +
    +Important +Lorum ipsum.
    +
    +

    Backslash escapes

    +

    Apostrophe
    Don’t vs don't.

    +

    Exceptions
    There are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples:

    +
    + + + + + + + + + + + + + + + + + + + + + +
    AsciiDoc Renders
    \joe.bloggs@example.com
    +<\joe.bloggs@example.com>
    +\mailto:[\joe.bloggs@example.com]
    joe.bloggs@example.com
    +<joe.bloggs@example.com>
    +mailto:[joe.bloggs@example.com]
    \http://www.example.com
    +\\http://www.example.com[]
    +\\http://www.example.com[Foobar Limited]
    http://www.example.com
    +http://www.example.com[]
    +http://www.example.com[Foobar Limited]
    A C\++ Library for C++
    +\\``double-quotes''
    +\*\*F**ile Open\...
    A C++ Library for C++
    +``double-quotes''
    +**F**ile Open...
    +
    +
    +

    Paragraphs

    +

    Normal paragraph
    This is a bold a line +This is a strong line +This is another strong line

    +

    Literal paragraph

    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +
    +

    Verse paragraph

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +

    +

    +
    +

    Indented (literal) paragraph

    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +

    Indented with quotes substitution

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +

    Literal paragraph with quotes substitution

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +

    Monospaced paragraph with line breaks
    This is a bold line
    +This is a strong line
    +This is another strong line

    +

    Another monospaced paragraph with line breaks
    This is a bold a line
    +This is a strong line
    +This is another strong line

    +

    Literal block with quotes substitution

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +

    +from Auguries of Innocence
    +— William Blake +

    +
    +
    A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher.

    +The World of Mathematics (1956)
    +— Bertrand Russell +

    +
    +
    +

    URLs

    +

    Mail Addresses

    +

    joe_bloggs@mail_server.com_

    +

    joe-bloggs@mail-server.com.

    +

    joe-bloggs@mail-server.com,joe-bloggs@mail-server.com,

    +

    Mail

    +

    Mail

    +

    Mail

    +

    joe.bloggs@mail.server.com
    +lorum ipsum.

    +
    +

    Comments

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +

    This comment line will be displayed in the output.

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. +
    Visible inline comment line.
    +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +

    Block title
    Lorum ipsum.

    +

    Block title
    Lorum ipsum.

    +
    +

    Index Terms

    +

    Test 1 test1.

    +

    Test 2 .

    +

    Test 3 .

    +

    Test 4 .

    +

    Test 5 test5.

    +

    Test 6 .

    +

    Test 7 .

    +

    Test 8 .

    +

    Multi-passthough substitution (see +http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) +foo

    +
    +

    Table with fractional column width units

    + + + +
    +

    Note

    +
    pagewidth and pageunits only apply to DocBook outputs.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +

    Table 1. Horizontal and vertical source data

    +
    +
    +

    Table with parent configuration file and header attribute entry

    +
    + + + + + + +
      +
    • +

      +Attribute entry from header: TEST_ATTRIBUTE +

      +
    • +
    • +

      +Replacement from testcases.conf configuration file: TEST_REPLACEMENT +

      +
    • +
    +
    +
    +

    Table column specifiers with merged cells

    +

    See +http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +

    1- A

    2- B

    i- a

    ii- b

    Values 1

    v1

    v2

    v3

    Values 2

    v4

    v5

    v6

    +
    +
    +

    Floating tables and images

    +
    + + + + + + + + + + + + + + + + + + +

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +

    Table 2. Simple table

    +
    +
    +Tiger image +

    Figure 2. Tiger

    +
    +
    +
    +

    Section level offsets

    +

    At level 1

    +

    Section title

    +

    At level 2

    +

    Section title

    +

    At level 2

    +

    Section title

    +

    At level 3

    +
    +

    Section level offsets

    +

    At level 1

    +
    +

    Single-quoted attributes

    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +

    +— Samuel Johnson +

    +
    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +

    +— Samuel Johnson +

    +
    +
    +

    Footnotes

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote two. Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +
    [F2]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel +images/smallnew.png]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel
    [AsciiDoc website.]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +
    [A footnote, "with an image" images/smallnew.png]
    . +
    [With [square brackets]]
    Qui in magna commodo, est labitur +dolorum an. Est ne magna primis.

    +
    +

    Rulers and page breaks

    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +

    这是一个测试

    +

    Double-with character titles. +link to auto-generated section ID.

    +
    +

    Block macros

    +

    RS458 is 2.

    +

    Template line 1. +Template line 2.

    +
    +

    àn îd without accénts

    +

    Lorum ipsum…

    +
    +

    àn îd with accénts

    +

    Lorum ipsum…

    +
    +

    Inline macros

    +

    A URL with [square +brackets].

    +

    +

    +

    +Last updated + 2019-01-17 09:02:58 EST +

    + + diff -Nru asciidoc-8.6.10/tests/data/testcases-html4.html asciidoc-10.1.2/tests/data/testcases-html4.html --- asciidoc-8.6.10/tests/data/testcases-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,896 @@ + + + + + + + +Test Cases + + +

    Test Cases

    +

    +Joe Bloggs
    +

    +
    +

    Passthrough attributes

    +

    *lorum ipsum*

    +

    <b>*lorum ipsum*</b>

    +
    +

    Author attributes

    +

    {eval:expression}, {sys:command} and {sys2:command}, {counter:c1}

    +

    Hello Joe Bloggs (Joe Bloggs, JB).

    +

    first name or last name or surname.

    +

    +

    first name and last name.

    +
    +

    System attributes

    +

    1 99 A

    +

    1 = 1, 99 = 99, A = A

    +

    2 100 B +2 100 B

    +

    2 = 2, 100 = 100, B = B

    +

    y: Foobar

    +

    +

    +

    3, 7

    +

    +

    3, 3

    +
    +

    Quoted text attributes

    +

    A=X, (X), X, [X] X

    +

    A=X, (_X_), X, [X] X X

    +

    [*X*] +X+

    +

    [_intro] intro [_intro] intro

    +

    fun with text. +fun with text. +fun with text. +fun with text. +fun with text. +“fun with text”. +‘fun with text’.

    +

    fun with text.

    +

    fun with text.

    +

    Obvious and very obvious.

    +

    Underline text, overline text +and line-through text.

    +

    Testing 123 …

    +

    (“+1\n+”) if (usually “+-1\n+”)

    +

    (“1\n”) if (usually “-1\n”)

    +

    (‘Joe Bloggs’) and ‘Joe Bloggs’

    +
    +

    Configuration attribute entries

    + + + + + +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +

    role attribute

    +

    Paragraph with a role attribute.

    +
      +
    • +

      +first +

      +
    • +
    • +

      +second +

      +
    • +
    • +

      +third +

      +
    • +
    +
    +

    Break list nesting

    +
      +
    1. +

      +List 1. +

      +
    2. +
    3. +

      +List 1. +

      +
    4. +
    +
      +
    1. +

      +List 2. +

      +
    2. +
    3. +

      +List 2. +

      +
    4. +
    +
    +

    Listing Blocks

    +
    +
    $ ls -al
    +
    +
    +
    [subs="quotes"]
    +------------------------------------------
    +$ ls *-al*
    +------------------------------------------
    +
    +

    Listing

    +
    +
    $ ls -al
    +
    + +
    +
    +
    $ ls -al
    +
    +
    +

    Example 1. Listing example

    +

    Python paragraph

    +
    +
    if n < 0: print 'Hello World!'
    +

    Titled Python listing

    +
    +
    if n < 0: print 'Hello World!'
    + +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +

    Example 2. Python listing example

    +
    +

    Links

    +

    An inline anchor. +An inline anchor with reftext.

    +

    [X1]; captioned link to this test case.

    +

    [X2] link to inline anchor; captioned link to inline anchor.

    +

    Link to [X3] anchor.

    +

    An example link to a bibliography entry [Test::Unit].

    + + + + + +
    +[Test::Unit] +
    +
    +

    +http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html +

    +
    +
    +

    Titles

    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +

    Block title
    Lorum ipsum.

    +
    +

    Lists

    +

    Bulleted:

    +
      +
    • +

      +item text +

      +
        +
      • +

        +item text +

        +
          +
        • +

          +item text +

          +
            +
          • +

            +item text +

            +
              +
            • +

              +item text +

              +
                +
              • +

                +item text +

                +
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +

    Numbered:

    +
      +
    1. +

      +arabic (decimal) numbering +

      +
        +
      1. +

        +loweralpha numbering +

        +
          +
        1. +

          +upperalpha numbering +

          +
            +
          1. +

            +lowerroman numbering +

            +
              +
            1. +

              +upperroman numbering +

              +
                +
              1. +

                +arabic (decimal) numbering +

                +
                  +
                1. +

                  +loweralpha numbering +

                  +
                    +
                  1. +

                    +lowerroman numbering +

                    +
                      +
                    1. +

                      +upperalpha numbering +

                      +
                        +
                      1. +

                        +upperroman numbering +

                        +
                      2. +
                      +
                    2. +
                    +
                  2. +
                  +
                2. +
                +
              2. +
              +
            2. +
            +
          2. +
          +
        2. +
        +
      2. +
      +
    2. +
    +

    Labeled:

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    With item anchor:

    +
    +
    +one +
    +
    +

    +Item one. +

    +
    +
    +two +
    +
    +

    +Item two. +

    +
    +
    +three +
    +
    +

    +Item three. +

    +
    +
    +
    +

    Inline passthroughs

    +
      +
    • +

      +Test `ABC`. +

      +
    • +
    • +

      +Test ABC. +

      +
    • +
    • +

      +The ++i and ++j auto-increments. +

      +
    • +
    • +

      +Paths ~/.vim and ~/docs. +

      +
    • +
    • +

      +The __init__ method. +

      +
    • +
    • +

      +The {id} attribute. +

      +
    • +
    +

    List start number test:

    +
      +
    1. +

      +List item 7. +

      +
    2. +
    3. +

      +List item 8. +

      +
    4. +
    +
    +

    Images

    +

    Block images

    +
    + +Tyger tyger +

    Figure 1. Tyger tyger

    +
    +
    +Tiger +

    Figure 2: Tyger tyger two

    +
    +
    +music2.png +
    + + + +
    +Note +Lorum ipsum.
    +

    Inline images

    +

    Inline image smallnew.png

    +

    Inline image NEW!

    +

    Inline image NEW!

    +
    +

    Admonishments

    + + + +
    +

    Note

    +
    Lorum ipsum.
    + + + +
    +

    Tip

    +
    Lorum ipsum.
    + + + +
    +

    Warning

    +
    Lorum ipsum.
    + + + +
    +

    Caution

    +
    Lorum ipsum.
    + + + +
    +

    Important

    +
    Lorum ipsum.
    + + + +
    +Note +Lorum ipsum.
    + + + +
    +Tip +Lorum ipsum.
    + + + +
    +Warning +Lorum ipsum.
    + + + +
    +Caution +Lorum ipsum.
    + + + +
    +Important +Lorum ipsum.
    +
    +

    Backslash escapes

    +

    Apostrophe
    Don’t vs don't.

    +

    Exceptions
    There are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples:

    +
    + + + + + + + + + + + + + + + + + + + + + +
    AsciiDoc Renders
    \joe.bloggs@example.com
    +<\joe.bloggs@example.com>
    +\mailto:[\joe.bloggs@example.com]
    joe.bloggs@example.com
    +<joe.bloggs@example.com>
    +mailto:[joe.bloggs@example.com]
    \http://www.example.com
    +\\http://www.example.com[]
    +\\http://www.example.com[Foobar Limited]
    http://www.example.com
    +http://www.example.com[]
    +http://www.example.com[Foobar Limited]
    A C\++ Library for C++
    +\\``double-quotes''
    +\*\*F**ile Open\...
    A C++ Library for C++
    +``double-quotes''
    +**F**ile Open...
    +
    +
    +

    Paragraphs

    +

    Normal paragraph
    This is a bold a line +This is a strong line +This is another strong line

    +

    Literal paragraph

    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +
    +

    Verse paragraph

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +

    +

    +
    +

    Indented (literal) paragraph

    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +

    Indented with quotes substitution

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +

    Literal paragraph with quotes substitution

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +

    Monospaced paragraph with line breaks
    This is a bold line
    +This is a strong line
    +This is another strong line

    +

    Another monospaced paragraph with line breaks
    This is a bold a line
    +This is a strong line
    +This is another strong line

    +

    Literal block with quotes substitution

    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +

    +from Auguries of Innocence
    +— William Blake +

    +
    +
    A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher.

    +The World of Mathematics (1956)
    +— Bertrand Russell +

    +
    +
    +

    URLs

    +

    Mail Addresses

    +

    joe_bloggs@mail_server.com_

    +

    joe-bloggs@mail-server.com.

    +

    joe-bloggs@mail-server.com,joe-bloggs@mail-server.com,

    +

    Mail

    +

    Mail

    +

    Mail

    +

    joe.bloggs@mail.server.com
    +lorum ipsum.

    +
    +

    Comments

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +

    This comment line will be displayed in the output.

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. +
    Visible inline comment line.
    +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +

    Block title
    Lorum ipsum.

    +

    Block title
    Lorum ipsum.

    +
    +

    Index Terms

    +

    Test 1 test1.

    +

    Test 2 .

    +

    Test 3 .

    +

    Test 4 .

    +

    Test 5 test5.

    +

    Test 6 .

    +

    Test 7 .

    +

    Test 8 .

    +

    Multi-passthough substitution (see +http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) +foo

    +
    +

    Table with fractional column width units

    + + + +
    +

    Note

    +
    pagewidth and pageunits only apply to DocBook outputs.
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +

    Table 1. Horizontal and vertical source data

    +
    +
    +

    Table with parent configuration file and header attribute entry

    +
    + + + + + + +
      +
    • +

      +Attribute entry from header: TEST_ATTRIBUTE +

      +
    • +
    • +

      +Replacement from testcases.conf configuration file: TEST_REPLACEMENT +

      +
    • +
    +
    +
    +

    Table column specifiers with merged cells

    +

    See +http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a

    +
    + + + + + + + + + + + + + + + + + + + + + + + + +

    1- A

    2- B

    i- a

    ii- b

    Values 1

    v1

    v2

    v3

    Values 2

    v4

    v5

    v6

    +
    +
    +

    Floating tables and images

    +
    + + + + + + + + + + + + + + + + + + +

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +

    Table 2. Simple table

    +
    +
    +Tiger image +

    Figure 2. Tiger

    +
    +
    +
    +

    Section level offsets

    +

    At level 1

    +

    Section title

    +

    At level 2

    +

    Section title

    +

    At level 2

    +

    Section title

    +

    At level 3

    +
    +

    Section level offsets

    +

    At level 1

    +
    +

    Single-quoted attributes

    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +

    +— Samuel Johnson +

    +
    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +

    +— Samuel Johnson +

    +
    +
    +

    Footnotes

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote two. Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +
    [F2]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel +images/smallnew.png]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel
    [AsciiDoc website.]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +
    [A footnote, "with an image" images/smallnew.png]
    . +
    [With [square brackets]]
    Qui in magna commodo, est labitur +dolorum an. Est ne magna primis.

    +
    +

    Rulers and page breaks

    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +

    这是一个测试

    +

    Double-with character titles. +link to auto-generated section ID.

    +
    +

    Block macros

    +

    RS458 is 2.

    +

    Template line 1. +Template line 2.

    +
    +

    àn îd without accénts

    +

    Lorum ipsum…

    +
    +

    àn îd with accénts

    +

    Lorum ipsum…

    +
    +

    Inline macros

    +

    A URL with [square +brackets].

    +
    +

    Equation

    +\[C = \alpha + \beta Y^{gamma} + \epsilon\] +
    +

    Example

    +Formal figures, tables, equations and examples can float in docbook backend +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/testcases-html5.html asciidoc-10.1.2/tests/data/testcases-html5.html --- asciidoc-8.6.10/tests/data/testcases-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1860 @@ + + + + + + + +Test Cases + + + + + +
    +
    +

    Passthrough attributes

    +
    +

    *lorum ipsum*

    +

    <b>*lorum ipsum*</b>

    +
    +
    +
    +

    Author attributes

    +
    +

    {eval:expression}, {sys:command} and {sys2:command}, {counter:c1}

    +

    Hello Joe Bloggs (Joe Bloggs, JB).

    +

    first name or last name or surname.

    +

    +

    first name and last name.

    +
    +
    +
    +

    System attributes

    +
    +

    1 99 A

    +

    1 = 1, 99 = 99, A = A

    +

    2 100 B +2 100 B

    +

    2 = 2, 100 = 100, B = B

    +

    y: Foobar

    +

    +

    +

    3, 7

    +

    +

    3, 3

    +
    +
    +
    +

    Quoted text attributes

    +
    +

    A=X, (X), X, [X] X

    +

    A=X, (_X_), X, [X] X X

    +

    [*X*] +X+

    + +

    fun with text. +fun with text. +fun with text. +fun with text. +fun with text. +“fun with text”. +‘fun with text’.

    +

    fun with text.

    +

    fun with text.

    +

    Obvious and very obvious.

    +

    Underline text, overline text +and line-through text.

    +

    Testing 123 …

    +

    (“+1\n+”) if (usually “+-1\n+”)

    +

    (“1\n”) if (usually “-1\n”)

    +

    (‘Joe Bloggs’) and ‘Joe Bloggs’

    +
    +
    +
    +

    Configuration attribute entries

    +
    +
    + + + + +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +
    +
    +

    role attribute

    +
    +

    Paragraph with a role attribute.

    +
      +
    • +

      +first +

      +
    • +
    • +

      +second +

      +
    • +
    • +

      +third +

      +
    • +
    +
    +
    +
    +

    Break list nesting

    +
    +
      +
    1. +

      +List 1. +

      +
    2. +
    3. +

      +List 1. +

      +
    4. +
    +
      +
    1. +

      +List 2. +

      +
    2. +
    3. +

      +List 2. +

      +
    4. +
    +
    +
    +
    +

    Listing Blocks

    +
    +
    +
    +
    $ ls -al
    +
    +
    +
    +
    [subs="quotes"]
    +------------------------------------------
    +$ ls *-al*
    +------------------------------------------
    +
    +
    +
    Listing
    +
    +
    $ ls -al
    +
    +
    +
    Example 1. Listing example
    +
    +
    +
    +
    $ ls -al
    +
    +
    +
    +
    Python paragraph
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    Titled Python listing
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    Example 2. Python listing example
    +
    +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    +
    +
    +

    Links

    +
    +

    An inline anchor. +An inline anchor with reftext.

    +

    [X1]; captioned link to this test case.

    +

    [X2] link to inline anchor; captioned link to inline anchor.

    +

    Link to [X3] anchor.

    +

    An example link to a bibliography entry [Test::Unit].

    + +
    +
    +
    +

    Titles

    +
    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +
    Block title

    Lorum ipsum.

    +
    +
    +
    +

    Lists

    +
    +

    Bulleted:

    +
      +
    • +

      +item text +

      +
        +
      • +

        +item text +

        +
          +
        • +

          +item text +

          +
            +
          • +

            +item text +

            +
              +
            • +

              +item text +

              +
                +
              • +

                +item text +

                +
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +

    Numbered:

    +
      +
    1. +

      +arabic (decimal) numbering +

      +
        +
      1. +

        +loweralpha numbering +

        +
          +
        1. +

          +upperalpha numbering +

          +
            +
          1. +

            +lowerroman numbering +

            +
              +
            1. +

              +upperroman numbering +

              +
                +
              1. +

                +arabic (decimal) numbering +

                +
                  +
                1. +

                  +loweralpha numbering +

                  +
                    +
                  1. +

                    +lowerroman numbering +

                    +
                      +
                    1. +

                      +upperalpha numbering +

                      +
                        +
                      1. +

                        +upperroman numbering +

                        +
                      2. +
                      +
                    2. +
                    +
                  2. +
                  +
                2. +
                +
              2. +
              +
            2. +
            +
          2. +
          +
        2. +
        +
      2. +
      +
    2. +
    +

    Labeled:

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    With item anchor:

    +
    +
    +one +
    +
    +

    +Item one. +

    +
    +
    +two +
    +
    +

    +Item two. +

    +
    +
    +three +
    +
    +

    +Item three. +

    +
    +
    +
    +
    +
    +

    Inline passthroughs

    +
    +
      +
    • +

      +Test `ABC`. +

      +
    • +
    • +

      +Test ABC. +

      +
    • +
    • +

      +The ++i and ++j auto-increments. +

      +
    • +
    • +

      +Paths ~/.vim and ~/docs. +

      +
    • +
    • +

      +The __init__ method. +

      +
    • +
    • +

      +The {id} attribute. +

      +
    • +
    +

    List start number test:

    +
      +
    1. +

      +List item 7. +

      +
    2. +
    3. +

      +List item 8. +

      +
    4. +
    +
    +
    +
    +

    Images

    +
    +
    +

    Block images

    +
    +
    +Tyger tyger +
    +
    Figure 1. Tyger tyger
    +
    +
    +
    +Tiger +
    +
    Figure 2: Tyger tyger two
    +
    +
    +
    +music2.png +
    +
    +
    + + + +
    +Note +Lorum ipsum.
    +
    +
    +
    +

    Inline images

    +

    Inline image +smallnew.png +

    +

    Inline image +NEW! +

    +

    Inline image +NEW! +

    +
    +
    +
    +
    +

    Admonishments

    +
    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    + + + +
    +Note +Lorum ipsum.
    +
    +
    + + + +
    +Tip +Lorum ipsum.
    +
    +
    + + + +
    +Warning +Lorum ipsum.
    +
    +
    + + + +
    +Caution +Lorum ipsum.
    +
    +
    + + + +
    +Important +Lorum ipsum.
    +
    +
    +
    +
    +

    Backslash escapes

    +
    +
    Apostrophe

    Don’t vs don't.

    +
    Exceptions

    There are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples:

    + +++ + + + + + + + + + + + + + + + + + + + +
    AsciiDoc Renders
    \joe.bloggs@example.com
    +<\joe.bloggs@example.com>
    +\mailto:[\joe.bloggs@example.com]
    joe.bloggs@example.com +<joe.bloggs@example.com> +mailto:[joe.bloggs@example.com]
    \http://www.example.com
    +\\http://www.example.com[]
    +\\http://www.example.com[Foobar Limited]
    http://www.example.com +http://www.example.com[] +http://www.example.com[Foobar Limited]
    A C\++ Library for C++
    +\\``double-quotes''
    +\*\*F**ile Open\...
    A C++ Library for C++ +``double-quotes'' +**F**ile Open...
    +
    +
    +
    +

    Paragraphs

    +
    +
    Normal paragraph

    This is a bold a line +This is a strong line +This is another strong line

    +
    +
    Literal paragraph
    +
    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +
    +
    +
    Verse paragraph
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    +
    +
    Indented (literal) paragraph
    +
    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +
    +
    +
    Indented with quotes substitution
    +
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    +
    Literal paragraph with quotes substitution
    +
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    Monospaced paragraph with line breaks

    This is a bold line
    +This is a strong line
    +This is another strong line

    +
    Another monospaced paragraph with line breaks

    This is a bold a line
    +This is a strong line
    +This is another strong line

    +
    +
    Literal block with quotes substitution
    +
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +
    +from Auguries of Innocence
    +— William Blake +
    +
    +
    A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher.
    +
    +The World of Mathematics (1956)
    +— Bertrand Russell +
    +
    +
    + +
    +

    Comments

    +
    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +

    This comment line will be displayed in the output.

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. +
    Visible inline comment line.
    +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +
    Block title

    Lorum ipsum.

    +
    Block title

    Lorum ipsum.

    +
    +
    +
    +

    Index Terms

    +
    +

    Test 1 test1.

    +

    Test 2 .

    +

    Test 3 .

    +

    Test 4 .

    +

    Test 5 test5.

    +

    Test 6 .

    +

    Test 7 .

    +

    Test 8 .

    + +
    +
    +
    +

    Table with fractional column width units

    +
    +
    + + + +
    +
    Note
    +
    pagewidth and pageunits only apply to DocBook outputs.
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 1. Horizontal and vertical source data
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +
    +
    +
    +

    Table with parent configuration file and header attribute entry

    +
    + ++ + + + + +
      +
    • +

      +Attribute entry from header: TEST_ATTRIBUTE +

      +
    • +
    • +

      +Replacement from testcases.conf configuration file: TEST_REPLACEMENT +

      +
    • +
    +
    +
    +
    +

    Table column specifiers with merged cells

    +
    + + +++++ + + + + + + + + + + + + + + + + + + + + + + +

    1- A

    2- B

    i- a

    ii- b

    Values 1

    v1

    v2

    v3

    Values 2

    v4

    v5

    v6

    +
    +
    +
    +

    Floating tables and images

    +
    + + ++++ + + + + + + + + + + + + + + + + +
    Table 2. Simple table

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +
    +
    +Tiger image +
    +
    Figure 2. Tiger
    +
    +
    +
    +
    +
    +

    Section level offsets

    +
    +

    At level 1

    +
    +

    Section title

    +

    At level 2

    +
    +
    +

    Section title

    +

    At level 2

    +
    +

    Section title

    +

    At level 3

    +
    +
    +
    +
    +
    +

    Section level offsets

    +
    +

    At level 1

    +
    +
    +
    +

    Single-quoted attributes

    +
    +
    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +
    +
    +
    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +
    +
    +
    +
    +
    +

    Footnotes

    +
    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote two. Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +
    [F2]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel + +images/smallnew.png +]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel
    [AsciiDoc website.]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +
    [A footnote, "with an image" images/smallnew.png ]
    . +
    [With [square brackets]]
    Qui in magna commodo, est labitur +dolorum an. Est ne magna primis.

    +
    +
    +
    +

    Rulers and page breaks

    +
    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    这是一个测试

    +
    +

    Double-with character titles. +link to auto-generated section ID.

    +
    +
    +
    +

    HTML 5 audio and video block macros

    +
    +
    +
    + +
    +
    +
    Audio tag test
    +
    + +
    +
    +
    + +
    +
    +
    Example video
    +
    + +
    +
    +
    + +
    + + + +
    +
    +
    +

    Block macros

    +
    +

    RS458 is 2.

    +
    +
    +

    Template line 1. +Template line 2.

    +
    +

    àn îd without accénts

    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    àn îd with accénts

    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    Inline macros

    + +
    +
    +

    Equation

    +
    +
    +
    +
    Equation
    +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +
    +
    +
    +
    +

    Example

    +
    +Formal figures, tables, equations and examples can float in docbook backend +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/testcases.txt asciidoc-10.1.2/tests/data/testcases.txt --- asciidoc-8.6.10/tests/data/testcases.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,802 +0,0 @@ -// -// A collection of AsciiDoc test cases. -// - -Test 'Cases' -============ -:author: Joe Bloggs -// Web page meta data. -:title: Test Cases -:keywords: AsciiDoc, DocBook, EPUB, slideshow -:description: AsciiDoc is a text document format for writing short documents, + - articles, books, slideshows and UNIX man pages. -:replacements.(\w)'(\w): \1’\2 -:test-attribute: TEST_ATTRIBUTE - - -== Passthrough attributes == -ifdef::basebackend-docbook[] -:passtest: pass:[*lorum ipsum*] -endif::basebackend-docbook[] -ifdef::basebackend-html[] -:passtest: pass:[*lorum ipsum*] -endif::basebackend-html[] -{passtest} - -ifdef::basebackend-docbook[] -:passtest: pass:specialcharacters,quotes[*lorum ipsum*] -endif::basebackend-docbook[] -ifdef::basebackend-html[] -:passtest: pass:specialcharacters,quotes[*lorum ipsum*] -endif::basebackend-html[] -{passtest} - - -== Author attributes == -\{eval:expression}, \{sys:command} and \{sys2:command}, \{counter:c1} - -Hello *{author}* ({firstname} {lastname}, {authorinitials}). - -{firstname,lastname,surname#}first name or last name or surname. - -{firstname+lastname+surname#}first name and last name and surname. - -{firstname+lastname#}first name and last name. - - -== System attributes == -{counter:c1} {counter:c2:99} {counter:c3:A} - -{c1} = 1, {c2} = 99, {c3} = A - -{counter:c1} {counter:c2:99} {counter:c3:A} -{c1} {c2} {c3} - -{c1} = 2, {c2} = 100, {c3} = B - -{set:y:Foobar} -y: {y} - -{set:y!} - -y: {y} - -:x: 3 -:y: {eval:{x}+4} - -{x}, {y} - -{set:y:{x}} - -{x}, {y} - - -== Quoted text attributes == - -A=_X_, (_X_), _X_, [_X_] _X_ - -A=*_X_*, (`_X_`), _`X`_, [*_X_*] +_X_+ _X_ - -// These two illustrate that nesting doesn't always work. -[_*X*_] _+X+_ - -[[_intro]] -<<_intro>> <<_intro,intro>> xref:_intro[] _intro_ - -// Quote attributes. -[foo]#fun with text#. -[foo bar]*fun with text*. -[foo]+fun with text+. -[foo]_fun with text_. -[foo]'fun with text'. -[foo]``fun with text''. -[foo]`fun with text'. - -[foo]$$fun with text$$. - -[foo]+++fun with text+++. - -[red]#Obvious# and [big red yellow-background]*very obvious*. - -[underline]#Underline text#, [overline]#overline text# -and [line-through]#line-through text#. - -[firstletter]##T##esting 123 ... - -(``+1\n+'') if (usually ``+-1\n+'') - -(``++1\n++'') if (usually ``++-1\n++'') - -(`{author}') and `{author}' - - -== Configuration attribute entries == - -:listdef-labeled.style: horizontal -term:: definition - -:listdef-labeled.style: vertical -term:: definition - -ifdef::backend-xhtml11[] -<> - -:xref2-inlinemacro.: {2?{2}} - -<> - -:xref2-inlinemacro.: {2=[{1}]} -endif::[] - - -== role attribute == - -[role="test"] -Paragraph with a role attribute. - -[role="test"] -- first -- second -- third - - -== Break list nesting == -1. List 1. -2. List 1. - -// New list. -a. List 2. -b. List 2. - - -== Listing Blocks == -[subs="quotes"] ------------------------------------------- -$ ls *-al* ------------------------------------------- - -[listing] -.......................................... -[subs="quotes"] ------------------------------------------- -$ ls *-al* ------------------------------------------- -.......................................... - -.Listing ------------------------------------------- -$ ls -al ------------------------------------------- - -.Listing example -========================================== ------------------------------------------- -$ ls -al ------------------------------------------- -========================================== - -.Python paragraph -[source,python] -if n < 0: print 'Hello World!' - -.Titled Python listing -[source,python] ------------------------------------------- -if n < 0: print 'Hello World!' ------------------------------------------- - -.Python listing example -========================================== -[source,python] ------------------------------------------- -if n < 0: print 'Hello World!' ------------------------------------------- -========================================== - - -[[X1,anchor reftext]] -== Links == -An [[X2]] inline anchor. -An [[X3, anchor reftext]] inline anchor with reftext. - -<>; captioned link to <>. - -<> link to inline anchor; captioned link to <>. - -Link to <> anchor. - -An example link to a bibliography entry <>. - -[horizontal] -[[[Test::Unit]]]:: http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html - - -== Titles == - -[float] -===== Level 4 ===== -[float] -==== Level 3 ==== -[float] -=== Level 2 === -[float] -== Level 1 == -[float] -Level 4 -+++++++ -[float] -Level 3 -^^^^^^^ -[float] -Level 2 -~~~~~~~ -[float] -Level 1 -------- - -.Block title -Lorum ipsum. - - -== Lists == - -Bulleted: - -- item text -* item text -** item text -*** item text -**** item text -***** item text - -Numbered: - -1. arabic (decimal) numbering -a. loweralpha numbering -A. upperalpha numbering -i) lowerroman numbering -I) upperroman numbering -. arabic (decimal) numbering -.. loweralpha numbering -... lowerroman numbering -.... upperalpha numbering -..... upperroman numbering - -Labeled: - -label:: item text -label;; item text -label::: item text -label:::: item text - -With item anchor: - -one:: Item one. -[[item_two]]two:: Item two. -three:: Item three. - - -== Inline passthroughs == - -- Test pass:[`ABC`]. -- Test `pass:[ABC]`. -- The `++i` and `++j` auto-increments. -- Paths `~/.vim` and `~/docs`. -- The `__init__` method. -- The `{id}` attribute. - -List start number test: - -// The ol start attribute is not valid XHTML 1.1 (but it works in all -// browsers). -ifndef::backend-xhtml11[] -[start=7] -. List item 7. -. List item 8. -endif::backend-xhtml11[] - -== Images - -=== Block images - -[[tiger_image]] -.Tyger tyger -image::../../images/tiger.png[Tyger tyger] - -:height: 250 -:width: 350 -.Tyger tyger two -image::../../images/tiger.png[caption="Figure 2: ", alt="Tiger", align="center"] -:height!: -:width!: - -// Images and icons directories. -:imagesdir: ../../doc -image::music2.png[] - -:icons: -:iconsdir: ../../images/icons -NOTE: Lorum ipsum. - -:icons!: - -ifdef::backend-xhtml11[] -:imagesdir: ../../images -:data-uri: -image:smallnew.png[NEW] 'testing' `123`. - -endif::[] - -:data-uri!: - -=== Inline images - -:imagesdir: ../../images - -Inline image image:smallnew.png[] - -Inline image image:smallnew.png[NEW!] - -Inline image image:smallnew.png["NEW!",title="Small new"] - - -== Admonishments - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -// With icon images. -:icons: -:iconsdir: ../../images/icons - -NOTE: Lorum ipsum. - -TIP: Lorum ipsum. - -WARNING: Lorum ipsum. - -CAUTION: Lorum ipsum. - -IMPORTANT: Lorum ipsum. - -:icons!: - -== Backslash escapes - -.Apostrophe -Don't vs don\'t. - -.Exceptions -There are a number of exceptions to the usual single backslash rule --- mostly relating to URL macros that have two syntaxes or quoting -ambiguity. Here are some non-standard escape examples: - -[cols="l,v",width="40%",options="header"] -|======================================== -|AsciiDoc | Renders - -2*| -\joe.bloggs@example.com -<\joe.bloggs@example.com> -\mailto:[\joe.bloggs@example.com] - -2*| -\http://www.example.com -\\http://www.example.com[] -\\http://www.example.com[Foobar Limited] - -2*| -A C\++ Library for C++ -\\``double-quotes'' -\*\*F**ile Open\... -|======================================== - - -== Paragraphs - -.Normal paragraph -This is a *bold* a line -This is a 'strong' line -This is another _strong_ line - -.Literal paragraph -[literal] -This is a *bold* a line -This is a 'strong' line -This is another _strong_ line - -.Verse paragraph -[verse] -This is a *bold* a line -This is a 'strong' line -This is another _strong_ line - -.Indented (literal) paragraph - This is a *bold* a line - This is a 'strong' line - This is another _strong_ line - -.Indented with quotes substitution -[subs="quotes"] - This is a *bold* a line - This is a 'strong' line - This is another _strong_ line - -.Literal paragraph with quotes substitution -["literal",subs="quotes"] -This is a *bold* a line -This is a 'strong' line -This is another _strong_ line - -ifndef::basebackend-docbook[] -.Monospaced paragraph with line breaks -+This is a *bold* line+ + -+This is a 'strong' line+ + -+This is another _strong_ line+ - - -.Another monospaced paragraph with line breaks -+This is a *bold* a line + -This is a 'strong' line + -This is another _strong_ line+ - -endif::basebackend-docbook[] - -.Literal block with quotes substitution -[subs="quotes"] -............................. -This is a *bold* a line -This is a 'strong' line -This is another _strong_ line -............................. - -[verse, William Blake, from Auguries of Innocence] -To see a world in a grain of sand, -And a heaven in a wild flower, -Hold infinity in the palm of your hand, -And eternity in an hour. - -[quote, Bertrand Russell, The World of Mathematics (1956)] -A good notation has subtlety and suggestiveness which at times makes -it almost seem like a live teacher. - - -URLs ----- -Mail Addresses -~~~~~~~~~~~~~~ -joe_bloggs@mail_server.com_ - -joe-bloggs@mail-server.com. - -joe-bloggs@mail-server.com,joe-bloggs@mail-server.com, - -mailto:joe-bloggs@mail-server.com[Mail] - -mailto:joe_bloggs@mail_server.com[Mail] - -mailto:joe.bloggs@mail.server.com[Mail] - -joe.bloggs@mail.server.com + -lorum ipsum. - - -Comments --------- -///////////////////////////////////////////////////////////////////// -A comment -block. -///////////////////////////////////////////////////////////////////// - -// This is a comment line. - -Qui in magna commodo, est labitur dolorum an. Est ne magna primis. -// Inline comment line. -adolescens. Sit munere ponderum dignissim et. Minim luptatum et. - -:showcomments: -// This comment line will be displayed in the output. - -Qui in magna commodo, est labitur dolorum an. Est ne magna primis. -// Visible inline comment line. -adolescens. Sit munere ponderum dignissim et. Minim luptatum et. - -///////////////////////////////////////////////////////////////////// -Comment blocks are never displayed in the output. -///////////////////////////////////////////////////////////////////// - -:showcomments!: - -[[comment_macro]] -.Block title -// Block macro comment does not consume titles or attributes. -Lorum ipsum. - -[[comment_block]] -.Block title -///////////////////////////////////////////////////////////////////// -Delimited comment block does not consume titles or attributes. -///////////////////////////////////////////////////////////////////// -Lorum ipsum. - - -ifdef::basebackend-docbook[] -[glossary] -List of terms -------------- -Using positional attribute to specify section template. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - -[template="glossary"] -List of terms -------------- -Using named 'template' attribute to specify section template. - -[glossary] -A glossary term:: - The corresponding (indented) definition. - -A second glossary term:: - The corresponding (indented) definition. - -endif::basebackend-docbook[] - -Index Terms ------------ -Test 1 ((test1)). - -Test 2 (((test2))). - -Test 3 (((test3,secondary))). - -Test 4 (((test4,secondary,tertiary))). - -Test 5 indexterm2:[test5]. - -Test 6 indexterm:[test6]. - -Test 7 indexterm:[test7,secondary]. - -Test 8 indexterm:[test8,secondary,tertiary]. - -Multi-passthough substitution (see -http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) -((`foo`)) -(((foo,`bar`))) -(((foo,`bar`,`two`))) - -Table with fractional column width units ----------------------------------------- -NOTE: 'pagewidth' and 'pageunits' only apply to DocBook outputs. - -:miscellaneous.pagewidth: 17.5 -:miscellaneous.pageunits: cm - -.Horizontal and vertical source data -[width="50%",cols="3,^2,^2,10",options="header"] -|========================================================= -|Date |Duration |Avg HR |Notes - -|22-Aug-08 |10:24 | 157 | -Worked out MSHR (max sustainable heart rate) by going hard -for this interval. - -|22-Aug-08 |23:03 | 152 | -Back-to-back with previous interval. - -|24-Aug-08 |40:00 | 145 | -Moderately hard interspersed with 3x 3min intervals (2min -hard + 1min really hard taking the HR up to 160). - -|========================================================= - -== Table with parent configuration file and header attribute entry - -[cols="asciidoc"] -|==== -| -- Attribute entry from header: {test-attribute} -- Replacement from `testcases.conf` configuration file: test-replacement -|==== - -== Table column specifiers with merged cells -See -http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a - -[cols="<1m,>1,^1s, ^1e"] -|============================================ - .2+| .2+|1- A 2+|2- B - |i- a |ii- b - |Values 1 |v1 |v2 |v3 - |Values 2 |v4 |v5 |v6 -|============================================ - -Floating tables and images --------------------------- -.Simple table -[float="left",width="15%"] -|======= -|1 |2 |A -|3 |4 |B -|5 |6 |C -|======= - -.Tiger -[float="right"] -image::images/tiger.png["Tiger image"] - -unfloat::[] - -Section level offsets ---------------------- -At level 1 - -:leveloffset: -1 -Section title -^^^^^^^^^^^^^ -At level 2 - -:leveloffset: 0 -Section title -~~~~~~~~~~~~~ -At level 2 - -:leveloffset: 2 -Section title -------------- -At level 3 - -:leveloffset!: -:numbered!: - -Section level offsets ---------------------- -At level 1 - -Single-quoted attributes ------------------------- -[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] -_____________________________________________________________________ -Sir, a woman's preaching is like a dog's walking on his hind legs. It -is not done well; but you are surprised to find it done at all. -_____________________________________________________________________ - -["quote","'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'"] -_____________________________________________________________________ -Sir, a woman's preaching is like a dog's walking on his hind legs. It -is not done well; but you are surprised to find it done at all. -_____________________________________________________________________ - -Footnotes ---------- -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. -footnote:[footnote one. -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.] -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. -footnoteref:["F2","footnote two. -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel."] -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel -footnoteref:[F2]. -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. -footnote:[http://asciidoc.org/ Qui in magna commodo, -est labitur dolorum an. Est ne magna primis adolescens. Sit munere -ponderum dignissim et. Minim luptatum et vel -image:images/smallnew.png[]] -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. -footnote:[http://asciidoc.org/] -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et -vel footnote:[http://asciidoc.org/[AsciiDoc website].]. -Qui in magna commodo, est labitur dolorum an. Est ne magna primis -adolescens. Sit munere ponderum dignissim et. Minim luptatum et -footnoteref:[F3,A footnote, "with an image" -image:images/smallnew.png[]]. -footnote:[With [square brackets\]] Qui in magna commodo, est labitur -dolorum an. Est ne magna primis. - - -Rulers and page breaks ----------------------- - -Lorum ipsum... - -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Lorum ipsum... - -<<< - -Lorum ipsum... - - -这是一个测试 ------------- -Double-with character titles. -<<_这是一个测试,link to auto-generated section ID>>. - - -ifdef::backend-html5[] -HTML 5 audio and video block macros ------------------------------------ -audio::images/example.ogg[] - -.Audio tag test -audio::images/example.ogg[] - -video::images/gizmo.ogv[width=200,options="nocontrols,autoplay"] - -.Example video -video::images/gizmo.ogv[] - -video::http://www.808.dk/pics/video/gizmo.ogv[] - -++++ - - - -++++ - -endif::backend-html5[] - - -== Block macros - -:rs458: 2 - -ifeval::[{rs458}==2] -RS458 is 2. -endif::[] -ifeval::[not ({rs458}==2)] -This will not be processed. -endif::[] - -// Test eval block macro. -eval::[Section.setlevel(1)] - -// Test template concatenation. -{template:test-template} - -// Test ascii-ids attribute. -:ascii-ids: -== àn îd without accénts -Lorum ipsum... - -:ascii-ids!: -== àn îd with accénts -Lorum ipsum... - - -== Inline macros -http://groups.google.com/group/asciidoc/[A URL with [square -brackets\]]. diff -Nru asciidoc-8.6.10/tests/data/testcases-xhtml11.html asciidoc-10.1.2/tests/data/testcases-xhtml11.html --- asciidoc-8.6.10/tests/data/testcases-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/testcases-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1823 @@ + + + + + + + + +Test Cases + + + + + +
    +
    +

    Passthrough attributes

    +
    +

    *lorum ipsum*

    +

    <b>*lorum ipsum*</b>

    +
    +
    +
    +

    Author attributes

    +
    +

    {eval:expression}, {sys:command} and {sys2:command}, {counter:c1}

    +

    Hello Joe Bloggs (Joe Bloggs, JB).

    +

    first name or last name or surname.

    +

    +

    first name and last name.

    +
    +
    +
    +

    System attributes

    +
    +

    1 99 A

    +

    1 = 1, 99 = 99, A = A

    +

    2 100 B +2 100 B

    +

    2 = 2, 100 = 100, B = B

    +

    y: Foobar

    +

    +

    +

    3, 7

    +

    +

    3, 3

    +
    +
    +
    +

    Quoted text attributes

    +
    +

    A=X, (X), X, [X] X

    +

    A=X, (_X_), X, [X] X X

    +

    [*X*] +X+

    + +

    fun with text. +fun with text. +fun with text. +fun with text. +fun with text. +“fun with text”. +‘fun with text’.

    +

    fun with text.

    +

    fun with text.

    +

    Obvious and very obvious.

    +

    Underline text, overline text +and line-through text.

    +

    Testing 123 …

    +

    (“+1\n+”) if (usually “+-1\n+”)

    +

    (“1\n”) if (usually “-1\n”)

    +

    (‘Joe Bloggs’) and ‘Joe Bloggs’

    +
    +
    +
    +

    Configuration attribute entries

    +
    +
    + + + + +
    +term +
    +
    +

    +definition +

    +
    +
    +
    +term +
    +
    +

    +definition +

    +
    +
    + +

    +
    +
    +
    +

    role attribute

    +
    +

    Paragraph with a role attribute.

    +
      +
    • +

      +first +

      +
    • +
    • +

      +second +

      +
    • +
    • +

      +third +

      +
    • +
    +
    +
    +
    +

    Break list nesting

    +
    +
      +
    1. +

      +List 1. +

      +
    2. +
    3. +

      +List 1. +

      +
    4. +
    +
      +
    1. +

      +List 2. +

      +
    2. +
    3. +

      +List 2. +

      +
    4. +
    +
    +
    +
    +

    Listing Blocks

    +
    +
    +
    +
    $ ls -al
    +
    +
    +
    +
    [subs="quotes"]
    +------------------------------------------
    +$ ls *-al*
    +------------------------------------------
    +
    +
    +
    Listing
    +
    +
    $ ls -al
    +
    +
    +
    Example 1. Listing example
    +
    +
    +
    +
    $ ls -al
    +
    +
    +
    +
    Python paragraph
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    Titled Python listing
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    Example 2. Python listing example
    +
    +
    +
    +
    if n < 0: print 'Hello World!'
    +
    +
    +
    +
    +

    Links

    +
    +

    An inline anchor. +An inline anchor with reftext.

    +

    [X1]; captioned link to this test case.

    +

    [X2] link to inline anchor; captioned link to inline anchor.

    +

    Link to [X3] anchor.

    +

    An example link to a bibliography entry [Test::Unit].

    + +
    +
    +
    +

    Titles

    +
    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +
    Level 4
    +

    Level 3

    +

    Level 2

    +

    Level 1

    +
    Block title

    Lorum ipsum.

    +
    +
    +
    +

    Lists

    +
    +

    Bulleted:

    +
      +
    • +

      +item text +

      +
        +
      • +

        +item text +

        +
          +
        • +

          +item text +

          +
            +
          • +

            +item text +

            +
              +
            • +

              +item text +

              +
                +
              • +

                +item text +

                +
              • +
              +
            • +
            +
          • +
          +
        • +
        +
      • +
      +
    • +
    +

    Numbered:

    +
      +
    1. +

      +arabic (decimal) numbering +

      +
        +
      1. +

        +loweralpha numbering +

        +
          +
        1. +

          +upperalpha numbering +

          +
            +
          1. +

            +lowerroman numbering +

            +
              +
            1. +

              +upperroman numbering +

              +
                +
              1. +

                +arabic (decimal) numbering +

                +
                  +
                1. +

                  +loweralpha numbering +

                  +
                    +
                  1. +

                    +lowerroman numbering +

                    +
                      +
                    1. +

                      +upperalpha numbering +

                      +
                        +
                      1. +

                        +upperroman numbering +

                        +
                      2. +
                      +
                    2. +
                    +
                  2. +
                  +
                2. +
                +
              2. +
              +
            2. +
            +
          2. +
          +
        2. +
        +
      2. +
      +
    2. +
    +

    Labeled:

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +label +
    +
    +

    +item text +

    +
    +
    +
    +
    +
    +
    +
    +
    +

    With item anchor:

    +
    +
    +one +
    +
    +

    +Item one. +

    +
    +
    +two +
    +
    +

    +Item two. +

    +
    +
    +three +
    +
    +

    +Item three. +

    +
    +
    +
    +
    +
    +

    Inline passthroughs

    +
    +
      +
    • +

      +Test `ABC`. +

      +
    • +
    • +

      +Test ABC. +

      +
    • +
    • +

      +The ++i and ++j auto-increments. +

      +
    • +
    • +

      +Paths ~/.vim and ~/docs. +

      +
    • +
    • +

      +The __init__ method. +

      +
    • +
    • +

      +The {id} attribute. +

      +
    • +
    +

    List start number test:

    +
    +
    +
    +

    Images

    +
    +
    +

    Block images

    +
    +
    +Tyger tyger +
    +
    Figure 1. Tyger tyger
    +
    +
    +
    +Tiger +
    +
    Figure 2: Tyger tyger two
    +
    +
    +
    +music2.png +
    +
    +
    + + + +
    +Note +Lorum ipsum.
    +
    +

    +NEW + testing 123.

    +
    +
    +

    Inline images

    +

    Inline image +smallnew.png +

    +

    Inline image +NEW! +

    +

    Inline image +NEW! +

    +
    +
    +
    +
    +

    Admonishments

    +
    +
    + + + +
    +
    Note
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Tip
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Warning
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Caution
    +
    Lorum ipsum.
    +
    +
    + + + +
    +
    Important
    +
    Lorum ipsum.
    +
    +
    + + + +
    +Note +Lorum ipsum.
    +
    +
    + + + +
    +Tip +Lorum ipsum.
    +
    +
    + + + +
    +Warning +Lorum ipsum.
    +
    +
    + + + +
    +Caution +Lorum ipsum.
    +
    +
    + + + +
    +Important +Lorum ipsum.
    +
    +
    +
    +
    +

    Backslash escapes

    +
    +
    Apostrophe

    Don’t vs don't.

    +
    Exceptions

    There are a number of exceptions to the usual single backslash rule — mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples:

    +
    + +++ + + + + + + + + + + + + + + + + + + + +
    AsciiDoc Renders
    \joe.bloggs@example.com
    +<\joe.bloggs@example.com>
    +\mailto:[\joe.bloggs@example.com]
    joe.bloggs@example.com +<joe.bloggs@example.com> +mailto:[joe.bloggs@example.com]
    \http://www.example.com
    +\\http://www.example.com[]
    +\\http://www.example.com[Foobar Limited]
    http://www.example.com +http://www.example.com[] +http://www.example.com[Foobar Limited]
    A C\++ Library for C++
    +\\``double-quotes''
    +\*\*F**ile Open\...
    A C++ Library for C++ +``double-quotes'' +**F**ile Open...
    +
    +
    +
    +
    +

    Paragraphs

    +
    +
    Normal paragraph

    This is a bold a line +This is a strong line +This is another strong line

    +
    +
    Literal paragraph
    +
    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +
    +
    +
    Verse paragraph
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    +
    +
    Indented (literal) paragraph
    +
    +
    This is a *bold* a line
    +This is a 'strong' line
    +This is another _strong_ line
    +
    +
    +
    Indented with quotes substitution
    +
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    +
    Literal paragraph with quotes substitution
    +
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    Monospaced paragraph with line breaks

    This is a bold line
    +This is a strong line
    +This is another strong line

    +
    Another monospaced paragraph with line breaks

    This is a bold a line
    +This is a strong line
    +This is another strong line

    +
    +
    Literal block with quotes substitution
    +
    +
    This is a bold a line
    +This is a strong line
    +This is another strong line
    +
    +
    +
    To see a world in a grain of sand,
    +And a heaven in a wild flower,
    +Hold infinity in the palm of your hand,
    +And eternity in an hour.
    +
    +from Auguries of Innocence
    +— William Blake +
    +
    +
    A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher.
    +
    +The World of Mathematics (1956)
    +— Bertrand Russell +
    +
    +
    + +
    +

    Comments

    +
    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. + +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +

    This comment line will be displayed in the output.

    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis. +
    Visible inline comment line.
    +adolescens. Sit munere ponderum dignissim et. Minim luptatum et.

    +
    Block title

    Lorum ipsum.

    +
    Block title

    Lorum ipsum.

    +
    +
    +
    +

    Index Terms

    +
    +

    Test 1 test1.

    +

    Test 2 .

    +

    Test 3 .

    +

    Test 4 .

    +

    Test 5 test5.

    +

    Test 6 .

    +

    Test 7 .

    +

    Test 8 .

    + +
    +
    +
    +

    Table with fractional column width units

    +
    +
    + + + +
    +
    Note
    +
    pagewidth and pageunits only apply to DocBook outputs.
    +
    +
    + + +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Table 1. Horizontal and vertical source data
    Date Duration Avg HR Notes

    22-Aug-08

    10:24

    157

    Worked out MSHR (max sustainable heart rate) by going hard +for this interval.

    22-Aug-08

    23:03

    152

    Back-to-back with previous interval.

    24-Aug-08

    40:00

    145

    Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160).

    +
    +
    +
    +
    +

    Table with parent configuration file and header attribute entry

    +
    +
    + ++ + + + + +
      +
    • +

      +Attribute entry from header: TEST_ATTRIBUTE +

      +
    • +
    • +

      +Replacement from testcases.conf configuration file: TEST_REPLACEMENT +

      +
    • +
    +
    +
    +
    +
    +

    Table column specifiers with merged cells

    +
    + +
    + +++++ + + + + + + + + + + + + + + + + + + + + + + +

    1- A

    2- B

    i- a

    ii- b

    Values 1

    v1

    v2

    v3

    Values 2

    v4

    v5

    v6

    +
    +
    +
    +
    +

    Floating tables and images

    +
    +
    + + ++++ + + + + + + + + + + + + + + + + +
    Table 2. Simple table

    1

    2

    A

    3

    4

    B

    5

    6

    C

    +
    +
    +
    +Tiger image +
    +
    Figure 2. Tiger
    +
    +
    +
    +
    +
    +

    Section level offsets

    +
    +

    At level 1

    +
    +

    Section title

    +

    At level 2

    +
    +
    +

    Section title

    +

    At level 2

    +
    +

    Section title

    +

    At level 3

    +
    +
    +
    +
    +
    +

    Section level offsets

    +
    +

    At level 1

    +
    +
    +
    +

    Single-quoted attributes

    +
    +
    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +
    +
    +
    +
    +

    Sir, a woman’s preaching is like a dog’s walking on his hind legs. It +is not done well; but you are surprised to find it done at all.

    +
    +
    +
    +
    +
    +

    Footnotes

    +
    +

    Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [footnote two. Qui in magna commodo, est labitur dolorum an. Est ne magna primis adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +
    [F2]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel + +images/smallnew.png +]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +
    [https://asciidoc.org/]
    +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel
    [AsciiDoc website.]
    . +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +
    [A footnote, "with an image" images/smallnew.png ]
    . +
    [With [square brackets]]
    Qui in magna commodo, est labitur +dolorum an. Est ne magna primis.

    +
    +
    +
    +

    Rulers and page breaks

    +
    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    这是一个测试

    +
    +

    Double-with character titles. +link to auto-generated section ID.

    +
    +
    +
    +

    Block macros

    +
    +

    RS458 is 2.

    +
    +
    +

    Template line 1. +Template line 2.

    +
    +

    àn îd without accénts

    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    àn îd with accénts

    +
    +

    Lorum ipsum…

    +
    +
    +
    +

    Inline macros

    + +
    +
    +

    Equation

    +
    +
    +
    +
    Equation
    +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +
    +
    +
    +
    +

    Example

    +
    +Formal figures, tables, equations and examples can float in docbook backend +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/utf8-bom-test-docbook5.xml asciidoc-10.1.2/tests/data/utf8-bom-test-docbook5.xml --- asciidoc-8.6.10/tests/data/utf8-bom-test-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-bom-test-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,17 @@ + + + + +
    + + UTF-8 BOM Test + +Include file with UTF-8 BOM: +
    +UTF-8 BOM Test +Include file with UTF-8 BOM: +include::utf8-bom-test.txt[depth=1] +Lorum ipsum… +Lorum ipsum… +
    +
    diff -Nru asciidoc-8.6.10/tests/data/utf8-bom-test-docbook.xml asciidoc-10.1.2/tests/data/utf8-bom-test-docbook.xml --- asciidoc-8.6.10/tests/data/utf8-bom-test-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-bom-test-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ + + + + + +
    + + UTF-8 BOM Test + +Include file with UTF-8 BOM: +
    +UTF-8 BOM Test +Include file with UTF-8 BOM: +include::utf8-bom-test.txt[depth=1] +Lorum ipsum… +Lorum ipsum… +
    +
    diff -Nru asciidoc-8.6.10/tests/data/utf8-bom-test-html4.html asciidoc-10.1.2/tests/data/utf8-bom-test-html4.html --- asciidoc-8.6.10/tests/data/utf8-bom-test-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-bom-test-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,27 @@ + + + + + +UTF-8 BOM Test + + +

    UTF-8 BOM Test

    +

    +

    + +

    Include file with UTF-8 BOM:

    +
    +

    UTF-8 BOM Test

    +

    Include file with UTF-8 BOM:

    +

    include::utf8-bom-test.txt[depth=1]

    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/utf8-bom-test-html5.html asciidoc-10.1.2/tests/data/utf8-bom-test-html5.html --- asciidoc-8.6.10/tests/data/utf8-bom-test-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-bom-test-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,761 @@ + + + + + +UTF-8 BOM Test + + + + + +
    +
    +
    +

    Include file with UTF-8 BOM:

    +
    +
    +
    +

    UTF-8 BOM Test

    +
    +

    Include file with UTF-8 BOM:

    +

    include::utf8-bom-test.txt[depth=1]

    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/utf8-bom-test.txt asciidoc-10.1.2/tests/data/utf8-bom-test.txt --- asciidoc-8.6.10/tests/data/utf8-bom-test.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-bom-test.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -UTF-8 BOM Test -============== - -Include file with UTF-8 BOM: - -:leveloffset: 1 -include::{docname}.txt[depth=1] - -Lorum ipsum... diff -Nru asciidoc-8.6.10/tests/data/utf8-bom-test-xhtml11.html asciidoc-10.1.2/tests/data/utf8-bom-test-xhtml11.html --- asciidoc-8.6.10/tests/data/utf8-bom-test-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-bom-test-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,763 @@ + + + + + + +UTF-8 BOM Test + + + + + +
    +
    +
    +

    Include file with UTF-8 BOM:

    +
    +
    +
    +

    UTF-8 BOM Test

    +
    +

    Include file with UTF-8 BOM:

    +

    include::utf8-bom-test.txt[depth=1]

    +

    Lorum ipsum…

    +

    Lorum ipsum…

    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/utf8-examples-docbook5.xml asciidoc-10.1.2/tests/data/utf8-examples-docbook5.xml --- asciidoc-8.6.10/tests/data/utf8-examples-docbook5.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-examples-docbook5.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,225 @@ + + + + +
    + + UTF-8 encoded sample plain-text file + +Markus Kuhn [ˈmaʳkÊŠs kuËn] http://www.cl.cam.ac.uk/~mgk25/ — 2002-07-25 +The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279. +Using Unicode/UTF-8, you can write in emails and source code things such as +
    +Mathematics and sciences +∮ Eâ‹…da = Q, n → ∞, ∑ f(i) = ∠g(i), ⎧⎡⎛┌─────â”⎞⎤⎫ + ⎪⎢⎜│a²+b³ ⎟⎥⎪ +∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ + ⎪⎢⎜⎷ c₈ ⎟⎥⎪ +â„• ⊆ â„•â‚€ ⊂ ℤ ⊂ â„š ⊂ ℠⊂ â„‚, ⎨⎢⎜ ⎟⎥⎬ + ⎪⎢⎜ ∞ ⎟⎥⎪ +⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ + ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª +2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣âŽi=1 ⎠⎦⎭ +
    +
    +Linguistics and dictionaries +ði ıntəˈnæʃənÉ™l fəˈnÉ›tık É™soÊŠsiˈeıʃn +Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘] +
    +
    +APL +((Vâ³V)=â³â´V)/Vâ†,V ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ +
    +
    +Nicer typography in plain text files + + + +‘single’ and “double†quotes + + + + +Curly apostrophes: “We’ve been here†+ + + + +‚deutsche‘ „Anführungszeichen“ + + + + +†, ‡, ‰, •, 3–4, —, −5/+5, ™, … + + + + +ASCII safety test: 1lI|, 0OD, 8B + + + + +the euro symbol: 14.95 € + + + +
    +
    +Combining characters +STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ +
    +
    +Greek (in Polytonic) +
    + +The Greek anthem + +Σὲ γνωÏίζω ἀπὸ τὴν κόψη +τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ, +σὲ γνωÏίζω ἀπὸ τὴν ὄψη +ποὺ μὲ βία μετÏάει Ï„á½´ γῆ. + +᾿Απ᾿ Ï„á½° κόκκαλα βγαλμένη +τῶν ῾Ελλήνων Ï„á½° ἱεÏá½± +καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη +χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά! +
    +
    + +From a speech of Demosthenes in the 4th century BC + +Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι, +ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς +λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ +τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿ +εἰς τοῦτο Ï€Ïοήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ +Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν +οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι, +οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν +ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον +τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι +γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν +Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους +σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ +τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ +τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς +τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον. + +Δημοσθένους, Γ´ ᾿Ολυνθιακὸς +
    +
    +
    +Georgian: +From a Unicode conference invitationგთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ +კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, +ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ +ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, +ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ+áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, +ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში. +
    +
    +Russian +From a Unicode conference invitationЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по +Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. +ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального +Интернета и Unicode, локализации и интернационализации, воплощению и +применению Unicode в различных операционных ÑиÑтемах и программных +приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах. +
    +
    +Thai (UCS Level 2) +Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese +classic San Gua): +[----------------------------|------------------------] + ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่ +สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸² + ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸² +โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัภ+ เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา รับหมาป่าเข้ามาเลยอาสัภ+à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™ ใช้สาวนั้นเป็นชนวนชื่นชวนใจ + พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸ ช่างอาเพศจริงหนาฟ้าร้องไห้ +ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ +(The above is a two-column text. If combining characters are handled +correctly, the lines of the second column should be aligned with the +| character above.) +
    +
    +Ethiopian +
    +Proverbs in the Amharic language +ሰማይ አይታረስ ንጉሥ አይከሰስᢠ+ብላ ካለአእንደአባቴ በቆመጠáŠá¢ +ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢ +ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢ +የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢ +አይጥ በበላ ዳዋ ተመታᢠ+ሲተረጉሙ ይደረáŒáˆ™á¢ +ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢ +ድር ቢያብር አንበሳ ያስርᢠ+ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢ +እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢ +የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…ᢠ+ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢ +ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢ +የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካᢠ+ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢ +ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢ +እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋᢠ+
    +
    +
    +Runes +ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ +(Old English, which transcribed into Latin reads “He cwaeth that he +bude thaem lande northweardum with tha Westsae.” and means “He said +that he lived in the northern land near the Western Sea.”) +
    +
    +Braille +â¡Œâ â §â ‘ â ¼â â ’ â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌ +â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞ +â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž +â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂ +â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™ +⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑ +â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ² +⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² +â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹ +â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž +â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ • +⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹ +â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎ +â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž +â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳ +⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž +â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² +(The first couple of paragraphs of "A Christmas Carol" by Dickens) +
    +
    +Compact font selection example text +ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 +abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ +–—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд +∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Աრ+
    +
    +Greetings in various languages +Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ +
    +
    +Box drawing alignment tests + â–ˆ + â–‰ + â•”â•â•â•¦â•â•â•— ┌──┬──┠╭──┬──╮ ╭──┬──╮ â”â”â”┳â”â”┓ ┎┒â”┑ â•· â•» â”┯┓ ┌┰┠▊ ╱╲╱╲╳╳╳ + ║┌─╨─â”â•‘ │╔â•â•§â•â•—│ │╒â•â•ªâ•â••â”‚ │╓─â•â”€â•–│ ┃┌─╂─â”┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ â”╋┥ â–‹ ╲╱╲╱╳╳╳ + ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ â•¿ │┃ â”╅╆┓ ╵ ╹ â”—â”·â”› └┸┘ â–Œ ╱╲╱╲╳╳╳ + â• â•¡ ╳ â•žâ•£ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳ + ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â–Ž + ║└─╥─┘║ │╚â•â•¤â•â•â”‚ │╘â•â•ªâ•â•›â”‚ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â– + â•šâ•â•â•©â•â•â• └──┴──┘ ╰──┴──╯ ╰──┴──╯ â”—â”â”â”»â”â”â”› ▗▄▖▛▀▜ └╌╌┘ â•Ž â”—â•â•â”› ┋ â–▂▃▄▅▆▇█ + â–▀▘▙▄▟ +
    +
    diff -Nru asciidoc-8.6.10/tests/data/utf8-examples-docbook.xml asciidoc-10.1.2/tests/data/utf8-examples-docbook.xml --- asciidoc-8.6.10/tests/data/utf8-examples-docbook.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-examples-docbook.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,226 @@ + + + + + +
    + + UTF-8 encoded sample plain-text file + +Markus Kuhn [ˈmaʳkÊŠs kuËn] http://www.cl.cam.ac.uk/~mgk25/ — 2002-07-25 +The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279. +Using Unicode/UTF-8, you can write in emails and source code things such as +
    +Mathematics and sciences +∮ Eâ‹…da = Q, n → ∞, ∑ f(i) = ∠g(i), ⎧⎡⎛┌─────â”⎞⎤⎫ + ⎪⎢⎜│a²+b³ ⎟⎥⎪ +∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ + ⎪⎢⎜⎷ c₈ ⎟⎥⎪ +â„• ⊆ â„•â‚€ ⊂ ℤ ⊂ â„š ⊂ ℠⊂ â„‚, ⎨⎢⎜ ⎟⎥⎬ + ⎪⎢⎜ ∞ ⎟⎥⎪ +⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ + ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª +2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣âŽi=1 ⎠⎦⎭ +
    +
    +Linguistics and dictionaries +ði ıntəˈnæʃənÉ™l fəˈnÉ›tık É™soÊŠsiˈeıʃn +Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘] +
    +
    +APL +((Vâ³V)=â³â´V)/Vâ†,V ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ +
    +
    +Nicer typography in plain text files + + + +‘single’ and “double†quotes + + + + +Curly apostrophes: “We’ve been here†+ + + + +‚deutsche‘ „Anführungszeichen“ + + + + +†, ‡, ‰, •, 3–4, —, −5/+5, ™, … + + + + +ASCII safety test: 1lI|, 0OD, 8B + + + + +the euro symbol: 14.95 € + + + +
    +
    +Combining characters +STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ +
    +
    +Greek (in Polytonic) +
    + +The Greek anthem + +Σὲ γνωÏίζω ἀπὸ τὴν κόψη +τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ, +σὲ γνωÏίζω ἀπὸ τὴν ὄψη +ποὺ μὲ βία μετÏάει Ï„á½´ γῆ. + +᾿Απ᾿ Ï„á½° κόκκαλα βγαλμένη +τῶν ῾Ελλήνων Ï„á½° ἱεÏá½± +καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη +χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά! +
    +
    + +From a speech of Demosthenes in the 4th century BC + +Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι, +ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς +λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ +τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿ +εἰς τοῦτο Ï€Ïοήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ +Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν +οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι, +οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν +ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον +τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι +γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν +Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους +σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ +τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ +τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς +τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον. + +Δημοσθένους, Γ´ ᾿Ολυνθιακὸς +
    +
    +
    +Georgian: +From a Unicode conference invitationგთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ +კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, +ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ +ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, +ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ+áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, +ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში. +
    +
    +Russian +From a Unicode conference invitationЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по +Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. +ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального +Интернета и Unicode, локализации и интернационализации, воплощению и +применению Unicode в различных операционных ÑиÑтемах и программных +приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах. +
    +
    +Thai (UCS Level 2) +Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese +classic San Gua): +[----------------------------|------------------------] + ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่ +สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸² + ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸² +โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัภ+ เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา รับหมาป่าเข้ามาเลยอาสัภ+à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™ ใช้สาวนั้นเป็นชนวนชื่นชวนใจ + พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸ ช่างอาเพศจริงหนาฟ้าร้องไห้ +ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ +(The above is a two-column text. If combining characters are handled +correctly, the lines of the second column should be aligned with the +| character above.) +
    +
    +Ethiopian +
    +Proverbs in the Amharic language +ሰማይ አይታረስ ንጉሥ አይከሰስᢠ+ብላ ካለአእንደአባቴ በቆመጠáŠá¢ +ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢ +ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢ +የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢ +አይጥ በበላ ዳዋ ተመታᢠ+ሲተረጉሙ ይደረáŒáˆ™á¢ +ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢ +ድር ቢያብር አንበሳ ያስርᢠ+ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢ +እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢ +የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…ᢠ+ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢ +ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢ +የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካᢠ+ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢ +ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢ +እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋᢠ+
    +
    +
    +Runes +ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ +(Old English, which transcribed into Latin reads “He cwaeth that he +bude thaem lande northweardum with tha Westsae.” and means “He said +that he lived in the northern land near the Western Sea.”) +
    +
    +Braille +â¡Œâ â §â ‘ â ¼â â ’ â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌ +â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞ +â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž +â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂ +â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™ +⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑ +â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ² +⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² +â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹ +â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž +â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ • +⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹ +â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎ +â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž +â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳ +⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž +â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² +(The first couple of paragraphs of "A Christmas Carol" by Dickens) +
    +
    +Compact font selection example text +ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 +abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ +–—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд +∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Աრ+
    +
    +Greetings in various languages +Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ +
    +
    +Box drawing alignment tests + â–ˆ + â–‰ + â•”â•â•â•¦â•â•â•— ┌──┬──┠╭──┬──╮ ╭──┬──╮ â”â”â”┳â”â”┓ ┎┒â”┑ â•· â•» â”┯┓ ┌┰┠▊ ╱╲╱╲╳╳╳ + ║┌─╨─â”â•‘ │╔â•â•§â•â•—│ │╒â•â•ªâ•â••â”‚ │╓─â•â”€â•–│ ┃┌─╂─â”┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ â”╋┥ â–‹ ╲╱╲╱╳╳╳ + ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ â•¿ │┃ â”╅╆┓ ╵ ╹ â”—â”·â”› └┸┘ â–Œ ╱╲╱╲╳╳╳ + â• â•¡ ╳ â•žâ•£ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳ + ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â–Ž + ║└─╥─┘║ │╚â•â•¤â•â•â”‚ │╘â•â•ªâ•â•›â”‚ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â– + â•šâ•â•â•©â•â•â• └──┴──┘ ╰──┴──╯ ╰──┴──╯ â”—â”â”â”»â”â”â”› ▗▄▖▛▀▜ └╌╌┘ â•Ž â”—â•â•â”› ┋ â–▂▃▄▅▆▇█ + â–▀▘▙▄▟ +
    +
    diff -Nru asciidoc-8.6.10/tests/data/utf8-examples-html4.html asciidoc-10.1.2/tests/data/utf8-examples-html4.html --- asciidoc-8.6.10/tests/data/utf8-examples-html4.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-examples-html4.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,225 @@ + + + + + +UTF-8 encoded sample plain-text file + + +

    UTF-8 encoded sample plain-text file

    +

    +

    + +

    Markus Kuhn [ˈmaʳkÊŠs kuËn] http://www.cl.cam.ac.uk/~mgk25/ — 2002-07-25

    +

    The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279.

    +

    Using Unicode/UTF-8, you can write in emails and source code things such as

    +
    +

    Mathematics and sciences

    +
    ∮ Eâ‹…da = Q,  n → ∞, ∑ f(i) = ∠g(i),      ⎧⎡⎛┌─────â”⎞⎤⎫
    +                                          ⎪⎢⎜│a²+b³ ⎟⎥⎪
    +∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β),    ⎪⎢⎜│───── ⎟⎥⎪
    +                                          ⎪⎢⎜⎷ c₈   ⎟⎥⎪
    +ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℠⊂ ℂ,                   ⎨⎢⎜       ⎟⎥⎬
    +                                          ⎪⎢⎜ ∞     ⎟⎥⎪
    +⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫),      ⎪⎢⎜ ⎲     ⎟⎥⎪
    +                                          ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª
    +2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm     ⎩⎣âŽi=1    ⎠⎦⎭
    +
    +

    Linguistics and dictionaries

    +

    ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn
    +Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘]

    +
    +

    APL

    +
    ((Vâ³V)=â³â´V)/Vâ†,V    ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ
    +
    +

    Nicer typography in plain text files

    +
      +
    • +

      +‘single’ and “double†quotes +

      +
    • +
    • +

      +Curly apostrophes: “We’ve been here†+

      +
    • +
    • +

      +‚deutsche‘ „Anführungszeichen“ +

      +
    • +
    • +

      +†, ‡, ‰, •, 3–4, —, −5/+5, ™, … +

      +
    • +
    • +

      +ASCII safety test: 1lI|, 0OD, 8B +

      +
    • +
    • +

      +the euro symbol: 14.95 € +

      +
    • +
    +
    +

    Combining characters

    +

    STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑

    +
    +

    Greek (in Polytonic)

    +
    +
    Σὲ γνωÏίζω ἀπὸ τὴν κόψη
    +τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ,
    +σὲ γνωÏίζω ἀπὸ τὴν ὄψη
    +ποὺ μὲ βία μετÏάει Ï„á½´ γῆ.
    +
    +᾿Απ᾿ τὰ κόκκαλα βγαλμένη
    +τῶν ῾Ελλήνων Ï„á½° ἱεÏá½±
    +καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη
    +χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά!
    +

    +— The Greek anthem +

    +
    +
    +
    Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι,
    +ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς
    +λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ
    +τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿
    +εἰς τοῦτο Ï€Ïοήκοντα,  ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ
    +Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν
    +οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι,
    +οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν
    +ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον
    +τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι
    +γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν
    +Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους
    +σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ
    +τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ
    +τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς
    +τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον.
    +
    +Δημοσθένους, Γ´ ᾿Ολυνθιακὸς
    +

    +— From a speech of Demosthenes in the 4th century BC +

    +
    +
    +

    Georgian:

    +

    From a Unicode conference invitation
    გთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ +კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, +ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ +ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, +ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ+áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, +ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში.

    +
    +

    Russian

    +

    From a Unicode conference invitation
    ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по +Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. +ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального +Интернета и Unicode, локализации и интернационализации, воплощению и +применению Unicode в различных операционных ÑиÑтемах и программных +приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах.

    +
    +

    Thai (UCS Level 2)

    +

    Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese +classic San Gua):

    +
    [----------------------------|------------------------]
    +  ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š  พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่
    +สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป       สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸²
    +  ทรงนับถือขันทีเป็นที่พึ่ง           บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸²
    +โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา         หมายจะฆ่ามดชั่วตัวสำคัà¸
    +  เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา      รับหมาป่าเข้ามาเลยอาสัà¸
    +à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™          ใช้สาวนั้นเป็นชนวนชื่นชวนใจ
    +  พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸          ช่างอาเพศจริงหนาฟ้าร้องไห้
    +ต้องรบราฆ่าฟันจนบรรลัย           ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ
    +

    (The above is a two-column text. If combining characters are handled +correctly, the lines of the second column should be aligned with the +| character above.)

    +
    +

    Ethiopian

    +
    +

    Proverbs in the Amharic language

    +
    ሰማይ አይታረስ ንጉሥ አይከሰስá¢
    +ብላ ካለአእንደአባቴ በቆመጠáŠá¢
    +ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢
    +ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢
    +የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢
    +አይጥ በበላ ዳዋ ተመታá¢
    +ሲተረጉሙ ይደረáŒáˆ™á¢
    +ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢
    +ድር ቢያብር አንበሳ ያስርá¢
    +ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢
    +እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢
    +የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…á¢
    +ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢
    +ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢
    +የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካá¢
    +ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢
    +ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢
    +እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋá¢
    +

    +

    +
    +
    +

    Runes

    +

    ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ

    +

    (Old English, which transcribed into Latin reads “He cwaeth that he +bude thaem lande northweardum with tha Westsae.” and means “He said +that he lived in the northern land near the Western Sea.”)

    +
    +

    Braille

    +
    â¡Œâ â §â ‘ â ¼â â ’  â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌
    +
    â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞
    +â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž
    +â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂
    +â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™
    +⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑
    +â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ²
    +
    ⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ²
    +
    â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹
    +â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž
    +â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ •
    +⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹
    +â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎
    +â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž
    +â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳
    +⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž
    +â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ²
    +

    (The first couple of paragraphs of "A Christmas Carol" by Dickens)

    +
    +

    Compact font selection example text

    +
    ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789
    +abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ
    +–—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд
    +∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Ô±áƒ
    +
    +

    Greetings in various languages

    +

    Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ

    +
    +

    Box drawing alignment tests

    +
    +
                                                                          â–ˆ
    +                                                                      â–‰
    +  â•”â•â•â•¦â•â•â•—  ┌──┬──┠ ╭──┬──╮  ╭──┬──╮  â”â”â”┳â”â”┓  ┎┒â”┑   â•·  â•» â”┯┓ ┌┰┠   â–Š ╱╲╱╲╳╳╳
    +  ║┌─╨─â”â•‘  │╔â•â•§â•â•—│  │╒â•â•ªâ•â••â”‚  │╓─â•â”€â•–│  ┃┌─╂─â”┃  ┗╃╄┙  ╶┼╴╺╋╸┠┼┨ â”╋┥    â–‹ ╲╱╲╱╳╳╳
    +  ║│╲ ╱│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ â•¿ │┃  â”╅╆┓   ╵  ╹ â”—â”·â”› └┸┘    â–Œ ╱╲╱╲╳╳╳
    +  â• â•¡ ╳ â•žâ•£  ├╢   ╟┤  ├┼─┼─┼┤  ├╫─╂─╫┤  ┣┿╾┼╼┿┫  ┕┛┖┚     ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳
    +  ║│╱ ╲│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ ╽ │┃  ░░▒▒▓▓██ ┊  ┆ ╎ ╠ ┇ ┋ ▎
    +  ║└─╥─┘║  │╚â•â•¤â•â•â”‚  │╘â•â•ªâ•â•›â”‚  │╙─╀─╜│  ┃└─╂─┘┃  ░░▒▒▓▓██ ┊  ┆ â•Ž â•  ┇ ┋ â–
    +  â•šâ•â•â•©â•â•â•  └──┴──┘  ╰──┴──╯  ╰──┴──╯  â”—â”â”â”»â”â”â”›  ▗▄▖▛▀▜   └╌╌┘ â•Ž â”—â•â•â”› ┋  â–▂▃▄▅▆▇█
    +                                               â–▀▘▙▄▟
    +
    +

    +

    +

    +Last updated + 2002-11-25 00:37:42 UTC +

    + + diff -Nru asciidoc-8.6.10/tests/data/utf8-examples-html5.html asciidoc-10.1.2/tests/data/utf8-examples-html5.html --- asciidoc-8.6.10/tests/data/utf8-examples-html5.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-examples-html5.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1023 @@ + + + + + +UTF-8 encoded sample plain-text file + + + + + +
    +
    +
    +

    Markus Kuhn [ˈmaʳkÊŠs kuËn] http://www.cl.cam.ac.uk/~mgk25/ — 2002-07-25

    +

    The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279.

    +

    Using Unicode/UTF-8, you can write in emails and source code things such as

    +
    +
    +
    +

    Mathematics and sciences

    +
    +
    +
    +
    ∮ Eâ‹…da = Q,  n → ∞, ∑ f(i) = ∠g(i),      ⎧⎡⎛┌─────â”⎞⎤⎫
    +                                          ⎪⎢⎜│a²+b³ ⎟⎥⎪
    +∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β),    ⎪⎢⎜│───── ⎟⎥⎪
    +                                          ⎪⎢⎜⎷ c₈   ⎟⎥⎪
    +ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℠⊂ ℂ,                   ⎨⎢⎜       ⎟⎥⎬
    +                                          ⎪⎢⎜ ∞     ⎟⎥⎪
    +⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫),      ⎪⎢⎜ ⎲     ⎟⎥⎪
    +                                          ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª
    +2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm     ⎩⎣âŽi=1    ⎠⎦⎭
    +
    +
    +
    +
    +

    Linguistics and dictionaries

    +
    +

    ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn
    +Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘]

    +
    +
    +
    +

    APL

    +
    +
    +
    +
    ((Vâ³V)=â³â´V)/Vâ†,V    ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ
    +
    +
    +
    +
    +

    Nicer typography in plain text files

    +
    +
      +
    • +

      +‘single’ and “double†quotes +

      +
    • +
    • +

      +Curly apostrophes: “We’ve been here†+

      +
    • +
    • +

      +‚deutsche‘ „Anführungszeichen“ +

      +
    • +
    • +

      +†, ‡, ‰, •, 3–4, —, −5/+5, ™, … +

      +
    • +
    • +

      +ASCII safety test: 1lI|, 0OD, 8B +

      +
    • +
    • +

      +the euro symbol: 14.95 € +

      +
    • +
    +
    +
    +
    +

    Combining characters

    +
    +

    STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑

    +
    +
    +
    +

    Greek (in Polytonic)

    +
    +
    +
    Σὲ γνωÏίζω ἀπὸ τὴν κόψη
    +τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ,
    +σὲ γνωÏίζω ἀπὸ τὴν ὄψη
    +ποὺ μὲ βία μετÏάει Ï„á½´ γῆ.
    +
    +᾿Απ᾿ τὰ κόκκαλα βγαλμένη
    +τῶν ῾Ελλήνων Ï„á½° ἱεÏá½±
    +καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη
    +χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά!
    +
    +— The Greek anthem +
    +
    +
    Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι,
    +ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς
    +λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ
    +τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿
    +εἰς τοῦτο Ï€Ïοήκοντα,  ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ
    +Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν
    +οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι,
    +οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν
    +ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον
    +τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι
    +γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν
    +Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους
    +σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ
    +τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ
    +τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς
    +τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον.
    +
    +Δημοσθένους, Γ´ ᾿Ολυνθιακὸς
    +
    +— From a speech of Demosthenes in the 4th century BC +
    +
    +
    +
    +

    Georgian:

    +
    +
    From a Unicode conference invitation

    გთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ +კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, +ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ +ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, +ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ+áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, +ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში.

    +
    +
    +
    +

    Russian

    +
    +
    From a Unicode conference invitation

    ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по +Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. +ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального +Интернета и Unicode, локализации и интернационализации, воплощению и +применению Unicode в различных операционных ÑиÑтемах и программных +приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах.

    +
    +
    +
    +

    Thai (UCS Level 2)

    +
    +

    Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese +classic San Gua):

    +
    +
    +
    [----------------------------|------------------------]
    +  ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š  พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่
    +สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป       สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸²
    +  ทรงนับถือขันทีเป็นที่พึ่ง           บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸²
    +โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา         หมายจะฆ่ามดชั่วตัวสำคัà¸
    +  เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา      รับหมาป่าเข้ามาเลยอาสัà¸
    +à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™          ใช้สาวนั้นเป็นชนวนชื่นชวนใจ
    +  พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸          ช่างอาเพศจริงหนาฟ้าร้องไห้
    +ต้องรบราฆ่าฟันจนบรรลัย           ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ
    +
    +

    (The above is a two-column text. If combining characters are handled +correctly, the lines of the second column should be aligned with the +| character above.)

    +
    +
    +
    +

    Ethiopian

    +
    +
    +
    Proverbs in the Amharic language
    +
    ሰማይ አይታረስ ንጉሥ አይከሰስá¢
    +ብላ ካለአእንደአባቴ በቆመጠáŠá¢
    +ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢
    +ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢
    +የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢
    +አይጥ በበላ ዳዋ ተመታá¢
    +ሲተረጉሙ ይደረáŒáˆ™á¢
    +ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢
    +ድር ቢያብር አንበሳ ያስርá¢
    +ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢
    +እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢
    +የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…á¢
    +ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢
    +ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢
    +የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካá¢
    +ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢
    +ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢
    +እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋá¢
    +
    +
    +
    +
    +
    +

    Runes

    +
    +

    ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ

    +

    (Old English, which transcribed into Latin reads “He cwaeth that he +bude thaem lande northweardum with tha Westsae.” and means “He said +that he lived in the northern land near the Western Sea.”)

    +
    +
    +
    +

    Braille

    +
    +
    +
    +
    â¡Œâ â §â ‘ â ¼â â ’  â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌
    +
    +
    +
    +
    â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞
    +â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž
    +â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂
    +â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™
    +⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑
    +â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ²
    +
    +
    +
    +
    ⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ²
    +
    +
    +
    +
    â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹
    +â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž
    +â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ •
    +⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹
    +â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎
    +â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž
    +â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳
    +⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž
    +â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ²
    +
    +

    (The first couple of paragraphs of "A Christmas Carol" by Dickens)

    +
    +
    +
    +

    Compact font selection example text

    +
    +
    +
    +
    ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789
    +abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ
    +–—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд
    +∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Ô±áƒ
    +
    +
    +
    +
    +

    Greetings in various languages

    +
    +

    Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ

    +
    +
    +
    +

    Box drawing alignment tests

    +
    +
    +
    +
                                                                          â–ˆ
    +                                                                      â–‰
    +  â•”â•â•â•¦â•â•â•—  ┌──┬──┠ ╭──┬──╮  ╭──┬──╮  â”â”â”┳â”â”┓  ┎┒â”┑   â•·  â•» â”┯┓ ┌┰┠   â–Š ╱╲╱╲╳╳╳
    +  ║┌─╨─â”â•‘  │╔â•â•§â•â•—│  │╒â•â•ªâ•â••â”‚  │╓─â•â”€â•–│  ┃┌─╂─â”┃  ┗╃╄┙  ╶┼╴╺╋╸┠┼┨ â”╋┥    â–‹ ╲╱╲╱╳╳╳
    +  ║│╲ ╱│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ â•¿ │┃  â”╅╆┓   ╵  ╹ â”—â”·â”› └┸┘    â–Œ ╱╲╱╲╳╳╳
    +  â• â•¡ ╳ â•žâ•£  ├╢   ╟┤  ├┼─┼─┼┤  ├╫─╂─╫┤  ┣┿╾┼╼┿┫  ┕┛┖┚     ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳
    +  ║│╱ ╲│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ ╽ │┃  ░░▒▒▓▓██ ┊  ┆ ╎ ╠ ┇ ┋ ▎
    +  ║└─╥─┘║  │╚â•â•¤â•â•â”‚  │╘â•â•ªâ•â•›â”‚  │╙─╀─╜│  ┃└─╂─┘┃  ░░▒▒▓▓██ ┊  ┆ â•Ž â•  ┇ ┋ â–
    +  â•šâ•â•â•©â•â•â•  └──┴──┘  ╰──┴──╯  ╰──┴──╯  â”—â”â”â”»â”â”â”›  ▗▄▖▛▀▜   └╌╌┘ â•Ž â”—â•â•â”› ┋  â–▂▃▄▅▆▇█
    +                                               â–▀▘▙▄▟
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/data/utf8-examples.txt asciidoc-10.1.2/tests/data/utf8-examples.txt --- asciidoc-8.6.10/tests/data/utf8-examples.txt 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-examples.txt 1970-01-01 00:00:00.000000000 +0000 @@ -1,217 +0,0 @@ -UTF-8 encoded sample plain-text file -==================================== - -Markus Kuhn [ˈmaʳkÊŠs kuËn] — 2002-07-25 - - -The ASCII compatible UTF-8 encoding used in this plain-text file -is defined in Unicode, ISO 10646-1, and RFC 2279. - - -Using Unicode/UTF-8, you can write in emails and source code things such as - -== Mathematics and sciences - - ∮ Eâ‹…da = Q, n → ∞, ∑ f(i) = ∠g(i), ⎧⎡⎛┌─────â”⎞⎤⎫ - ⎪⎢⎜│a²+b³ ⎟⎥⎪ - ∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ - ⎪⎢⎜⎷ c₈ ⎟⎥⎪ - â„• ⊆ â„•â‚€ ⊂ ℤ ⊂ â„š ⊂ ℠⊂ â„‚, ⎨⎢⎜ ⎟⎥⎬ - ⎪⎢⎜ ∞ ⎟⎥⎪ - ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ - ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª - 2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣âŽi=1 ⎠⎦⎭ - - -== Linguistics and dictionaries - -ði ıntəˈnæʃənÉ™l fəˈnÉ›tık É™soÊŠsiˈeıʃn + -Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘] - - -== APL - - ((Vâ³V)=â³â´V)/Vâ†,V ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ - - -== Nicer typography in plain text files - -- ‘single’ and “double†quotes -- Curly apostrophes: “We’ve been here†-- ‚deutsche‘ „Anführungszeichen“ -- †, ‡, ‰, •, 3–4, —, −5/+5, â„¢, … -- ASCII safety test: 1lI|, 0OD, 8B -- the euro symbol: 14.95 € - - -== Combining characters - -STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ - -== Greek (in Polytonic) - -[verse, The Greek anthem] -________________________________ -Σὲ γνωÏίζω ἀπὸ τὴν κόψη -τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ, -σὲ γνωÏίζω ἀπὸ τὴν ὄψη -ποὺ μὲ βία μετÏάει Ï„á½´ γῆ. - -᾿Απ᾿ Ï„á½° κόκκαλα βγαλμένη -τῶν ῾Ελλήνων Ï„á½° ἱεÏá½± -καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη -χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά! -________________________________ - -[verse,From a speech of Demosthenes in the 4th century BC] -______________________________________________________________ -Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι, -ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς -λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ -τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿ -εἰς τοῦτο Ï€Ïοήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ -Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν -οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι, -οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν -ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον -τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι -γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν -Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους -σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ -τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ -τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς -τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον. - -Δημοσθένους, Γ´ ᾿Ολυνθιακὸς -______________________________________________________________ - - -== Georgian: - -.From a Unicode conference invitation -გთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ -კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, -ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ -ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, -ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ-áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, -ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში. - - -== Russian - -.From a Unicode conference invitation -ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по -Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. -ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального -Интернета и Unicode, локализации и интернационализации, воплощению и -применению Unicode в различных операционных ÑиÑтемах и программных -приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах. - - -== Thai (UCS Level 2) - -Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese -classic 'San Gua'): - - [----------------------------|------------------------] - ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่ - สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸² - ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸² - โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัภ- เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา รับหมาป่าเข้ามาเลยอาสัภ- à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™ ใช้สาวนั้นเป็นชนวนชื่นชวนใจ - พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸ ช่างอาเพศจริงหนาฟ้าร้องไห้ - ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ - -(The above is a two-column text. If combining characters are handled -correctly, the lines of the second column should be aligned with the -| character above.) - - -== Ethiopian - -.Proverbs in the Amharic language -[verse] -ሰማይ አይታረስ ንጉሥ አይከሰስᢠ-ብላ ካለአእንደአባቴ በቆመጠáŠá¢ -ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢ -ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢ -የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢ -አይጥ በበላ ዳዋ ተመታᢠ-ሲተረጉሙ ይደረáŒáˆ™á¢ -ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢ -ድር ቢያብር አንበሳ ያስርᢠ-ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢ -እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢ -የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…ᢠ-ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢ -ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢ -የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካᢠ-ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢ -ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢ -እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋᢠ- - -== Runes - -ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ - -(Old English, which transcribed into Latin reads ``He cwaeth that he -bude thaem lande northweardum with tha Westsae.'' and means ``He said -that he lived in the northern land near the Western Sea.'') - - -== Braille - - â¡Œâ â §â ‘ â ¼â â ’ â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌ - - â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞ - â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž - â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂ - â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™ - ⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑ - â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ² - - ⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² - - â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹ - â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž - â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ • - ⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹ - â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎ - â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž - â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳ - ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž - â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² - -(The first couple of paragraphs of "A Christmas Carol" by Dickens) - - -== Compact font selection example text - - ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 - abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ - –—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд - ∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Աრ- - -== Greetings in various languages - -Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ - - -== Box drawing alignment tests - ---------------------------------------------------------------------- - â–ˆ - â–‰ - â•”â•â•â•¦â•â•â•— ┌──┬──┠╭──┬──╮ ╭──┬──╮ â”â”â”┳â”â”┓ ┎┒â”┑ â•· â•» â”┯┓ ┌┰┠▊ ╱╲╱╲╳╳╳ - ║┌─╨─â”â•‘ │╔â•â•§â•â•—│ │╒â•â•ªâ•â••â”‚ │╓─â•â”€â•–│ ┃┌─╂─â”┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ â”╋┥ â–‹ ╲╱╲╱╳╳╳ - ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ â•¿ │┃ â”╅╆┓ ╵ ╹ â”—â”·â”› └┸┘ â–Œ ╱╲╱╲╳╳╳ - â• â•¡ ╳ â•žâ•£ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳ - ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â–Ž - ║└─╥─┘║ │╚â•â•¤â•â•â”‚ │╘â•â•ªâ•â•›â”‚ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â– - â•šâ•â•â•©â•â•â• └──┴──┘ ╰──┴──╯ ╰──┴──╯ â”—â”â”â”»â”â”â”› ▗▄▖▛▀▜ └╌╌┘ â•Ž â”—â•â•â”› ┋ â–▂▃▄▅▆▇█ - â–▀▘▙▄▟ ---------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/tests/data/utf8-examples-xhtml11.html asciidoc-10.1.2/tests/data/utf8-examples-xhtml11.html --- asciidoc-8.6.10/tests/data/utf8-examples-xhtml11.html 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/data/utf8-examples-xhtml11.html 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,1025 @@ + + + + + + +UTF-8 encoded sample plain-text file + + + + + +
    +
    +
    +

    Markus Kuhn [ˈmaʳkÊŠs kuËn] http://www.cl.cam.ac.uk/~mgk25/ — 2002-07-25

    +

    The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279.

    +

    Using Unicode/UTF-8, you can write in emails and source code things such as

    +
    +
    +
    +

    Mathematics and sciences

    +
    +
    +
    +
    ∮ Eâ‹…da = Q,  n → ∞, ∑ f(i) = ∠g(i),      ⎧⎡⎛┌─────â”⎞⎤⎫
    +                                          ⎪⎢⎜│a²+b³ ⎟⎥⎪
    +∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β),    ⎪⎢⎜│───── ⎟⎥⎪
    +                                          ⎪⎢⎜⎷ c₈   ⎟⎥⎪
    +ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℠⊂ ℂ,                   ⎨⎢⎜       ⎟⎥⎬
    +                                          ⎪⎢⎜ ∞     ⎟⎥⎪
    +⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫),      ⎪⎢⎜ ⎲     ⎟⎥⎪
    +                                          ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª
    +2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm     ⎩⎣âŽi=1    ⎠⎦⎭
    +
    +
    +
    +
    +

    Linguistics and dictionaries

    +
    +

    ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn
    +Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘]

    +
    +
    +
    +

    APL

    +
    +
    +
    +
    ((Vâ³V)=â³â´V)/Vâ†,V    ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ
    +
    +
    +
    +
    +

    Nicer typography in plain text files

    +
    +
      +
    • +

      +‘single’ and “double†quotes +

      +
    • +
    • +

      +Curly apostrophes: “We’ve been here†+

      +
    • +
    • +

      +‚deutsche‘ „Anführungszeichen“ +

      +
    • +
    • +

      +†, ‡, ‰, •, 3–4, —, −5/+5, ™, … +

      +
    • +
    • +

      +ASCII safety test: 1lI|, 0OD, 8B +

      +
    • +
    • +

      +the euro symbol: 14.95 € +

      +
    • +
    +
    +
    +
    +

    Combining characters

    +
    +

    STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑

    +
    +
    +
    +

    Greek (in Polytonic)

    +
    +
    +
    Σὲ γνωÏίζω ἀπὸ τὴν κόψη
    +τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ,
    +σὲ γνωÏίζω ἀπὸ τὴν ὄψη
    +ποὺ μὲ βία μετÏάει Ï„á½´ γῆ.
    +
    +᾿Απ᾿ τὰ κόκκαλα βγαλμένη
    +τῶν ῾Ελλήνων Ï„á½° ἱεÏá½±
    +καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη
    +χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά!
    +
    +— The Greek anthem +
    +
    +
    Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι,
    +ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς
    +λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ
    +τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿
    +εἰς τοῦτο Ï€Ïοήκοντα,  ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ
    +Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν
    +οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι,
    +οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν
    +ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον
    +τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι
    +γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν
    +Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους
    +σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ
    +τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ
    +τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς
    +τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον.
    +
    +Δημοσθένους, Γ´ ᾿Ολυνθιακὸς
    +
    +— From a speech of Demosthenes in the 4th century BC +
    +
    +
    +
    +

    Georgian:

    +
    +
    From a Unicode conference invitation

    გთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ +კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, +ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ +ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, +ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ+áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, +ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში.

    +
    +
    +
    +

    Russian

    +
    +
    From a Unicode conference invitation

    ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по +Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. +ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального +Интернета и Unicode, локализации и интернационализации, воплощению и +применению Unicode в различных операционных ÑиÑтемах и программных +приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах.

    +
    +
    +
    +

    Thai (UCS Level 2)

    +
    +

    Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese +classic San Gua):

    +
    +
    +
    [----------------------------|------------------------]
    +  ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š  พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่
    +สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป       สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸²
    +  ทรงนับถือขันทีเป็นที่พึ่ง           บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸²
    +โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา         หมายจะฆ่ามดชั่วตัวสำคัà¸
    +  เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา      รับหมาป่าเข้ามาเลยอาสัà¸
    +à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™          ใช้สาวนั้นเป็นชนวนชื่นชวนใจ
    +  พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸          ช่างอาเพศจริงหนาฟ้าร้องไห้
    +ต้องรบราฆ่าฟันจนบรรลัย           ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ
    +
    +

    (The above is a two-column text. If combining characters are handled +correctly, the lines of the second column should be aligned with the +| character above.)

    +
    +
    +
    +

    Ethiopian

    +
    +
    +
    Proverbs in the Amharic language
    +
    ሰማይ አይታረስ ንጉሥ አይከሰስá¢
    +ብላ ካለአእንደአባቴ በቆመጠáŠá¢
    +ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢
    +ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢
    +የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢
    +አይጥ በበላ ዳዋ ተመታá¢
    +ሲተረጉሙ ይደረáŒáˆ™á¢
    +ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢
    +ድር ቢያብር አንበሳ ያስርá¢
    +ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢
    +እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢
    +የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…á¢
    +ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢
    +ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢
    +የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካá¢
    +ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢
    +ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢
    +እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋá¢
    +
    +
    +
    +
    +
    +

    Runes

    +
    +

    ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ

    +

    (Old English, which transcribed into Latin reads “He cwaeth that he +bude thaem lande northweardum with tha Westsae.” and means “He said +that he lived in the northern land near the Western Sea.”)

    +
    +
    +
    +

    Braille

    +
    +
    +
    +
    â¡Œâ â §â ‘ â ¼â â ’  â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌
    +
    +
    +
    +
    â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞
    +â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž
    +â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂
    +â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™
    +⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑
    +â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ²
    +
    +
    +
    +
    ⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ²
    +
    +
    +
    +
    â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹
    +â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž
    +â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ •
    +⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹
    +â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎
    +â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž
    +â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳
    +⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž
    +â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ²
    +
    +

    (The first couple of paragraphs of "A Christmas Carol" by Dickens)

    +
    +
    +
    +

    Compact font selection example text

    +
    +
    +
    +
    ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789
    +abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ
    +–—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд
    +∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Ô±áƒ
    +
    +
    +
    +
    +

    Greetings in various languages

    +
    +

    Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ

    +
    +
    +
    +

    Box drawing alignment tests

    +
    +
    +
    +
                                                                          â–ˆ
    +                                                                      â–‰
    +  â•”â•â•â•¦â•â•â•—  ┌──┬──┠ ╭──┬──╮  ╭──┬──╮  â”â”â”┳â”â”┓  ┎┒â”┑   â•·  â•» â”┯┓ ┌┰┠   â–Š ╱╲╱╲╳╳╳
    +  ║┌─╨─â”â•‘  │╔â•â•§â•â•—│  │╒â•â•ªâ•â••â”‚  │╓─â•â”€â•–│  ┃┌─╂─â”┃  ┗╃╄┙  ╶┼╴╺╋╸┠┼┨ â”╋┥    â–‹ ╲╱╲╱╳╳╳
    +  ║│╲ ╱│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ â•¿ │┃  â”╅╆┓   ╵  ╹ â”—â”·â”› └┸┘    â–Œ ╱╲╱╲╳╳╳
    +  â• â•¡ ╳ â•žâ•£  ├╢   ╟┤  ├┼─┼─┼┤  ├╫─╂─╫┤  ┣┿╾┼╼┿┫  ┕┛┖┚     ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳
    +  ║│╱ ╲│║  │║   ║│  ││ │ ││  │║ ┃ ║│  ┃│ ╽ │┃  ░░▒▒▓▓██ ┊  ┆ ╎ ╠ ┇ ┋ ▎
    +  ║└─╥─┘║  │╚â•â•¤â•â•â”‚  │╘â•â•ªâ•â•›â”‚  │╙─╀─╜│  ┃└─╂─┘┃  ░░▒▒▓▓██ ┊  ┆ â•Ž â•  ┇ ┋ â–
    +  â•šâ•â•â•©â•â•â•  └──┴──┘  ╰──┴──╯  ╰──┴──╯  â”—â”â”â”»â”â”â”›  ▗▄▖▛▀▜   └╌╌┘ â•Ž â”—â•â•â”› ┋  â–▂▃▄▅▆▇█
    +                                               â–▀▘▙▄▟
    +
    +
    +
    +
    +

    + + + diff -Nru asciidoc-8.6.10/tests/inputs/article-docinfo.xml asciidoc-10.1.2/tests/inputs/article-docinfo.xml --- asciidoc-8.6.10/tests/inputs/article-docinfo.xml 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/article-docinfo.xml 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,87 @@ + + + + + Dr + Lois + Common-Denominator + + Director, M. Behn School of Coop. Eng. + Director of Cooperative Efforts + The Marguerite Behn International School of + Cooperative Engineering + + + + + Mr + Steven + Norman + T + + ATI + Senior Application Analyst + Foobar, Inc. + Application Development + + + + + Peter + Pan + Sr. + Spiderman + + + Peter's a super hero in his spare time. + + + + + + + 2009 + Behn International + + + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + + + + + 1.1 + May 2009 + PP + + Updates. + + + + 1.0 + October 2003 + PP + + First release. + + + diff -Nru asciidoc-8.6.10/tests/inputs/article.txt asciidoc-10.1.2/tests/inputs/article.txt --- asciidoc-8.6.10/tests/inputs/article.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/article.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,139 @@ +The Article Title +================= +Author's Name +v1.0, 2003-12 + + +This is the optional preamble (an untitled section body). Useful for +writing simple sectionless documents consisting only of a preamble. + +NOTE: The abstract, preface, appendix, bibliography, glossary and +index section titles are significant ('specialsections'). + + +:numbered!: +[abstract] +Example Abstract +---------------- +The optional abstract (one or more paragraphs) goes here. + +This document is an AsciiDoc article skeleton containing briefly +annotated element placeholders plus a couple of example index entries +and footnotes. + +:numbered: + +The First Section +----------------- +Article sections start at level 1 and can be nested up to four levels +deep. +footnote:[An example footnote.] +indexterm:[Example index entry] + +And now for something completely different: ((monkeys)), lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. +(((Big cats,Lions))) +(((Big cats,Tigers,Bengal Tiger))) +(((Big cats,Tigers,Siberian Tiger))) +Note that multi-entry terms generate separate index entries. + +Here are a couple of image examples: an image:images/smallnew.png[] +example inline image followed by an example block image: + +.Tiger block image +image::images/tiger.png[Tiger image] + +Followed by an example table: + +.An example table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +.An example example +=============================================== +Lorum ipum... +=============================================== + +[[X1]] +Sub-section with Anchor +~~~~~~~~~~~~~~~~~~~~~~~ +Sub-section at level 2. + +A Nested Sub-section +^^^^^^^^^^^^^^^^^^^^ +Sub-section at level 3. + +Yet another nested Sub-section +++++++++++++++++++++++++++++++ +Sub-section at level 4. + +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +footnote:[A second example footnote.] + + +The Second Section +------------------ +Article sections are at level 1 and can contain sub-sections nested up +to four deep. + +An example link to anchor at start of the <>. +indexterm:[Second example index entry] + +An example link to a bibliography entry <>. + + +:numbered!: + +[appendix] +Example Appendix +---------------- +AsciiDoc article appendices are just just article sections with +'specialsection' titles. + +Appendix Sub-section +~~~~~~~~~~~~~~~~~~~~ +Appendix sub-section at level 2. + + +[bibliography] +Example Bibliography +-------------------- +The bibliography list is a style of AsciiDoc bulleted list. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +[glossary] +Example Glossary +---------------- +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::backend-docbook[] +[index] +Example Index +------------- +//////////////////////////////////////////////////////////////// +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::backend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/asciidoc.1.txt asciidoc-10.1.2/tests/inputs/asciidoc.1.txt --- asciidoc-8.6.10/tests/inputs/asciidoc.1.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/asciidoc.1.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,237 @@ +ASCIIDOC(1) +=========== +:doctype: manpage + + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + + +SYNOPSIS +-------- +*asciidoc* ['OPTIONS'] 'FILE' + + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + + +OPTIONS +------- +*-a, --attribute*='ATTRIBUTE':: + Define or delete document attribute. 'ATTRIBUTE' is formatted like + 'NAME=VALUE'. Command-line attributes take precedence over + document and configuration file attributes. Alternate acceptable + forms are 'NAME' (the 'VALUE' defaults to an empty string); + 'NAME!' (delete the 'NAME' attribute); 'NAME=VALUE@' (do not override + document or configuration file attributes). Values containing + spaces should be enclosed in double-quote characters. This option + may be specified more than once. A special attribute named + 'trace' controls the output of diagnostic information. + +*-b, --backend*='BACKEND':: + Backend output file format: 'docbook45', 'docbook5', 'xhtml11', 'html4', + 'html5', 'slidy', 'wordpress' or 'latex' (the 'latex' backend is + experimental). You can also use the backend alias names 'html' + (aliased to 'xhtml11') or 'docbook' (aliased to 'docbook45'). + Defaults to 'html'. The *--backend* option is also used to manage + backend plugins (see <>). + +*-f, --conf-file*='CONF_FILE':: + Use configuration file 'CONF_FILE'.Configuration files processed + in command-line order (after implicit configuration files). This + option may be specified more than once. + +*--doctest*:: + Run Python doctests in 'asciidoc' module. + +*-d, --doctype*='DOCTYPE':: + Document type: 'article', 'manpage' or 'book'. The 'book' document + type is only supported by the 'docbook' backends. Default document + type is 'article'. + +*-c, --dump-conf*:: + Dump configuration to stdout. + +*--filter*='FILTER':: + Specify the name of a filter to be loaded (used to load filters + that are not auto-loaded). This option may be specified more than + once. The *--filter* option is also used to manage filter plugins + (see <>). + +*-h, --help* ['TOPIC']:: + Print help TOPIC. *--help* 'topics' will print a list of help + topics, *--help* 'syntax' summarizes AsciiDoc syntax, + *--help* 'manpage' prints the AsciiDoc manpage. + +*-e, --no-conf*:: + Exclude implicitly loaded configuration files except for those + named like the input file ('infile.conf' and + 'infile-backend.conf'). + +*-s, --no-header-footer*:: + Suppress document header and footer output. + +*-o, --out-file*='OUT_FILE':: + Write output to file 'OUT_FILE'. Defaults to the base name of + input file with 'backend' extension. If the input is stdin then + the outfile defaults to stdout. If 'OUT_FILE' is '-' then the + standard output is used. + +*-n, --section-numbers*:: + Auto-number HTML article section titles. Synonym for + *--attribute numbered*. + +*--safe*:: + Enable safe mode. Safe mode is disabled by default. AsciiDoc + 'safe mode' skips potentially dangerous scripted sections in + AsciiDoc source files. + +*--theme*='THEME':: + Specify a theme name. Synonym for *--attribute theme*='THEME'. + The *--theme* option is also used to manage theme plugins (see + <>). + +*-v, --verbose*:: + Verbosely print processing information and configuration file + checks to stderr. + +*--version*:: + Print program version number. + + +[[X1]] +PLUGIN COMMANDS +--------------- +The asciidoc(1) *--filter*, *--backend* and *--theme* options are used +to install, remove and list AsciiDoc filter, backend and theme +plugins. Syntax: + + asciidoc OPTION install ZIP_FILE [PLUGINS_DIR] + asciidoc OPTION remove PLUGIN_NAME [PLUGINS_DIR] + asciidoc OPTION list + asciidoc OPTION build ZIP_FILE PLUGIN_SOURCE + +Where: + +*OPTION*:: + asciidoc(1) *--filter*, *--backend* or *--theme* option specifying + the type of plugin. + +*PLUGIN_NAME*:: + A unique plugin name containing only alphanumeric or underscore + characters. + +*ZIP_FILE*:: + A Zip file containing plugin resources, the name must start with the + plugin name e.g. `my_filter-1.0.zip` packages filter `my_filter`. + +*PLUGINS_DIR*:: + The directory containing installed plugins. Each plugin is contained + in its own separate subdirectory which has the same name as the + plugin. + *PLUGINS_DIR* defaults to the `$HOME/.asciidoc/filters` (for + filter plugins) or `$HOME/.asciidoc/backends` (for backend plugins) or + `$HOME/.asciidoc/themes` (for theme plugins). + +*PLUGIN_SOURCE*:: + The name of a directory containing the plugin source files or the + name of a single source file. + +The plugin commands perform as follows: + +*install*:: + Create a subdirectory in *PLUGINS_DIR* with the same name as the + plugin then extract the *ZIP_FILE* into it. + +*remove*:: + Delete the *PLUGIN_NAME* plugin subdirectory and all its contents + from the *PLUGINS_DIR*. + +*list*:: + List the names and locations of all installed filter or theme + plugins (including standard plugins installed in the global + configuration directory). + +*build*:: + Create a plugin file named *ZIP_FILE* containing the files and + subdirectories specified by *PLUGIN_SOURCE*. File and directory + names starting with a period are skipped. + + +ENVIRONMENT VARIABLES +--------------------- + +*`SOURCE_DATE_EPOCH`*:: + If the `SOURCE_DATE_EPOCH` environment variable is set to a UNIX + timestamp, then the `{docdate}`, `{doctime}`, `{localdate}`, and + `{localtime}` attributes are computed in the UTC time zone, with any + timestamps newer than `SOURCE_DATE_EPOCH` replaced by + `SOURCE_DATE_EPOCH`. (This helps software using AsciiDoc to build + reproducibly.) + + +EXAMPLES +-------- +`asciidoc asciidoc_file_name.txt`:: + Simply generate an html file from the asciidoc_file_name.txt that is in + current directory using asciidoc. + +`asciidoc -b html5 asciidoc_file_name.txt`:: + Use the `-b` switch to use one of the proposed backend or another one you + installed on your computer. + +`asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt`:: + Use the `-a` switch to set attributes from command-line. AsciiDoc generated + its stand-alone HTML user guide containing embedded CSS, JavaScript and + images from the AsciiDoc article template with this command. + +`asciidoc -b html5 -d manpage asciidoc.1.txt`:: + Generating the asciidoc manpage using the html5 backend. + + +EXIT STATUS +----------- +*0*:: + Success + +*1*:: + Failure (syntax or usage error; configuration error; document + processing failure; unexpected error). + + +BUGS +---- +See the AsciiDoc distribution BUGS file. + + +AUTHOR +------ +AsciiDoc was originally written by Stuart Rackham. Many people have +contributed to it. + + +RESOURCES +--------- +GitHub: + +Main web site: + + +SEE ALSO +-------- +a2x(1) + + +COPYING +------- +Copyright \(C) 2002-2013 Stuart Rackham. + +Copyright \(C) 2013-2020 AsciiDoc Contributors. + +Free use of this software is granted under the terms of the GNU General +Public License version 2 (GPLv2). + diff -Nru asciidoc-8.6.10/tests/inputs/asciidoc.conf asciidoc-10.1.2/tests/inputs/asciidoc.conf --- asciidoc-8.6.10/tests/inputs/asciidoc.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/asciidoc.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,7 @@ +# +# Customization for AsciiDoc documentation. +# +[specialwords] +ifndef::doctype-manpage[] +monospacedwords=\\?\basciidoc\(1\) \\?\ba2x\(1\) +endif::doctype-manpage[] diff -Nru asciidoc-8.6.10/tests/inputs/asciidoc.txt asciidoc-10.1.2/tests/inputs/asciidoc.txt --- asciidoc-8.6.10/tests/inputs/asciidoc.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/asciidoc.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,6096 @@ +AsciiDoc User Guide +=================== +AsciiDoc.py Team +:toc: +:icons: +:numbered: +:website: https://asciidoc.org/ + +AsciiDoc is a text document format for writing notes, documentation, +articles, books, ebooks, slideshows, web pages, blogs and UNIX man +pages. AsciiDoc files can be translated to many formats including +HTML, PDF, EPUB, man page. AsciiDoc is highly configurable: both the +AsciiDoc source file syntax and the backend output markups (which can +be almost any type of SGML/XML markup) can be customized and extended +by the user. + +[WARNING] +This user guide is for AsciiDoc.py, which is a legacy processor for +this syntax, handling an older rendition of AsciiDoc. As such, this +will not properly handle the +https://projects.eclipse.org/projects/technology.asciidoc[current AsciiDoc specification]. +It is suggested that unless you specifically require the AsciiDoc.py +toolchain, you should find a processor that handles the modern +AsciiDoc syntax. + +.This document +********************************************************************** +This is an overly large document, it probably needs to be refactored +into a Tutorial, Quick Reference and Formal Reference. + +If you're new to AsciiDoc read this section and the <> section and take a look at the example AsciiDoc (`*.txt`) +source files in the distribution `doc` directory. +********************************************************************** + + +Introduction +------------ +AsciiDoc is a plain text human readable/writable document format that +can be translated to DocBook or HTML using the asciidoc(1) command. +You can then either use asciidoc(1) generated HTML directly or run +asciidoc(1) DocBook output through your favorite DocBook toolchain or +use the AsciiDoc a2x(1) toolchain wrapper to produce PDF, EPUB, DVI, +LaTeX, PostScript, man page, HTML and text formats. + +The AsciiDoc format is a useful presentation format in its own right: +AsciiDoc markup is simple, intuitive and as such is easily proofed and +edited. + +AsciiDoc is light weight: it consists of a single Python script and a +bunch of configuration files. Apart from asciidoc(1) and a Python +interpreter, no other programs are required to convert AsciiDoc text +files to DocBook or HTML. See <> +below. + +Text markup conventions tend to be a matter of (often strong) personal +preference: if the default syntax is not to your liking you can define +your own by editing the text based asciidoc(1) configuration files. +You can also create configuration files to translate AsciiDoc +documents to almost any SGML/XML markup. + +asciidoc(1) comes with a set of configuration files to translate +AsciiDoc articles, books and man pages to HTML or DocBook backend +formats. + +.My AsciiDoc Itch +********************************************************************** +DocBook has emerged as the de facto standard Open Source documentation +format. But DocBook is a complex language, the markup is difficult to +read and even more difficult to write directly -- I found I was +spending more time typing markup tags, consulting reference manuals +and fixing syntax errors, than I was writing the documentation. +********************************************************************** + + +[[X6]] +Getting Started +--------------- +Installing AsciiDoc +~~~~~~~~~~~~~~~~~~~ +See the `README` and `INSTALL` files for install prerequisites and +procedures. Packagers take a look at <>. + +[[X11]] +Example AsciiDoc Documents +~~~~~~~~~~~~~~~~~~~~~~~~~~ +The best way to quickly get a feel for AsciiDoc is to view the +AsciiDoc web site and/or distributed examples: + +- Take a look at the linked examples on the AsciiDoc web site home + page {website}. Press the 'Page Source' sidebar menu item to view + corresponding AsciiDoc source. +- Read the `*.txt` source files in the distribution `./doc` directory + along with the corresponding HTML and DocBook XML files. + + +AsciiDoc Document Types +----------------------- +There are three types of AsciiDoc documents: article, book and +manpage. All document types share the same AsciiDoc format with some +minor variations. If you are familiar with DocBook you will have +noticed that AsciiDoc document types correspond to the same-named +DocBook document types. + +Use the asciidoc(1) `-d` (`--doctype`) option to specify the AsciiDoc +document type -- the default document type is 'article'. + +By convention the `.txt` file extension is used for AsciiDoc document +source files. + +article +~~~~~~~ +Used for short documents, articles and general documentation. See the +AsciiDoc distribution `./doc/article.txt` example. + +AsciiDoc defines standard DocBook article frontmatter and backmatter +<> (appendix, abstract, bibliography, +glossary, index). + +book +~~~~ +Books share the same format as articles, with the following +differences: + +- The part titles in multi-part books are <> + (same level as book title). +- Some sections are book specific e.g. preface and colophon. + +Book documents will normally be used to produce DocBook output since +DocBook processors can automatically generate footnotes, table of +contents, list of tables, list of figures, list of examples and +indexes. + +AsciiDoc defines standard DocBook book frontmatter and backmatter +<> (appendix, dedication, preface, +bibliography, glossary, index, colophon). + +.Example book documents +Book:: + The `./doc/book.txt` file in the AsciiDoc distribution. + +Multi-part book:: + The `./doc/book-multi.txt` file in the AsciiDoc distribution. + +manpage +~~~~~~~ +Used to generate roff format UNIX manual pages. AsciiDoc manpage +documents observe special header title and section naming conventions +-- see the <> section for details. + +AsciiDoc defines the 'synopsis' <> to +generate the DocBook `refsynopsisdiv` section. + +See also the asciidoc(1) man page source (`./doc/asciidoc.1.txt`) from +the AsciiDoc distribution. + + +[[X5]] +AsciiDoc Backends +----------------- +The asciidoc(1) command translates an AsciiDoc formatted file to the +backend format specified by the `-b` (`--backend`) command-line +option. asciidoc(1) itself has little intrinsic knowledge of backend +formats, all translation rules are contained in customizable cascading +configuration files. Backend specific attributes are listed in the +<> section. + +docbook45:: + Outputs DocBook XML 4.5 markup. + +docbook5:: + Outputs DocBook XML 5.0 markup. + +html4:: + This backend generates plain HTML 4.01 Transitional markup. + +xhtml11:: + This backend generates XHTML 1.1 markup styled with CSS2. Output + files have an `.html` extension. + +html5:: + This backend generates HTML 5 markup, apart from the inclusion of + <> it is functionally identical to + the 'xhtml11' backend. + +slidy:: + Use this backend to generate self-contained + https://www.w3.org/Talks/Tools/Slidy2[Slidy] HTML slideshows for + your web browser from AsciiDoc documents. The Slidy backend is + documented in the distribution `doc/slidy.txt` file and + {website}slidy.html[online]. + +wordpress:: + A minor variant of the 'html4' backend to support + https://srackham.wordpress.com/blogpost1/[blogpost]. + +latex:: + Experimental LaTeX backend. + +Backend Aliases +~~~~~~~~~~~~~~~ +Backend aliases are alternative names for AsciiDoc backends. AsciiDoc +comes with two backend aliases: 'html' (aliased to 'xhtml11') and +'docbook' (aliased to 'docbook45'). + +You can assign (or reassign) backend aliases by setting an AsciiDoc +attribute named like `backend-alias-` to an AsciiDoc backend +name. For example, the following backend alias attribute definitions +appear in the `[attributes]` section of the global `asciidoc.conf` +configuration file: + + backend-alias-html=xhtml11 + backend-alias-docbook=docbook45 + +[[X100]] +Backend Plugins +~~~~~~~~~~~~~~~ +The asciidoc(1) `--backend` option is also used to install and manage +backend <>. + +- A backend plugin is used just like the built-in backends. +- Backend plugins <> over built-in backends with + the same name. +- You can use the `{asciidoc-confdir}` <> to + refer to the built-in backend configuration file location from + backend plugin configuration files. +- You can use the `{backend-confdir}` <> to + refer to the backend plugin configuration file location. +- By default backends plugins are installed in + `$HOME/.asciidoc/backends/` where `` is the + backend name. + + +DocBook +------- +AsciiDoc generates 'article', 'book' and 'refentry' +https://docbook.org/[DocBook] documents (corresponding to the +AsciiDoc 'article', 'book' and 'manpage' document types). + +Most Linux distributions come with conversion tools (collectively +called a toolchain) for <> to +presentation formats such as Postscript, HTML, PDF, EPUB, DVI, +PostScript, LaTeX, roff (the native man page format), HTMLHelp, +JavaHelp and text. There are also programs that allow you to view +DocBook files directly, for example +https://wiki.gnome.org/action/show/Apps/Yelp[Yelp] (the GNOME help +viewer). + +[[X12]] +Converting DocBook to other file formats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +DocBook files are validated, parsed and translated various +presentation file formats using a combination of applications +collectively called a DocBook 'tool chain'. The function of a tool +chain is to read the DocBook markup (produced by AsciiDoc) and +transform it to a presentation format (for example HTML, PDF, HTML +Help, EPUB, DVI, PostScript, LaTeX). + +A wide range of user output format requirements coupled with a choice +of available tools and stylesheets results in many valid tool chain +combinations. + +[[X43]] +a2x Toolchain Wrapper +~~~~~~~~~~~~~~~~~~~~~ +One of the biggest hurdles for new users is installing, configuring +and using a DocBook XML toolchain. `a2x(1)` can help -- it's a +toolchain wrapper command that will generate XHTML (chunked and +unchunked), PDF, EPUB, DVI, PS, LaTeX, man page, HTML Help and text +file outputs from an AsciiDoc text file. `a2x(1)` does all the grunt +work associated with generating and sequencing the toolchain commands +and managing intermediate and output files. `a2x(1)` also optionally +deploys admonition and navigation icons and a CSS stylesheet. See the +`a2x(1)` man page for more details. In addition to `asciidoc(1)` you +also need <>, <> and +optionally: <> or <> (to generate PDF); +`w3m(1)` or `lynx(1)` (to generate text). + +The following examples generate `doc/source-highlight-filter.pdf` from +the AsciiDoc `doc/source-highlight-filter.txt` source file. The first +example uses `dblatex(1)` (the default PDF generator) the second +example forces FOP to be used: + + $ a2x -f pdf doc/source-highlight-filter.txt + $ a2x -f pdf --fop doc/source-highlight-filter.txt + +See the `a2x(1)` man page for details. + +TIP: Use the `--verbose` command-line option to view executed +toolchain commands. + +HTML generation +~~~~~~~~~~~~~~~ +AsciiDoc produces nicely styled HTML directly without requiring a +DocBook toolchain but there are also advantages in going the DocBook +route: + +- HTML from DocBook can optionally include automatically generated + indexes, tables of contents, footnotes, lists of figures and tables. +- DocBook toolchains can also (optionally) generate separate (chunked) + linked HTML pages for each document section. +- Toolchain processing performs link and document validity checks. +- If the DocBook 'lang' attribute is set then things like table of + contents, figure and table captions and admonition captions will be + output in the specified language (setting the AsciiDoc 'lang' + attribute sets the DocBook 'lang' attribute). + +On the other hand, HTML output directly from AsciiDoc is much faster, +is easily customized and can be used in situations where there is no +suitable DocBook toolchain (for example, see the {website}[AsciiDoc +website]). + +PDF generation +~~~~~~~~~~~~~~ +There are two commonly used tools to generate PDFs from DocBook, +<> and <>. + +.dblatex or FOP? +- 'dblatex' is easier to install, there's zero configuration + required and no Java VM to install -- it just works out of the box. +- 'dblatex' source code highlighting and numbering is superb. +- 'dblatex' is easier to use as it converts DocBook directly to PDF + whereas before using 'FOP' you have to convert DocBook to XML-FO + using <>. +- 'FOP' is more feature complete (for example, callouts are processed + inside literal layouts) and arguably produces nicer looking output. + +HTML Help generation +~~~~~~~~~~~~~~~~~~~~ +. Convert DocBook XML documents to HTML Help compiler source files + using <> and <>. +. Convert the HTML Help source (`.hhp` and `.html`) files to HTML Help + (`.chm`) files using the <>. + +Toolchain components summary +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +AsciiDoc:: + Converts AsciiDoc (`.txt`) files to DocBook XML (`.xml`) files. + +[[X13]]https://github.com/docbook/xslt10-stylesheets[DocBook XSLT Stylesheets]:: + These are a set of XSL stylesheets containing rules for converting + DocBook XML documents to HTML, XSL-FO, manpage and HTML Help files. + The stylesheets are used in conjunction with an XML parser such as + <>. + +[[X40]]http://www.xmlsoft.org[xsltproc]:: + An XML parser for applying XSLT stylesheets (in our case the + <>) to XML documents. + +[[X31]]http://dblatex.sourceforge.net/[dblatex]:: + Generates PDF, DVI, PostScript and LaTeX formats directly from + DocBook source via the intermediate LaTeX typesetting language -- + uses <>, <> and + `latex(1)`. + +[[X14]]https://xmlgraphics.apache.org/fop/[FOP]:: + The Apache Formatting Objects Processor converts XSL-FO (`.fo`) + files to PDF files. The XSL-FO files are generated from DocBook + source files using <> and + <>. + +[[X67]]Microsoft Help Compiler:: + The Microsoft HTML Help Compiler (`hhc.exe`) is a command-line tool + that converts HTML Help source files to a single HTML Help (`.chm`) + file. It runs on MS Windows platforms and can be downloaded from + https://www.microsoft.com/. + +AsciiDoc dblatex configuration files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The AsciiDoc distribution `./dblatex` directory contains +`asciidoc-dblatex.xsl` (customized XSL parameter settings) and +`asciidoc-dblatex.sty` (customized LaTeX settings). These are examples +of optional <> output customization and are used by +<>. + +AsciiDoc DocBook XSL Stylesheets drivers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You will have noticed that the distributed HTML and HTML Help +documentation files (for example `./doc/asciidoc.html`) are not the +plain outputs produced using the default 'DocBook XSL Stylesheets' +configuration. This is because they have been processed using +customized DocBook XSL Stylesheets along with (in the case of HTML +outputs) the custom `./stylesheets/docbook-xsl.css` CSS stylesheet. + +You'll find the customized DocBook XSL drivers along with additional +documentation in the distribution `./docbook-xsl` directory. The +examples that follow are executed from the distribution documentation +(`./doc`) directory. These drivers are also used by <>. + +`common.xsl`:: + Shared driver parameters. This file is not used directly but is + included in all the following drivers. + +`chunked.xsl`:: + Generate chunked XHTML (separate HTML pages for each document + section) in the `./doc/chunked` directory. For example: + + $ python ../asciidoc.py -b docbook asciidoc.txt + $ xsltproc --nonet ../docbook-xsl/chunked.xsl asciidoc.xml + +`epub.xsl`:: + Used by <> to generate EPUB formatted documents. + +`fo.xsl`:: + Generate XSL Formatting Object (`.fo`) files for subsequent PDF + file generation using FOP. For example: + + $ python ../asciidoc.py -b docbook article.txt + $ xsltproc --nonet ../docbook-xsl/fo.xsl article.xml > article.fo + $ fop article.fo article.pdf + +`htmlhelp.xsl`:: + Generate Microsoft HTML Help source files for the MS HTML Help + Compiler in the `./doc/htmlhelp` directory. This example is run on + MS Windows from a Cygwin shell prompt: + + $ python ../asciidoc.py -b docbook asciidoc.txt + $ xsltproc --nonet ../docbook-xsl/htmlhelp.xsl asciidoc.xml + $ c:/Program\ Files/HTML\ Help\ Workshop/hhc.exe htmlhelp.hhp + +`manpage.xsl`:: + Generate a `roff(1)` format UNIX man page from a DocBook XML + 'refentry' document. This example generates an `asciidoc.1` man + page file: + + $ python ../asciidoc.py -d manpage -b docbook asciidoc.1.txt + $ xsltproc --nonet ../docbook-xsl/manpage.xsl asciidoc.1.xml + +`xhtml.xsl`:: + Convert a DocBook XML file to a single XHTML file. For example: + + $ python ../asciidoc.py -b docbook asciidoc.txt + $ xsltproc --nonet ../docbook-xsl/xhtml.xsl asciidoc.xml > asciidoc.html + +If you want to see how the complete documentation set is processed +take a look at the A-A-P script `./doc/main.aap`. + + +Generating Plain Text Files +--------------------------- +AsciiDoc does not have a text backend (for most purposes AsciiDoc +source text is fine), however you can convert AsciiDoc text files to +formatted text using the AsciiDoc <> toolchain wrapper +utility. + + +[[X35]] +HTML5 and XHTML 1.1 +------------------- +The 'xhtml11' and 'html5' backends embed or link CSS and JavaScript +files in their outputs, there is also a <> plugin +framework. + +- If the AsciiDoc 'linkcss' attribute is defined then CSS and + JavaScript files are linked to the output document, otherwise they + are embedded (the default behavior). +- The default locations for CSS and JavaScript files can be changed by + setting the AsciiDoc 'stylesdir' and 'scriptsdir' attributes + respectively. +- The default locations for embedded and linked files differ and are + calculated at different times -- embedded files are loaded when + asciidoc(1) generates the output document, linked files are loaded + by the browser when the user views the output document. +- Embedded files are automatically inserted in the output files but + you need to manually copy linked CSS and Javascript files from + AsciiDoc <> to the correct location + relative to the output document. + +.Stylesheet file locations +[cols="3*",frame="topbot",options="header"] +|==================================================================== +|'stylesdir' attribute +|Linked location ('linkcss' attribute defined) +|Embedded location ('linkcss' attribute undefined) + +|Undefined (default). +|Same directory as the output document. +|`stylesheets` subdirectory in the AsciiDoc configuration directory +(the directory containing the backend conf file). + +|Absolute or relative directory name. +|Absolute or relative to the output document. +|Absolute or relative to the AsciiDoc configuration directory (the +directory containing the backend conf file). + +|==================================================================== + +.JavaScript file locations +[cols="3*",frame="topbot",options="header"] +|==================================================================== +|'scriptsdir' attribute +|Linked location ('linkcss' attribute defined) +|Embedded location ('linkcss' attribute undefined) + +|Undefined (default). +|Same directory as the output document. +|`javascripts` subdirectory in the AsciiDoc configuration directory +(the directory containing the backend conf file). + +|Absolute or relative directory name. +|Absolute or relative to the output document. +|Absolute or relative to the AsciiDoc configuration directory (the +directory containing the backend conf file). + +|==================================================================== + +[[X99]] +Themes +~~~~~~ +The AsciiDoc 'theme' attribute is used to select an alternative CSS +stylesheet and to optionally include additional JavaScript code. + +- Theme files reside in an AsciiDoc <> + named `themes//` (where `` is the the theme name set + by the 'theme' attribute). asciidoc(1) sets the 'themedir' attribute + to the theme directory path name. +- The 'theme' attribute can also be set using the asciidoc(1) + `--theme` option, the `--theme` option can also be used to manage + theme <>. +- AsciiDoc ships with two themes: 'flask' and 'volnitsky'. +- The `.css` file replaces the default `asciidoc.css` CSS file. +- The `.js` file is included in addition to the default + `asciidoc.js` JavaScript file. +- If the <> attribute is defined then icons are loaded + from the theme `icons` sub-directory if it exists (i.e. the + 'iconsdir' attribute is set to theme `icons` sub-directory path). +- Embedded theme files are automatically inserted in the output files + but you need to manually copy linked CSS and Javascript files to the + location of the output documents. +- Linked CSS and JavaScript theme files are linked to the same linked + locations as <>. + +For example, the command-line option `--theme foo` (or `--attribute +theme=foo`) will cause asciidoc(1) to search <> for a sub-directory called `themes/foo` +containing the stylesheet `foo.css` and optionally a JavaScript file +name `foo.js`. + + +Document Structure +------------------ +An AsciiDoc document consists of a series of <> +starting with an optional document Header, followed by an optional +Preamble, followed by zero or more document Sections. + +Almost any combination of zero or more elements constitutes a valid +AsciiDoc document: documents can range from a single sentence to a +multi-part book. + +Block Elements +~~~~~~~~~~~~~~ +Block elements consist of one or more lines of text and may contain +other block elements. + +The AsciiDoc block structure can be informally summarized as follows +footnote:[This is a rough structural guide, not a rigorous syntax +definition]: + + Document ::= (Header?,Preamble?,Section*) + Header ::= (Title,(AuthorInfo,RevisionInfo?)?) + AuthorInfo ::= (FirstName,(MiddleName?,LastName)?,EmailAddress?) + RevisionInfo ::= (RevisionNumber?,RevisionDate,RevisionRemark?) + Preamble ::= (SectionBody) + Section ::= (Title,SectionBody?,(Section)*) + SectionBody ::= ((BlockTitle?,Block)|BlockMacro)+ + Block ::= (Paragraph|DelimitedBlock|List|Table) + List ::= (BulletedList|NumberedList|LabeledList|CalloutList) + BulletedList ::= (ListItem)+ + NumberedList ::= (ListItem)+ + CalloutList ::= (ListItem)+ + LabeledList ::= (ListEntry)+ + ListEntry ::= (ListLabel,ListItem) + ListLabel ::= (ListTerm+) + ListItem ::= (ItemText,(List|ListParagraph|ListContinuation)*) + +Where: + +- '?' implies zero or one occurrence, '+' implies one or more + occurrences, '*' implies zero or more occurrences. +- All block elements are separated by line boundaries. +- `BlockId`, `AttributeEntry` and `AttributeList` block elements (not + shown) can occur almost anywhere. +- There are a number of document type and backend specific + restrictions imposed on the block syntax. +- The following elements cannot contain blank lines: Header, Title, + Paragraph, ItemText. +- A ListParagraph is a Paragraph with its 'listelement' option set. +- A ListContinuation is a <>. + +[[X95]] +Header +~~~~~~ +The Header contains document meta-data, typically title plus optional +authorship and revision information: + +- The Header is optional, but if it is used it must start with a + document <>. +- Optional Author and Revision information immediately follows the + header title. +- The document header must be separated from the remainder of the + document by one or more blank lines and cannot contain blank lines. +- The header can include comments. +- The header can include <>, typically + 'doctype', 'lang', 'encoding', 'icons', 'data-uri', 'toc', + 'numbered'. +- Header attributes are overridden by command-line attributes. +- If the header contains non-UTF-8 characters then the 'encoding' must + precede the header (either in the document or on the command-line). + +Here's an example AsciiDoc document header: + + Writing Documentation using AsciiDoc + ==================================== + Joe Bloggs + v2.0, February 2003: + Rewritten for version 2 release. + +The author information line contains the author's name optionally +followed by the author's email address. The author's name is formatted +like: + + firstname[ [middlename ]lastname][ ]] + +i.e. a first name followed by optional middle and last names followed +by an email address in that order. Multi-word first, middle and last +names can be entered using the underscore as a word separator. The +email address comes last and must be enclosed in angle <> brackets. +Here a some examples of author information lines: + + Joe Bloggs + Joe Bloggs + Vincent Willem van_Gogh + +If the author line does not match the above specification then the +entire author line is treated as the first name. + +The optional revision information line follows the author information +line. The revision information can be one of two formats: + +. An optional document revision number followed by an optional + revision date followed by an optional revision remark: ++ +-- + * If the revision number is specified it must be followed by a + comma. + * The revision number must contain at least one numeric character. + * Any non-numeric characters preceding the first numeric character + will be dropped. + * If a revision remark is specified it must be preceded by a colon. + The revision remark extends from the colon up to the next blank + line, attribute entry or comment and is subject to normal text + substitutions. + * If a revision number or remark has been set but the revision date + has not been set then the revision date is set to the value of the + 'docdate' attribute. + +Examples: + + v2.0, February 2003 + February 2003 + v2.0, + v2.0, February 2003: Rewritten for version 2 release. + February 2003: Rewritten for version 2 release. + v2.0,: Rewritten for version 2 release. + :Rewritten for version 2 release. +-- + +. The revision information line can also be an RCS/CVS/SVN $Id$ + marker: ++ +-- + * AsciiDoc extracts the 'revnumber', 'revdate', and 'author' + attributes from the $Id$ revision marker and displays them in the + document header. + * If an $Id$ revision marker is used the header author line can be + omitted. + +Example: + + $Id: mydoc.txt,v 1.5 2009/05/17 17:58:44 jbloggs Exp $ +-- + +You can override or set header parameters by passing 'revnumber', +'revremark', 'revdate', 'email', 'author', 'authorinitials', +'firstname' and 'lastname' attributes using the asciidoc(1) `-a` +(`--attribute`) command-line option. For example: + + $ asciidoc -a revdate=2004/07/27 article.txt + +Attribute entries can also be added to the header for substitution in +the header template with <> elements. + +The 'title' element in HTML outputs is set to the AsciiDoc document +title, you can set it to a different value by including a 'title' +attribute entry in the document header. + +[[X87]] +Additional document header information +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AsciiDoc has two mechanisms for optionally including additional +meta-data in the header of the output document: + +'docinfo' configuration file sections:: +If a <> section named 'docinfo' has been loaded +then it will be included in the document header. Typically the +'docinfo' section name will be prefixed with a '+' character so that it +is appended to (rather than replace) other 'docinfo' sections. + +'docinfo' files:: +Two docinfo files are recognized: one named `docinfo` and a second +named like the AsciiDoc source file with a `-docinfo` suffix. For +example, if the source document is called `mydoc.txt` then the +document information files would be `docinfo.xml` and +`mydoc-docinfo.xml` (for DocBook outputs) and `docinfo.html` and +`mydoc-docinfo.html` (for HTML outputs). The <> attributes control which docinfo files are included in +the output files. + +The contents docinfo templates and files is dependent on the type of +output: + +HTML:: + Valid 'head' child elements. Typically 'style' and 'script' elements + for CSS and JavaScript inclusion. + +DocBook:: + Valid 'articleinfo' or 'bookinfo' child elements. DocBook defines + numerous elements for document meta-data, for example: copyrights, + document history and authorship information. See the DocBook + `./doc/article-docinfo.xml` example that comes with the AsciiDoc + distribution. The rendering of meta-data elements (or not) is + DocBook processor dependent. + + +[[X86]] +Preamble +~~~~~~~~ +The Preamble is an optional untitled section body between the document +Header and the first Section title. + +Sections +~~~~~~~~ +In addition to the document title (level 0), AsciiDoc supports four +section levels: 1 (top) to 4 (bottom). Section levels are delimited +by section <>. Sections are translated using +configuration file <>. AsciiDoc +generates the following <> specifically for +use in section markup templates: + +level:: +The `level` attribute is the section level number, it is normally just +the <> level number (1..4). However, if the `leveloffset` +attribute is defined it will be added to the `level` attribute. The +`leveloffset` attribute is useful for <>. + +sectnum:: +The `-n` (`--section-numbers`) command-line option generates the +`sectnum` (section number) attribute. The `sectnum` attribute is used +for section numbers in HTML outputs (DocBook section numbering are +handled automatically by the DocBook toolchain commands). + +[[X93]] +Section markup templates +^^^^^^^^^^^^^^^^^^^^^^^^ +Section markup templates specify output markup and are defined in +AsciiDoc configuration files. Section markup template names are +derived as follows (in order of precedence): + +1. From the title's first positional attribute or 'template' + attribute. For example, the following three section titles are + functionally equivalent: ++ +..................................................................... +[[terms]] +[glossary] +List of Terms +------------- + +["glossary",id="terms"] +List of Terms +------------- + +[template="glossary",id="terms"] +List of Terms +------------- +..................................................................... + +2. When the title text matches a configuration file + <> entry. +3. If neither of the above the default `sect` template is used + (where `` is a number from 1 to 4). + +In addition to the normal section template names ('sect1', 'sect2', +'sect3', 'sect4') AsciiDoc has the following templates for +frontmatter, backmatter and other special sections: 'abstract', +'preface', 'colophon', 'dedication', 'glossary', 'bibliography', +'synopsis', 'appendix', 'index'. These special section templates +generate the corresponding Docbook elements; for HTML outputs they +default to the 'sect1' section template. + +Section IDs +^^^^^^^^^^^ +If no explicit section ID is specified an ID will be synthesised from +the section title. The primary purpose of this feature is to ensure +persistence of table of contents links (permalinks): the missing +section IDs are generated dynamically by the JavaScript TOC generator +*after* the page is loaded. If you link to a dynamically generated TOC +address the page will load but the browser will ignore the (as yet +ungenerated) section ID. + +The IDs are generated by the following algorithm: + +- Replace all non-alphanumeric title characters with underscores. +- Strip leading or trailing underscores. +- Convert to lowercase. +- Prepend the `idprefix` attribute (so there's no possibility of name + clashes with existing document IDs). Prepend an underscore if the + `idprefix` attribute is not defined. +- A numbered suffix (`_2`, `_3` ...) is added if a same named + auto-generated section ID exists. +- If the `ascii-ids` attribute is defined then non-ASCII characters + are replaced with ASCII equivalents. This attribute should be + *should be avoided* if possible as its sole purpose is to accommodate + deficient downstream applications that cannot process non-ASCII ID + attributes. If available, it will use the + https://pypi.org/project/trans/[trans python module], otherwise it + will fallback to using NFKD algorithm, which cannot handle all + unicode characters. For example, 'WstÄ™p żółtej Å‚Ä…ki' will be + translated to 'Wstep zoltej laki' under trans and 'Wstep zotej aki' + under NFKD. + +Example: the title 'Jim's House' would generate the ID `_jim_s_house`. + +Section ID synthesis can be disabled by undefining the `sectids` +attribute. + +[[X16]] +Special Section Titles +^^^^^^^^^^^^^^^^^^^^^^ +AsciiDoc has a mechanism for mapping predefined section titles +auto-magically to specific markup templates. For example a title +'Appendix A: Code Reference' will automatically use the 'appendix' +<>. The mappings from title to template +name are specified in `[specialsections]` sections in the Asciidoc +language configuration files (`lang-*.conf`). Section entries are +formatted like: + + =<template> + +`<title>` is a Python regular expression and `<template>` is the name +of a configuration file markup template section. If the `<title>` +matches an AsciiDoc document section title then the backend output is +marked up using the `<template>` markup template (instead of the +default `sect<level>` section template). The `{title}` attribute value +is set to the value of the matched regular expression group named +'title', if there is no 'title' group `{title}` defaults to the whole +of the AsciiDoc section title. If `<template>` is blank then any +existing entry with the same `<title>` will be deleted. + +.Special section titles vs. explicit template names +********************************************************************* +AsciiDoc has two mechanisms for specifying non-default section markup +templates: you can specify the template name explicitly (using the +'template' attribute) or indirectly (using 'special section titles'). +Specifying a <<X93,section template>> attribute explicitly is +preferred. Auto-magical 'special section titles' have the following +drawbacks: + +- They are non-obvious, you have to know the exact matching + title for each special section on a language by language basis. +- Section titles are predefined and can only be customised with a + configuration change. +- The implementation is complicated by multiple languages: every + special section title has to be defined for each language (in each + of the `lang-*.conf` files). + +Specifying special section template names explicitly does add more +noise to the source document (the 'template' attribute declaration), +but the intention is obvious and the syntax is consistent with other +AsciiDoc elements c.f. bibliographic, Q&A and glossary lists. + +Special section titles have been deprecated but are retained for +backward compatibility. + +********************************************************************* + +Inline Elements +~~~~~~~~~~~~~~~ +<<X34,Inline document elements>> are used to format text and to +perform various types of text substitution. Inline elements and inline +element syntax is defined in the asciidoc(1) configuration files. + +Here is a list of AsciiDoc inline elements in the (default) order in +which they are processed: + +Special characters:: + These character sequences escape special characters used by + the backend markup (typically `<`, `>`, and `&` characters). + See `[specialcharacters]` configuration file sections. + +Quotes:: + Elements that markup words and phrases; usually for character + formatting. See `[quotes]` configuration file sections. + +Special Words:: + Word or word phrase patterns singled out for markup without + the need for further annotation. See `[specialwords]` + configuration file sections. + +Replacements:: + Each replacement defines a word or word phrase pattern to + search for along with corresponding replacement text. See + `[replacements]` configuration file sections. + +Attribute references:: + Document attribute names enclosed in braces are replaced by + the corresponding attribute value. + +Inline Macros:: + Inline macros are replaced by the contents of parametrized + configuration file sections. + + +Document Processing +------------------- +The AsciiDoc source document is read and processed as follows: + +1. The document 'Header' is parsed, header parameter values are + substituted into the configuration file `[header]` template section + which is then written to the output file. +2. Each document 'Section' is processed and its constituent elements + translated to the output file. +3. The configuration file `[footer]` template section is substituted + and written to the output file. + +When a block element is encountered asciidoc(1) determines the type of +block by checking in the following order (first to last): (section) +Titles, BlockMacros, Lists, DelimitedBlocks, Tables, AttributeEntrys, +AttributeLists, BlockTitles, Paragraphs. + +The default paragraph definition `[paradef-default]` is last element +to be checked. + +Knowing the parsing order will help you devise unambiguous macro, list +and block syntax rules. + +Inline substitutions within block elements are performed in the +following default order: + +1. Special characters +2. Quotes +3. Special words +4. Replacements +5. Attributes +6. Inline Macros +7. Replacements2 + +The substitutions and substitution order performed on +Title, Paragraph and DelimitedBlock elements is determined by +configuration file parameters. + + +Text Formatting +--------------- +[[X51]] +Quoted Text +~~~~~~~~~~~ +Words and phrases can be formatted by enclosing inline text with +quote characters: + +_Emphasized text_:: + Word phrases \'enclosed in single quote characters' (acute + accents) or \_underline characters_ are emphasized. + +*Strong text*:: + Word phrases \*enclosed in asterisk characters* are rendered + in a strong font (usually bold). + +[[X81]]+Monospaced text+:: + Word phrases \+enclosed in plus characters+ are rendered in a + monospaced font. Word phrases \`enclosed in backtick + characters` (grave accents) are also rendered in a monospaced + font but in this case the enclosed text is rendered literally + and is not subject to further expansion (see <<X80,inline + literal passthrough>>). + +`Single quoted text':: + Phrases enclosed with a \`single grave accent to the left and + a single acute accent to the right' are rendered in single + quotation marks. + +``Double quoted text'':: + Phrases enclosed with \\``two grave accents to the left and + two acute accents to the right'' are rendered in quotation + marks. + +#Unquoted text#:: + Placing \#hashes around text# does nothing, it is a mechanism + to allow inline attributes to be applied to otherwise + unformatted text. + +New quote types can be defined by editing asciidoc(1) configuration +files. See the <<X7,Configuration Files>> section for details. + +.Quoted text behavior +- Quoting cannot be overlapped. +- Different quoting types can be nested. +- To suppress quoted text formatting place a backslash character + immediately in front of the leading quote character(s). In the case + of ambiguity between escaped and non-escaped text you will need to + escape both leading and trailing quotes, in the case of + multi-character quotes you may even need to escape individual + characters. + +[[X96]] +Quoted text attributes +^^^^^^^^^^^^^^^^^^^^^^ +Quoted text can be prefixed with an <<X21,attribute list>>. The first +positional attribute ('role' attribute) is translated by AsciiDoc to +an HTML 'span' element 'class' attribute or a DocBook 'phrase' element +'role' attribute. + +DocBook XSL Stylesheets translate DocBook 'phrase' elements with +'role' attributes to corresponding HTML 'span' elements with the same +'class' attributes; CSS can then be used +http://www.sagehill.net/docbookxsl/UsingCSS.html[to style the +generated HTML]. Thus CSS styling can be applied to both DocBook and +AsciiDoc generated HTML outputs. You can also specify multiple class +names separated by spaces. + +CSS rules for text color, text background color, text size and text +decorators are included in the distributed AsciiDoc CSS files and are +used in conjunction with AsciiDoc 'xhtml11', 'html5' and 'docbook' +outputs. The CSS class names are: + +- '<color>' (text foreground color). +- '<color>-background' (text background color). +- 'big' and 'small' (text size). +- 'underline', 'overline' and 'line-through' (strike through) text + decorators. + +Where '<color>' can be any of the +https://en.wikipedia.org/wiki/Web_colors#HTML_color_names[sixteen HTML +color names]. Examples: + + [red]#Obvious# and [big red yellow-background]*very obvious*. + + [underline]#Underline text#, [overline]#overline text# and + [blue line-through]*bold blue and line-through*. + +is rendered as: + +[red]#Obvious# and [big red yellow-background]*very obvious*. + +[underline]#Underline text#, [overline]#overline text# and +[bold blue line-through]*bold blue and line-through*. + +NOTE: Color and text decorator attributes are rendered for XHTML and +HTML 5 outputs using CSS stylesheets. The mechanism to implement +color and text decorator attributes is provided for DocBook toolchains +via the DocBook 'phrase' element 'role' attribute, but the actual +rendering is toolchain specific and is not part of the AsciiDoc +distribution. + +[[X52]] +Constrained and Unconstrained Quotes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +There are actually two types of quotes: + +Constrained quotes +++++++++++++++++++ +Quoted must be bounded by white space or commonly adjoining +punctuation characters. These are the most commonly used type of +quote. + +Unconstrained quotes +++++++++++++++++++++ +Unconstrained quotes have no boundary constraints and can be placed +anywhere within inline text. For consistency and to make them easier +to remember unconstrained quotes are double-ups of the `_`, `*`, `+` +and `#` constrained quotes: + + __unconstrained emphasized text__ + **unconstrained strong text** + ++unconstrained monospaced text++ + ##unconstrained unquoted text## + +The following example emboldens the letter F: + + **F**ile Open... + +Superscripts and Subscripts +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Put \^carets on either^ side of the text to be superscripted, put +\~tildes on either side~ of text to be subscripted. For example, the +following line: + + e^πi^+1 = 0. H~2~O and x^10^. Some ^super text^ + and ~some sub text~ + +Is rendered like: + +e^πi^+1 = 0. H~2~O and x^10^. Some ^super text^ +and ~some sub text~ + +Superscripts and subscripts are implemented as <<X52,unconstrained +quotes>> and they can be escaped with a leading backslash and prefixed +with with an attribute list. + +Line Breaks +~~~~~~~~~~~ +A plus character preceded by at least one space character at the end +of a non-blank line forces a line break. It generates a line break +(`br`) tag for HTML outputs and a custom XML `asciidoc-br` processing +instruction for DocBook outputs. The `asciidoc-br` processing +instruction is handled by <<X43,a2x(1)>>. + +Page Breaks +~~~~~~~~~~~ +A line of three or more less-than (`<<<`) characters will generate a +hard page break in DocBook and printed HTML outputs. It uses the CSS +`page-break-after` property for HTML outputs and a custom XML +`asciidoc-pagebreak` processing instruction for DocBook outputs. The +`asciidoc-pagebreak` processing instruction is handled by +<<X43,a2x(1)>>. Hard page breaks are sometimes handy but as a general +rule you should let your page processor generate page breaks for you. + +Rulers +~~~~~~ +A line of three or more apostrophe characters will generate a ruler +line. It generates a ruler (`hr`) tag for HTML outputs and a custom +XML `asciidoc-hr` processing instruction for DocBook outputs. The +`asciidoc-hr` processing instruction is handled by <<X43,a2x(1)>>. + +Tabs +~~~~ +By default tab characters input files will translated to 8 spaces. Tab +expansion is set with the 'tabsize' entry in the configuration file +`[miscellaneous]` section and can be overridden in included files by +setting a 'tabsize' attribute in the `include` macro's attribute list. +For example: + + include::addendum.txt[tabsize=2] + +The tab size can also be set using the attribute command-line option, +for example `--attribute tabsize=4` + +Replacements +~~~~~~~~~~~~ +The following replacements are defined in the default AsciiDoc +configuration: + + (C) copyright, (TM) trademark, (R) registered trademark, + -- em dash, ... ellipsis, -> right arrow, <- left arrow, => right + double arrow, <= left double arrow. + +Which are rendered as: + +(C) copyright, (TM) trademark, (R) registered trademark, +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right +double arrow, <= left double arrow. + +You can also include arbitrary entity references in the AsciiDoc +source. Examples: + + ➊ ¶ + +renders: + +➊ ¶ + +To render a replacement literally escape it with a leading back-slash. + +The <<X7,Configuration Files>> section explains how to configure your +own replacements. + +Special Words +~~~~~~~~~~~~~ +Words defined in `[specialwords]` configuration file sections are +automatically marked up without having to be explicitly notated. + +The <<X7,Configuration Files>> section explains how to add and replace +special words. + + +[[X17]] +Titles +------ +Document and section titles can be in either of two formats: + +Two line titles +~~~~~~~~~~~~~~~ +A two line title consists of a title line, starting hard against the +left margin, and an underline. Section underlines consist a repeated +character pairs spanning the width of the preceding title (give or +take up to two characters): + +The default title underlines for each of the document levels are: + + + Level 0 (top level): ====================== + Level 1: ---------------------- + Level 2: ~~~~~~~~~~~~~~~~~~~~~~ + Level 3: ^^^^^^^^^^^^^^^^^^^^^^ + Level 4 (bottom level): ++++++++++++++++++++++ + +Examples: + + Level One Section Title + ----------------------- + + Level 2 Subsection Title + ~~~~~~~~~~~~~~~~~~~~~~~~ + +[[X46]] +One line titles +~~~~~~~~~~~~~~~ +One line titles consist of a single line delimited on either side by +one or more equals characters (the number of equals characters +corresponds to the section level minus one). Here are some examples: + + = Document Title (level 0) = + == Section title (level 1) == + === Section title (level 2) === + ==== Section title (level 3) ==== + ===== Section title (level 4) ===== + +[NOTE] +===================================================================== +- One or more spaces must fall between the title and the delimiters. +- The trailing title delimiter is optional. +- The one-line title syntax can be changed by editing the + configuration file `[titles]` section `sect0`...`sect4` entries. +===================================================================== + +Floating titles +~~~~~~~~~~~~~~~ +Setting the title's first positional attribute or 'style' attribute to +'float' generates a free-floating title. A free-floating title is +rendered just like a normal section title but is not formally +associated with a text body and is not part of the regular section +hierarchy so the normal ordering rules do not apply. Floating titles +can also be used in contexts where section titles are illegal: for +example sidebar and admonition blocks. Example: + + [float] + The second day + ~~~~~~~~~~~~~~ + +Floating titles do not appear in a document's table of contents. + + +[[X42]] +Block Titles +------------ +A 'BlockTitle' element is a single line beginning with a period +followed by the title text. A BlockTitle is applied to the immediately +following Paragraph, DelimitedBlock, List, Table or BlockMacro. For +example: + +........................ +.Notes +- Note 1. +- Note 2. +........................ + +is rendered as: + +.Notes +- Note 1. +- Note 2. + + +[[X41]] +BlockId Element +--------------- +A 'BlockId' is a single line block element containing a unique +identifier enclosed in double square brackets. It is used to assign an +identifier to the ensuing block element. For example: + + [[chapter-titles]] + Chapter titles can be ... + +The preceding example identifies the ensuing paragraph so it can be +referenced from other locations, for example with +`<<chapter-titles,chapter titles>>`. + +'BlockId' elements can be applied to Title, Paragraph, List, +DelimitedBlock, Table and BlockMacro elements. The BlockId element +sets the `{id}` attribute for substitution in the subsequent block's +markup template. If a second positional argument is supplied it sets +the `{reftext}` attribute which is used to set the DocBook `xreflabel` +attribute. + +The 'BlockId' element has the same syntax and serves the same function +to the <<X30,anchor inline macro>>. + +[[X79]] +AttributeList Element +--------------------- +An 'AttributeList' block element is an <<X21,attribute list>> on a +line by itself: + +- 'AttributeList' attributes are only applied to the immediately + following block element -- the attributes are made available to the + block's markup template. +- Multiple contiguous 'AttributeList' elements are additively combined + in the order they appear. +- The first positional attribute in the list is often used to specify + the ensuing element's <<X23,style>>. + +Attribute value substitution +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +By default, only substitutions that take place inside attribute list +values are attribute references, this is because not all attributes +are destined to be marked up and rendered as text (for example the +table 'cols' attribute). To perform normal inline text substitutions +(special characters, quotes, macros, replacements) on an attribute +value you need to enclose it in single quotes. In the following quote +block the second attribute value in the AttributeList is quoted to +ensure the 'http' macro is expanded to a hyperlink. + +--------------------------------------------------------------------- +[quote,'https://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] +_____________________________________________________________________ +Sir, a woman's preaching is like a dog's walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +_____________________________________________________________________ +--------------------------------------------------------------------- + +Common attributes +~~~~~~~~~~~~~~~~~ +Most block elements support the following attributes: + +[cols="1e,1,5a",frame="topbot",options="header"] +|==================================================================== +|Name |Backends |Description + +|id |html4, html5, xhtml11, docbook | +Unique identifier typically serve as link targets. +Can also be set by the 'BlockId' element. + +|role |html4, html5, xhtml11, docbook | +Role contains a string used to classify or subclassify an element and +can be applied to AsciiDoc block elements. The AsciiDoc 'role' +attribute is translated to the 'role' attribute in DocBook outputs and +is included in the 'class' attribute in HTML outputs, in this respect +it behaves like the <<X96,quoted text role attribute>>. + +DocBook XSL Stylesheets translate DocBook 'role' attributes to HTML +'class' attributes; CSS can then be used +http://www.sagehill.net/docbookxsl/UsingCSS.html[to style the +generated HTML]. + +|reftext |docbook | +'reftext' is used to set the DocBook 'xreflabel' attribute. +The 'reftext' attribute can an also be set by the 'BlockId' element. + +|floatstyle |docbook | +'floatstyle' is used to specify the floatstyle attribute for the +titled table, example, image and equation blocks. This is useful when +used in conjuction with the dblatex toolchain. A typical example +would be to specify the value as 'floatstyle="[htbp]"'. + +|==================================================================== + + +Paragraphs +---------- +Paragraphs are blocks of text terminated by a blank line, the end of +file, or the start of a delimited block or a list. There are three +paragraph syntaxes: normal, indented (literal) and admonition which +are rendered, by default, with the corresponding paragraph style. + +Each syntax has a default style, but you can explicitly apply any +paragraph style to any paragraph syntax. You can also apply +<<X104,delimited block>> styles to single paragraphs. + +The built-in paragraph styles are: 'normal', 'literal', 'verse', +'quote', 'listing', 'TIP', 'NOTE', 'IMPORTANT', 'WARNING', 'CAUTION', +'abstract', 'partintro', 'comment', 'example', 'sidebar', 'source', +'music', 'latex', 'graphviz'. + +normal paragraph syntax +~~~~~~~~~~~~~~~~~~~~~~~ +Normal paragraph syntax consists of one or more non-blank lines of +text. The first line must start hard against the left margin (no +intervening white space). The default processing expectation is that +of a normal paragraph of text. + +[[X85]] +literal paragraph syntax +~~~~~~~~~~~~~~~~~~~~~~~~ +Literal paragraphs are rendered verbatim in a monospaced font without +any distinguishing background or border. By default there is no text +formatting or substitutions within Literal paragraphs apart from +Special Characters and Callouts. + +The 'literal' style is applied implicitly to indented paragraphs i.e. +where the first line of the paragraph is indented by one or more space +or tab characters. For example: + +--------------------------------------------------------------------- + Consul *necessitatibus* per id, + consetetur, eu pro everti postulant + homero verear ea mea, qui. +--------------------------------------------------------------------- + +Renders: + + Consul *necessitatibus* per id, + consetetur, eu pro everti postulant + homero verear ea mea, qui. + +NOTE: Because <<X64,lists>> can be indented it's possible for your +indented paragraph to be misinterpreted as a list -- in situations +like this apply the 'literal' style to a normal paragraph. + +Instead of using a paragraph indent you could apply the 'literal' +style explicitly, for example: + +--------------------------------------------------------------------- +[literal] +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +--------------------------------------------------------------------- + +Renders: + +[literal] +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +[[X94]] +quote and verse paragraph styles +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The optional 'attribution' and 'citetitle' attributes (positional +attributes 2 and 3) specify the author and source respectively. + +The 'verse' style retains the line breaks, for example: + +--------------------------------------------------------------------- +[verse, William Blake, from Auguries of Innocence] +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +--------------------------------------------------------------------- + +Which is rendered as: + +[verse, William Blake, from Auguries of Innocence] +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. + +The 'quote' style flows the text at left and right margins, for +example: + +--------------------------------------------------------------------- +[quote, Bertrand Russell, The World of Mathematics (1956)] +A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher. +--------------------------------------------------------------------- + +Which is rendered as: + +[quote, Bertrand Russell, The World of Mathematics (1956)] +A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher. + +[[X28]] +Admonition Paragraphs +~~~~~~~~~~~~~~~~~~~~~ +'TIP', 'NOTE', 'IMPORTANT', 'WARNING' and 'CAUTION' admonishment +paragraph styles are generated by placing `NOTE:`, `TIP:`, +`IMPORTANT:`, `WARNING:` or `CAUTION:` as the first word of the +paragraph. For example: + + NOTE: This is an example note. + +Alternatively, you can specify the paragraph admonition style +explicitly using an <<X79,AttributeList element>>. For example: + + [NOTE] + This is an example note. + +Renders: + +NOTE: This is an example note. + +TIP: If your admonition requires more than a single paragraph use an +<<X22,admonition block>> instead. + +[[X47]] +Admonition Icons and Captions +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +NOTE: Admonition customization with `icons`, `iconsdir`, `icon` and +`caption` attributes does not apply when generating DocBook output. If +you are going the DocBook route then the <<X43,a2x(1)>> `--no-icons` +and `--icons-dir` options can be used to set the appropriate XSL +Stylesheets parameters. + +By default the asciidoc(1) HTML backends generate text captions +instead of admonition icon image links. To generate links to icon +images define the <<X45,`icons`>> attribute, for example using the `-a +icons` command-line option. + +The <<X44,`iconsdir`>> attribute sets the location of linked icon +images. + +You can override the default icon image using the `icon` attribute to +specify the path of the linked image. For example: + + [icon="./images/icons/wink.png"] + NOTE: What lovely war. + +Use the `caption` attribute to customize the admonition captions (not +applicable to `docbook` backend). The following example suppresses the +icon image and customizes the caption of a 'NOTE' admonition +(undefining the `icons` attribute with `icons=None` is only necessary +if <<X45,admonition icons>> have been enabled): + + [icons=None, caption="My Special Note"] + NOTE: This is my special note. + +This subsection also applies to <<X22,Admonition Blocks>>. + + +[[X104]] +Delimited Blocks +---------------- +Delimited blocks are blocks of text enveloped by leading and trailing +delimiter lines (normally a series of four or more repeated +characters). The behavior of Delimited Blocks is specified by entries +in configuration file `[blockdef-*]` sections. + +Predefined Delimited Blocks +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +AsciiDoc ships with a number of predefined DelimitedBlocks (see the +`asciidoc.conf` configuration file in the asciidoc(1) program +directory): + +Predefined delimited block underlines: + + CommentBlock: ////////////////////////// + PassthroughBlock: ++++++++++++++++++++++++++ + ListingBlock: -------------------------- + LiteralBlock: .......................... + SidebarBlock: ************************** + QuoteBlock: __________________________ + ExampleBlock: ========================== + OpenBlock: -- + +.Default DelimitedBlock substitutions +[cols="2e,7*^",frame="topbot",options="header,autowidth"] +|===================================================== +| |Attributes |Callouts |Macros | Quotes |Replacements +|Special chars |Special words + +|PassthroughBlock |Yes |No |Yes |No |No |No |No +|ListingBlock |No |Yes |No |No |No |Yes |No +|LiteralBlock |No |Yes |No |No |No |Yes |No +|SidebarBlock |Yes |No |Yes |Yes |Yes |Yes |Yes +|QuoteBlock |Yes |No |Yes |Yes |Yes |Yes |Yes +|ExampleBlock |Yes |No |Yes |Yes |Yes |Yes |Yes +|OpenBlock |Yes |No |Yes |Yes |Yes |Yes |Yes +|===================================================== + +Listing Blocks +~~~~~~~~~~~~~~ +'ListingBlocks' are rendered verbatim in a monospaced font, they +retain line and whitespace formatting and are often distinguished by a +background or border. There is no text formatting or substitutions +within Listing blocks apart from Special Characters and Callouts. +Listing blocks are often used for computer output and file listings. + +Here's an example: + +[listing] +...................................... +-------------------------------------- +#include <stdio.h> + +int main() { + printf("Hello World!\n"); + exit(0); +} +-------------------------------------- +...................................... + +Which will be rendered like: + +-------------------------------------- +#include <stdio.h> + +int main() { + printf("Hello World!\n"); + exit(0); +} +-------------------------------------- + +By convention <<X59,filter blocks>> use the listing block syntax and +are implemented as distinct listing block styles. + +[[X65]] +Literal Blocks +~~~~~~~~~~~~~~ +'LiteralBlocks' are rendered just like <<X85,literal paragraphs>>. +Example: + +--------------------------------------------------------------------- +................................... +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +................................... +--------------------------------------------------------------------- + +Renders: +................................... +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +................................... + +If the 'listing' style is applied to a LiteralBlock it will be +rendered as a ListingBlock (this is handy if you have a listing +containing a ListingBlock). + +Sidebar Blocks +~~~~~~~~~~~~~~ +A sidebar is a short piece of text presented outside the narrative +flow of the main text. The sidebar is normally presented inside a +bordered box to set it apart from the main text. + +The sidebar body is treated like a normal section body. + +Here's an example: + +--------------------------------------------------------------------- +.An Example Sidebar +************************************************ +Any AsciiDoc SectionBody element (apart from +SidebarBlocks) can be placed inside a sidebar. +************************************************ +--------------------------------------------------------------------- + +Which will be rendered like: + +.An Example Sidebar +************************************************ +Any AsciiDoc SectionBody element (apart from +SidebarBlocks) can be placed inside a sidebar. +************************************************ + +[[X26]] +Comment Blocks +~~~~~~~~~~~~~~ +The contents of 'CommentBlocks' are not processed; they are useful for +annotations and for excluding new or outdated content that you don't +want displayed. CommentBlocks are never written to output files. +Example: + +--------------------------------------------------------------------- +////////////////////////////////////////// +CommentBlock contents are not processed by +asciidoc(1). +////////////////////////////////////////// +--------------------------------------------------------------------- + +See also <<X25,Comment Lines>>. + +NOTE: System macros are executed inside comment blocks. + +[[X76]] +Passthrough Blocks +~~~~~~~~~~~~~~~~~~ +By default the block contents is subject only to 'attributes' and +'macros' substitutions (use an explicit 'subs' attribute to apply +different substitutions). PassthroughBlock content will often be +backend specific. Here's an example: + +--------------------------------------------------------------------- +[subs="quotes"] +++++++++++++++++++++++++++++++++++++++ +<table border="1"><tr> + <td>*Cell 1*</td> + <td>*Cell 2*</td> +</tr></table> +++++++++++++++++++++++++++++++++++++++ +--------------------------------------------------------------------- + +The following styles can be applied to passthrough blocks: + +pass:: + No substitutions are performed. This is equivalent to `subs="none"`. + +asciimath, latexmath:: + By default no substitutions are performed, the contents are rendered + as <<X78,mathematical formulas>>. + +Quote Blocks +~~~~~~~~~~~~ +'QuoteBlocks' are used for quoted passages of text. There are two +styles: 'quote' and 'verse'. The style behavior is identical to +<<X94,quote and verse paragraphs>> except that blocks can contain +multiple paragraphs and, in the case of the 'quote' style, other +section elements. The first positional attribute sets the style, if +no attributes are specified the 'quote' style is used. The optional +'attribution' and 'citetitle' attributes (positional attributes 2 and +3) specify the quote's author and source. For example: + +--------------------------------------------------------------------- +[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] +____________________________________________________________________ +As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled. + +"A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There's money in +this case, Watson, if there is nothing else." +____________________________________________________________________ +--------------------------------------------------------------------- + +Which is rendered as: + +[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] +____________________________________________________________________ +As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled. + +"A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There's money in +this case, Watson, if there is nothing else." +____________________________________________________________________ + +[[X48]] +Example Blocks +~~~~~~~~~~~~~~ +'ExampleBlocks' encapsulate the DocBook Example element and are used +for, well, examples. Example blocks can be titled by preceding them +with a 'BlockTitle'. DocBook toolchains will normally automatically +number examples and generate a 'List of Examples' backmatter section. + +Example blocks are delimited by lines of equals characters and can +contain any block elements apart from Titles, BlockTitles and +Sidebars) inside an example block. For example: + +--------------------------------------------------------------------- +.An example +===================================================================== +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. +===================================================================== +--------------------------------------------------------------------- + +Renders: + +.An example +===================================================================== +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. +===================================================================== + +A title prefix that can be inserted with the `caption` attribute +(HTML backends). For example: + +--------------------------------------------------------------------- +[caption="Example 1: "] +.An example with a custom caption +===================================================================== +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. +===================================================================== +--------------------------------------------------------------------- + +[[X22]] +Admonition Blocks +~~~~~~~~~~~~~~~~~ +The 'ExampleBlock' definition includes a set of admonition +<<X23,styles>> ('NOTE', 'TIP', 'IMPORTANT', 'WARNING', 'CAUTION') for +generating admonition blocks (admonitions containing more than a +<<X28,single paragraph>>). Just precede the 'ExampleBlock' with an +attribute list specifying the admonition style name. For example: + +--------------------------------------------------------------------- +[NOTE] +.A NOTE admonition block +===================================================================== +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. + +. Fusce euismod commodo velit. +. Vivamus fringilla mi eu lacus. + .. Fusce euismod commodo velit. + .. Vivamus fringilla mi eu lacus. +. Donec eget arcu bibendum + nunc consequat lobortis. +===================================================================== +--------------------------------------------------------------------- + +Renders: + +[NOTE] +.A NOTE admonition block +===================================================================== +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. + +. Fusce euismod commodo velit. +. Vivamus fringilla mi eu lacus. + .. Fusce euismod commodo velit. + .. Vivamus fringilla mi eu lacus. +. Donec eget arcu bibendum + nunc consequat lobortis. +===================================================================== + +See also <<X47,Admonition Icons and Captions>>. + +[[X29]] +Open Blocks +~~~~~~~~~~~ +Open blocks are special: + +- The open block delimiter is line containing two hyphen characters + (instead of four or more repeated characters). + +- They can be used to group block elements for <<X15,List item + continuation>>. + +- Open blocks can be styled to behave like any other type of delimited + block. The following built-in styles can be applied to open + blocks: 'literal', 'verse', 'quote', 'listing', 'TIP', 'NOTE', + 'IMPORTANT', 'WARNING', 'CAUTION', 'abstract', 'partintro', + 'comment', 'example', 'sidebar', 'source', 'music', 'latex', + 'graphviz'. For example, the following open block and listing block + are functionally identical: + + [listing] + -- + Lorum ipsum ... + -- + + --------------- + Lorum ipsum ... + --------------- + +- An unstyled open block groups section elements but otherwise does + nothing. + +Open blocks are used to generate document abstracts and book part +introductions: + +- Apply the 'abstract' style to generate an abstract, for example: + + [abstract] + -- + In this paper we will ... + -- + +. Apply the 'partintro' style to generate a book part introduction for + a multi-part book, for example: + + [partintro] + .Optional part introduction title + -- + Optional part introduction goes here. + -- + + +[[X64]] +Lists +----- +.List types +- Bulleted lists. Also known as itemized or unordered lists. +- Numbered lists. Also called ordered lists. +- Labeled lists. Sometimes called variable or definition lists. +- Callout lists (a list of callout annotations). + +.List behavior +- List item indentation is optional and does not determine nesting, + indentation does however make the source more readable. +- Another list or a literal paragraph immediately following a list + item will be implicitly included in the list item; use <<X15, list + item continuation>> to explicitly append other block elements to a + list item. +- A comment block or a comment line block macro element will terminate + a list -- use inline comment lines to put comments inside lists. +- The `listindex` <<X60,intrinsic attribute>> is the current list item + index (1..). If this attribute is used outside a list then it's value + is the number of items in the most recently closed list. Useful for + displaying the number of items in a list. + +Bulleted Lists +~~~~~~~~~~~~~~ +Bulleted list items start with a single dash or one to five asterisks +followed by some white space then some text. Bulleted list syntaxes +are: + +................... +- List item. +* List item. +** List item. +*** List item. +**** List item. +***** List item. +................... + +Numbered Lists +~~~~~~~~~~~~~~ +List item numbers are explicit or implicit. + +.Explicit numbering +List items begin with a number followed by some white space then the +item text. The numbers can be decimal (arabic), roman (upper or lower +case) or alpha (upper or lower case). Decimal and alpha numbers are +terminated with a period, roman numbers are terminated with a closing +parenthesis. The different terminators are necessary to ensure 'i', +'v' and 'x' roman numbers are are distinguishable from 'x', 'v' and +'x' alpha numbers. Examples: + +..................................................................... +1. Arabic (decimal) numbered list item. +a. Lower case alpha (letter) numbered list item. +F. Upper case alpha (letter) numbered list item. +iii) Lower case roman numbered list item. +IX) Upper case roman numbered list item. +..................................................................... + +.Implicit numbering +List items begin one to five period characters, followed by some white +space then the item text. Examples: + +..................................................................... +. Arabic (decimal) numbered list item. +.. Lower case alpha (letter) numbered list item. +... Lower case roman numbered list item. +.... Upper case alpha (letter) numbered list item. +..... Upper case roman numbered list item. +..................................................................... + +You can use the 'style' attribute (also the first positional +attribute) to specify an alternative numbering style. The numbered +list style can be one of the following values: 'arabic', 'loweralpha', +'upperalpha', 'lowerroman', 'upperroman'. + +Here are some examples of bulleted and numbered lists: + +--------------------------------------------------------------------- +- Praesent eget purus quis magna eleifend eleifend. + 1. Fusce euismod commodo velit. + a. Fusce euismod commodo velit. + b. Vivamus fringilla mi eu lacus. + c. Donec eget arcu bibendum nunc consequat lobortis. + 2. Vivamus fringilla mi eu lacus. + i) Fusce euismod commodo velit. + ii) Vivamus fringilla mi eu lacus. + 3. Donec eget arcu bibendum nunc consequat lobortis. + 4. Nam fermentum mattis ante. +- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + * Fusce euismod commodo velit. + ** Qui in magna commodo, est labitur dolorum an. Est ne magna primis + adolescens. Sit munere ponderum dignissim et. Minim luptatum et + vel. + ** Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. +[upperroman] + .. Fusce euismod commodo velit. + .. Vivamus fringilla mi eu lacus. + . Donec eget arcu bibendum nunc consequat lobortis. +--------------------------------------------------------------------- + +Which render as: + +- Praesent eget purus quis magna eleifend eleifend. + 1. Fusce euismod commodo velit. + a. Fusce euismod commodo velit. + b. Vivamus fringilla mi eu lacus. + c. Donec eget arcu bibendum nunc consequat lobortis. + 2. Vivamus fringilla mi eu lacus. + i) Fusce euismod commodo velit. + ii) Vivamus fringilla mi eu lacus. + 3. Donec eget arcu bibendum nunc consequat lobortis. + 4. Nam fermentum mattis ante. +- Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + * Fusce euismod commodo velit. + ** Qui in magna commodo, est labitur dolorum an. Est ne magna primis + adolescens. Sit munere ponderum dignissim et. Minim luptatum et + vel. + ** Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. +[upperroman] + .. Fusce euismod commodo velit. + .. Vivamus fringilla mi eu lacus. + . Donec eget arcu bibendum nunc consequat lobortis. + +A predefined 'compact' option is available to bulleted and numbered +lists -- this translates to the DocBook 'spacing="compact"' lists +attribute which may or may not be processed by the DocBook toolchain. +Example: + + [options="compact"] + - Compact list item. + - Another compact list item. + +TIP: To apply the 'compact' option globally define a document-wide +'compact-option' attribute, e.g. using the `-a compact-option` +command-line option. + +You can set the list start number using the 'start' attribute (works +for HTML outputs and DocBook outputs processed by DocBook XSL +Stylesheets). Example: + + [start=7] + . List item 7. + . List item 8. + +Labeled Lists +~~~~~~~~~~~~~ +Labeled list items consist of one or more text labels followed by the +text of the list item. + +An item label begins a line with an alphanumeric character hard +against the left margin and ends with two, three or four colons or two +semi-colons. A list item can have multiple labels, one per line. + +The list item text consists of one or more lines of text starting +after the last label (either on the same line or a new line) and can +be followed by nested List or ListParagraph elements. Item text can be +optionally indented. + +Here are some examples: + +--------------------------------------------------------------------- +In:: +Lorem:: + Fusce euismod commodo velit. + + Fusce euismod commodo velit. + +Ipsum:: Vivamus fringilla mi eu lacus. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc consequat lobortis. +Dolor:: + Donec eget arcu bibendum nunc consequat lobortis. + Suspendisse;; + A massa id sem aliquam auctor. + Morbi;; + Pretium nulla vel lorem. + In;; + Dictum mauris in urna. + Vivamus::: Fringilla mi eu lacus. + Donec::: Eget arcu bibendum nunc consequat lobortis. +--------------------------------------------------------------------- + +Which render as: + +In:: +Lorem:: + Fusce euismod commodo velit. + + Fusce euismod commodo velit. + +Ipsum:: Vivamus fringilla mi eu lacus. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc consequat lobortis. +Dolor:: + Donec eget arcu bibendum nunc consequat lobortis. + Suspendisse;; + A massa id sem aliquam auctor. + Morbi;; + Pretium nulla vel lorem. + In;; + Dictum mauris in urna. + Vivamus::: Fringilla mi eu lacus. + Donec::: Eget arcu bibendum nunc consequat lobortis. + +Horizontal labeled list style +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The 'horizontal' labeled list style (also the first positional +attribute) places the list text side-by-side with the label instead of +under the label. Here is an example: + +--------------------------------------------------------------------- +[horizontal] +*Lorem*:: Fusce euismod commodo velit. Qui in magna commodo, est +labitur dolorum an. Est ne magna primis adolescens. + + Fusce euismod commodo velit. + +*Ipsum*:: Vivamus fringilla mi eu lacus. +- Vivamus fringilla mi eu lacus. +- Donec eget arcu bibendum nunc consequat lobortis. + +*Dolor*:: + - Vivamus fringilla mi eu lacus. + - Donec eget arcu bibendum nunc consequat lobortis. + +--------------------------------------------------------------------- + +Which render as: + +[horizontal] +*Lorem*:: Fusce euismod commodo velit. Qui in magna commodo, est +labitur dolorum an. Est ne magna primis adolescens. + + Fusce euismod commodo velit. + +*Ipsum*:: Vivamus fringilla mi eu lacus. +- Vivamus fringilla mi eu lacus. +- Donec eget arcu bibendum nunc consequat lobortis. + +*Dolor*:: + - Vivamus fringilla mi eu lacus. + - Donec eget arcu bibendum nunc consequat lobortis. + +[NOTE] +===================================================================== +- Current PDF toolchains do not make a good job of determining + the relative column widths for horizontal labeled lists. +- Nested horizontal labeled lists will generate DocBook validation + errors because the 'DocBook XML V4.2' DTD does not permit nested + informal tables (although <<X13,DocBook XSL Stylesheets>> and + <<X31,dblatex>> process them correctly). +- The label width can be set as a percentage of the total width by + setting the 'width' attribute e.g. `width="10%"` +===================================================================== + +Question and Answer Lists +~~~~~~~~~~~~~~~~~~~~~~~~~ +AsciiDoc comes pre-configured with a 'qanda' style labeled list for generating +DocBook question and answer (Q&A) lists. Example: + +--------------------------------------------------------------------- +[qanda] +Question one:: + Answer one. +Question two:: + Answer two. +--------------------------------------------------------------------- + +Renders: + +[qanda] +Question one:: + Answer one. +Question two:: + Answer two. + +Glossary Lists +~~~~~~~~~~~~~~ +AsciiDoc comes pre-configured with a 'glossary' style labeled list for +generating DocBook glossary lists. Example: + +--------------------------------------------------------------------- +[glossary] +A glossary term:: + The corresponding definition. +A second glossary term:: + The corresponding definition. +--------------------------------------------------------------------- + +For working examples see the `article.txt` and `book.txt` documents in +the AsciiDoc `./doc` distribution directory. + +NOTE: To generate valid DocBook output glossary lists must be located +in a section that uses the 'glossary' <<X93,section markup template>>. + +Bibliography Lists +~~~~~~~~~~~~~~~~~~ +AsciiDoc comes with a predefined 'bibliography' bulleted list style +generating DocBook bibliography entries. Example: + +--------------------------------------------------------------------- +[bibliography] +.Optional list title +- [[[taoup]]] Eric Steven Raymond. 'The Art of UNIX + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. +--------------------------------------------------------------------- + +The `[[[<reference>]]]` syntax is a bibliography entry anchor, it +generates an anchor named `<reference>` and additionally displays +`[<reference>]` at the anchor position. For example `[[[taoup]]]` +generates an anchor named `taoup` that displays `[taoup]` at the +anchor position. Cite the reference from elsewhere your document using +`<<taoup>>`, this displays a hyperlink (`[taoup]`) to the +corresponding bibliography entry anchor. + +For working examples see the `article.txt` and `book.txt` documents in +the AsciiDoc `./doc` distribution directory. + +NOTE: To generate valid DocBook output bibliography lists must be +located in a <<X93,bibliography section>>. + +[[X15]] +List Item Continuation +~~~~~~~~~~~~~~~~~~~~~~ +Another list or a literal paragraph immediately following a list item +is implicitly appended to the list item; to append other block +elements to a list item you need to explicitly join them to the list +item with a 'list continuation' (a separator line containing a single +plus character). Multiple block elements can be appended to a list +item using list continuations (provided they are legal list item +children in the backend markup). + +Here are some examples of list item continuations: list item one +contains multiple continuations; list item two is continued with an +<<X29,OpenBlock>> containing multiple elements: + +--------------------------------------------------------------------- +1. List item one. ++ +List item one continued with a second paragraph followed by an +Indented block. ++ +................. +$ ls *.sh +$ mv *.sh ~/tmp +................. ++ +List item continued with a third paragraph. + +2. List item two continued with an open block. ++ +-- +This paragraph is part of the preceding list item. + +a. This list is nested and does not require explicit item continuation. ++ +This paragraph is part of the preceding list item. + +b. List item b. + +This paragraph belongs to item two of the outer list. +-- +--------------------------------------------------------------------- + +Renders: + +1. List item one. ++ +List item one continued with a second paragraph followed by an +Indented block. ++ +................. +$ ls *.sh +$ mv *.sh ~/tmp +................. ++ +List item continued with a third paragraph. + +2. List item two continued with an open block. ++ +-- +This paragraph is part of the preceding list item. + +a. This list is nested and does not require explicit item continuation. ++ +This paragraph is part of the preceding list item. + +b. List item b. + +This paragraph belongs to item two of the outer list. +-- + + +[[X92]] +Footnotes +--------- +The shipped AsciiDoc configuration includes three footnote inline +macros: + +`footnote:[<text>]`:: + Generates a footnote with text `<text>`. + +`footnoteref:[<id>,<text>]`:: + Generates a footnote with a reference ID `<id>` and text `<text>`. + +`footnoteref:[<id>]`:: + Generates a reference to the footnote with ID `<id>`. + +The footnote text can span multiple lines. + +The 'xhtml11' and 'html5' backends render footnotes dynamically using +JavaScript; 'html4' outputs do not use JavaScript and leave the +footnotes inline; 'docbook' footnotes are processed by the downstream +DocBook toolchain. + +Example footnotes: + + A footnote footnote:[An example footnote.]; + a second footnote with a reference ID footnoteref:[note2,Second footnote.]; + finally a reference to the second footnote footnoteref:[note2]. + +Renders: + +A footnote footnote:[An example footnote.]; +a second footnote with a reference ID footnoteref:[note2,Second footnote.]; +finally a reference to the second footnote footnoteref:[note2]. + + +Indexes +------- +The shipped AsciiDoc configuration includes the inline macros for +generating DocBook index entries. + +`indexterm:[<primary>,<secondary>,<tertiary>]`:: +`(((<primary>,<secondary>,<tertiary>)))`:: + This inline macro generates an index term (the `<secondary>` and + `<tertiary>` positional attributes are optional). Example: + `indexterm:[Tigers,Big cats]` (or, using the alternative syntax + `(((Tigers,Big cats)))`. Index terms that have secondary and + tertiary entries also generate separate index terms for the + secondary and tertiary entries. The index terms appear in the + index, not the primary text flow. + +`indexterm2:[<primary>]`:: +`((<primary>))`:: + This inline macro generates an index term that appears in both the + index and the primary text flow. The `<primary>` should not be + padded to the left or right with white space characters. + +For working examples see the `article.txt` and `book.txt` documents in +the AsciiDoc `./doc` distribution directory. + +NOTE: Index entries only really make sense if you are generating +DocBook markup -- DocBook conversion programs automatically generate +an index at the point an 'Index' section appears in source document. + + +[[X105]] +Callouts +-------- +Callouts are a mechanism for annotating verbatim text (for example: +source code, computer output and user input). Callout markers are +placed inside the annotated text while the actual annotations are +presented in a callout list after the annotated text. Here's an +example: + +--------------------------------------------------------------------- + .MS-DOS directory listing + ----------------------------------------------------- + 10/17/97 9:04 <DIR> bin + 10/16/97 14:11 <DIR> DOS \<1> + 10/16/97 14:40 <DIR> Program Files + 10/16/97 14:46 <DIR> TEMP + 10/17/97 9:04 <DIR> tmp + 10/16/97 14:37 <DIR> WINNT + 10/16/97 14:25 119 AUTOEXEC.BAT \<2> + 2/13/94 6:21 54,619 COMMAND.COM \<2> + 10/16/97 14:25 115 CONFIG.SYS \<2> + 11/16/97 17:17 61,865,984 pagefile.sys + 2/13/94 6:21 9,349 WINA20.386 \<3> + ----------------------------------------------------- + + \<1> This directory holds MS-DOS. + \<2> System startup code for DOS. + \<3> Some sort of Windows 3.1 hack. +--------------------------------------------------------------------- + +Which renders: + +.MS-DOS directory listing +----------------------------------------------------- +10/17/97 9:04 <DIR> bin +10/16/97 14:11 <DIR> DOS <1> +10/16/97 14:40 <DIR> Program Files +10/16/97 14:46 <DIR> TEMP +10/17/97 9:04 <DIR> tmp +10/16/97 14:37 <DIR> WINNT +10/16/97 14:25 119 AUTOEXEC.BAT <2> + 2/13/94 6:21 54,619 COMMAND.COM <2> +10/16/97 14:25 115 CONFIG.SYS <2> +11/16/97 17:17 61,865,984 pagefile.sys + 2/13/94 6:21 9,349 WINA20.386 <3> +----------------------------------------------------- + +<1> This directory holds MS-DOS. +<2> System startup code for DOS. +<3> Some sort of Windows 3.1 hack. + +.Explanation +- The callout marks are whole numbers enclosed in angle brackets -- + they refer to the correspondingly numbered item in the following + callout list. +- By default callout marks are confined to 'LiteralParagraphs', + 'LiteralBlocks' and 'ListingBlocks' (although this is a + configuration file option and can be changed). +- Callout list item numbering is fairly relaxed -- list items can + start with `<n>`, `n>` or `>` where `n` is the optional list item + number (in the latter case list items starting with a single `>` + character are implicitly numbered starting at one). +- Callout lists should not be nested. +- Callout lists cannot be used within tables. +- Callout lists start list items hard against the left margin. +- If you want to present a number inside angle brackets you'll need to + escape it with a backslash to prevent it being interpreted as a + callout mark. + +NOTE: Define the AsciiDoc 'icons' attribute (for example using the `-a +icons` command-line option) to display callout icons. + +Implementation Notes +~~~~~~~~~~~~~~~~~~~~ +Callout marks are generated by the 'callout' inline macro while +callout lists are generated using the 'callout' list definition. The +'callout' macro and 'callout' list are special in that they work +together. The 'callout' inline macro is not enabled by the normal +'macros' substitutions option, instead it has its own 'callouts' +substitution option. + +The following attributes are available during inline callout macro +substitution: + +`{index}`:: + The callout list item index inside the angle brackets. +`{coid}`:: + An identifier formatted like `CO<listnumber>-<index>` that + uniquely identifies the callout mark. For example `CO2-4` + identifies the fourth callout mark in the second set of callout + marks. + +The `{coids}` attribute can be used during callout list item +substitution -- it is a space delimited list of callout IDs that refer +to the explanatory list item. + +Including callouts in included code +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You can annotate working code examples with callouts -- just remember +to put the callouts inside source code comments. This example displays +the `test.py` source file (containing a single callout) using the +'source' (code highlighter) filter: + +.AsciiDoc source +--------------------------------------------------------------------- + [source,python] + ------------------------------------------- + \include::test.py[] + ------------------------------------------- + + \<1> Print statement. +--------------------------------------------------------------------- + +.Included `test.py` source +--------------------------------------------------------------------- +print 'Hello World!' # \<1> +--------------------------------------------------------------------- + + +Macros +------ +Macros are a mechanism for substituting parametrized text into output +documents. + +Macros have a 'name', a single 'target' argument and an 'attribute +list'. The usual syntax is `<name>:<target>[<attrlist>]` (for +inline macros) and `<name>::<target>[<attrlist>]` (for block +macros). Here are some examples: + + https://docbook.org/[DocBook.org] + include::chapt1.txt[tabsize=2] + mailto:srackham@gmail.com[] + +.Macro behavior +- `<name>` is the macro name. It can only contain letters, digits or + dash characters and cannot start with a dash. +- The optional `<target>` cannot contain white space characters. +- `<attrlist>` is a <<X21,list of attributes>> enclosed in square + brackets. +- `]` characters inside attribute lists must be escaped with a + backslash. +- Expansion of macro references can normally be escaped by prefixing a + backslash character (see the AsciiDoc 'FAQ' for examples of + exceptions to this rule). +- Attribute references in block macros are expanded. +- The substitutions performed prior to Inline macro macro expansion + are determined by the inline context. +- Macros are processed in the order they appear in the configuration + file(s). +- Calls to inline macros can be nested inside different inline macros + (an inline macro call cannot contain a nested call to itself). +- In addition to `<name>`, `<target>` and `<attrlist>` the + `<passtext>` and `<subslist>` named groups are available to + <<X77,passthrough macros>>. A macro is a passthrough macro if the + definition includes a `<passtext>` named group. + +Inline Macros +~~~~~~~~~~~~~ +Inline Macros occur in an inline element context. Predefined Inline +macros include 'URLs', 'image' and 'link' macros. + +URLs +^^^^ +'http', 'https', 'ftp', 'file', 'mailto' and 'callto' URLs are +rendered using predefined inline macros. + +- If you don't need a custom link caption you can enter the 'http', + 'https', 'ftp', 'file' URLs and email addresses without any special + macro syntax. +- If the `<attrlist>` is empty the URL is displayed. + +Here are some examples: + + https://docbook.org/[DocBook.org] + https://docbook.org/ + mailto:joe.bloggs@foobar.com[email Joe Bloggs] + joe.bloggs@foobar.com + +Which are rendered: + +https://docbook.org/[DocBook.org] + +https://docbook.org/ + +mailto:joe.bloggs@foobar.com[email Joe Bloggs] + +joe.bloggs@foobar.com + +If the `<target>` necessitates space characters use `%20`, for example +`large%20image.png`. + +Internal Cross References +^^^^^^^^^^^^^^^^^^^^^^^^^ +Two AsciiDoc inline macros are provided for creating hypertext links +within an AsciiDoc document. You can use either the standard macro +syntax or the (preferred) alternative. + +[[X30]] +anchor +++++++ +Used to specify hypertext link targets: + + [[<id>,<xreflabel>]] + anchor:<id>[<xreflabel>] + +The `<id>` is a unique string that conforms to the output markup's +anchor syntax. The optional `<xreflabel>` is the text to be displayed +by captionless 'xref' macros that refer to this anchor. The optional +`<xreflabel>` is only really useful when generating DocBook output. +Example anchor: + + [[X1]] + +You may have noticed that the syntax of this inline element is the +same as that of the <<X41,BlockId block element>>, this is no +coincidence since they are functionally equivalent. + +xref +++++ +Creates a hypertext link to a document anchor. + + <<<id>,<caption>>> + xref:<id>[<caption>] + +The `<id>` refers to an anchor ID. The optional `<caption>` is the +link's displayed text. Example: + + <<X21,attribute lists>> + +If `<caption>` is not specified then the displayed text is +auto-generated: + +- The AsciiDoc 'xhtml11' and 'html5' backends display the `<id>` + enclosed in square brackets. +- If DocBook is produced the DocBook toolchain is responsible for the + displayed text which will normally be the referenced figure, table + or section title number followed by the element's title text. + +Here is an example: + +--------------------------------------------------------------------- +[[tiger_image]] +.Tyger tyger +image::tiger.png[] + +This can be seen in <<tiger_image>>. +--------------------------------------------------------------------- + +Linking to Local Documents +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Hypertext links to files on the local file system are specified using +the 'link' inline macro. + + link:<target>[<caption>] + +The 'link' macro generates relative URLs. The link macro `<target>` is +the target file name (relative to the file system location of the +referring document). The optional `<caption>` is the link's displayed +text. If `<caption>` is not specified then `<target>` is displayed. +Example: + + link:downloads/foo.zip[download foo.zip] + +You can use the `<filename>#<id>` syntax to refer to an anchor within +a target document but this usually only makes sense when targeting +HTML documents. + +[[X9]] +Images +^^^^^^ +Inline images are inserted into the output document using the 'image' +macro. The inline syntax is: + + image:<target>[<attributes>] + +The contents of the image file `<target>` is displayed. To display the +image its file format must be supported by the target backend +application. HTML and DocBook applications normally support PNG or JPG +files. + +`<target>` file name paths are relative to the location of the +referring document. + +[[X55]] +.Image macro attributes +- The optional 'alt' attribute is also the first positional attribute, + it specifies alternative text which is displayed if the output + application is unable to display the image file (see also + https://htmlhelp.com/feature/art3.htm[Use of ALT texts in IMGs]). For + example: + + image:images/logo.png[Company Logo] + +- The optional 'title' attribute provides a title for the image. The + <<X49,block image macro>> renders the title alongside the image. + The inline image macro displays the title as a popup ``tooltip'' in + visual browsers (AsciiDoc HTML outputs only). + +- The optional `width` and `height` attributes scale the image size + and can be used in any combination. The units are pixels. The + following example scales the previous example to a height of 32 + pixels: + + image:images/logo.png["Company Logo",height=32] + +- The optional `link` attribute is used to link the image to an + external document. The following example links a screenshot + thumbnail to a full size version: + + image:screen-thumbnail.png[height=32,link="screen.png"] + +- The optional `scaledwidth` attribute is only used in DocBook block + images (specifically for PDF documents). The following example + scales the images to 75% of the available print width: + + image::images/logo.png[scaledwidth="75%",alt="Company Logo"] + +- The image `scale` attribute sets the DocBook `imagedata` element + `scale` attribute. + +- The optional `align` attribute aligns block macro images + horizontally. Allowed values are `center`, `left` and `right`. For + example: + + image::images/tiger.png["Tiger image",align="left"] + +- The optional `float` attribute floats the image `left` or `right` on + the page (works with HTML outputs only, has no effect on DocBook + outputs). `float` and `align` attributes are mutually exclusive. + Use the `unfloat::[]` block macro to stop floating. + +Comment Lines +^^^^^^^^^^^^^ +See <<X25,comment block macro>>. + +Block Macros +~~~~~~~~~~~~ +A Block macro reference must be contained in a single line separated +either side by a blank line or a block delimiter. + +Block macros behave just like Inline macros, with the following +differences: + +- They occur in a block context. +- The default syntax is `<name>::<target>[<attrlist>]` (two + colons, not one). +- Markup template section names end in `-blockmacro` instead of + `-inlinemacro`. + +Block Identifier +^^^^^^^^^^^^^^^^ +The Block Identifier macro sets the `id` attribute and has the same +syntax as the <<X30,anchor inline macro>> since it performs +essentially the same function -- block templates use the `id` +attribute as a block element ID. For example: + + [[X30]] + +This is equivalent to the `[id="X30"]` <<X79,AttributeList element>>). + +[[X49]] +Images +^^^^^^ +The 'image' block macro is used to display images in a block context. +The syntax is: + + image::<target>[<attributes>] + +The block `image` macro has the same <<X55,macro attributes>> as it's +<<X9,inline image macro>> counterpart. + +WARNING: Unlike the inline `image` macro, the entire block `image` macro +must be on a single line. + +Block images can be titled by preceding the 'image' macro with a +'BlockTitle'. DocBook toolchains normally number titled block images +and optionally list them in an automatically generated 'List of +Figures' backmatter section. + +This example: + + .Main circuit board + image::images/layout.png[J14P main circuit board] + +is equivalent to: + + image::images/layout.png["J14P main circuit board", title="Main circuit board"] + +A title prefix that can be inserted with the `caption` attribute +(HTML backends). For example: + + .Main circuit board + [caption="Figure 2: "] + image::images/layout.png[J14P main circuit board] + +[[X66]] +.Embedding images in XHTML documents +********************************************************************* +If you define the `data-uri` attribute then images will be embedded in +XHTML outputs using the +https://en.wikipedia.org/wiki/Data_URI_scheme[data URI scheme]. You +can use the 'data-uri' attribute with the 'xhtml11' and 'html5' +backends to produce single-file XHTML documents with embedded images +and CSS, for example: + + $ asciidoc -a data-uri mydocument.txt + +[NOTE] +====== +- All current popular browsers support data URIs, although versions + of Internet Explorer prior to version 8 do not. +- Some browsers limit the size of data URIs. +====== +********************************************************************* + +[[X25]] +Comment Lines +^^^^^^^^^^^^^ +Single lines starting with two forward slashes hard up against the +left margin are treated as comments. Comment lines do not appear in +the output unless the 'showcomments' attribute is defined. Comment +lines have been implemented as both block and inline macros so a +comment line can appear as a stand-alone block or within block elements +that support inline macro expansion. Example comment line: + + // This is a comment. + +If the 'showcomments' attribute is defined comment lines are written +to the output: + +- In DocBook the comment lines are enclosed by the 'remark' element + (which may or may not be rendered by your toolchain). +- The 'showcomments' attribute does not expose <<X26,Comment Blocks>>. + Comment Blocks are never passed to the output. + +System Macros +~~~~~~~~~~~~~ +System macros are block macros that perform a predefined task and are +hardwired into the asciidoc(1) program. + +- You can escape system macros with a leading backslash character + (as you can with other macros). +- The syntax and tasks performed by system macros is built into + asciidoc(1) so they don't appear in configuration files. You can + however customize the syntax by adding entries to a configuration + file `[macros]` section. + +[[X63]] +Include Macros +^^^^^^^^^^^^^^ +The `include` and `include1` system macros to include the contents of +a named file into the source document. + +The `include` macro includes a file as if it were part of the parent +document -- tabs are expanded and system macros processed. The +contents of `include1` files are not subject to tab expansion or +system macro processing nor are attribute or lower priority +substitutions performed. The `include1` macro's intended use is to +include verbatim embedded CSS or scripts into configuration file +headers. Example: + +------------------------------------ +\include::chapter1.txt[tabsize=4] +------------------------------------ + +.Include macro behavior +- If the included file name is specified with a relative path then the + path is relative to the location of the referring document. +- Include macros can appear inside configuration files. +- Files included from within 'DelimitedBlocks' are read to completion + to avoid false end-of-block underline termination. +- Attribute references are expanded inside the include 'target'; if an + attribute is undefined then the included file is silently skipped. +- The 'tabsize' macro attribute sets the number of space characters to + be used for tab expansion in the included file (not applicable to + `include1` macro). +- The 'depth' macro attribute sets the maximum permitted number of + subsequent nested includes (not applicable to `include1` macro which + does not process nested includes). Setting 'depth' to '1' disables + nesting inside the included file. By default, nesting is limited to + a depth of ten. +- The `lines` macro attribute can be used to include specific lines of + the file. You can specify a range of pages by using `..` between + the two numbers, for example `1..10` would include the first 10 + lines. You can include multiple ranges or invdividual pages by using + a comma or semi-colon, for example `1..10,45,50..60`. +- If the 'warnings' attribute is set to 'False' (or any other + Python literal that evaluates to boolean false) then no warning + message is printed if the included file does not exist. By default + 'warnings' are enabled. +- Internally the `include1` macro is translated to the `include1` + system attribute which means it must be evaluated in a region where + attribute substitution is enabled. To inhibit nested substitution in + included files it is preferable to use the `include` macro and set + the attribute `depth=1`. + +Conditional Inclusion Macros +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Lines of text in the source document can be selectively included or +excluded from processing based on the existence (or not) of a document +attribute. + +Document text between the `ifdef` and `endif` macros is included if a +document attribute is defined: + + ifdef::<attribute>[] + : + endif::<attribute>[] + +Document text between the `ifndef` and `endif` macros is not included +if a document attribute is defined: + + ifndef::<attribute>[] + : + endif::<attribute>[] + +`<attribute>` is an attribute name which is optional in the trailing +`endif` macro. + +If you only want to process a single line of text then the text can be +put inside the square brackets and the `endif` macro omitted, for +example: + + ifdef::revnumber[Version number 42] + +Is equivalent to: + + ifdef::revnumber[] + Version number 42 + endif::revnumber[] + +'ifdef' and 'ifndef' macros also accept multiple attribute names: + +- Multiple ',' separated attribute names evaluate to defined if one + or more of the attributes is defined, otherwise it's value is + undefined. +- Multiple '+' separated attribute names evaluate to defined if all + of the attributes is defined, otherwise it's value is undefined. + +Document text between the `ifeval` and `endif` macros is included if +the Python expression inside the square brackets is true. Example: + + ifeval::[{rs458}==2] + : + endif::[] + +- Document attribute references are expanded before the expression is + evaluated. +- If an attribute reference is undefined then the expression is + considered false. + +Take a look at the `*.conf` configuration files in the AsciiDoc +distribution for examples of conditional inclusion macro usage. + +Executable system macros +^^^^^^^^^^^^^^^^^^^^^^^^ +The 'eval', 'sys' and 'sys2' block macros exhibit the same behavior as +their same named <<X24, system attribute references>>. The difference +is that system macros occur in a block macro context whereas system +attributes are confined to inline contexts where attribute +substitution is enabled. + +The following example displays a long directory listing inside a +literal block: + + ------------------ + sys::[ls -l *.txt] + ------------------ + +NOTE: There are no block macro versions of the 'eval3' and 'sys3' +system attributes. + +Template System Macro +^^^^^^^^^^^^^^^^^^^^^ +The `template` block macro allows the inclusion of one configuration +file template section within another. The following example includes +the `[admonitionblock]` section in the `[admonitionparagraph]` +section: + + [admonitionparagraph] + template::[admonitionblock] + +.Template macro behavior +- The `template::[]` macro is useful for factoring configuration file + markup. +- `template::[]` macros cannot be nested. +- `template::[]` macro expansion is applied after all configuration + files have been read. + + +[[X77]] +Passthrough macros +~~~~~~~~~~~~~~~~~~ +Passthrough macros are analogous to <<X76,passthrough blocks>> and are +used to pass text directly to the output. The substitution performed +on the text is determined by the macro definition but can be overridden +by the `<subslist>`. The usual syntax is +`<name>:<subslist>[<passtext>]` (for inline macros) and +`<name>::<subslist>[<passtext>]` (for block macros). Passthroughs, by +definition, take precedence over all other text substitutions. + +pass:: + Inline and block. Passes text unmodified (apart from explicitly + specified substitutions). Examples: + + pass:[<q>To be or not to be</q>] + pass:attributes,quotes[<u>the '{author}'</u>] + +asciimath, latexmath:: + Inline and block. Passes text unmodified. Used for + <<X78,mathematical formulas>>. + +\+++:: + Inline and block. The triple-plus passthrough is functionally + identical to the 'pass' macro but you don't have to escape `]` + characters and you can prefix with quoted attributes in the inline + version. Example: + + Red [red]+++`sum_(i=1)\^n i=(n(n+1))/2`$+++ AsciiMath formula + +$$:: + Inline and block. The double-dollar passthrough is functionally + identical to the triple-plus passthrough with one exception: special + characters are escaped. Example: + + $$`[[a,b],[c,d]]((n),(k))`$$ + +[[X80]]`:: + Text quoted with single backtick characters constitutes an 'inline + literal' passthrough. The enclosed text is rendered in a monospaced + font and is only subject to special character substitution. This + makes sense since monospace text is usually intended to be rendered + literally and often contains characters that would otherwise have to + be escaped. If you need monospaced text containing inline + substitutions use a <<X81,plus character instead of a backtick>>. + +Macro Definitions +~~~~~~~~~~~~~~~~~ +Each entry in the configuration `[macros]` section is a macro +definition which can take one of the following forms: + +`<pattern>=<name>[<subslist]`:: Inline macro definition. +`<pattern>=#<name>[<subslist]`:: Block macro definition. +`<pattern>=+<name>[<subslist]`:: System macro definition. +`<pattern>`:: Delete the existing macro with this `<pattern>`. + +`<pattern>` is a Python regular expression and `<name>` is the name of +a markup template. If `<name>` is omitted then it is the value of the +regular expression match group named 'name'. The optional +`[<subslist]` is a comma-separated list of substitution names enclosed +in `[]` brackets, it sets the default substitutions for passthrough +text, if omitted then no passthrough substitutions are performed. + +.Pattern named groups +The following named groups can be used in macro `<pattern>` regular +expressions and are available as markup template attributes: + +name:: + The macro name. + +target:: + The macro target. + +attrlist:: + The macro attribute list. + +passtext:: + Contents of this group are passed unmodified to the output subject + only to 'subslist' substitutions. + +subslist:: + Processed as a comma-separated list of substitution names for + 'passtext' substitution, overrides the the macro definition + 'subslist'. + +.Here's what happens during macro substitution +- Each contextually relevant macro 'pattern' from the `[macros]` + section is matched against the input source line. +- If a match is found the text to be substituted is loaded from a + configuration markup template section named like + `<name>-inlinemacro` or `<name>-blockmacro` (depending on the macro + type). +- Global and macro attribute list attributes are substituted in the + macro's markup template. +- The substituted template replaces the macro reference in the output + document. + + +[[X98]] +HTML 5 audio and video block macros +----------------------------------- +The 'html5' backend 'audio' and 'video' block macros generate the HTML +5 'audio' and 'video' elements respectively. They follow the usual +AsciiDoc block macro syntax `<name>::<target>[<attrlist>]` where: + +[horizontal] +`<name>`:: 'audio' or 'video'. +`<target>`:: The URL or file name of the video or audio file. +`<attrlist>`:: A list of named attributes (see below). + +.Audio macro attributes +[options="header",cols="1,5",frame="topbot"] +|==================================================================== +|Name | Value +|options +|A comma separated list of one or more of the following items: +'autoplay', 'loop' which correspond to the same-named HTML 5 'audio' +element boolean attributes. By default the player 'controls' are +enabled, include the 'nocontrols' option value to hide them. +|==================================================================== + +.Video macro attributes +[options="header",cols="1,5",frame="topbot"] +|==================================================================== +|Name | Value +|height | The height of the player in pixels. +|width | The width of the player in pixels. +|poster | The URL or file name of an image representing the video. +|options +|A comma separated list of one or more of the following items: +'autoplay', 'loop' and 'nocontrols'. The 'autoplay' and 'loop' options +correspond to the same-named HTML 5 'video' element boolean +attributes. By default the player 'controls' are enabled, include the +'nocontrols' option value to hide them. +|==================================================================== + +Examples: + +--------------------------------------------------------------------- +audio::images/example.ogg[] + +video::gizmo.ogv[width=200,options="nocontrols,autoplay"] + +.Example video +video::gizmo.ogv[] + +video::http://www.808.dk/pics/video/gizmo.ogv[] +--------------------------------------------------------------------- + +If your needs are more complex put raw HTML 5 in a markup block, for +example (from http://www.808.dk/?code-html-5-video): + +--------------------------------------------------------------------- +++++ +<video poster="pics/video/gizmo.jpg" id="video" style="cursor: pointer;" > + <source src="pics/video/gizmo.mp4" /> + <source src="pics/video/gizmo.webm" type="video/webm" /> + <source src="pics/video/gizmo.ogv" type="video/ogg" /> + Video not playing? <a href="pics/video/gizmo.mp4">Download file</a> instead. +</video> + +<script type="text/javascript"> + var video = document.getElementById('video'); + video.addEventListener('click',function(){ + video.play(); + },false); +</script> +++++ +--------------------------------------------------------------------- + + +Tables +------ +The AsciiDoc table syntax looks and behaves like other delimited block +types and supports standard <<X73,block configuration entries>>. +Formatting is easy to read and, just as importantly, easy to enter. + +- Cells and columns can be formatted using built-in customizable styles. +- Horizontal and vertical cell alignment can be set on columns and + cell. +- Horizontal and vertical cell spanning is supported. + +.Use tables sparingly +********************************************************************* +When technical users first start creating documents, tables (complete +with column spanning and table nesting) are often considered very +important. The reality is that tables are seldom used, even in +technical documentation. + +Try this exercise: thumb through your library of technical books, +you'll be surprised just how seldom tables are actually used, even +less seldom are tables containing block elements (such as paragraphs +or lists) or spanned cells. This is no accident, like figures, tables +are outside the normal document flow -- tables are for consulting not +for reading. + +Tables are designed for, and should normally only be used for, +displaying column oriented tabular data. +********************************************************************* + +Example tables +~~~~~~~~~~~~~~ + +.Simple table +[width="15%"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= + +.AsciiDoc source +--------------------------------------------------------------------- +[width="15%"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= +--------------------------------------------------------------------- + +.Columns formatted with strong, monospaced and emphasis styles +[width="50%",cols=">s,^m,e",frame="topbot",options="header,footer"] +|========================== +| 2+|Columns 2 and 3 +|1 |Item 1 |Item 1 +|2 |Item 2 |Item 2 +|3 |Item 3 |Item 3 +|4 |Item 4 |Item 4 +|footer 1|footer 2|footer 3 +|========================== + +.AsciiDoc source +--------------------------------------------------------------------- +.An example table +[width="50%",cols=">s,^m,e",frame="topbot",options="header,footer"] +|========================== +| 2+|Columns 2 and 3 +|1 |Item 1 |Item 1 +|2 |Item 2 |Item 2 +|3 |Item 3 |Item 3 +|4 |Item 4 |Item 4 +|footer 1|footer 2|footer 3 +|========================== +--------------------------------------------------------------------- + +.Horizontal and vertical source data +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= + +Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry. + +.AsciiDoc source +--------------------------------------------------------------------- +.Windtrainer workouts +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= +--------------------------------------------------------------------- + +.A table with externally sourced CSV data +[format="csv",cols="^1,4*2",options="header"] +|=================================================== +ID,Customer Name,Contact Name,Customer Address,Phone +include::customers.csv[] +|=================================================== + +.AsciiDoc source +--------------------------------------------------------------------- +[format="csv",cols="^1,4*2",options="header"] +|=================================================== +ID,Customer Name,Contact Name,Customer Address,Phone +\include::customers.csv[] +|=================================================== +--------------------------------------------------------------------- + + +.Cell spans, alignments and styles +[cols="e,m,^,>s",width="25%"] +|============================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +^|8 +|9 2+>|10 +|============================ + +.AsciiDoc source +--------------------------------------------------------------------- +[cols="e,m,^,>s",width="25%"] +|============================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +^|8 +|9 2+>|10 +|============================ +--------------------------------------------------------------------- + +[[X68]] +Table input data formats +~~~~~~~~~~~~~~~~~~~~~~~~ +AsciiDoc table data can be 'psv', 'dsv' or 'csv' formatted. The +default table format is 'psv'. + +AsciiDoc 'psv' ('Prefix Separated Values') and 'dsv' ('Delimiter +Separated Values') formats are cell oriented -- the table is treated +as a sequence of cells -- there are no explicit row separators. + +- 'psv' prefixes each cell with a separator whereas 'dsv' delimits + cells with a separator. +- 'psv' and 'dsv' separators are Python regular expressions. +- The default 'psv' separator contains <<X84, cell specifier>> related + named regular expression groups. +- The default 'dsv' separator is `:|\n` (a colon or a new line + character). +- 'psv' and 'dsv' cell separators can be escaped by preceding them + with a backslash character. + +Here are four 'psv' cells (the second item spans two columns; the +last contains an escaped separator): + + |One 2+|Two and three |A \| separator character + +'csv' is the quasi-standard row oriented 'Comma Separated Values +(CSV)' format commonly used to import and export spreadsheet and +database data. + +[[X69]] +Table attributes +~~~~~~~~~~~~~~~~ +Tables can be customized by the following attributes: + +format:: +'psv' (default), 'dsv' or 'csv' (See <<X68, Table Data Formats>>). + +separator:: +The cell separator. A Python regular expression ('psv' and 'dsv' +formats) or a single character ('csv' format). + +frame:: +Defines the table border and can take the following values: 'topbot' +(top and bottom), 'all' (all sides), 'none' and 'sides' (left and +right sides). The default value is 'all'. + +grid:: +Defines which ruler lines are drawn between table rows and columns. +The 'grid' attribute value can be any of the following values: 'none', +'cols', 'rows' and 'all'. The default value is 'all'. + +align:: +Use the 'align' attribute to horizontally align the table on the +page (works with HTML outputs only, has no effect on DocBook outputs). +The following values are valid: 'left', 'right', and 'center'. + +float:: +Use the 'float' attribute to float the table 'left' or 'right' on the +page (works with HTML outputs only, has no effect on DocBook outputs). +Floating only makes sense in conjunction with a table 'width' +attribute value of less than 100% (otherwise the table will take up +all the available space). 'float' and 'align' attributes are mutually +exclusive. Use the `unfloat::[]` block macro to stop floating. + +halign:: +Use the 'halign' attribute to horizontally align all cells in a table. +The following values are valid: 'left', 'right', and 'center' +(defaults to 'left'). Overridden by <<X70,Column specifiers>> and +<<X84,Cell specifiers>>. + +valign:: +Use the 'valign' attribute to vertically align all cells in a table. +The following values are valid: 'top', 'bottom', and 'middle' +(defaults to 'top'). Overridden by <<X70,Column specifiers>> and +<<X84,Cell specifiers>>. + +options:: +The 'options' attribute can contain comma separated values, for +example: 'header', 'footer'. By default header and footer rows are +omitted. See <<X74,attribute options>> for a complete list of +available table options. + +cols:: +The 'cols' attribute is a comma separated list of <<X70,column +specifiers>>. For example `cols="2<p,2*,4p,>"`. + +- If 'cols' is present it must specify all columns. +- If the 'cols' attribute is not specified the number of columns is + calculated as the number of data items in the *first line* of the + table. +- The degenerate form for the 'cols' attribute is an integer + specifying the number of columns e.g. `cols=4`. + +width:: +The 'width' attribute is expressed as a percentage value +('"1%"'...'"99%"'). The width specifies the table width relative to +the available width. HTML backends use this value to set the table +width attribute. It's a bit more complicated with DocBook, see the +<<X89,DocBook table widths>> sidebar. + +filter:: +The 'filter' attribute defines an external shell command that is +invoked for each cell. The built-in 'asciidoc' table style is +implemented using a filter. + +[[X89]] +.DocBook table widths +********************************************************************** +The AsciiDoc docbook backend generates CALS tables. CALS tables do not +support a table width attribute -- table width can only be controlled +by specifying absolute column widths. + +Specifying absolute column widths is not media independent because +different presentation media have different physical dimensions. To +get round this limitation both +http://www.sagehill.net/docbookxsl/Tables.html#TableWidth[DocBook XSL +Stylesheets] and +http://dblatex.sourceforge.net/doc/manual/ch03s05.html#sec-table-width[dblatex] +have implemented table width processing instructions for setting the +table width as a percentage of the available width. AsciiDoc emits +these processing instructions if the 'width' attribute is set along +with proportional column widths (the AsciiDoc docbook backend +'pageunits' attribute defaults to '*'). + +To generate DocBook tables with absolute column widths set the +'pageunits' attribute to a CALS absolute unit such as 'pt' and set the +'pagewidth' attribute to match the width of the presentation media. +********************************************************************** + +[[X70]] +Column Specifiers +~~~~~~~~~~~~~~~~~ +Column specifiers define how columns are rendered and appear in the +table <<X69,cols attribute>>. A column specifier consists of an +optional column multiplier followed by optional alignment, width and +style values and is formatted like: + + [<multiplier>*][<align>][<width>][<style>] + +- All components are optional. The multiplier must be first and the + style last. The order of `<align>` or `<width>` is not important. +- Column `<width>` can be either an integer proportional value (1...) + or a percentage (1%...100%). The default value is 1. To ensure + portability across different backends, there is no provision for + absolute column widths (not to be confused with output column width + <<X72,markup attributes>> which are available in both percentage and + absolute units). +- The '<align>' column alignment specifier is formatted like: + + [<horizontal>][.<vertical>] ++ +Where `<horizontal>` and `<vertical>` are one of the following +characters: `<`, `^` or `>` which represent 'left', 'center' and +'right' horizontal alignment or 'top', 'middle' and 'bottom' vertical +alignment respectively. + +- A `<multiplier>` can be used to specify repeated columns e.g. + `cols="4*<"` specifies four left-justified columns. The default + multiplier value is 1. +- The `<style>` name specifies a <<X71,table style>> to used to markup + column cells (you can use the full style names if you wish but the + first letter is normally sufficient). +- Column specific styles are not applied to header rows. + +[[X84]] +Cell Specifiers +~~~~~~~~~~~~~~~ +Cell specifiers allow individual cells in 'psv' formatted tables to be +spanned, multiplied, aligned and styled. Cell specifiers prefix 'psv' +`|` delimiters and are formatted like: + + [<span>*|+][<align>][<style>] + +- '<span>' specifies horizontal and vertical cell spans ('+' operator) or + the number of times the cell is replicated ('*' operator). '<span>' + is formatted like: + + [<colspan>][.<rowspan>] ++ +Where `<colspan>` and `<rowspan>` are integers specifying the number of +columns and rows to span. + +- `<align>` specifies horizontal and vertical cell alignment an is the + same as in <<X70,column specifiers>>. +- A `<style>` value is the first letter of <<X71,table style>> name. + +For example, the following 'psv' formatted cell will span two columns +and the text will be centered and emphasized: + + `2+^e| Cell text` + +[[X71]] +Table styles +~~~~~~~~~~~~ +Table styles can be applied to the entire table (by setting the +'style' attribute in the table's attribute list) or on a per column +basis (by specifying the style in the table's <<X69,cols attribute>>). +Table data can be formatted using the following predefined styles: + +default:: +The default style: AsciiDoc inline text formatting; blank lines are +treated as paragraph breaks. + +emphasis:: +Like default but all text is emphasised. + +monospaced:: +Like default but all text is in a monospaced font. + +strong:: +Like default but all text is bold. + +header:: +Apply the same style as the table header. Normally used to create a +vertical header in the first column. + +asciidoc:: +With this style table cells can contain any of the AsciiDoc elements +that are allowed inside document sections. This style runs asciidoc(1) +as a filter to process cell contents. See also <<X83,Docbook table +limitations>>. + +literal:: +No text formatting; monospaced font; all line breaks are retained +(the same as the AsciiDoc <<X65,LiteralBlock>> element). + +verse:: +All line breaks are retained (just like the AsciiDoc <<X94,verse +paragraph style>>). + +[[X72]] +Markup attributes +~~~~~~~~~~~~~~~~~ +AsciiDoc makes a number of attributes available to table markup +templates and tags. Column specific attributes are available when +substituting the 'colspec' cell data tags. + +pageunits:: +DocBook backend only. Specifies table column absolute width units. +Defaults to '*'. + +pagewidth:: +DocBook backend only. The nominal output page width in 'pageunit' +units. Used to calculate CALS tables absolute column and table +widths. Defaults to '425'. + +tableabswidth:: +Integer value calculated from 'width' and 'pagewidth' attributes. +In 'pageunit' units. + +tablepcwidth:: +Table width expressed as a percentage of the available width. Integer +value (0..100). + +colabswidth:: +Integer value calculated from 'cols' column width, 'width' and +'pagewidth' attributes. In 'pageunit' units. + +colpcwidth:: +Column width expressed as a percentage of the table width. Integer +value (0..100). + +colcount:: +Total number of table columns. + +rowcount:: +Total number of table rows. + +halign:: +Horizontal cell content alignment: 'left', 'right' or 'center'. + +valign:: +Vertical cell content alignment: 'top', 'bottom' or 'middle'. + +colnumber, colstart:: +The number of the leftmost column occupied by the cell (1...). + +colend:: +The number of the rightmost column occupied by the cell (1...). + +colspan:: +Number of columns the cell should span. + +rowspan:: +Number of rows the cell should span (1...). + +morerows:: +Number of additional rows the cell should span (0...). + +Nested tables +~~~~~~~~~~~~~ +An alternative 'psv' separator character '!' can be used (instead of +'|') in nested tables. This allows a single level of table nesting. +Columns containing nested tables must use the 'asciidoc' style. An +example can be found in `./examples/website/newtables.txt`. + +[[X83]] +DocBook table limitations +~~~~~~~~~~~~~~~~~~~~~~~~~ +Fully implementing tables is not trivial, some DocBook toolchains do +better than others. AsciiDoc HTML table outputs are rendered +correctly in all the popular browsers -- if your DocBook generated +tables don't look right compare them with the output generated by the +AsciiDoc 'xhtml11' backend or try a different DocBook toolchain. Here +is a list of things to be aware of: + +- Although nested tables are not legal in DocBook 4 the FOP and + dblatex toolchains will process them correctly. If you use `a2x(1)` + you will need to include the `--no-xmllint` option to suppress + DocBook validation errors. ++ +NOTE: In theory you can nest DocBook 4 tables one level using the +'entrytbl' element, but not all toolchains process 'entrytbl'. + +- DocBook only allows a subset of block elements inside table cells so + not all AsciiDoc elements produce valid DocBook inside table cells. + If you get validation errors running `a2x(1)` try the `--no-xmllint` + option, toolchains will often process nested block elements such as + sidebar blocks and floating titles correctly even though, strictly + speaking, they are not legal. + +- Text formatting in cells using the 'monospaced' table style will + raise validation errors because the DocBook 'literal' element was + not designed to support formatted text (using the 'literal' element + is a kludge on the part of AsciiDoc as there is no easy way to set + the font style in DocBook. + +- Cell alignments are ignored for 'verse', 'literal' or 'asciidoc' + table styles. + + +[[X1]] +Manpage Documents +----------------- +Sooner or later, if you program in a UNIX environment, you're going +to have to write a man page. + +By observing a couple of additional conventions (detailed below) you +can write AsciiDoc files that will generate HTML and PDF man pages +plus the native manpage roff format. The easiest way to generate roff +manpages from AsciiDoc source is to use the a2x(1) command. The +following example generates a roff formatted manpage file called +`asciidoc.1` (a2x(1) uses asciidoc(1) to convert `asciidoc.1.txt` to +DocBook which it then converts to roff using DocBook XSL Stylesheets): + + a2x --doctype manpage --format manpage asciidoc.1.txt + +.Viewing and printing manpage files +********************************************************************** +Use the `man(1)` command to view the manpage file: + + $ man -l asciidoc.1 + +To print a high quality man page to a postscript printer: + + $ man -l -Tps asciidoc.1 | lpr + +You could also create a PDF version of the man page by converting +PostScript to PDF using `ps2pdf(1)`: + + $ man -l -Tps asciidoc.1 | ps2pdf - asciidoc.1.pdf + +The `ps2pdf(1)` command is included in the Ghostscript distribution. +********************************************************************** + +To find out more about man pages view the `man(7)` manpage +(`man 7 man` and `man man-pages` commands). + + +Document Header +~~~~~~~~~~~~~~~ +A manpage document Header is mandatory. The title line contains the +man page name followed immediately by the manual section number in +brackets, for example 'ASCIIDOC(1)'. The title name should not contain +white space and the manual section number is a single digit optionally +followed by a single character. + +The NAME Section +~~~~~~~~~~~~~~~~ +The first manpage section is mandatory, must be titled 'NAME' and must +contain a single paragraph (usually a single line) consisting of a +list of one or more comma separated command name(s) separated from the +command purpose by a dash character. The dash must have at least one +white space character on either side. For example: + + printf, fprintf, sprintf - print formatted output + +The SYNOPSIS Section +~~~~~~~~~~~~~~~~~~~~ +The second manpage section is mandatory and must be titled 'SYNOPSIS'. + +refmiscinfo attributes +~~~~~~~~~~~~~~~~~~~~~~ +In addition to the automatically created man page <<X60,intrinsic +attributes>> you can assign DocBook +https://tdg.docbook.org/tdg/4.5/refmiscinfo.html[refmiscinfo] +element 'source', 'version' and 'manual' values using AsciiDoc +`{mansource}`, `{manversion}` and `{manmanual}` attributes +respectively. This example is from the AsciiDoc header of a man page +source file: + + :man source: AsciiDoc + :man version: {revnumber} + :man manual: AsciiDoc Manual + + +[[X78]] +Mathematical Formulas +--------------------- +The 'asciimath' and 'latexmath' <<X76,passthrough blocks>> along with +the 'asciimath' and 'latexmath' <<X77,passthrough macros>> provide a +(backend dependent) mechanism for rendering mathematical formulas. You +can use the following math markups: + +LaTeX Math +~~~~~~~~~~ +ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf[LaTeX +math] can be included in documents that are processed by +<<X31,dblatex(1)>>. Example inline formula: + + latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] + +For more examples see the {website}[AsciiDoc website] or the +distributed `doc/latexmath.txt` file. + +MathJax +~~~~~~~ +https://www.mathjax.org/[MathJax] allows LaTeX Math style formulas to be included +in XHTML documents generated via the AsciiDoc 'xhtml11' and 'html5' backends. +This route overcomes several restrictions of the MathML-based approaches, +notably, restricted support of MathML by many mainstream browsers. To enable +'MathJax' support you must define the 'mathjax' attribute, for example using the +`-a mathjax` command-line option. Equations are specified as explained above +using the 'latexmath' passthrough blocks. By default, rendering of equations +with 'MathJax' requires a working internet connection and will thus not work if +you are offline (but it can be configured differently). + +LaTeXMathML +~~~~~~~~~~~ +///////////////////////////////////////////////////////////////////// +There is an https://math.etsu.edu/LaTeXMathML/[extended LaTeXMathML +version] by Jeff Knisley, in addition to a JavaScript file it requires +the inclusion of a CSS file. +///////////////////////////////////////////////////////////////////// + +'LaTeXMathML' allows LaTeX Math style formulas to be included in XHTML +documents generated using the AsciiDoc 'xhtml11' and 'html5' backends. +AsciiDoc uses the +https://www.maths.nottingham.ac.uk/plp/pmadw/lm.html[original +LaTeXMathML] by Douglas Woodall. 'LaTeXMathML' is derived from +ASCIIMath and is for users who are more familiar with or prefer +using LaTeX math formulas (it recognizes a subset of LaTeX Math, the +differences are documented on the 'LaTeXMathML' web page). To enable +LaTeXMathML support you must define the 'latexmath' attribute, for +example using the `-a latexmath` command-line option. Example inline +formula: + + latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$] + +For more examples see the {website}[AsciiDoc website] or the +distributed `doc/latexmathml.txt` file. + +NOTE: The 'latexmath' macro used to include 'LaTeX Math' in DocBook +outputs is not the same as the 'latexmath' macro used to include +'LaTeX MathML' in XHTML outputs. 'LaTeX Math' applies to DocBook +outputs that are processed by <<X31,dblatex>> and is normally used to +generate PDF files. 'LaTeXMathML' is very much a subset of 'LaTeX +Math' and applies to XHTML documents. This remark does not +apply to 'MathJax' which does not use any of the 'latexmath' macros +(but only requires the 'latexmath' passthrough blocks for identification +of the equations). + +ASCIIMath +~~~~~~~~~~~ +///////////////////////////////////////////////////////////////////// +The older ASCIIMath 1.47 version is used instead of version 2 +because: + +1. Version 2 doesn't work when embedded. +2. Version 2 is much larger. +///////////////////////////////////////////////////////////////////// + +http://asciimath.org/[ASCIIMath] formulas can be included in XHTML +documents generated using the 'xhtml11' and 'html5' backends. To enable +ASCIIMath support you must define the 'asciimath' attribute, for +example using the `-a asciimath` command-line option. Example inline +formula: + + asciimath:[`x/x={(1,if x!=0),(text{undefined},if x=0):}`] + +For more examples see the {website}[AsciiDoc website] or the +distributed `doc/asciimath.txt` file. + +MathML +~~~~~~ +https://www.w3.org/Math/[MathML] is a low level XML markup for +mathematics. AsciiDoc has no macros for MathML but users familiar with +this markup could use passthrough macros and passthrough blocks to +include MathML in output documents. + + +[[X7]] +Configuration Files +------------------- +AsciiDoc source file syntax and output file markup is largely +controlled by a set of cascading, text based, configuration files. At +runtime The AsciiDoc default configuration files are combined with +optional user and document specific configuration files. + +Configuration File Format +~~~~~~~~~~~~~~~~~~~~~~~~~ +Configuration files contain named sections. Each section begins with a +section name in square brackets []. The section body consists of the +lines of text between adjacent section headings. + +- Section names consist of one or more alphanumeric, underscore or + dash characters and cannot begin or end with a dash. +- Lines starting with a '#' character are treated as comments and + ignored. +- If the section name is prefixed with a '+' character then the + section contents is appended to the contents of an already existing + same-named section. +- Otherwise same-named sections and section entries override + previously loaded sections and section entries (this is sometimes + referred to as 'cascading'). Consequently, downstream configuration + files need only contain those sections and section entries that need + to be overridden. + +TIP: When creating custom configuration files you only need to include +the sections and entries that differ from the default configuration. + +TIP: The best way to learn about configuration files is to read the +default configuration files in the AsciiDoc distribution in +conjunction with asciidoc(1) output files. You can view configuration +file load sequence by turning on the asciidoc(1) `-v` (`--verbose`) +command-line option. + +AsciiDoc reserves the following section names for specific purposes: + +miscellaneous:: + Configuration options that don't belong anywhere else. +attributes:: + Attribute name/value entries. +specialcharacters:: + Special characters reserved by the backend markup. +tags:: + Backend markup tags. +quotes:: + Definitions for quoted inline character formatting. +specialwords:: + Lists of words and phrases singled out for special markup. +replacements, replacements2, replacements3:: + Find and replace substitution definitions. +specialsections:: + Used to single out special section names for specific markup. +macros:: + Macro syntax definitions. +titles:: + Heading, section and block title definitions. +paradef-*:: + Paragraph element definitions. +blockdef-*:: + DelimitedBlock element definitions. +listdef-*:: + List element definitions. +listtags-*:: + List element tag definitions. +tabledef-*:: + Table element definitions. +tabletags-*:: + Table element tag definitions. + +Each line of text in these sections is a 'section entry'. Section +entries share the following syntax: + +name=value:: + The entry value is set to value. +name=:: + The entry value is set to a zero length string. +name!:: + The entry is undefined (deleted from the configuration). This + syntax only applies to 'attributes' and 'miscellaneous' + sections. + +.Section entry behavior +- All equals characters inside the `name` must be escaped with a + backslash character. +- `name` and `value` are stripped of leading and trailing white space. +- Attribute names, tag entry names and markup template section names + consist of one or more alphanumeric, underscore or dash characters. + Names should not begin or end with a dash. +- A blank configuration file section (one without any entries) deletes + any preceding section with the same name (applies to non-markup + template sections). + + +Miscellaneous section +~~~~~~~~~~~~~~~~~~~~~ +The optional `[miscellaneous]` section specifies the following +`name=value` options: + +newline:: + Output file line termination characters. Can include any + valid Python string escape sequences. The default value is + `\r\n` (carriage return, line feed). Should not be quoted or + contain explicit spaces (use `\x20` instead). For example: + + $ asciidoc -a 'newline=\n' -b docbook mydoc.txt + +outfilesuffix:: + The default extension for the output file, for example + `outfilesuffix=.html`. Defaults to backend name. +tabsize:: + The number of spaces to expand tab characters, for example + `tabsize=4`. Defaults to 8. A 'tabsize' of zero suppresses tab + expansion (useful when piping included files through block + filters). Included files can override this option using the + 'tabsize' attribute. +pagewidth, pageunits:: + These global table related options are documented in the + <<X4,Table Configuration File Definitions>> sub-section. + +NOTE: `[miscellaneous]` configuration file entries can be set using +the asciidoc(1) `-a` (`--attribute`) command-line option. + +Titles section +~~~~~~~~~~~~~~ +sectiontitle:: + Two line section title pattern. The entry value is a Python + regular expression containing the named group 'title'. + +underlines:: + A comma separated list of document and section title underline + character pairs starting with the section level 0 and ending + with section level 4 underline. The default setting is: + + underlines="==","--","~~","^^","++" + +sect0...sect4:: + One line section title patterns. The entry value is a Python + regular expression containing the named group 'title'. + +blocktitle:: + <<X42,BlockTitle element>> pattern. The entry value is a + Python regular expression containing the named group 'title'. + +subs:: + A comma separated list of substitutions that are performed on + the document header and section titles. Defaults to 'normal' + substitution. + +Tags section +~~~~~~~~~~~~ +The `[tags]` section contains backend tag definitions (one per +line). Tags are used to translate AsciiDoc elements to backend +markup. + +An AsciiDoc tag definition is formatted like +`<tagname>=<starttag>|<endtag>`. For example: + + emphasis=<em>|</em> + +In this example asciidoc(1) replaces the | character with the +emphasized text from the AsciiDoc input file and writes the result to +the output file. + +Use the `{brvbar}` attribute reference if you need to include a | pipe +character inside tag text. + +Attributes section +~~~~~~~~~~~~~~~~~~ +The optional `[attributes]` section contains predefined attributes. + +If the attribute value requires leading or trailing spaces then the +text text should be enclosed in quotation mark (") characters. + +To delete a attribute insert a `name!` entry in a downstream +configuration file or use the asciidoc(1) `--attribute name!` +command-line option (an attribute name suffixed with a `!` character +deletes the attribute) + +Special Characters section +~~~~~~~~~~~~~~~~~~~~~~~~~~ +The `[specialcharacters]` section specifies how to escape characters +reserved by the backend markup. Each translation is specified on a +single line formatted like: + + <special_character>=<translated_characters> + +Special characters are normally confined to those that resolve +markup ambiguity (in the case of HTML and XML markups the ampersand, +less than and greater than characters). The following example causes +all occurrences of the `<` character to be replaced by `<`. + + <=< + +Quoted Text section +~~~~~~~~~~~~~~~~~~~ +Quoting is used primarily for text formatting. The `[quotes]` section +defines AsciiDoc quoting characters and their corresponding backend +markup tags. Each section entry value is the name of a of a `[tags]` +section entry. The entry name is the character (or characters) that +quote the text. The following examples are taken from AsciiDoc +configuration files: + + [quotes] + _=emphasis + + [tags] + emphasis=<em>|</em> + +You can specify the left and right quote strings separately by +separating them with a | character, for example: + + ``|''=quoted + +Omitting the tag will disable quoting, for example, if you don't want +superscripts or subscripts put the following in a custom configuration +file or edit the global `asciidoc.conf` configuration file: + + [quotes] + ^= + ~= + +<<X52,Unconstrained quotes>> are differentiated from constrained +quotes by prefixing the tag name with a hash character, for example: + + __=#emphasis + +.Quoted text behavior +- Quote characters must be non-alphanumeric. +- To minimize quoting ambiguity try not to use the same quote + characters in different quote types. + +Special Words section +~~~~~~~~~~~~~~~~~~~~~ +The `[specialwords]` section is used to single out words and phrases +that you want to consistently format in some way throughout your +document without having to repeatedly specify the markup. The name of +each entry corresponds to a markup template section and the entry +value consists of a list of words and phrases to be marked up. For +example: + + [specialwords] + strongwords=NOTE IMPORTANT + + [strongwords] + <strong>{words}</strong> + +The examples specifies that any occurrence of `NOTE` or `IMPORTANT` +should appear in a bold font. + +Words and word phrases are treated as Python regular expressions: for +example, the word `^NOTE` would only match `NOTE` if appeared at +the start of a line. + +AsciiDoc comes with three built-in Special Word types: +'emphasizedwords', 'monospacedwords' and 'strongwords', each has a +corresponding (backend specific) markup template section. Edit the +configuration files to customize existing Special Words and to add new +ones. + +.Special word behavior +- Word list entries must be separated by space characters. +- Word list entries with embedded spaces should be enclosed in quotation (") + characters. +- A `[specialwords]` section entry of the form + +name=word1{nbsp}[word2...]+ adds words to existing `name` entries. +- A `[specialwords]` section entry of the form `name` undefines + (deletes) all existing `name` words. +- Since word list entries are processed as Python regular expressions + you need to be careful to escape regular expression special + characters. +- By default Special Words are substituted before Inline Macros, this + may lead to undesirable consequences. For example the special word + `foobar` would be expanded inside the macro call + `http://www.foobar.com[]`. A possible solution is to emphasize + whole words only by defining the word using regular expression + characters, for example `\bfoobar\b`. +- If the first matched character of a special word is a backslash then + the remaining characters are output without markup i.e. the + backslash can be used to escape special word markup. For example + the special word `\\?\b[Tt]en\b` will mark up the words `Ten` and + `ten` only if they are not preceded by a backslash. + +[[X10]] +Replacements section +~~~~~~~~~~~~~~~~~~~~ +`[replacements]`, `[replacements2]` and `[replacements3]` +configuration file entries specify find and replace text and are +formatted like: + + <find_pattern>=<replacement_text> + +The find text can be a Python regular expression; the replace text can +contain Python regular expression group references. + +Use Replacement shortcuts for often used macro references, for +example (the second replacement allows us to backslash escape the +macro name): + + NEW!=image:./images/smallnew.png[New!] + \\NEW!=NEW! + +The only difference between the three replacement types is how they +are applied. By default 'replacements' and 'replacements2' are applied +in <<X102,normal>> substitution contexts whereas 'replacements3' needs +to be configured explicitly and should only be used in backend +configuration files. + +.Replacement behavior +- The built-in replacements can be escaped with a backslash. +- If the find or replace text has leading or trailing spaces then the + text should be enclosed in quotation (") characters. +- Since the find text is processed as a regular expression you need to + be careful to escape regular expression special characters. +- Replacements are performed in the same order they appear in the + configuration file replacements section. + +Markup Template Sections +~~~~~~~~~~~~~~~~~~~~~~~~ +Markup template sections supply backend markup for translating +AsciiDoc elements. Since the text is normally backend dependent +you'll find these sections in the backend specific configuration +files. Template sections differ from other sections in that they +contain a single block of text instead of per line 'name=value' +entries. A markup template section body can contain: + +- Attribute references +- System macro calls. +- A document content placeholder + +The document content placeholder is a single | character and is +replaced by text from the source element. Use the `{brvbar}` +attribute reference if you need a literal | character in the template. + +[[X27]] +Configuration file names, precedence and locations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Configuration files have a `.conf` file name extension; they are +loaded from the following locations: + +1. The directory containing the asciidoc executable. +2. If there is no `asciidoc.conf` file in the directory containing the + asciidoc executable then load from the global configuration + directory (normally `/etc/asciidoc` or `/usr/local/etc/asciidoc`) + i.e. the global configuration files directory is skipped if + AsciiDoc configuration files are installed in the same directory as + the asciidoc executable. This allows both a system wide copy and + multiple local copies of AsciiDoc to coexist on the same host PC. +3. The user's `$HOME/.asciidoc` directory (if it exists). +4. The directory containing the AsciiDoc source file. +5. Explicit configuration files specified using: + - The `conf-files` attribute (one or more file names separated by a + `|` character). These files are loaded in the order they are + specified and prior to files specified using the `--conf-file` + command-line option. + - The asciidoc(1) `--conf-file`) command-line option. The + `--conf-file` option can be specified multiple times, in which + case configuration files will be processed in the same order they + appear on the command-line. +6. <<X100,Backend plugin>> configuration files are loaded from + subdirectories named like `backends/<backend>` in locations 1, 2 + and 3. +7. <<X59,Filter>> configuration files are loaded from subdirectories + named like `filters/<filter>` in locations 1, 2 and 3. + +Configuration files from the above locations are loaded in the +following order: + +- The `[attributes]` section only from: + * `asciidoc.conf` in location 3 + * Files from location 5. ++ +This first pass makes locally set attributes available in the global +`asciidoc.conf` file. + +- `asciidoc.conf` from locations 1, 2, 3. +- 'attributes', 'titles' and 'specialcharacters' sections from the + `asciidoc.conf` in location 4. +- The document header is parsed at this point and we can assume the + 'backend' and 'doctype' have now been defined. +- Backend plugin `<backend>.conf` and `<backend>-<doctype>.conf` files + from locations 6. If a backend plugin is not found then try + locations 1, 2 and 3 for `<backend>.conf` and + `<backend>-<doctype>.conf` backend configuration files. +- Filter conf files from locations 7. +- `lang-<lang>.conf` from locations 1, 2, 3. +- `asciidoc.conf` from location 4. +- `<backend>.conf` and `<backend>-<doctype>.conf` from location 4. +- Filter conf files from location 4. +- `<docfile>.conf` and `<docfile>-<backend>.conf` from location 4. +- Configuration files from location 5. + +Where: + +- `<backend>` and `<doctype>` are values specified by the asciidoc(1) + `-b` (`--backend`) and `-d` (`--doctype`) command-line options. +- `<infile>` is the path name of the AsciiDoc input file without the + file name extension. +- `<lang>` is a two letter country code set by the the AsciiDoc 'lang' + attribute. + +[NOTE] +===================================================================== +The backend and language global configuration files are loaded *after* +the header has been parsed. This means that you can set most +attributes in the document header. Here's an example header: + + Life's Mysteries + ================ + :author: Hu Nose + :doctype: book + :toc: + :icons: + :data-uri: + :lang: en + :encoding: iso-8859-1 + +Attributes set in the document header take precedence over +configuration file attributes. + +===================================================================== + +TIP: Use the asciidoc(1) `-v` (`--verbose`) command-line option to see +which configuration files are loaded and the order in which they are +loaded. + + +Document Attributes +------------------- +A document attribute is comprised of a 'name' and a textual 'value' +and is used for textual substitution in AsciiDoc documents and +configuration files. An attribute reference (an attribute name +enclosed in braces) is replaced by the corresponding attribute +value. Attribute names are case insensitive and can only contain +alphanumeric, dash and underscore characters. + +There are four sources of document attributes (from highest to lowest +precedence): + +- Command-line attributes. +- AttributeEntry, AttributeList, Macro and BlockId elements. +- Configuration file `[attributes]` sections. +- Intrinsic attributes. + +Within each of these divisions the last processed entry takes +precedence. + +NOTE: If an attribute is not defined then the line containing the +attribute reference is dropped. This property is used extensively in +AsciiDoc configuration files to facilitate conditional markup +generation. + + +[[X18]] +Attribute Entries +----------------- +The `AttributeEntry` block element allows document attributes to be +assigned within an AsciiDoc document. Attribute entries are added to +the global document attributes dictionary. The attribute name/value +syntax is a single line like: + + :<name>: <value> + +For example: + + :Author Initials: JB + +This will set an attribute reference `{authorinitials}` to the value +'JB' in the current document. + +To delete (undefine) an attribute use the following syntax: + + :<name>!: + +.AttributeEntry behavior +- The attribute entry line begins with colon -- no white space allowed + in left margin. +- AsciiDoc converts the `<name>` to a legal attribute name (lower + case, alphanumeric, dash and underscore characters only -- all other + characters deleted). This allows more human friendly text to be + used. +- Leading and trailing white space is stripped from the `<value>`. +- Lines ending in a space followed by a plus character are continued + to the next line, for example: + + :description: AsciiDoc is a text document format for writing notes, + + documentation, articles, books, slideshows, web pages + + and man pages. + +- If the `<value>` is blank then the corresponding attribute value is + set to an empty string. +- Attribute references contained in the entry `<value>` will be + expanded. +- By default AttributeEntry values are substituted for + `specialcharacters` and `attributes` (see above), if you want to + change or disable AttributeEntry substitution use the <<X77,\pass:[] + inline macro>> syntax. +- Attribute entries in the document Header are available for header + markup template substitution. +- Attribute elements override configuration file and intrinsic + attributes but do not override command-line attributes. + +Here are some more attribute entry examples: + +--------------------------------------------------------------------- +AsciiDoc User Manual +==================== +:author: Stuart Rackham +:email: srackham@gmail.com +:revdate: April 23, 2004 +:revnumber: 5.1.1 +--------------------------------------------------------------------- + +Which creates these attributes: + + {author}, {firstname}, {lastname}, {authorinitials}, {email}, + {revdate}, {revnumber} + +The previous example is equivalent to this <<X95,document header>>: + +--------------------------------------------------------------------- +AsciiDoc User Manual +==================== +Stuart Rackham <srackham@gmail.com> +5.1.1, April 23, 2004 +--------------------------------------------------------------------- + +Setting configuration entries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +A variant of the Attribute Entry syntax allows configuration file +section entries and markup template sections to be set from within an +AsciiDoc document: + + :<section_name>.[<entry_name>]: <entry_value> + +Where `<section_name>` is the configuration section name, +`<entry_name>` is the name of the entry and `<entry_value>` is the +optional entry value. This example sets the default labeled list +style to 'horizontal': + + :listdef-labeled.style: horizontal + +It is exactly equivalent to a configuration file containing: + + [listdef-labeled] + style=horizontal + +- If the `<entry_name>` is omitted then the entire section is + substituted with the `<entry_value>`. This feature should only be + used to set markup template sections. The following example sets the + 'xref2' inline macro markup template: + + :xref2-inlinemacro.: <a href="#{1}">{2?{2}}</a> + +- No substitution is performed on configuration file attribute entries + and they cannot be undefined. +- This feature can only be used in attribute entries -- configuration + attributes cannot be set using the asciidoc(1) command `--attribute` + option. + +[[X62]] +.Attribute entries promote clarity and eliminate repetition +********************************************************************* +URLs and file names in AsciiDoc macros are often quite long -- they +break paragraph flow and readability suffers. The problem is +compounded by redundancy if the same name is used repeatedly. +Attribute entries can be used to make your documents easier to read +and write, here are some examples: + + :1: http://freshmeat.sourceforge.net/projects/asciidoc/ + :homepage: https://asciidoc.org[AsciiDoc home page] + :new: image:./images/smallnew.png[] + :footnote1: footnote:[A meaningless latin term] + + Using previously defined attributes: See the {1}[Freshmeat summary] + or the {homepage} for something new {new}. Lorem ispum {footnote1}. + +.Note +- The attribute entry definition must precede it's usage. +- You are not limited to URLs or file names, entire macro calls or + arbitrary lines of text can be abbreviated. +- Shared attributes entries could be grouped into a separate file and + <<X63,included>> in multiple documents. +********************************************************************* + + +[[X21]] +Attribute Lists +--------------- +- An attribute list is a comma separated list of attribute values. +- The entire list is enclosed in square brackets. +- Attribute lists are used to pass parameters to macros, blocks (using + the <<X79,AttributeList element>>) and inline quotes. + +The list consists of zero or more positional attribute values followed +by zero or more named attribute values. Here are three examples: a +single unquoted positional attribute; three unquoted positional +attribute values; one positional attribute followed by two named +attributes; the unquoted attribute value in the final example contains +comma (`,`) and double-quote (`"`) character entities: + + [Hello] + [quote, Bertrand Russell, The World of Mathematics (1956)] + ["22 times", backcolor="#0e0e0e", options="noborders,wide"] + [A footnote, "with an image" image:smallnew.png[]] + +.Attribute list behavior +- If one or more attribute values contains a comma the all string + values must be quoted (enclosed in double quotation mark + characters). +- If the list contains any named or quoted attributes then all string + attribute values must be quoted. +- To include a double quotation mark (") character in a quoted + attribute value the the quotation mark must be escaped with a + backslash. +- List attributes take precedence over existing attributes. +- List attributes can only be referenced in configuration file markup + templates and tags, they are not available elsewhere in the + document. +- Setting a named attribute to `None` undefines the attribute. +- Positional attributes are referred to as `{1}`,`{2}`,`{3}`,... +- Attribute `{0}` refers to the entire list (excluding the enclosing + square brackets). +- Named attribute names cannot contain dash characters. + +[[X75]] +Options attribute +~~~~~~~~~~~~~~~~~ +If the attribute list contains an attribute named `options` it is +processed as a comma separated list of option names: + +- Each name generates an attribute named like `<option>-option` (where + `<option>` is the option name) with an empty string value. For + example `[options="opt1,opt2,opt3"]` is equivalent to setting the + following three attributes + `[opt1-option="",opt2-option="",opt2-option=""]`. +- If you define a an option attribute globally (for example with an + <<X18,attribute entry>>) then it will apply to all elements in the + document. +- AsciiDoc implements a number of predefined options which are listed + in the <<X74,Attribute Options appendix>>. + +Macro Attribute lists +~~~~~~~~~~~~~~~~~~~~~ +Macros calls are suffixed with an attribute list. The list may be +empty but it cannot be omitted. List entries are used to pass +attribute values to macro markup templates. + + +Attribute References +-------------------- +An attribute reference is an attribute name (possibly followed by an +additional parameters) enclosed in curly braces. When an attribute +reference is encountered it is evaluated and replaced by its +corresponding text value. If the attribute is undefined the line +containing the attribute is dropped. + +There are three types of attribute reference: 'Simple', 'Conditional' +and 'System'. + +.Attribute reference evaluation +- You can suppress attribute reference expansion by placing a + backslash character immediately in front of the opening brace + character. +- By default attribute references are not expanded in + 'LiteralParagraphs', 'ListingBlocks' or 'LiteralBlocks'. +- Attribute substitution proceeds line by line in reverse line order. +- Attribute reference evaluation is performed in the following order: + 'Simple' then 'Conditional' and finally 'System'. + +Simple Attributes References +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Simple attribute references take the form `{<name>}`. If the +attribute name is defined its text value is substituted otherwise the +line containing the reference is dropped from the output. + +Conditional Attribute References +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Additional parameters are used in conjunction with attribute names to +calculate a substitution value. Conditional attribute references take +the following forms: + +`{<names>=<value>}`:: + `<value>` is substituted if the attribute `<names>` is + undefined otherwise its value is substituted. `<value>` can + contain simple attribute references. + +`{<names>?<value>}`:: + `<value>` is substituted if the attribute `<names>` is defined + otherwise an empty string is substituted. `<value>` can + contain simple attribute references. + +`{<names>!<value>}`:: + `<value>` is substituted if the attribute `<names>` is + undefined otherwise an empty string is substituted. `<value>` + can contain simple attribute references. + +`{<names>#<value>}`:: + `<value>` is substituted if the attribute `<names>` is defined + otherwise the undefined attribute entry causes the containing + line to be dropped. `<value>` can contain simple attribute + references. + +`{<names>%<value>}`:: + `<value>` is substituted if the attribute `<names>` is not + defined otherwise the containing line is dropped. `<value>` + can contain simple attribute references. + +`{<names>@<regexp>:<value1>[:<value2>]}`:: + `<value1>` is substituted if the value of attribute `<names>` + matches the regular expression `<regexp>` otherwise `<value2>` + is substituted. If attribute `<names>` is not defined the + containing line is dropped. If `<value2>` is omitted an empty + string is assumed. The values and the regular expression can + contain simple attribute references. To embed colons in the + values or the regular expression escape them with backslashes. + +`{<names>$<regexp>:<value1>[:<value2>]}`:: + Same behavior as the previous ternary attribute except for + the following cases: + + `{<names>$<regexp>:<value>}`;; + Substitutes `<value>` if `<names>` matches `<regexp>` + otherwise the result is undefined and the containing + line is dropped. + + `{<names>$<regexp>::<value>}`;; + Substitutes `<value>` if `<names>` does not match + `<regexp>` otherwise the result is undefined and the + containing line is dropped. + +The attribute `<names>` parameter normally consists of a single +attribute name but it can be any one of the following: + +- A single attribute name which evaluates to the attributes value. +- Multiple ',' separated attribute names which evaluates to an empty + string if one or more of the attributes is defined, otherwise it's + value is undefined. +- Multiple '+' separated attribute names which evaluates to an empty + string if all of the attributes are defined, otherwise it's value is + undefined. + +Conditional attributes with single attribute names are evaluated first +so they can be used inside the multi-attribute conditional `<value>`. + +Conditional attribute examples +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Conditional attributes are mainly used in AsciiDoc configuration +files -- see the distribution `.conf` files for examples. + +Attribute equality test:: + If `{backend}` is 'docbook45' or 'xhtml11' the example evaluates to + ``DocBook 4.5 or XHTML 1.1 backend'' otherwise it evaluates to + ``some other backend'': + + {backend@docbook45|xhtml11:DocBook 4.5 or XHTML 1.1 backend:some other backend} + +Attribute value map:: + This example maps the `frame` attribute values [`topbot`, `all`, + `none`, `sides`] to [`hsides`, `border`, `void`, `vsides`]: + + {frame@topbot:hsides}{frame@all:border}{frame@none:void}{frame@sides:vsides} + + +[[X24]] +System Attribute References +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +System attribute references generate the attribute text value by +executing a predefined action that is parametrized by one or more +arguments. The syntax is `{<action>:<arguments>}`. + +`{counter:<attrname>[:<seed>]}`:: + Increments the document attribute (if the attribute is + undefined it is set to `1`). Returns the new attribute value. + + - Counters generate global (document wide) attributes. + - The optional `<seed>` specifies the counter's initial value; + it can be a number or a single letter; defaults to '1'. + - `<seed>` can contain simple and conditional attribute + references. + - The 'counter' system attribute will not be executed if the + containing line is dropped by the prior evaluation of an + undefined attribute. + +`{counter2:<attrname>[:<seed>]}`:: + Same as `counter` except the it always returns a blank string. + +`{eval:<expression>}`:: + Substitutes the result of the Python `<expression>`. + + - If `<expression>` evaluates to `None` or `False` the + reference is deemed undefined and the line containing the + reference is dropped from the output. + - If the expression evaluates to `True` the attribute + evaluates to an empty string. + - `<expression>` can contain simple and conditional attribute + references. + - The 'eval' system attribute can be nested inside other + system attributes. + +`{eval3:<command>}`:: + Passthrough version of `{eval:<expression>}` -- the generated + output is written directly to the output without any further + substitutions. + +`{include:<filename>}`:: + Substitutes contents of the file named `<filename>`. + + - The included file is read at the time of attribute + substitution. + - If the file does not exist a warning is emitted and the line + containing the reference is dropped from the output file. + - Tabs are expanded based on the current 'tabsize' attribute + value. + +`{set:<attrname>[!][:<value>]}`:: + Sets or unsets document attribute. Normally only used in + configuration file markup templates (use + <<X18,AttributeEntries>> in AsciiDoc documents). + + - If the attribute name is followed by an exclamation mark + the attribute becomes undefined. + - If `<value>` is omitted the attribute is set to a blank + string. + - `<value>` can contain simple and conditional attribute + references. + - Returns a blank string unless the attribute is undefined in + which case the return value is undefined and the enclosing + line will be dropped. + +`{set2:<attrname>[!][:<value>]}`:: + Same as `set` except that the attribute scope is local to the + template. + +`{sys:<command>}`:: + Substitutes the stdout generated by the execution of the shell + `<command>`. + +`{sys2:<command>}`:: + Substitutes the stdout and stderr generated by the execution + of the shell `<command>`. + +`{sys3:<command>}`:: + Passthrough version of `{sys:<command>}` -- the generated + output is written directly to the output without any further + substitutions. + +`{template:<template>}`:: + Substitutes the contents of the configuration file section + named `<template>`. Attribute references contained in the + template are substituted. + +.System reference behavior +- System attribute arguments can contain non-system attribute + references. +- Closing brace characters inside system attribute arguments must be + escaped with a backslash. + +[[X60]] +Intrinsic Attributes +-------------------- +Intrinsic attributes are simple attributes that are created +automatically from: AsciiDoc document header parameters; asciidoc(1) +command-line arguments; attributes defined in the default +configuration files; the execution context. Here's the list of +predefined intrinsic attributes: + + {amp} ampersand (&) character entity + {asciidoc-args} used to pass inherited arguments to asciidoc filters + {asciidoc-confdir} the asciidoc(1) global configuration directory + {asciidoc-dir} the asciidoc(1) application directory + {asciidoc-file} the full path name of the asciidoc(1) script + {asciidoc-version} the version of asciidoc(1) + {author} author's full name + {authored} empty string '' if {author} or {email} defined, + {authorinitials} author initials (from document header) + {backend-<backend>} empty string '' + {<backend>-<doctype>} empty string '' + {backend} document backend specified by `-b` option + {backend-confdir} the directory containing the <backend>.conf file + {backslash} backslash character + {basebackend-<base>} empty string '' + {basebackend} html or docbook + {blockname} current block name (note 8). + {brvbar} broken vertical bar (|) character + {docdate} document last modified date (note 9) + {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 (note 9) + {doctitle} document title (from document header) + {doctype-<doctype>} empty string '' + {doctype} document type specified by `-d` option + {email} author's email address (from document header) + {empty} empty string '' + {encoding} specifies input and output encoding + {filetype-<fileext>} empty string '' + {filetype} output file name file extension + {firstname} author first name (from document header) + {gt} greater than (>) character entity + {id} running block id generated by BlockId elements + {indir} input file directory name (note 2,5) + {infile} input file name (note 2,5) + {lastname} author last name (from document header) + {ldquo} 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 (note 9) + {localtime} the current time (note 9) + {lsquo} Left single quote character (note 7) + {lt} less than (<) character entity + {manname} manpage name (defined in NAME section) + {manpurpose} manpage (defined in NAME section) + {mantitle} document title minus the manpage volume number + {manvolnum} manpage volume number (1..8) (from document header) + {middlename} author middle name (from document header) + {nbsp} non-breaking space character entity + {notitle} do not display the document title + {outdir} document output directory name (note 2) + {outfile} output file name (note 2) + {plus} plus character + {python} the full path name of the Python interpreter executable + {rdquo} 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) + {rsquo} right single quote character (note 7) + {sectnum} formatted section number (in section titles) + {sp} space character + {showcomments} send comment lines to the output + {title} section title (in titled elements) + {two-colons} two colon characters + {two-semicolons} two semicolon characters + {user-dir} the ~/.asciidoc directory (if it exists) + {verbose} defined as '' if --verbose command option specified + {wj} word-joiner + {zwsp} zero-width space character entity + +[NOTE] +====== +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. + footnote:[Conditional inclusion using `ifdef` and `ifndef` macros + 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. +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 + https://en.wikipedia.org/wiki/Quotation_mark#Summary_table[non-English + usage of quotation marks]. +8. The `{blockname}` attribute identifies the style of the current + block. It applies to delimited blocks, lists and tables. Here is a + list of `{blockname}` values (does not include filters or custom + block and style names): + + delimited blocks:: comment, sidebar, open, pass, literal, verse, + listing, quote, example, note, tip, important, caution, warning, + abstract, partintro + + lists:: arabic, loweralpha, upperalpha, lowerroman, upperroman, + labeled, labeled3, labeled4, qanda, horizontal, bibliography, + glossary + + tables:: table +9. If the `SOURCE_DATE_EPOCH` environment variable is set to a UNIX + timestamp, then the `{docdate}`, `{doctime}`, `{localdate}`, and + `{localtime}` attributes are computed in the UTC time zone, with any + timestamps newer than `SOURCE_DATE_EPOCH` replaced by + `SOURCE_DATE_EPOCH`. (This helps software using AsciiDoc to build + reproducibly.) + + +====== + + +[[X73]] +Block Element Definitions +------------------------- +The syntax and behavior of Paragraph, DelimitedBlock, List and Table +block elements is determined by block definitions contained in +<<X7,AsciiDoc configuration file>> sections. + +Each definition consists of a section title followed by one or more +section entries. Each entry defines a block parameter controlling some +aspect of the block's behavior. Here's an example: + +--------------------------------------------------------------------- +[blockdef-listing] +delimiter=^-{4,}$ +template=listingblock +presubs=specialcharacters,callouts +--------------------------------------------------------------------- + +Configuration file block definition sections are processed +incrementally after each configuration file is loaded. Block +definition section entries are merged into the block definition, this +allows block parameters to be overridden and extended by later +<<X27,loading configuration files>>. + +AsciiDoc Paragraph, DelimitedBlock, List and Table block elements +share a common subset of configuration file parameters: + +delimiter:: + A Python regular expression that matches the first line of a block + element -- in the case of DelimitedBlocks and Tables it also matches + the last line. + +template:: + The name of the configuration file markup template section that will + envelope the block contents. The pipe ('|') character is substituted + for the block contents. List elements use a set of (list specific) + tag parameters instead of a single template. The template name can + contain attribute references allowing dynamic template selection a + the time of template substitution. + +options:: + A comma delimited list of element specific option names. In addition + to being used internally, options are available during markup tag + and template substitution as attributes with an empty string value + named like `<option>-option` (where `<option>` is the option name). + See <<X74,attribute options>> for a complete list of available + options. + +subs, presubs, postsubs:: + * 'presubs' and 'postsubs' are lists of comma separated substitutions that are + performed on the block contents. 'presubs' is applied first, + 'postsubs' (if specified) second. + + * 'subs' is an alias for 'presubs'. + + * If a 'filter' is allowed (Paragraphs, DelimitedBlocks and Tables) + and has been specified then 'presubs' and 'postsubs' substitutions + are performed before and after the filter is run respectively. + + * Allowed values: 'specialcharacters', 'quotes', 'specialwords', + 'replacements', 'macros', 'attributes', 'callouts'. + + * [[X102]]The following composite values are also allowed: + + 'none';; + No substitutions. + 'normal';; + The following substitutions in the following order: + 'specialcharacters', 'quotes', 'attributes', 'specialwords', + 'replacements', 'macros', 'replacements2'. + 'verbatim';; + The following substitutions in the following order: + 'specialcharacters' and 'callouts'. + + * 'normal' and 'verbatim' substitutions can be redefined by with + `subsnormal` and `subsverbatim` entries in a configuration file + `[miscellaneous]` section. + + * The substitutions are processed in the order in which they are + listed and can appear more than once. + +filter:: + This optional entry specifies an executable shell command for + processing block content (Paragraphs, DelimitedBlocks and Tables). + The filter command can contain attribute references. + +posattrs:: + Optional comma separated list of positional attribute names. This + list maps positional attributes (in the block's <<X21,attribute + list>>) to named block attributes. The following example, from the + QuoteBlock definition, maps the first and section positional + attributes: + + posattrs=attribution,citetitle + +style:: + This optional parameter specifies the default style name. + + +<stylename>-style:: + Optional style definition (see <<X23,Styles>> below). + +The following block parameters behave like document attributes and can +be set in block attribute lists and style definitions: 'template', +'options', 'subs', 'presubs', 'postsubs', 'filter'. + +[[X23]] +Styles +~~~~~~ +A style is a set of block parameter bundled as a single named +parameter. The following example defines a style named 'verbatim': + + verbatim-style=template="literalblock",subs="verbatim" + +If a block's <<X21,attribute list>> contains a 'style' attribute then +the corresponding style parameters are be merged into the default +block definition parameters. + +- All style parameter names must be suffixed with `-style` and the + style parameter value is in the form of a list of <<X21,named + attributes>>. +- The 'template' style parameter is mandatory, other parameters can be + omitted in which case they inherit their values from the default + block definition parameters. +- Multi-item style parameters ('subs','presubs','postsubs','posattrs') + must be specified using Python tuple syntax (rather than a simple + list of values as they in separate entries) e.g. + `postsubs=("callouts",)` not `postsubs="callouts"`. + +Paragraphs +~~~~~~~~~~ +Paragraph translation is controlled by `[paradef-*]` configuration +file section entries. Users can define new types of paragraphs and +modify the behavior of existing types by editing AsciiDoc +configuration files. + +Here is the shipped Default paragraph definition: + +-------------------------------------------------------------------- +[paradef-default] +delimiter=(?P<text>\S.*) +template=paragraph +-------------------------------------------------------------------- + +The normal paragraph definition has a couple of special properties: + +1. It must exist and be defined in a configuration file section named + `[paradef-default]`. +2. Irrespective of its position in the configuration files default + paragraph document matches are attempted only after trying all + other paragraph types. + +Paragraph specific block parameter notes: + +delimiter:: + This regular expression must contain the named group 'text' which + matches the text on the first line. Paragraphs are terminated by a + blank line, the end of file, or the start of a DelimitedBlock. + +options:: + The 'listelement' option specifies that paragraphs of this type will + automatically be considered part of immediately preceding list + items. The 'skip' option causes the paragraph to be treated as a + comment (see <<X26,CommentBlocks>>). + +.Paragraph processing proceeds as follows: +1. The paragraph text is aligned to the left margin. +2. Optional 'presubs' inline substitutions are performed on the + paragraph text. +3. If a filter command is specified it is executed and the paragraph + text piped to its standard input; the filter output replaces the + paragraph text. +4. Optional 'postsubs' inline substitutions are performed on the + paragraph text. +5. The paragraph text is enveloped by the paragraph's markup template + and written to the output file. + +Delimited Blocks +~~~~~~~~~~~~~~~~ +DelimitedBlock 'options' values are: + +sectionbody:: + The block contents are processed as a SectionBody. + +skip:: + The block is treated as a comment (see <<X26,CommentBlocks>>). + Preceding <<X21,attribute lists>> and <<X42,block titles>> are not + consumed. + +'presubs', 'postsubs' and 'filter' entries are ignored when +'sectionbody' or 'skip' options are set. + +DelimitedBlock processing proceeds as follows: + +1. Optional 'presubs' substitutions are performed on the block + contents. +2. If a filter is specified it is executed and the block's contents + piped to its standard input. The filter output replaces the block + contents. +3. Optional 'postsubs' substitutions are performed on the block + contents. +4. The block contents is enveloped by the block's markup template and + written to the output file. + +TIP: Attribute expansion is performed on the block filter command +before it is executed, this is useful for passing arguments to the +filter. + +Lists +~~~~~ +List behavior and syntax is determined by `[listdef-*]` configuration +file sections. The user can change existing list behavior and add new +list types by editing configuration files. + +List specific block definition notes: + +type:: + This is either 'bulleted','numbered','labeled' or 'callout'. + +delimiter:: + A Python regular expression that matches the first line of a + list element entry. This expression can contain the named groups + 'text' (bulleted groups), 'index' and 'text' (numbered lists), + 'label' and 'text' (labeled lists). + +tags:: + The `<name>` of the `[listtags-<name>]` configuration file section + containing list markup tag definitions. The tag entries ('list', + 'entry', 'label', 'term', 'text') map the AsciiDoc list structure to + backend markup; see the 'listtags' sections in the AsciiDoc + distributed backend `.conf` configuration files for examples. + +Tables +~~~~~~ +Table behavior and syntax is determined by `[tabledef-*]` and +`[tabletags-*]` configuration file sections. The user can change +existing table behavior and add new table types by editing +configuration files. The following `[tabledef-*]` section entries +generate table output markup elements: + +colspec:: + The table 'colspec' tag definition. + +headrow, footrow, bodyrow:: + Table header, footer and body row tag definitions. 'headrow' and + 'footrow' table definition entries default to 'bodyrow' if + they are undefined. + +headdata, footdata, bodydata:: + Table header, footer and body data tag definitions. 'headdata' and + 'footdata' table definition entries default to 'bodydata' if they + are undefined. + +paragraph:: + If the 'paragraph' tag is specified then blank lines in the cell + data are treated as paragraph delimiters and marked up using this + tag. + +[[X4]] +Table behavior is also influenced by the following `[miscellaneous]` +configuration file entries: + +pagewidth:: + This integer value is the printable width of the output media. See + <<X69,table attributes>>. + +pageunits:: + The units of width in output markup width attribute values. + +.Table definition behavior +- The output markup generation is specifically designed to work with + the HTML and CALS (DocBook) table models, but should be adaptable to + most XML table schema. +- Table definitions can be ``mixed in'' from multiple cascading + configuration files. +- New table definitions inherit the default table and table tags + definitions (`[tabledef-default]` and `[tabletags-default]`) so you + only need to override those conf file entries that require + modification. + + +[[X59]] +Filters +------- +AsciiDoc filters allow external commands to process AsciiDoc +'Paragraphs', 'DelimitedBlocks' and 'Table' content. Filters are +primarily an extension mechanism for generating specialized outputs. +Filters are implemented using external commands which are specified in +configuration file definitions. + +There's nothing special about the filters, they're just standard UNIX +filters: they read text from the standard input, process it, and write +to the standard output. + +The asciidoc(1) command `--filter` option can be used to install and +remove filters. The same option is used to unconditionally load a +filter. + +Attribute substitution is performed on the filter command prior to +execution -- attributes can be used to pass parameters from the +AsciiDoc source document to the filter. + +WARNING: Filters sometimes included executable code. Before installing +a filter you should verify that it is from a trusted source. + +Filter Search Paths +~~~~~~~~~~~~~~~~~~~ +If the filter command does not specify a directory path then +asciidoc(1) recursively searches for the executable filter command: + +- First it looks in the user's `$HOME/.asciidoc/filters` directory. +- Next the global filters directory (usually `/etc/asciidoc/filters` + or `/usr/local/etc/asciidoc`) directory is searched. +- Then it looks in the asciidoc(1) `./filters` directory. +- Finally it relies on the executing shell to search the environment + search path (`$PATH`). + +Standard practice is to install each filter in it's own sub-directory +with the same name as the filter's style definition. For example the +music filter's style name is 'music' so it's configuration and filter +files are stored in the `filters/music` directory. + +Filter Configuration Files +~~~~~~~~~~~~~~~~~~~~~~~~~~ +Filters are normally accompanied by a configuration file containing a +Paragraph or DelimitedBlock definition along with corresponding markup +templates. + +While it is possible to create new 'Paragraph' or 'DelimitedBlock' +definitions the preferred way to implement a filter is to add a +<<X23,style>> to the existing Paragraph and ListingBlock definitions +(all filters shipped with AsciiDoc use this technique). The filter is +applied to the paragraph or delimited block by preceding it with an +attribute list: the first positional attribute is the style name, +remaining attributes are normally filter specific parameters. + +asciidoc(1) auto-loads all `.conf` files found in the filter search +paths unless the container directory also contains a file named +`__noautoload__` (see previous section). The `__noautoload__` feature +is used for filters that will be loaded manually using the `--filter` +option. + +[[X56]] +Example Filter +~~~~~~~~~~~~~~ +AsciiDoc comes with a toy filter for highlighting source code keywords +and comments. See also the `./filters/code/code-filter-readme.txt` +file. + +NOTE: The purpose of this toy filter is to demonstrate how to write a +filter -- it's much to simplistic to be passed off as a code syntax +highlighter. If you want a full featured multi-language highlighter +use the {website}source-highlight-filter.html[source code highlighter +filter]. + +Built-in filters +~~~~~~~~~~~~~~~~ +The AsciiDoc distribution includes 'source', 'music', 'latex' and +'graphviz' filters, details are on the +{website}index.html#_filters[AsciiDoc website]. + +[cols="1e,5",frame="topbot",options="header"] +.Built-in filters list +|==================================================================== +|Filter name |Description + +|music +|A {website}music-filter.html[music filter] is included in the +distribution `./filters/` directory. It translates music in +https://lilypond.org/[LilyPond] or https://abcnotation.com/[ABC] +notation to standard classical notation. + +|source +|A {website}source-highlight-filter.html[source code highlight filter] +is included in the distribution `./filters/` directory. + +|latex +|The {website}latex-filter.html[AsciiDoc LaTeX filter] translates +LaTeX source to an image that is automatically inserted into the +AsciiDoc output documents. + +|graphviz +|Gouichi Iisaka has written a https://www.graphviz.org/[Graphviz] +filter for AsciiDoc. Graphviz generates diagrams from a textual +specification. Gouichi Iisaka's Graphviz filter is included in the +AsciiDoc distribution. Here are some +{website}asciidoc-graphviz-sample.html[AsciiDoc Graphviz examples]. + +|==================================================================== + +[[X58]] +Filter plugins +~~~~~~~~~~~~~~ +Filter <<X101,plugins>> are a mechanism for distributing AsciiDoc +filters. A filter plugin is a Zip file containing the files that +constitute a filter. The asciidoc(1) `--filter` option is used to +load and manage filer <<X101,plugins>>. + +- Filter plugins <<X27,take precedence>> over built-in filters with + the same name. +- By default filter plugins are installed in + `$HOME/.asciidoc/filters/<filter>` where `<filter>` is the filter + name. + + +[[X101]] +Plugins +------- +The AsciiDoc plugin architecture is an extension mechanism that allows +additional <<X100,backends>>, <<X58,filters>> and <<X99,themes>> to be +added to AsciiDoc. + +- A plugin is a Zip file containing an AsciiDoc backend, filter or + theme (configuration files, stylesheets, scripts, images). +- The asciidoc(1) `--backend`, `--filter` and `--theme` command-line + options are used to load and manage plugins. Each of these options + responds to the plugin management 'install', 'list', 'remove' and + 'build' commands. +- The plugin management command names are reserved and cannot be used + for filter, backend or theme names. +- The plugin Zip file name always begins with the backend, filter or + theme name. + +Plugin commands and conventions are documented in the asciidoc(1) man +page. You can find lists of plugins on the +{website}plugins.html[AsciiDoc website]. + + +[[X36]] +Help Commands +------------- +The asciidoc(1) command has a `--help` option which prints help topics +to stdout. The default topic summarizes asciidoc(1) usage: + + $ asciidoc --help + +To print a help topic specify the topic name as a command argument. +Help topic names can be shortened so long as they are not ambiguous. +Examples: + + $ asciidoc --help manpage + $ asciidoc -h m # Short version of previous example. + $ asciidoc --help syntax + $ asciidoc -h s # Short version of previous example. + +Customizing Help +~~~~~~~~~~~~~~~~ +To change, delete or add your own help topics edit a help +configuration file. The help file name `help-<lang>.conf` is based on +the setting of the `lang` attribute, it defaults to `help.conf` +(English). The <<X27,help file location>> will depend on whether you +want the topics to apply to all users or just the current user. + +The help topic files have the same named section format as other +<<X7,configuration files>>. The `help.conf` files are stored in the +same locations and loaded in the same order as other configuration +files. + +When the `--help` command-line option is specified AsciiDoc loads the +appropriate help files and then prints the contents of the section +whose name matches the help topic name. If a topic name is not +specified `default` is used. You don't need to specify the whole help +topic name on the command-line, just enough letters to ensure it's not +ambiguous. If a matching help file section is not found a list of +available topics is printed. + + +Tips and Tricks +--------------- + +Know Your Editor +~~~~~~~~~~~~~~~~ +Writing AsciiDoc documents will be a whole lot more pleasant if you +know your favorite text editor. Learn how to indent and reformat text +blocks, paragraphs, lists and sentences. <<X20,Tips for 'vim' users>> +follow. + +[[X20]] +Vim Commands for Formatting AsciiDoc +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Text Wrap Paragraphs +^^^^^^^^^^^^^^^^^^^^ +Use the vim `:gq` command to reformat paragraphs. Setting the +'textwidth' sets the right text wrap margin; for example: + + :set textwidth=70 + +To reformat a paragraph: + +1. Position the cursor at the start of the paragraph. +2. Type `gq}`. + +Execute `:help gq` command to read about the vim gq command. + +[TIP] +===================================================================== +- Assign the `gq}` command to the Q key with the `nnoremap Q gq}` + command or put it in your `~/.vimrc` file to so it's always + available (see the <<X61, Example `~/.vimrc` file>>). +- Put `set` commands in your `~/.vimrc` file so you don't have to + enter them manually. +- The Vim website (https://www.vim.org/) has a wealth of resources, + including scripts for automated spell checking and ASCII Art + drawing. +===================================================================== + +Format Lists +^^^^^^^^^^^^ +The `gq` command can also be used to format bulleted, numbered and +callout lists. First you need to set the `comments`, `formatoptions` +and `formatlistpat` (see the <<X61, Example `~/.vimrc` file>>). + +Now you can format simple lists that use dash, asterisk, period and +plus bullets along with numbered ordered lists: + +1. Position the cursor at the start of the list. +2. Type `gq}`. + +Indent Paragraphs +^^^^^^^^^^^^^^^^^ +Indent whole paragraphs by indenting the fist line with the desired +indent and then executing the `gq}` command. + +[[X61]] +Example `~/.vimrc` File +^^^^^^^^^^^^^^^^^^^^^^^ +--------------------------------------------------------------------- +" Use bold bright fonts. +set background=dark + +" Show tabs and trailing characters. +"set listchars=tab:»·,trail:·,eol:¬ +set listchars=tab:»·,trail:· +set list + +" Reformat paragraphs and list. +nnoremap <Leader>r gq} + +" Delete trailing white space and Dos-returns and to expand tabs to spaces. +nnoremap <Leader>t :set et<CR>:retab!<CR>:%s/[\r \t]\+$//<CR> + +autocmd BufRead,BufNewFile *.txt,*.asciidoc,README,TODO,CHANGELOG,NOTES,ABOUT + \ setlocal autoindent expandtab tabstop=8 softtabstop=2 shiftwidth=2 filetype=asciidoc + \ textwidth=70 wrap formatoptions=tcqn + \ formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\\|^\\s*<\\d\\+>\\s\\+\\\\|^\\s*[a-zA-Z.]\\.\\s\\+\\\\|^\\s*[ivxIVX]\\+\\.\\s\\+ + \ comments=s1:/*,ex:*/,://,b:#,:%,:XCOMM,fb:-,fb:*,fb:+,fb:.,fb:> +--------------------------------------------------------------------- + +Troubleshooting +~~~~~~~~~~~~~~~ +AsciiDoc diagnostic features are detailed in the <<X82,Diagnostics +appendix>>. + +Gotchas +~~~~~~~ +Incorrect character encoding:: + If you get an error message like `'UTF-8' codec can't decode ...` + then you source file contains invalid UTF-8 characters -- set the + AsciiDoc <<X54,encoding attribute>> for the correct character set + (typically ISO-8859-1 (Latin-1) for European languages). + +Invalid output:: + AsciiDoc attempts to validate the input AsciiDoc source but makes + no attempt to validate the output markup, it leaves that to + external tools such as `xmllint(1)` (integrated into `a2x(1)`). + Backend validation cannot be hardcoded into AsciiDoc because + backends are dynamically configured. The following example + generates valid HTML but invalid DocBook (the DocBook `literal` + element cannot contain an `emphasis` element): + + +monospaced text with an _emphasized_ word+ + +Misinterpreted text formatting:: + You can suppress markup expansion by placing a backslash character + immediately in front of the element. The following example + suppresses inline monospaced formatting: + + \+1 for C++. + +Overlapping text formatting:: + Overlapping text formatting will generate illegal overlapping + markup tags which will result in downstream XML parsing errors. + Here's an example: + + Some *strong markup _that overlaps* emphasized markup_. + +Ambiguous underlines:: + A DelimitedBlock can immediately follow a paragraph without an + intervening blank line, but be careful, a single line paragraph + underline may be misinterpreted as a section title underline + resulting in a ``closing block delimiter expected'' error. + +Ambiguous ordered list items:: + Lines beginning with numbers at the end of sentences will be + interpreted as ordered list items. The following example + (incorrectly) begins a new list with item number 1999: + + He was last sighted in + 1999. Since then things have moved on. ++ +The 'list item out of sequence' warning makes it unlikely that this +problem will go unnoticed. + +Special characters in attribute values:: + Special character substitution precedes attribute substitution so + if attribute values contain special characters you may, depending + on the substitution context, need to escape the special characters + yourself. For example: + + $ asciidoc -a 'orgname=Bill & Ben Inc.' mydoc.txt + +Attribute lists:: + If any named attribute entries are present then all string + attribute values must be quoted. For example: + + ["Desktop screenshot",width=32] + +[[X90]] +Combining separate documents +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You have a number of stand-alone AsciiDoc documents that you want to +process as a single document. Simply processing them with a series of +`include` macros won't work because the documents contain (level 0) +document titles. The solution is to create a top level wrapper +document and use the `leveloffset` attribute to push them all down one +level. For example: + +[listing] +..................................................................... +Combined Document Title +======================= + +// Push titles down one level. +:leveloffset: 1 + +\include::document1.txt[] + +// Return to normal title levels. +:leveloffset: 0 + +A Top Level Section +------------------- +Lorum ipsum. + +// Push titles down one level. +:leveloffset: 1 + +\include::document2.txt[] + +\include::document3.txt[] +..................................................................... + +The document titles in the included documents will now be processed as +level 1 section titles, level 1 sections as level 2 sections and so +on. + +- Put a blank line between the `include` macro lines to ensure the + title of the included document is not seen as part of the last + paragraph of the previous document. +- You won't want non-title document header lines (for example, Author + and Revision lines) in the included files -- conditionally exclude + them if they are necessary for stand-alone processing. + +Processing document sections separately +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +You have divided your AsciiDoc document into separate files (one per +top level section) which are combined and processed with the following +top level document: + +--------------------------------------------------------------------- +Combined Document Title +======================= +Joe Bloggs +v1.0, 12-Aug-03 + +\include::section1.txt[] + +\include::section2.txt[] + +\include::section3.txt[] +--------------------------------------------------------------------- + +You also want to process the section files as separate documents. +This is easy because asciidoc(1) will quite happily process +`section1.txt`, `section2.txt` and `section3.txt` separately -- the +resulting output documents contain the section but have no document +title. + +Processing document snippets +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use the `-s` (`--no-header-footer`) command-line option to suppress +header and footer output, this is useful if the processed output is to +be included in another file. For example: + + $ asciidoc -sb docbook section1.txt + +asciidoc(1) can be used as a filter, so you can pipe chunks of text +through it. For example: + + $ echo 'Hello *World!*' | asciidoc -s - + <div class="paragraph"><p>Hello <strong>World!</strong></p></div> + +Badges in HTML page footers +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +See the `[footer]` section in the AsciiDoc distribution `xhtml11.conf` +configuration file. + +Pretty printing AsciiDoc output +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If the indentation and layout of the asciidoc(1) output is not to your +liking you can: + +1. Change the indentation and layout of configuration file markup + template sections. The `{empty}` attribute is useful for outputting + trailing blank lines in markup templates. + +2. Use https://www.html-tidy.org/[HTML Tidy] program to tidy + asciidoc(1) output. Example: + + $ asciidoc -b docbook -o - mydoc.txt | tidy -indent -xml >mydoc.xml + +3. Use the `xmllint(1)` format option. Example: + + $ xmllint --format mydoc.xml + +Supporting minor DocBook DTD variations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The conditional inclusion of DocBook SGML markup at the end of the +distribution `docbook45.conf` file illustrates how to support minor +DTD variations. The included sections override corresponding entries +from preceding sections. + +Creating stand-alone HTML documents +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If you've ever tried to send someone an HTML document that includes +stylesheets and images you'll know that it's not as straight-forward +as exchanging a single file. AsciiDoc has options to create +stand-alone documents containing embedded images, stylesheets and +scripts. The following AsciiDoc command creates a single file +containing <<X66,embedded images>>, CSS stylesheets, and JavaScript +(for table of contents and footnotes): + + $ asciidoc -a data-uri -a icons -a toc -a max-width=55em article.txt + +You can view the HTML file here: {website}article-standalone.html[] + +Shipping stand-alone AsciiDoc source +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Reproducing presentation documents from someone else's source has one +major problem: unless your configuration files are the same as the +creator's you won't get the same output. + +The solution is to create a single backend specific configuration file +using the asciidoc(1) `-c` (`--dump-conf`) command-line option. You +then ship this file along with the AsciiDoc source document plus the +`asciidoc.py` script. The only end user requirement is that they have +Python installed (and that they consider you a trusted source). This +example creates a composite HTML configuration file for `mydoc.txt`: + + $ asciidoc -cb xhtml11 mydoc.txt > mydoc-xhtml11.conf + +Ship `mydoc.txt`, `mydoc-html.conf`, and `asciidoc.py`. With +these three files (and a Python interpreter) the recipient can +regenerate the HMTL output: + + $ ./asciidoc.py -eb xhtml11 mydoc.txt + +The `-e` (`--no-conf`) option excludes the use of implicit +configuration files, ensuring that only entries from the +`mydoc-html.conf` configuration are used. + +Inserting blank space +~~~~~~~~~~~~~~~~~~~~~ +Adjust your style sheets to add the correct separation between block +elements. Inserting blank paragraphs containing a single non-breaking +space character `{nbsp}` works but is an ad hoc solution compared +to using style sheets. + +Closing open sections +~~~~~~~~~~~~~~~~~~~~~ +You can close off section tags up to level `N` by calling the +`eval::[Section.setlevel(N)]` system macro. This is useful if you +want to include a section composed of raw markup. The following +example includes a DocBook glossary division at the top section level +(level 0): + +--------------------------------------------------------------------- +\ifdef::basebackend-docbook[] + +\eval::[Section.setlevel(0)] + ++++++++++++++++++++++++++++++++ +<glossary> + <title>Glossary + + ... + + ++++++++++++++++++++++++++++++++ +\endif::basebackend-docbook[] +--------------------------------------------------------------------- + +Validating output files +~~~~~~~~~~~~~~~~~~~~~~~ +Use `xmllint(1)` to check the AsciiDoc generated markup is both well +formed and valid. Here are some examples: + + $ xmllint --nonet --noout --valid docbook-file.xml + $ xmllint --nonet --noout --valid xhtml11-file.html + $ xmllint --nonet --noout --valid --html html4-file.html + +The `--valid` option checks the file is valid against the document +type's DTD, if the DTD is not installed in your system's catalog then +it will be fetched from its Internet location. If you omit the +`--valid` option the document will only be checked that it is well +formed. + +The online https://validator.w3.org/#validate_by_uri+with_options[W3C +Markup Validation Service] is the defacto standard when it comes to +validating HTML (it validates all HTML standards including HTML5). + + +:numbered!: + +[glossary] +Glossary +-------- +[glossary] +[[X8]] Block element:: + An AsciiDoc block element is a document entity composed of one or + more whole lines of text. + +[[X34]] Inline element:: + AsciiDoc inline elements occur within block element textual + content, they perform formatting and substitution tasks. + +Formal element:: + An AsciiDoc block element that has a BlockTitle. Formal elements + are normally listed in front or back matter, for example lists of + tables, examples and figures. + +Verbatim element:: + The word verbatim indicates that white space and line breaks in + the source document are to be preserved in the output document. + + +[appendix] +Migration Notes +--------------- +[[X53]] +Version 7 to version 8 +~~~~~~~~~~~~~~~~~~~~~~ +- A new set of quotes has been introduced which may match inline text + in existing documents -- if they do you'll need to escape the + matched text with backslashes. +- The index entry inline macro syntax has changed -- if your documents + include indexes you may need to edit them. +- Replaced a2x(1) `--no-icons` and `--no-copy` options with their + negated equivalents: `--icons` and `--copy` respectively. The + default behavior has also changed -- the use of icons and copying of + icon and CSS files must be specified explicitly with the `--icons` + and `--copy` options. + +The rationale for the changes can be found in the AsciiDoc +`CHANGELOG`. + +NOTE: If you want to disable unconstrained quotes, the new alternative +constrained quotes syntax and the new index entry syntax then you can +define the attribute `asciidoc7compatible` (for example by using the +`-a asciidoc7compatible` command-line option). + +[[X38]] +[appendix] +Packager Notes +-------------- +Read the `README` and `INSTALL` files (in the distribution root +directory) for install prerequisites and procedures. The distribution +`Makefile.in` (used by `configure` to generate the `Makefile`) is the +canonical installation procedure. + + +[[X39]] +[appendix] +AsciiDoc Safe Mode +------------------- +AsciiDoc 'safe mode' skips potentially dangerous scripted sections in +AsciiDoc source files by inhibiting the execution of arbitrary code or +the inclusion of arbitrary files. + +The safe mode is disabled by default, it can be enabled with the +asciidoc(1) `--safe` command-line option. + +.Safe mode constraints +- `eval`, `sys` and `sys2` executable attributes and block macros are + not executed. +- `include::[]` and `include1::[]` block macro + files must reside inside the parent file's directory. +- `{include:}` executable attribute files must reside + inside the source document directory. +- Passthrough Blocks are dropped. + +[WARNING] +===================================================================== +The safe mode is not designed to protect against unsafe AsciiDoc +configuration files. Be especially careful when: + +1. Implementing filters. +2. Implementing elements that don't escape special characters. +3. Accepting configuration files from untrusted sources. +===================================================================== + + +[appendix] +Using AsciiDoc with non-English Languages +----------------------------------------- +AsciiDoc can process UTF-8 character sets but there are some things +you need to be aware of: + +- If you are generating output documents using a DocBook toolchain + then you should set the AsciiDoc `lang` attribute to the appropriate + language (it defaults to `en` (English)). This will ensure things + like table of contents, figure and table captions and admonition + captions are output in the specified language. For example: + + $ a2x -a lang=es doc/article.txt + +- If you are outputting HTML directly from asciidoc(1) you'll + need to set the various `*_caption` attributes to match your target + language (see the list of captions and titles in the `[attributes]` + section of the distribution `lang-*.conf` files). The easiest way is + to create a language `.conf` file (see the AsciiDoc's `lang-en.conf` + file). ++ +NOTE: You still use the 'NOTE', 'CAUTION', 'TIP', 'WARNING', +'IMPORTANT' captions in the AsciiDoc source, they get translated in +the HTML output file. + +- asciidoc(1) automatically loads configuration files named like + `lang-.conf` where `` is a two letter language code that + matches the current AsciiDoc `lang` attribute. See also + <>. + + +[appendix] +Vim Syntax Highlighter +---------------------- +Syntax highlighting is incredibly useful, in addition to making +reading AsciiDoc documents much easier syntax highlighting also helps +you catch AsciiDoc syntax errors as you write your documents. + +If you use the Vim editor, it comes with an +https://github.com/vim/vim/blob/master/runtime/syntax/asciidoc.vim[AsciiDoc +syntax highlighter pre-included]. By default, it will activate for +files that use the .asciidoc or .adoc file extensions. + +Alternatively, to enable syntax highlighting for the current document or +other extensions: + +- Put a Vim 'autocmd' in your Vim configuration file (see the + <>). +- or execute the Vim command `:set syntax=asciidoc`. +- or add the following line to the end of you AsciiDoc source files: + + // vim: set syntax=asciidoc: + + +[[X74]] +[appendix] +Attribute Options +----------------- +Here is the list of predefined <>: + + +[cols="2e,2,2,5",frame="topbot",options="header"] +|==================================================================== +|Option|Backends|AsciiDoc Elements|Description + +|autowidth |xhtml11, html5, html4 |table| +The column widths are determined by the browser, not the AsciiDoc +'cols' attribute. If there is no 'width' attribute the table width is +also left up to the browser. + +|unbreakable |xhtml11, html5 |block elements| +'unbreakable' attempts to keep the block element together on a single +printed page c.f. the 'breakable' and 'unbreakable' docbook (XSL/FO) +options below. + +|breakable, unbreakable |docbook (XSL/FO) |table, example, block image| +The 'breakable' options allows block elements to break across page +boundaries; 'unbreakable' attempts to keep the block element together +on a single page. If neither option is specified the default XSL +stylesheet behavior prevails. + +|compact |docbook, xhtml11, html5 |bulleted list, numbered list| +Minimizes vertical space in the list + +|footer |docbook, xhtml11, html5, html4 |table| +The last row of the table is rendered as a footer. + +|header |docbook, xhtml11, html5, html4 |table| +The first row of the table is rendered as a header. + +|pgwide |docbook (XSL/FO) |table, block image, horizontal labeled list| +Specifies that the element should be rendered across the full text +width of the page irrespective of the current indentation. + +|strong |xhtml11, html5, html4 |labeled lists| +Emboldens label text. +|==================================================================== + + +[[X82]] +[appendix] +Diagnostics +----------- +The `asciidoc(1)` `--verbose` command-line option prints additional +information to stderr: files processed, filters processed, warnings, +system attribute evaluation. + +A special attribute named 'trace' enables the output of +element-by-element diagnostic messages detailing output markup +generation to stderr. The 'trace' attribute can be set on the +command-line or from within the document using <> (the latter allows tracing to be confined to specific +portions of the document). + +- Trace messages print the source file name and line number and the + trace name followed by related markup. +- 'trace names' are normally the names of AsciiDoc elements (see the + list below). +- The trace message is only printed if the 'trace' attribute value + matches the start of a 'trace name'. The 'trace' attribute value can + be any Python regular expression. If a trace value is not specified + all trace messages will be printed (this can result in large amounts + of output if applied to the whole document). + +- In the case of inline substitutions: + * The text before and after the substitution is printed; the before + text is preceded by a line containing `<<<` and the after text by + a line containing `>>>`. + * The 'subs' trace value is an alias for all inline substitutions. + +.Trace names +..................................................................... + block close + block open + +dropped line (a line containing an undefined attribute reference). +floating title +footer +header +list close +list entry close +list entry open +list item close +list item open +list label close +list label open +list open +macro block (a block macro) +name (man page NAME section) +paragraph +preamble close +preamble open +push blockname +pop blockname +section close +section open: level +subs (all inline substitutions) +table +..................................................................... + +Where: + +- `` is section level number '0...4'. +- `` is a delimited block name: 'comment', 'sidebar', + 'open', 'pass', 'listing', 'literal', 'quote', 'example'. +- `` is an inline substitution type: + 'specialcharacters','quotes','specialwords', 'replacements', + 'attributes','macros','callouts', 'replacements2', 'replacements3'. + +Command-line examples: + +. Trace the entire document. + + $ asciidoc -a trace mydoc.txt + +. Trace messages whose names start with `quotes` or `macros`: + + $ asciidoc -a 'trace=quotes|macros' mydoc.txt + +. Print the first line of each trace message: + + $ asciidoc -a trace mydoc.txt 2>&1 | grep ^TRACE: + +Attribute Entry examples: + +. Begin printing all trace messages: + + :trace: + +. Print only matched trace messages: + + :trace: quotes|macros + +. Turn trace messages off: + + :trace!: + + +[[X88]] +[appendix] +Backend Attributes +------------------ +This table contains a list of optional attributes that influence the +generated outputs. + +[cols="1e,1,5a",frame="topbot",options="header"] +|==================================================================== +|Name |Backends |Description + +|badges |xhtml11, html5 | +Link badges ('XHTML 1.1' and 'CSS') in document footers. By default +badges are omitted ('badges' is undefined). + +NOTE: The path names of images, icons and scripts are relative path +names to the output document not the source document. + +|data-uri |xhtml11, html5 | +Embed images using the <>. + +|css-signature |html5, xhtml11 | +Set a 'CSS signature' for the document (sets the 'id' attribute of the +HTML 'body' element). CSS signatures provide a mechanism that allows +users to personalize the document appearance. The term 'CSS signature' +was https://juicystudio.com/article/css-selectors.php[coined by +Eric Meyer]. + + +|disable-javascript |xhtml11, html5 | +If the `disable-javascript` attribute is defined the `asciidoc.js` +JavaScript is not embedded or linked to the output document. By +default AsciiDoc automatically embeds or links the `asciidoc.js` +JavaScript to the output document. The script dynamically generates +<> and <>. + +|[[X97]] docinfo, docinfo1, docinfo2 |All backends | +These three attributes control which <> will be included in the the header of the output file: + +docinfo:: Include `-docinfo.` +docinfo1:: Include `docinfo.` +docinfo2:: Include `docinfo.` and `-docinfo.` + +Where `` is the file name (sans extension) of the AsciiDoc +input file and `` is `.html` for HTML outputs or `.xml` for +DocBook outputs. If the input file is the standard input then the +output file name is used. The following example will include the +`mydoc-docinfo.xml` docinfo file in the DocBook `mydoc.xml` output +file: + + $ asciidoc -a docinfo -b docbook mydoc.txt + +This next example will include `docinfo.html` and `mydoc-docinfo.html` +docinfo files in the HTML output file: + + $ asciidoc -a docinfo2 -b html4 mydoc.txt + + +|[[X54]]encoding |html4, html5, xhtml11, docbook | +Set the input and output document character set encoding. For example +the `--attribute encoding=ISO-8859-1` command-line option will set the +character set encoding to `ISO-8859-1`. + +- The default encoding is UTF-8. +- This attribute specifies the character set in the output document. +- The encoding name must correspond to a Python codec name or alias. +- The 'encoding' attribute can be set using an AttributeEntry inside + the document header. For example: + + :encoding: ISO-8859-1 + +|hr |html4 | +Defines the 'html4' inter-section horizontal ruler element. By default +'html4' top level sections are separated by a horizontal ruler +element, undefine this attribute or set it to an empty string if you +do not want them. The default 'html4' backend value for the 'hr' +attribute is `
    `. + +|[[X45]]icons |xhtml11, html5 | +Link admonition paragraph and admonition block icon images and badge +images. By default 'icons' is undefined and text is used in place of +icon images. + +|[[X44]]iconsdir |html4, html5, xhtml11, docbook | +The name of the directory containing linked admonition icons, +navigation icons and the `callouts` sub-directory (the `callouts` +sub-directory contains <> number images). 'iconsdir' +defaults to `./images/icons`. If admonition icons are embedded using +the <> scheme then the 'iconsdir' attribute defaults to +the location of the icons installed in the AsciiDoc configuration +directory. + +|imagesdir |html4, html5, xhtml11, docbook | +If this attribute is defined it is prepended to the target image file +name paths in inline and block image macros. + +|keywords, description, title |html4, html5, xhtml11 | +The 'keywords' and 'description' attributes set the correspondingly +named HTML meta tag contents; the 'title' attribute sets the HTML +title tag contents. Their principle use is for SEO (Search Engine +Optimisation). All three are optional, but if they are used they must +appear in the document header (or on the command-line). If 'title' is +not specified the AsciiDoc document title is used. + +|linkcss |html5, xhtml11 | +Link CSS stylesheets and JavaScripts. By default 'linkcss' is +undefined in which case stylesheets and scripts are automatically +embedded in the output document. + +|[[X103]]max-width |html5, xhtml11 | +Set the document maximum display width (sets the 'body' element CSS +'max-width' property). + +|numbered |html4, html5, xhtml11, docbook (XSL Stylesheets) | +Adds section numbers to section titles. The 'docbook' backend ignores +'numbered' attribute entries after the document header. + +|plaintext | All backends | +If this global attribute is defined all inline substitutions are +suppressed and block indents are retained. This option is useful when +dealing with large amounts of imported plain text. + +|quirks |xhtml11 | +Include the `xhtml11-quirks.conf` configuration file and +`xhtml11-quirks.css` <> to work around IE6 browser +incompatibilities. This feature is deprecated and its use is +discouraged -- documents are still viewable in IE6 without it. + +|revremark |docbook | +A short summary of changes in this document revision. Must be defined +prior to the first document section. The document also needs to be +dated to output this attribute. + +|footer-style |html4, html5, xhtml11 | +Changes the "Last updated" field in the footer of the document or removes this +field and the revision number (in the footer only). + +Can take 3 values: + +- none : Don't display the "Last updated" and "Revision number" fields in the + footer of the document +- revdate : The "Last updated" field's date in the footer will be the revision + date specified in the document (`revdate` attribute) +- default (or any other value) : The "Last updated" field's date in the footer + will be the date of the input file modification + +This attribute can be set, for example, using `:footer-style: revdate` in the +header of the file or using the `--attribute footer-style=revdate` command-line +option. + +|scriptsdir |html5, xhtml11 | +The name of the directory containing linked JavaScripts. +See <>. + +|sgml |docbook45 | +The `--backend=docbook45` command-line option produces DocBook 4.5 +XML. You can produce the older DocBook SGML format using the +`--attribute sgml` command-line option. + +|stylesdir |html5, xhtml11 | +The name of the directory containing linked or embedded +<>. +See <>. + +|stylesheet |html5, xhtml11 | +The file name of an optional additional CSS <>. + +|theme |html5, xhtml11 | +Use alternative stylesheet (see <>). + +|[[X91]]toc |html5, xhtml11, docbook (XSL Stylesheets) | +Adds a table of contents to the start of an article or book document. +The `toc` attribute can be specified using the `--attribute toc` +command-line option or a `:toc:` attribute entry in the document +header. The 'toc' attribute is defined by default when the 'docbook' +backend is used. To disable table of contents generation undefine the +'toc' attribute by putting a `:toc!:` attribute entry in the document +header or from the command-line with an `--attribute toc!` option. + +*xhtml11 and html5 backends* + +- JavaScript needs to be enabled in your browser. +- The following example generates a numbered table of contents using a + JavaScript embedded in the `mydoc.html` output document: + + $ asciidoc -a toc -a numbered mydoc.txt + +|toc2 |html5, xhtml11 | +Adds a scrollable table of contents in the left hand margin of an +article or book document. Use the 'max-width' attribute to change the +content width. In all other respects behaves the same as the 'toc' +attribute. + +|toc-placement |html5, xhtml11 | +When set to 'auto' (the default value) asciidoc(1) will place the +table of contents in the document header. When 'toc-placement' is set +to 'manual' the TOC can be positioned anywhere in the document by +placing the `toc::[]` block macro at the point you want the TOC to +appear. + +NOTE: If you use 'toc-placement' then you also have to define the +<> attribute. + +|toc-title |html5, xhtml11 | +Sets the table of contents title (defaults to 'Table of Contents'). + +|toclevels |html5, xhtml11 | +Sets the number of title levels (1..4) reported in the table of +contents (see the 'toc' attribute above). Defaults to 2 and must be +used with the 'toc' attribute. Example usage: + + $ asciidoc -a toc -a toclevels=3 doc/asciidoc.txt + +|==================================================================== + + +[appendix] +License +------- +AsciiDoc is free software; you can redistribute it and/or modify it +under the terms of the 'GNU General Public License version 2' (GPLv2) +as published by the Free Software Foundation. + +AsciiDoc is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License version 2 for more details. + +Copyright (C) 2002-2013 Stuart Rackham. + +Copyright (C) 2013-2020 AsciiDoc Contributors. diff -Nru asciidoc-8.6.10/tests/inputs/ascii-ids1.txt asciidoc-10.1.2/tests/inputs/ascii-ids1.txt --- asciidoc-8.6.10/tests/inputs/ascii-ids1.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/ascii-ids1.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,9 @@ +// Test of generated chapter ID normalized to ASCII +:ascii-ids: 1 + +== WstÄ™p żółtej Å‚Ä…ki + +== schön Grüßen + +== Белые Мотыль + diff -Nru asciidoc-8.6.10/tests/inputs/asciimath.txt asciidoc-10.1.2/tests/inputs/asciimath.txt --- asciidoc-8.6.10/tests/inputs/asciimath.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/asciimath.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,59 @@ +ASCIIMath Formulae +==================== + +http://asciimath.org/[ASCIIMath] is a clever JavaScript written by +Peter Jipsen that dynamically transforms mathematical formulae +written in a wiki-like plain text markup to +https://www.w3.org/Math/[MathML] markup which is displayed as +standard mathematical notation by the Web Browser. See 'Appendix E' +in the AsciiDoc User Guide for more details. + +The AsciiDoc `xhtml11` backend supports ASCIIMath -- it links the +ASCIIMath script and escapes ASCIIMath delimiters and special +characters to yield valid XHTML. To use ASCIIMath: + +1. Include the `-a asciimath` command-line option when you run + `asciidoc(1)`. +2. Enclose ASCIIMath formulas inside math or double-dollar + passthroughs or in math passthrough blocks. + +Here's the link:asciimath.txt[AsciiDoc source] that generated this +page. + +.NOTE +- When you use the `asciimath:[]` inline macro you need to escape `]` + characters in the formulas with a backslash, escaping is unnecessary + if you use the double-dollar macro (for examples see the second + formula below). +- See the http://asciimath.org[ASCIIMath] website for ASCIIMath + documentation and the latest version. +- If the formulas don't appear to be correct you probably need to + install the correct math fonts (see the + http://asciimath.org[ASCIIMath] website for details). +- See the link:latexmathml.html[LaTeXMathML page] if you prefer to use + LaTeX math formulas. + +A list of example formulas: + +- $$`[[a,b],[c,d]]((n),(k))`$$ +- asciimath:[x/x={(1,if x!=0),(text{undefined},if x=0):}] +- asciimath:[d/dxf(x)=lim_(h->0)(f(x+h)-f(x))/h] +- +++`sum_(i=1)\^n i=(n(n+1))/2`$+++ and *bold + asciimath:[int_0\^(pi/2) sinx\ dx=1]* +- asciimath:[(a,b\]={x in RR : a < x <= b}] +- asciimath:[x^2+y_1+z_12^34] + +********************************************************************* +The first three terms factor to give +asciimath:[(x+b/(2a))^2=(b^2)/(4a^2)-c/a]. + +asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. + +Now we take square roots on both sides and get +asciimath:[x+b/(2a)=+-sqrt((b^2)/(4a^2)-c/a)]. +Finally we move the asciimath:[b/(2a)] to the right and simplify to +get the two solutions: +*asciimath:[x_(1,2)=(-b+-sqrt(b^2-4ac))/(2a)]*. + +********************************************************************* + diff -Nru asciidoc-8.6.10/tests/inputs/barchart.py asciidoc-10.1.2/tests/inputs/barchart.py --- asciidoc-8.6.10/tests/inputs/barchart.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/barchart.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,4 @@ +print( + "No barchart to avoid depending on Pychart for the tests.\n" + "See also: https://asciidoc.org/faq.html#_is_it_possible_to_include_charts_in_asciidoc_documents" # noqa: E501 +) diff -Nru asciidoc-8.6.10/tests/inputs/book-multi.txt asciidoc-10.1.2/tests/inputs/book-multi.txt --- asciidoc-8.6.10/tests/inputs/book-multi.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/book-multi.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,181 @@ +Multi-Part Book Title Goes Here +=============================== +Author's Name +v1.0, 2003-12 +:doctype: book + + +[dedication] +Example Dedication +================== +The optional dedication goes here. + +This document is an AsciiDoc multi-part book skeleton containing +briefly annotated element placeholders plus a couple of example index +entries and footnotes. Books are normally used to generate DocBook +markup and the preface, appendix, bibliography, glossary and index +section titles are significant ('specialsections'). + +NOTE: Multi-part books differ from all other AsciiDoc document formats +in that top level sections (dedication, preface, book parts, +appendices, bibliography, glossary, index) must be level zero headings +(not level one). + + +[preface] +Example Preface +================ +The optional book preface goes here at section level zero. + +Preface Sub-section +~~~~~~~~~~~~~~~~~~~ +NOTE: Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents. + + + +The First Part of the Book +========================== + +[partintro] +.Optional part introduction title +-- +Optional part introduction goes here. +-- + +The First Chapter +----------------- +Chapters can be grouped by preceding them with a level 0 Book Part +title. + +Book chapters are at level 1 and can contain sub-sections nested up to +three deep. +footnote:[An example footnote.] +indexterm:[Example index entry] + +It's also worth noting that a book part can have it's own preface, +bibliography, glossary and index. Chapters can have their own +bibliography, glossary and index. + +And now for something completely different: ((monkeys)), lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. +(((Big cats,Lions))) +(((Big cats,Tigers,Bengal Tiger))) +(((Big cats,Tigers,Siberian Tiger))) +Note that multi-entry terms generate separate index entries. + +Here are a couple of image examples: an image:images/smallnew.png[] +example inline image followed by an example block image: + +.Tiger block image +image::images/tiger.png[Tiger image] + +Followed by an example table: + +.An example table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +.An example example +=============================================== +Lorum ipum... +=============================================== + +[[X1]] +Sub-section with Anchor +~~~~~~~~~~~~~~~~~~~~~~~ +Sub-section at level 2. + +Chapter Sub-section +^^^^^^^^^^^^^^^^^^^ +Sub-section at level 3. + +Chapter Sub-section ++++++++++++++++++++ +Sub-section at level 4. + +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +footnote:[A second example footnote.] + + +The Second Chapter +------------------ +An example link to anchor at start of the <>. +indexterm:[Second example index entry] + +An example link to a bibliography entry <>. + + + +The Second Part of the Book +=========================== + +The First Chapter of the Second Part +------------------------------------ +Chapters grouped into book parts are at level 1 and can contain +sub-sections. + + + +:numbered!: + +[appendix] +Example Appendix +================ +One or more optional appendixes go here at section level zero. + +Appendix Sub-section +~~~~~~~~~~~~~~~~~~~ +NOTE: Preface and appendix subsections start out of sequence at level +2 (level 1 is skipped). This only applies to multi-part book +documents. + + + +[bibliography] +Example Bibliography +==================== +The bibliography list is a style of AsciiDoc bulleted list. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +[glossary] +Example Glossary +================ +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +[colophon] +Example Colophon +================ +Text at the end of a book describing facts about its production. + + +[index] +Example Index +============= +//////////////////////////////////////////////////////////////// +The index is normally left completely empty, it's contents are +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// diff -Nru asciidoc-8.6.10/tests/inputs/book.txt asciidoc-10.1.2/tests/inputs/book.txt --- asciidoc-8.6.10/tests/inputs/book.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/book.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,156 @@ +Book Title Goes Here +==================== +Author's Name +v1.0, 2003-12 +:doctype: book + + +[dedication] +Example Dedication +------------------ +Optional dedication. + +This document is an AsciiDoc book skeleton containing briefly +annotated example elements plus a couple of example index entries and +footnotes. + +Books are normally used to generate DocBook markup and the titles of +the preface, appendix, bibliography, glossary and index sections are +significant ('specialsections'). + + +[preface] +Example Preface +--------------- +Optional preface. + +Preface Sub-section +~~~~~~~~~~~~~~~~~~~ +Preface sub-section body. + + +The First Chapter +----------------- +Chapters can contain sub-sections nested up to three deep. +footnote:[An example footnote.] +indexterm:[Example index entry] + +Chapters can have their own bibliography, glossary and index. + +And now for something completely different: ((monkeys)), lions and +tigers (Bengal and Siberian) using the alternative syntax index +entries. +(((Big cats,Lions))) +(((Big cats,Tigers,Bengal Tiger))) +(((Big cats,Tigers,Siberian Tiger))) +Note that multi-entry terms generate separate index entries. + +Here are a couple of image examples: an image:images/smallnew.png[] +example inline image followed by an example block image: + +.Tiger block image +image::images/tiger.png[Tiger image] + +Followed by an example table: + +.An example table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +.An example example +=============================================== +Lorum ipum... +=============================================== + +[[X1]] +Sub-section with Anchor +~~~~~~~~~~~~~~~~~~~~~~~ +Sub-section at level 2. + +Chapter Sub-section +^^^^^^^^^^^^^^^^^^^ +Sub-section at level 3. + +Chapter Sub-section ++++++++++++++++++++ +Sub-section at level 4. + +This is the maximum sub-section depth supported by the distributed +AsciiDoc configuration. +footnote:[A second example footnote.] + + +The Second Chapter +------------------ +An example link to anchor at start of the <>. +indexterm:[Second example index entry] + +An example link to a bibliography entry <>. + + +The Third Chapter +----------------- +Book chapters are at level 1 and can contain sub-sections. + + +:numbered!: + +[appendix] +Example Appendix +---------------- +One or more optional appendixes go here at section level 1. + +Appendix Sub-section +~~~~~~~~~~~~~~~~~~~ +Sub-section body. + + +[bibliography] +Example Bibliography +-------------------- +The bibliography list is a style of AsciiDoc bulleted list. + +[bibliography] +.Books +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + +[bibliography] +.Articles +- [[[abc2003]]] Gall Anonim. 'An article', Whatever. 2003. + + +[glossary] +Example Glossary +---------------- +Glossaries are optional. Glossaries entries are an example of a style +of AsciiDoc labeled lists. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +[colophon] +Example Colophon +---------------- +Text at the end of a book describing facts about its production. + + +[index] +Example Index +------------- +//////////////////////////////////////////////////////////////// +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// diff -Nru asciidoc-8.6.10/tests/inputs/customers.csv asciidoc-10.1.2/tests/inputs/customers.csv --- asciidoc-8.6.10/tests/inputs/customers.csv 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/customers.csv 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ +"AROUT","Around the Horn","Thomas Hardy","120 Hanover Sq. +London","(171) 555-7788" +"BERGS","Berglunds snabbkop","Christina Berglund","Berguvsvagen 8 +Lulea","0921-12 34 65" +"BLAUS","Blauer See Delikatessen","Hanna Moos","Forsterstr. 57 +Mannheim","0621-08460" +"BLONP","Blondel pere et fils","Frederique Citeaux","24, place Kleber +Strasbourg","88.60.15.31" +"BOLID","Bolido Comidas preparadas","Martin Sommer","C/ Araquil, 67 +Madrid","(91) 555 22 82" +"BONAP","Bon app'","Laurence Lebihan","12, rue des Bouchers +Marseille","91.24.45.40" +"BOTTM","Bottom-Dollar Markets","Elizabeth Lincoln","23 Tsawassen Blvd. +Tsawassen","(604) 555-4729" +"BSBEV","B's Beverages","Victoria Ashworth","Fauntleroy Circus +London","(171) 555-1212" +"CACTU","Cactus Comidas para llevar","Patricio Simpson","Cerrito 333 +Buenos Aires","(1) 135-5555" diff -Nru asciidoc-8.6.10/tests/inputs/deprecated-quotes.txt asciidoc-10.1.2/tests/inputs/deprecated-quotes.txt --- asciidoc-8.6.10/tests/inputs/deprecated-quotes.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/deprecated-quotes.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,12 @@ +// Deprecated quote attributes. +[role="foo"]##fun with text##. +["green","yellow",2,role="foo"]##fun with text##. +[green,yellow,2]##fun with text##. +More [red,black,4]*fun with text*. +Yet more [red,,1.5]**fun with text**. +Yet more [red,,1.5]+fun with text+. +Yet more [red,,1.5]'fun with text'. + +Yet more [red,,1.5]_fun with text_. + +Yet more [orange]'fun with text'. diff -Nru asciidoc-8.6.10/tests/inputs/dummy_file.py asciidoc-10.1.2/tests/inputs/dummy_file.py --- asciidoc-8.6.10/tests/inputs/dummy_file.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/dummy_file.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,470 @@ +#!/usr/bin/env python3 + +__version__ = '0.4.0' + + +import difflib +import io +import os +from pathlib import Path +import re +import shutil +import sys + +sys.path.append(str(Path(__file__).resolve().parent.parent)) +from asciidoc import asciidoc # noqa: E402 + +# Default backends. +BACKENDS = ('html4', 'xhtml11', 'docbook', 'docbook5', 'html5') +BACKEND_EXT = { + 'html4': '.html', + 'xhtml11': '.html', + 'docbook': '.xml', + 'docbook5': '.xml', + 'slidy': '.html', + 'html5': '.html' +} + + +def iif(condition, iftrue, iffalse=None): + """ + Immediate if c.f. ternary ?: operator. + False value defaults to '' if the true value is a string. + False value defaults to 0 if the true value is a number. + """ + if iffalse is None: + if isinstance(iftrue, str): + iffalse = '' + if type(iftrue) in (int, float): + iffalse = 0 + if condition: + return iftrue + else: + return iffalse + + +def message(msg=''): + print(msg, file=sys.stderr) + + +def strip_end(lines): + """ + Strip blank strings from the end of list of strings. + """ + for i in range(len(lines) - 1, -1, -1): + if not lines[i]: + del lines[i] + else: + break + + +def normalize_data(lines): + """ + Strip comments and trailing blank strings from lines. + """ + result = [s for s in lines if not s.startswith('#')] + strip_end(result) + return result + + +class AsciiDocTest(object): + def __init__(self): + self.number = None # Test number (1..). + self.name = '' # Optional test name. + self.title = '' # Optional test name. + self.description = [] # List of lines followoing title. + self.source = None # AsciiDoc test source file name. + self.options = [] + self.attributes = {'asciidoc-version': 'test'} + self.backends = BACKENDS + self.artifacts = [] # list of generated artifacts to delete + self.requires = [] # list of dependencies to check for for the test + self.confdir = None + self.datadir = None # Where output files are stored. + self.disabled = False + self.passed = self.skipped = self.failed = 0 + + def backend_filename(self, backend): + """ + Return the path name of the backend output file that is generated from + the test name and output file type. + """ + return '%s-%s%s' % ( + os.path.normpath(os.path.join(self.datadir, self.name)), + backend, + BACKEND_EXT[backend] + ) + + def parse(self, lines, confdir, datadir): + """ + Parse conf file test section from list of text lines. + """ + self.__init__() + self.confdir = confdir + self.datadir = datadir + lines = Lines(lines) + while not lines.eol(): + text = lines.read_until(r'^%') + if text: + if not text[0].startswith('%'): + if text[0][0] == '!': + self.disabled = True + self.title = text[0][1:] + else: + self.title = text[0] + self.description = text[1:] + continue + reo = re.match(r'^%\s*(?P[\w_-]+)', text[0]) + if not reo: + raise ValueError + directive = reo.groupdict()['directive'] + data = normalize_data(text[1:]) + if directive == 'source': + if data: + self.source = os.path.normpath(os.path.join( + self.confdir, os.path.normpath(data[0]) + )) + elif directive == 'options': + self.options = eval(' '.join(data)) + for i, v in enumerate(self.options): + if isinstance(v, str): + self.options[i] = (v, None) + elif directive == 'attributes': + self.attributes.update(eval(' '.join(data))) + elif directive == 'backends': + self.backends = eval(' '.join(data)) + elif directive == 'name': + self.name = data[0].strip() + elif directive == 'requires': + self.requires = eval(' '.join(data)) + elif directive == 'artifacts': + self.artifacts = eval(' '.join(data)) + else: + raise ValueError + if not self.title: + self.title = self.source + if not self.name: + self.name = os.path.basename(os.path.splitext(self.source)[0]) + + def is_missing(self, backend): + """ + Returns True if there is no output test data file for backend. + """ + return not os.path.isfile(self.backend_filename(backend)) + + def is_missing_or_outdated(self, backend): + """ + Returns True if the output test data file is missing or out of date. + """ + return self.is_missing(backend) or ( + os.path.getmtime(self.source) + > os.path.getmtime(self.backend_filename(backend)) + ) + + def clean_artifacts(self): + for artifact in self.artifacts: + loc = os.path.join(self.confdir, artifact) + if os.path.exists(loc): + os.unlink(loc) + + def get_expected(self, backend): + """ + Return expected test data output for backend. + """ + with open( + self.backend_filename(backend), + encoding='utf-8', + newline='' + ) as open_file: + return open_file.readlines() + + def generate_expected(self, backend): + """ + Generate and return test data output for backend. + """ + asciidoc.reset_asciidoc() + outfile = io.StringIO() + options = self.options[:] + options.append(('--out-file', outfile)) + options.append(('--backend', backend)) + for k, v in self.attributes.items(): + if v == '' or k[-1] in '!@': + s = str(k) + elif v is None: + s = k + '!' + else: + s = '%s=%s' % (k, v) + options.append(('--attribute', s)) + asciidoc.execute('asciidoc', options, [self.source]) + return outfile.getvalue().splitlines(keepends=True) + + def update_expected(self, backend): + """ + Generate and write backend data. + """ + lines = self.generate_expected(backend) + if not os.path.isdir(self.datadir): + print('CREATING: %s' % self.datadir) + os.mkdir(self.datadir) + with open( + self.backend_filename(backend), + 'w+', + encoding='utf-8', + newline='' + ) as open_file: + print('WRITING: %s' % open_file.name) + open_file.writelines(lines) + + def update(self, backend=None, force=False): + """ + Regenerate and update expected test data outputs. + """ + if backend is None: + backends = self.backends + else: + backends = [backend] + + print('SOURCE: asciidoc: %s' % self.source) + for backend in backends: + if force or self.is_missing_or_outdated(backend): + self.update_expected(backend) + print() + + self.clean_artifacts() + + def run(self, backend=None): + """ + Execute test. + Return True if test passes. + """ + if backend is None: + backends = self.backends + else: + backends = [backend] + result = True # Assume success. + self.passed = self.failed = self.skipped = 0 + print('%d: %s' % (self.number, self.title)) + if self.source and os.path.isfile(self.source): + print('SOURCE: asciidoc: %s' % self.source) + for backend in backends: + fromfile = self.backend_filename(backend) + skip = False + for require in self.requires: + if shutil.which(require) is None: + skip = True + break + if not skip and not self.is_missing(backend): + expected = self.get_expected(backend) + strip_end(expected) + got = self.generate_expected(backend) + strip_end(got) + lines = [] + for line in difflib.unified_diff(got, expected, n=0): + lines.append(line) + if lines: + result = False + self.failed += 1 + lines = lines[3:] + print('FAILED: %s: %s' % (backend, fromfile)) + message('+++ %s' % fromfile) + message('--- got') + for line in lines: + message(line) + message() + else: + self.passed += 1 + print('PASSED: %s: %s' % (backend, fromfile)) + else: + self.skipped += 1 + print('SKIPPED: %s: %s' % (backend, fromfile)) + self.clean_artifacts() + else: + self.skipped += len(backends) + if self.source: + msg = 'MISSING: %s' % self.source + else: + msg = 'NO ASCIIDOC SOURCE FILE SPECIFIED' + print(msg) + print('') + return result + + +class AsciiDocTests(object): + def __init__(self, conffile): + """ + Parse configuration file + :param conffile: + """ + self.conffile = conffile + self.passed = self.failed = self.skipped = 0 + # All file names are relative to configuration file directory. + self.confdir = os.path.dirname(self.conffile) + self.datadir = self.confdir # Default expected files directory. + self.tests = [] # List of parsed AsciiDocTest objects. + self.globals = {} + with open(self.conffile, encoding='utf-8') as open_file: + lines = Lines(open_file.readlines()) + first = True + while not lines.eol(): + s = lines.read_until(r'^%+$') + s = [line for line in s if len(line) > 0] # Drop blank lines. + # Must be at least one non-blank line in addition to delimiter. + if len(s) > 1: + # Optional globals precede all tests. + if first and re.match(r'^%\s*globals$', s[0]): + self.globals = eval(' '.join(normalize_data(s[1:]))) + if 'datadir' in self.globals: + self.datadir = os.path.join( + self.confdir, + os.path.normpath(self.globals['datadir']) + ) + else: + test = AsciiDocTest() + test.parse(s[1:], self.confdir, self.datadir) + self.tests.append(test) + test.number = len(self.tests) + first = False + + def run(self, number=None, backend=None): + """ + Run all tests. + If number is specified run test number (1..). + """ + self.passed = self.failed = self.skipped = 0 + for test in self.tests: + if ( + (not test.disabled or number) + and (not number or number == test.number) + and (not backend or backend in test.backends) + ): + test.run(backend) + self.passed += test.passed + self.failed += test.failed + self.skipped += test.skipped + if self.passed > 0: + print('TOTAL PASSED: %s' % self.passed) + if self.failed > 0: + print('TOTAL FAILED: %s' % self.failed) + if self.skipped > 0: + print('TOTAL SKIPPED: %s' % self.skipped) + + def update(self, number=None, backend=None, force=False): + """ + Regenerate expected test data and update configuratio file. + """ + for test in self.tests: + if (not test.disabled or number) and (not number or number == test.number): + test.update(backend, force=force) + + def list(self): + """ + Lists tests to stdout. + """ + for test in self.tests: + print('%d: %s%s' % (test.number, iif(test.disabled, '!'), test.title)) + + +class Lines(list): + """ + A list of strings. + Adds eol() and read_until() to list type. + """ + + def __init__(self, lines): + super(Lines, self).__init__() + self.extend([s.rstrip() for s in lines]) + self.pos = 0 + + def eol(self): + return self.pos >= len(self) + + def read_until(self, regexp): + """ + Return a list of lines from current position up until the next line + matching regexp. + Advance position to matching line. + """ + result = [] + if not self.eol(): + result.append(self[self.pos]) + self.pos += 1 + while not self.eol(): + if re.match(regexp, self[self.pos]): + break + result.append(self[self.pos]) + self.pos += 1 + return result + + +if __name__ == '__main__': + # guarantee a stable timestamp matching the test fixtures + os.environ['SOURCE_DATE_EPOCH'] = '1038184662' + # Process command line options. + from argparse import ArgumentParser + parser = ArgumentParser( + description='Run AsciiDoc conformance tests specified in configuration' + 'FILE.' + ) + msg = 'Use configuration file CONF_FILE (default configuration file is '\ + 'testasciidoc.conf in testasciidoc.py directory)' + parser.add_argument( + '-v', + '--version', + action='version', + version='%(prog)s {}'.format(__version__) + ) + parser.add_argument('-f', '--conf-file', help=msg) + + subparsers = parser.add_subparsers(metavar='command', dest='command') + subparsers.required = True + + subparsers.add_parser('list', help='List tests') + + options = ArgumentParser(add_help=False) + options.add_argument('-n', '--number', type=int, help='Test number to run') + options.add_argument('-b', '--backend', type=str, help='Backend to run') + + subparsers.add_parser('run', help='Execute tests', parents=[options]) + + subparser = subparsers.add_parser( + 'update', + help='Regenerate and update test data', + parents=[options] + ) + subparser.add_argument( + '--force', + action='store_true', + help='Update all test data overwriting existing data' + ) + + args = parser.parse_args() + + conffile = os.path.join(os.path.dirname(sys.argv[0]), 'testasciidoc.conf') + force = 'force' in args and args.force is True + if args.conf_file is not None: + conffile = args.conf_file + if not os.path.isfile(conffile): + message('missing CONF_FILE: %s' % conffile) + sys.exit(1) + tests = AsciiDocTests(conffile) + cmd = args.command + number = None + backend = None + if 'number' in args: + number = args.number + if 'backend' in args: + backend = args.backend + if backend and backend not in BACKENDS: + message('illegal BACKEND: {:s}'.format(backend)) + sys.exit(1) + if number is not None and (number < 1 or number > len(tests.tests)): + message('illegal test NUMBER: {:d}'.format(number)) + sys.exit(1) + if cmd == 'run': + tests.run(number, backend) + if tests.failed: + sys.exit(1) + elif cmd == 'update': + tests.update(number, backend, force=force) + elif cmd == 'list': + tests.list() diff -Nru asciidoc-8.6.10/tests/inputs/filters-test.txt asciidoc-10.1.2/tests/inputs/filters-test.txt --- asciidoc-8.6.10/tests/inputs/filters-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/filters-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,90 @@ +Filter Tests +============ + + +== Toy filter example from User Guide + +[code,python] +---------------------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +---------------------------------------------- + + +== Pychart Chart generations from FAQ + +// Generate chart image file. +sys2::[python "{indir}/barchart.py" --format=png --output="{outdir={indir}}/{imagesdir=}{imagesdir?/}barchart.png" --scale=2] + +// Display chart image file. +image::barchart.png[] + + +== Graphviz Graphs + +.Simple graph +["graphviz", "graphviz1.png", alt="Graphviz->AsciiDoc->HTML"] +--------------------------------------------------------------------- +digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} +--------------------------------------------------------------------- + +.Not so simple graph +["graphviz", "graphviz2.png"] +--------------------------------------------------------------------- +digraph automata_0 { + size ="8.5, 11"; + node [shape = circle]; + 0 [ style = filled, color=lightgrey ]; + 2 [ shape = doublecircle ]; + 0 -> 2 [ label = "a " ]; + 0 -> 1 [ label = "other " ]; + 1 -> 2 [ label = "a " ]; + 1 -> 1 [ label = "other " ]; + 2 -> 2 [ label = "a " ]; + 2 -> 1 [ label = "other " ]; + "Machine: a" [ shape = plaintext ]; +} +--------------------------------------------------------------------- + + +== Music filter + +.A tune generated from ABC notation +[music,music1.png] +--------------------------------------------------------------------- +T:The Butterfly +R:slip jig +C:Tommy Potts +H:Fiddle player Tommy Potts made this tune from two older slip jigs, +H:one of which is called "Skin the Peelers" in Roche's collection. +D:Bothy Band: 1975. +M:9/8 +K:Em +vB2(E G2)(E F3)|B2(E G2)(E F)ED|vB2(E G2)(E F3)|(B2d) d2(uB A)FD:| +|:(vB2c) (e2f) g3|(uB2d) (g2e) (dBA)|(B2c) (e2f) g2(ua|b2a) (g2e) (dBA):| +|:~B3 (B2A) G2A|~B3 BA(uB d)BA|~B3 (B2A) G2(A|B2d) (g2e) (dBA):| +--------------------------------------------------------------------- + +<>. + +[[X1]] +.A fragment generated from LilyPond source +["music", "music2.png", "ly", link="music2.ly"] +--------------------------------------------------------------------- +\version "2.10.0" +\paper { + ragged-right = ##t +} +{ + \time 3/4 + \clef bass + c2 e4 g2. f4 e d c2 r4 +} +--------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/tests/inputs/include-lines-test.txt asciidoc-10.1.2/tests/inputs/include-lines-test.txt --- asciidoc-8.6.10/tests/inputs/include-lines-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/include-lines-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,23 @@ +include line test +================= + +The imports: + +[source,python] +---- +include::./dummy_file.py[lines="6..15"] +---- + +Some random ranges: + +[source,python] +---- +include::./dummy_file.py[lines="29..44,61..68,70,398..-1"] +---- + +Using ; as separator: + +[source,python] +---- +include::./dummy_file.py[lines="29..44;61..68"] +---- diff -Nru asciidoc-8.6.10/tests/inputs/lang-cs-man-test.txt asciidoc-10.1.2/tests/inputs/lang-cs-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-cs-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-cs-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-it.conf language file. +:lang: cs + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SINOSSI +------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-cs-test.txt asciidoc-10.1.2/tests/inputs/lang-cs-test.txt --- asciidoc-8.6.10/tests/inputs/lang-cs-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-cs-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-cs.conf language file. +:lang: cs + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Abstract +-------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Dedica +------ +Dedication special section. + + +Prefazione +---------- +Preface special section. + + +Colofone +-------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Appendice A: Example Appendix +----------------------------- +Appendix special section. + + +Bibliografia +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glossario +--------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Index +----- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-de-man-test.txt asciidoc-10.1.2/tests/inputs/lang-de-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-de-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-de-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-de.conf language file. +:lang: de + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +ÃœBERSICHT +--------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-de-test.txt asciidoc-10.1.2/tests/inputs/lang-de-test.txt --- asciidoc-8.6.10/tests/inputs/lang-de-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-de-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-de.conf language file. +:lang: de + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Zusammenfassung +--------------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Widmung +------- +Dedication special section. + + +Vorwort +------- +Preface special section. + + +Kolophon +-------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Anhang A: Example Appendix +-------------------------- +Appendix special section. + + +Literaturverzeichnis +-------------------- +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glossar +------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Stichwortverzeichnis +-------------------- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-en-man-test.txt asciidoc-10.1.2/tests/inputs/lang-en-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-en-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-en-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-en.conf language file. +:lang: en + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SYNOPSIS +-------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-en-test.txt asciidoc-10.1.2/tests/inputs/lang-en-test.txt --- asciidoc-8.6.10/tests/inputs/lang-en-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-en-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,114 @@ +// Test for lang-en.conf language file. +:lang: en + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +// Translate title. +Abstract +-------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +// Translate title. +Dedication +---------- +Dedication special section. + + +// Translate title. +Preface +------- +Preface special section. + + +// Translate title. +Colophon +-------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +// Translate title. +Appendix A: Example Appendix +---------------------------- +Appendix special section. + + +// Translate title. +Bibliography +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +// Translate title. +Glossary +-------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +// Translate title. +Index +----- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-es-man-test.txt asciidoc-10.1.2/tests/inputs/lang-es-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-es-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-es-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-es.conf language file. +:lang: es + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SINOPSIS +-------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-es-test.txt asciidoc-10.1.2/tests/inputs/lang-es-test.txt --- asciidoc-8.6.10/tests/inputs/lang-es-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-es-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-es.conf language file. +:lang: es + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Resumen +------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Dedicación +---------- +Dedication special section. + + +Prefacio +-------- +Preface special section. + + +Colofón +------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Apéndice A: Example Appendix +---------------------------- +Appendix special section. + + +Bibliografía +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glosario +-------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Ãndice +------ +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-fr-man-test.txt asciidoc-10.1.2/tests/inputs/lang-fr-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-fr-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-fr-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-fr.conf language file. +:lang: fr + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SYNOPSIS +-------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-fr-test.txt asciidoc-10.1.2/tests/inputs/lang-fr-test.txt --- asciidoc-8.6.10/tests/inputs/lang-fr-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-fr-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-fr.conf language file. +:lang: fr + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Résumé +------ +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Dédicace +-------- +Dedication special section. + + +Préface +------- +Preface special section. + + +Colophon +-------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Appendice A: Example Appendix +----------------------------- +Appendix special section. + + +Bibliographie +------------- +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glossaire +--------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Index +----- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-hu-man-test.txt asciidoc-10.1.2/tests/inputs/lang-hu-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-hu-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-hu-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-hu.conf language file. +:lang: hu + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +ÃTTEKINTÉS +---------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-hu-test.txt asciidoc-10.1.2/tests/inputs/lang-hu-test.txt --- asciidoc-8.6.10/tests/inputs/lang-hu-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-hu-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-hu.conf language file. +:lang: hu + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Kivonat +------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Ajánlás +-------- +Dedication special section. + + +ElÅ‘szó +------ +Preface special section. + + +Utószó +------ +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +A függelék: Example Appendix +---------------------------- +Appendix special section. + + +Bibliográfia +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Szójegyzék +---------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Index +----- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-it-man-test.txt asciidoc-10.1.2/tests/inputs/lang-it-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-it-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-it-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-it.conf language file. +:lang: it + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SINOSSI +------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-it-test.txt asciidoc-10.1.2/tests/inputs/lang-it-test.txt --- asciidoc-8.6.10/tests/inputs/lang-it-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-it-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-it.conf language file. +:lang: it + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Abstract +-------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Dedica +------ +Dedication special section. + + +Prefazione +---------- +Preface special section. + + +Colofone +-------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Appendice A: Example Appendix +----------------------------- +Appendix special section. + + +Bibliografia +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glossario +--------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Index +----- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-ja-man-test.txt asciidoc-10.1.2/tests/inputs/lang-ja-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-ja-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-ja-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ +// Test for lang-ja.conf language file. +:lang: ja + +ASCIIDOC(1) +=========== +:doctype: manpage + +== åå‰ +asciidoc - AsciiDoc テキストファイルを HTML ã‚„ DocBook ã«å¤‰æ›ã™ã‚‹ + +== æ›¸å¼ +*asciidoc* ['OPTIONS'] 'FILE' + +== 説明 +asciidoc(1) コマンド㯠AsciiDoc テキストファイル 'FILE' ã‚’ DocBook +ã‚„ HTML ã«å¤‰æ›ã™ã‚‹ã€‚ 'FILE' ㌠'-' ãªã‚‰ã°æ¨™æº–入力を使用ã™ã‚‹ã€‚ + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-ja-test.txt asciidoc-10.1.2/tests/inputs/lang-ja-test.txt --- asciidoc-8.6.10/tests/inputs/lang-ja-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-ja-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,94 @@ +// Test for lang-ja.conf language file. +:lang: ja + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +== æ¦‚è¦ +概è¦ã‚»ã‚¯ã‚·ãƒ§ãƒ³ + +endif::doctype-article[] + + +ifdef::doctype-book[] +== 献辞 +献辞セクション + + +== å‰æ›¸ +å‰æ›¸ã‚»ã‚¯ã‚·ãƒ§ãƒ³ + + +== 奥付 +奥付セクション + +endif::doctype-book[] + + +== 第一セクション +=== 警告 +以下ã¯å‡¦ç†ç³»ãŒç¿»è¨³ã™ã‚‹ã®ã§ã“ã®ã‚½ãƒ¼ã‚¹ã§ã¯ç¿»è¨³ã—ãªã„。 + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[虎ã®çµµ] + +続ã„ã¦è¡¨ã®ä¾‹ã€‚ + +.Table +[width="60%",options="header"] +|================================================= +| オプション | 説明 +| -a 'USER GROUP' | 'USER' ã‚’ 'GROUP' ã«è¿½åŠ ã™ã‚‹ +| -R 'GROUP' | 'GROUP' ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’ç¦æ­¢ã™ã‚‹ +|================================================= + +ãã—ã¦ã¾ã£ãŸãç•°ãªã‚‹ã‚‚ã®ã®ä¾‹: ((猿))ã€ãƒ©ã‚¤ã‚ªãƒ³ã€è™Žã€‚ + + +== 付録 A: 付録ã®ä¾‹ +付録セクション + + +== å‚考文献 +å‚考文献セクション + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +== 用語集 +用語集セクション + +[glossary] +用語:: + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + +別ã®ç”¨èªž:: + (インデントã•ã‚ŒãŸï¼‰ç”¨èªžã®å®šç¾© + + +ifdef::basebackend-docbook[] +== 索引 +//////////////////////////////////////////////////////////////// +索引セクション。 +内容㯠DocBook ツールãƒã‚§ãƒ¼ãƒ³ãŒè‡ªå‹•ç”Ÿæˆã™ã‚‹ã®ã§ã€ +通常ã“ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã¯ç©ºã§ã‚る。 +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-nl-man-test.txt asciidoc-10.1.2/tests/inputs/lang-nl-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-nl-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-nl-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-nl.conf language file. +:lang: nl + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SYNOPSIS +-------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-nl-test.txt asciidoc-10.1.2/tests/inputs/lang-nl-test.txt --- asciidoc-8.6.10/tests/inputs/lang-nl-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-nl-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,94 @@ +// Test for lang-nl.conf language file. +:lang: nl + += Languages Test +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +== Samenvatting +Bijzonder 'abstract' sectie. + +endif::doctype-article[] + + +ifdef::doctype-book[] +== Opdracht +Bijzonder 'dedication' sectie. + + +== Voorwoord +Bijzonder 'preface' sectie. + + +== Colofon +Bijzonder 'colophon' sectie. + +endif::doctype-book[] + + +== Het Eerste Hoofdstuk +=== Vermaningen +Vertaal ze niet in the broncode -- ze worden vanzelf vertaald in het +output bestand + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Gevolgd door een voorbeeld tabel: + +.Table +[width="60%",options="header"] +|============================================== +| Optie | Beschrijving +| -a 'USER GROUP' | Voeg 'USER' toe aan 'GROUP'. +| -R 'GROUP' | Schakel toegang uit tot 'GROUP'. +|============================================== + +En nu iets totaal anders: ((apen)), leeuwen en tijgers. + + +== Bijlage A: Voorbeeld Bijlage +Bijzonder 'appendix' sectie. + + +== Literatuurlijst +Bijzonder 'bibliography' sectie. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +== Woordenlijst +Bijzonder 'glossary' sectie. + +[glossary] +Een woordenlijst term:: + De bijhorende (ingesprongen) definitie. + +Een tweede term:: + De bijhorende (ingesprongen) definitie. + + +ifdef::basebackend-docbook[] +== Register +//////////////////////////////////////////////////////////////// +Bijzonder 'index' sectie. +Het register wordt normaal leeg gehouden, de inhoud wordt +automatisch gegenereerd door de DocBook hulpmiddelen. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-pt-BR-man-test.txt asciidoc-10.1.2/tests/inputs/lang-pt-BR-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-pt-BR-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-pt-BR-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-pt-BR.conf language file. +:lang: pt-BR + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SINOPSE +------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-pt-BR-test.txt asciidoc-10.1.2/tests/inputs/lang-pt-BR-test.txt --- asciidoc-8.6.10/tests/inputs/lang-pt-BR-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-pt-BR-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-pt-BR.conf language file. +:lang: pt-BR + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Resumo +------ +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Dedicação +--------- +Dedication special section. + + +Prefácio +-------- +Preface special section. + + +Cólofon +------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Appêndice A: Example Appendix +----------------------------- +Appendix special section. + + +Bibliografia +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glossário +--------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Ãndice +------ +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-ro-man-test.txt asciidoc-10.1.2/tests/inputs/lang-ro-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-ro-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-ro-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-it.conf language file. +:lang: it + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +SINOSSI +------- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-ro-test.txt asciidoc-10.1.2/tests/inputs/lang-ro-test.txt --- asciidoc-8.6.10/tests/inputs/lang-ro-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-ro-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-it.conf language file. +:lang: it + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +Abstract +-------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +Dedica +------ +Dedication special section. + + +Prefazione +---------- +Preface special section. + + +Colofone +-------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Appendice A: Example Appendix +----------------------------- +Appendix special section. + + +Bibliografia +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Glossario +--------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Index +----- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-ru-man-test.txt asciidoc-10.1.2/tests/inputs/lang-ru-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-ru-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-ru-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-ru.conf language file. +:lang: ru + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +ОБЗОР +----- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-ru-test.txt asciidoc-10.1.2/tests/inputs/lang-ru-test.txt --- asciidoc-8.6.10/tests/inputs/lang-ru-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-ru-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-ru.conf language file. +:lang: ru + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +ÐÐ½Ð½Ð¾Ñ‚Ð°Ñ†Ð¸Ñ +--------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +ПоÑвÑщение +---------- +Dedication special section. + + +Введение +-------- +Preface special section. + + +Колофон +------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Приложение A: Example Appendix +------------------------------ +Appendix special section. + + +Ð‘Ð¸Ð±Ð»Ð¸Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Словарь терминов +---------------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Предметный указатель +-------------------- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-sv-man-test.txt asciidoc-10.1.2/tests/inputs/lang-sv-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-sv-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-sv-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-sv.conf language file. +:lang: sv + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAMN +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +ÖVERSIKT +-------- +*asciidoc* ['OPTIONS'] 'FILE' + +BESKRIVNING +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-sv-test.txt asciidoc-10.1.2/tests/inputs/lang-sv-test.txt --- asciidoc-8.6.10/tests/inputs/lang-sv-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-sv-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,114 @@ +// Test for lang-sv.conf language file. +:lang: sv + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2003-12-21 + +ifdef::doctype-article[] +// Translate title. +Sammanfattning +-------------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +// Translate title. +Dedikation +---------- +Dedication special section. + + +// Translate title. +Förord +------ +Preface special section. + + +// Translate title. +Kolofon +------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +// Translate title. +Appendix A: Exempel-appendix +---------------------------- +Appendix special section. + + +// Translate title. +Referenser +---------- +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +// Translate title. +Ordlista +-------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +// Translate title. +Sakregister +----------- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/lang-uk-man-test.txt asciidoc-10.1.2/tests/inputs/lang-uk-man-test.txt --- asciidoc-8.6.10/tests/inputs/lang-uk-man-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-uk-man-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,21 @@ +// Test for lang-uk.conf language file. +:lang: uk + +ASCIIDOC(1) +=========== +:doctype: manpage + +NAME +---- +asciidoc - converts an AsciiDoc text file to HTML or DocBook + +ОГЛЯД +----- +*asciidoc* ['OPTIONS'] 'FILE' + +DESCRIPTION +----------- +The asciidoc(1) command translates the AsciiDoc text file 'FILE' to +DocBook or HTML. If 'FILE' is '-' then the standard input is used. + +... diff -Nru asciidoc-8.6.10/tests/inputs/lang-uk-test.txt asciidoc-10.1.2/tests/inputs/lang-uk-test.txt --- asciidoc-8.6.10/tests/inputs/lang-uk-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/lang-uk-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,106 @@ +// Test for lang-uk.conf language file. +:lang: uk + +Languages Test +============== +:revnumber: v1.0 +:revdate: 2011-01-30 + +ifdef::doctype-article[] +ÐÐ½Ð¾Ñ‚Ð°Ñ†Ñ–Ñ +-------- +Abstract special section. + +endif::doctype-article[] + + +ifdef::doctype-book[] +ПриÑвÑÑ‡ÐµÐ½Ð½Ñ +----------- +Dedication special section. + + +Ð’Ñтуп +----- +Preface special section. + + +Колофон +------- +Colophon special section. + +endif::doctype-book[] + + +The First Section +----------------- +Admonishments +~~~~~~~~~~~~~ +Do not translate in the source file -- they are translated to the +output file + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +.Tiger +image::../../images/tiger.png[Tiger image] + +Followed by an example table: + +.Table +[width="60%",options="header"] +|============================================== +| Option | Description +| -a 'USER GROUP' | Add 'USER' to 'GROUP'. +| -R 'GROUP' | Disables access to 'GROUP'. +|============================================== + +And now for something completely different: ((monkeys)), lions and +tigers. + + +Додаток A: Example Appendix +--------------------------- +Appendix special section. + + +Ð‘Ñ–Ð±Ð»Ñ–Ð¾Ð³Ñ€Ð°Ñ„Ñ–Ñ +------------ +Bibliography special section. + +[bibliography] +- [[[taoup]]] Eric Steven Raymond. 'The Art of Unix + Programming'. Addison-Wesley. ISBN 0-13-142901-9. +- [[[walsh-muellner]]] Norman Walsh & Leonard Muellner. + 'DocBook - The Definitive Guide'. O'Reilly & Associates. 1999. + ISBN 1-56592-580-7. + + +Словник термінів +---------------- +Glossary special section. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + + +ifdef::basebackend-docbook[] +Предметний покажчик +------------------- +//////////////////////////////////////////////////////////////// +Index special section. +The index is normally left completely empty, it's contents being +generated automatically by the DocBook toolchain. +//////////////////////////////////////////////////////////////// +endif::basebackend-docbook[] diff -Nru asciidoc-8.6.10/tests/inputs/latex-filter.txt asciidoc-10.1.2/tests/inputs/latex-filter.txt --- asciidoc-8.6.10/tests/inputs/latex-filter.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/latex-filter.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,246 @@ +LaTeX Filter +============ + +:blogpost-status: published +:blogpost-doctype: article +:blogpost-posttype: page +:blogpost-categories: AsciiDoc,LaTeX,python + +The AsciiDoc distribution includes a LaTeX filter that translates LaTeX source +to an image which is automatically inserted into the AsciiDoc output document. +Although it can accept any LaTeX source, the primary use is to render +mathematical formulae (see the examples below). The filter implements the +'latex' Listing block and Paragraph styles. + +Two image formats are supported; PNG and SVG. PNG is the default since that +was the first format that this filter supported. However, SVG is a better +format since it's scalable. Using SVG make formulas look good in both PDFs +and on web pages. SVG will also scale well when zooming in on a web page for +example. It is recommended to always use the SVG format. This can be done by +setting the 'imgfmt' parameter to 'svg', as is done below. An even better way +is to set the global attribute 'latex-imgfmt' to 'svg'. Then SVG will be used +for all formulas. + +This LaTeX paragraph: + +[listing] +..................................................................... +["latex", imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- +..................................................................... + +Renders: + +["latex", imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- + +Compare the formula above, which is rendered as an SVG image, to the formula +below which has been rendered as a PNG image. The difference will be most +notable if zooming in on a web page, printing the web page or when rendering +the document as a PDF. + +[listing] +..................................................................... +["latex", "latex2.png", 140, imgfmt="png"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- +..................................................................... + +Renders: + +["latex", "latex2.png", 140, imgfmt="png"] +--------------------------------------------------------------------- +\begin{equation*} +y = \int_0^\infty \gamma^2 \cos(x) dx +\end{equation*} +--------------------------------------------------------------------- + +This LaTeX block: + +[listing] +..................................................................... +["latex","latex1.svg",imgfmt="svg",align="center"] +--------------------------------------------------------------------- +\begin{equation*} +\displaystyle{ V_i = C_0 - C_3 +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} } +\end{equation*} +--------------------------------------------------------------------- +..................................................................... + +Renders: + +["latex","latex1.svg",imgfmt="svg",align="center"] +--------------------------------------------------------------------- +\begin{equation*} +\displaystyle{ V_i = C_0 - C_3 +\frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} } +\end{equation*} +--------------------------------------------------------------------- + +This LaTeX block: + +[listing] +..................................................................... +.LaTeX filter example +[latex] +["latex","latex3.svg",imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation} +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{ +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2} +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}. +\end{equation} + +\begin{equation} +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))} +\end{equation} + +\begin{equation}\label{first} +a=b+c +\end{equation} + +\begin{subequations}\label{grp} +\begin{align} +a&=b+c\label{second}\\ +d&=e+f+g\label{third}\\ +h&=i+j\label{fourth} +\end{align} +\end{subequations} +--------------------------------------------------------------------- +..................................................................... + +Renders: + +.LaTeX filter example +[latex] +["latex","latex3.svg",imgfmt="svg"] +--------------------------------------------------------------------- +\begin{equation} +\Re{z} =\frac{n\pi \dfrac{\theta +\psi}{2}}{ +\left(\dfrac{\theta +\psi}{2}\right)^2 + \left( \dfrac{1}{2} +\log \left\lvert\dfrac{B}{A}\right\rvert\right)^2}. +\end{equation} + +\begin{equation} +\boxed{\eta \leq C(\delta(\eta) +\Lambda_M(0,\delta))} +\end{equation} + +\begin{equation}\label{first} +a=b+c +\end{equation} + +\begin{subequations}\label{grp} +\begin{align} +a&=b+c\label{second}\\ +d&=e+f+g\label{third}\\ +h&=i+j\label{fourth} +\end{align} +\end{subequations} +--------------------------------------------------------------------- + +This LaTeX paragraph: + +[listing] +..................................................................... +.A LaTeX table +["latex",imgfmt="svg"] +\begin{tabular}{c r @{.} l} +Pi expression & +\multicolumn{2}{c}{Value} \\ +\hline +$\pi$ & 3&1416 \\ +$\pi^{\pi}$ & 36&46 \\ +$(\pi^{\pi})^{\pi}$ & 80662&7 \\ +\end{tabular} +..................................................................... + +Renders: + +.A LaTeX table +["latex",imgfmt="svg"] +\begin{tabular}{c r @{.} l} +Pi expression & +\multicolumn{2}{c}{Value} \\ +\hline +$\pi$ & 3&1416 \\ +$\pi^{\pi}$ & 36&46 \\ +$(\pi^{\pi})^{\pi}$ & 80662&7 \\ +\end{tabular} + + +Using the Filter +---------------- +- The LaTeX filter is invoked by setting the Listing block or + Paragraph style (the first positional block attribute) to 'latex'. +- The second positional attribute (named 'target' is optional, it sets + the name of the generated image file. If this is not supplied a + file name like `{docname}__{target-number}.{imgfmt}` is synthesised + (where `{docname}` is the document file name, `{target-number}` + is an integer number and `{imgfmt}` is the image format (png or svg). +- The third positional attribute, named 'dpi', is also optional; it is + an integer number that sets the output resolution in dots per inch + for a PNG image. It is ignored for an SVG image. +- The image format to use can be selected by setting the 'imgfmt' + parameter or by globally setting the 'latex-imgfmt' attribute. + Setting it to 'svg' will render SVG images and setting it to 'png' + will render PNG images. The default is 'png'. + +Because the LaTeX images are rendered using the image block templates +you can also use the optional named image block attributes (see +link:userguide.html#X55[Image macro attributes] in the AsciiDoc User +Guide). + +[TIP] +===================================================================== +You can also change the image size using the following LaTeX commands: + + \tiny + \scriptsize + \footnotesize + \small + \normalsize + \large + \Large + \LARGE + \huge + +For example: + + [latex] + \Large $y = \int_0^\infty \gamma^2 \cos(x) dx$ + +The `\Large` command is outside the `$` math delimiters. + +===================================================================== + +The filter (`./filters/latex/latex2img.py`) can be used outside +AsciiDoc to convert LaTeX source to images. + +Execute the following command to see how to use it: + + $ ./filters/latex/latex2img.py --help + + +Limitations +----------- +- The `asciidoc(1)` input and output files cannot both be `-` (stdin + and stdout), either the input or output files (or both) must be a + named file. + + +Installation +------------ +In addition to AsciiDoc you will need to have `latex(1)`, +`dvipng(1)` (for PNG) and/or `dvisvgm(1)` (for SVG) installed. diff -Nru asciidoc-8.6.10/tests/inputs/latexmathml.txt asciidoc-10.1.2/tests/inputs/latexmathml.txt --- asciidoc-8.6.10/tests/inputs/latexmathml.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/latexmathml.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,41 @@ +LaTeXMathML Formulae +==================== + +https://www.maths.nottingham.ac.uk/plp/pmadw/lm.html[LaTeXMathML] +capability has been added to AsciiDoc for users who are more familar +with or prefer LaTeX math formulas to the +https://asciidoc.org/asciimath.html[ASCIIMath] +notation. + +'LaTeXMathML' is a derivative of +https://asciidoc.org/asciimath.html[ASCIIMath] -- in +terms of usage the only difference it that you use the `latexmath` +attribute instead of the `asciimath` attribute. + +'LaTeXMathML' processes LaTeX math formulas not arbitrary LaTeX (as +`dblatex(1)` does). See the +https://www.maths.nottingham.ac.uk/plp/pmadw/lm.html[LaTeXMathML] +website for details. + +Here's the link:latexmathml.txt[AsciiDoc source] that generated this +page. + +Some example 'LaTeXMathML' formulas: + +- latexmath:[$R_x = 10.0 \times \sin(R_\phi)$] + +- latexmath:[$\sum_{n=1}^\infty \frac{1}{2^n}$] + +- latexmath:[$\lim_{x\to\infty} f(x) = k \choose r + \frac ab + \sum_{n=1}^\infty a_n + \displaystyle{ \left\{ \frac{1}{13} + \sum_{n=1}^\infty b_n \right\} }$] + +- latexmath:[$\$\alpha + \$\beta = \$(\alpha + \beta)$] + +- latexmath:[$\begin{eqnarray} x & = & \frac{-7 \pm + \sqrt{49 - 24}}{6} \\ & = & -2 \textrm{ or } -\frac13. + \end{eqnarray}$] + +- latexmath:[$\displaystyle{ V_i = C_0 - C_3 + \frac{C_1\cos(\theta_i+C_3)}{C_4+C_1\cos(\theta_i+C_2)} }$] + diff -Nru asciidoc-8.6.10/tests/inputs/latexmath.txt asciidoc-10.1.2/tests/inputs/latexmath.txt --- asciidoc-8.6.10/tests/inputs/latexmath.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/latexmath.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,121 @@ +Embedding LaTeX Math in AsciiDoc dblatex documents +================================================== + +You can include LaTeX math equations in AsciiDoc documents that are +processed by http://dblatex.sourceforge.net/[dblatex]. The AsciiDoc +'latexmath' macros and passthrough blocks generate DocBook +'inlineequation', 'informalequation' and 'equation' elements +containing the LaTeX markup which is processed by 'dblatex'. + + +Inline equations +---------------- +This markup: + +--------------------------------------------------------------------- +An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] +using the 'latexmath' inline macro. +--------------------------------------------------------------------- + +Renders: + +An inline equation latexmath:[$C = \alpha + \beta Y^{\gamma} + \epsilon$] +using the 'latexmath' inline macro. + + +Informal equations +------------------ +Informal (untitled) equations are generated with a 'latexmath' style +passthrough delimited block. This markup: + +--------------------------------------------------------------------- +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ +--------------------------------------------------------------------- + +Renders: + +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ + +Functionally identical block macro syntax: + +--------------------------------------------------------------------- +latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]] +--------------------------------------------------------------------- + +Renders: + +latexmath::[\[C = \alpha + \beta Y^{\gamma} + \epsilon\]] + + +Formal equations +---------------- +Formal equations are titled and are generated with a 'latexmath' style +passthrough delimited block. + +This markup: + +--------------------------------------------------------------------- +.First equation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ +--------------------------------------------------------------------- + +Renders: + +.First equation +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ + +This markup: + +--------------------------------------------------------------------- +.Matrix +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[ P^{e \rightarrow c}= \left[ + \begin{array}{*{3}{r@{}l}} + & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\ + + & \sin \theta \sin \psi + & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi + & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\ + + - & \sin \theta \cos \psi + & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi + & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\ + \end{array} +\right] \] +++++++++++++++++++++++++++++++++++++++++++++ +--------------------------------------------------------------------- + +Renders: + +.Matrix +[latexmath] +++++++++++++++++++++++++++++++++++++++++++++ +\[ P^{e \rightarrow c}= \left[ + \begin{array}{*{3}{r@{}l}} + & \cos \theta & & \sin \theta \sin \varphi & & \sin \theta \cos \varphi\\ + + & \sin \theta \sin \psi + & & \cos \varphi \cos \psi - \cos \theta \sin \varphi \sin \psi + & - & \sin \varphi \cos \psi - \cos \theta \cos \varphi \sin \psi\\ + + - & \sin \theta \cos \psi + & & \cos \varphi \sin \psi + \cos \theta \sin \varphi \cos \psi + & - & \sin \varphi \sin \psi + \cos \theta \cos \varphi \cos \psi\\ + \end{array} +\right] \] +++++++++++++++++++++++++++++++++++++++++++++ + + diff -Nru asciidoc-8.6.10/tests/inputs/newline.txt asciidoc-10.1.2/tests/inputs/newline.txt --- asciidoc-8.6.10/tests/inputs/newline.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/newline.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,17 @@ += Newline Tests + +These are tests about newlines. +See https://en.wikipedia.org/wiki/Newline[details] on the history. + +NOTE: Each section in the source file has the newline style from the + description. + +== UNIX Newlines + +Uses \n. + +== DOS Newlines + +Uses \r\n. + +== MAC Newlines Uses \r. Only used prior to Mac OS X. \ No newline at end of file diff -Nru asciidoc-8.6.10/tests/inputs/newtables.txt asciidoc-10.1.2/tests/inputs/newtables.txt --- asciidoc-8.6.10/tests/inputs/newtables.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/newtables.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,743 @@ +AsciiDoc New tables +=================== + +*New in version 8.3.0* + +I've finally come up with a 'new tables' syntax that I'm happy with +and can at last remove this footnote from the 'User Guide': ``The +current table syntax is overly complicated and unwieldy to edit, +hopefully a more usable syntax will appear in future versions of +AsciiDoc.'' + +.Update +********************************************************************* +The following additions were made at AsciiDoc 8.4.4: + +- Cell column and row spanning. +- Styles can be applied per cell. +- Vertical cell alignment can be applied to columns and cells. + +See the examples at the end of this document. +********************************************************************* + +At first glance it doesn't look much different to the old syntax but +it's a lot more flexible, easier to enter and supports a lot of column +styles (for example the 'asciidoc' style supports AsciiDoc block and +inline elements). The old tables syntax has been deprecated but is +currently still processed. Here are some examples of AsciiDoc 'new +tables': + +.Simple table +[width="15%"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= + +.AsciiDoc source +--------------------------------------------------------------------- +[width="15%"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= +--------------------------------------------------------------------- + + +.Table with title, header and footer +[width="40%",frame="topbot",options="header,footer"] +|====================== +|Column 1 |Column 2 +|1 |Item 1 +|2 |Item 2 +|3 |Item 3 +|6 |Three items +|====================== + +.AsciiDoc source +--------------------------------------------------------------------- +.An example table +[width="40%",frame="topbot",options="header,footer"] +|====================== +|Column 1 |Column 2 +|1 |Item 1 +|2 |Item 2 +|3 |Item 3 +|6 |Three items +|====================== +--------------------------------------------------------------------- + + +.Columns formatted with strong, monospaced and emphasis styles +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"] +|========================== +| 2+|Columns 2 and 3 +|1 |Item 1 |Item 1 +|2 |Item 2 |Item 2 +|3 |Item 3 |Item 3 +|4 |Item 4 |Item 4 +|footer 1|footer 2|footer 3 +|========================== + +.AsciiDoc source +--------------------------------------------------------------------- +.An example table +[width="50%",cols=">s,^2m,^2e",frame="topbot",options="header,footer"] +|========================== +| 2+|Columns 2 and 3 +|1 |Item 1 |Item 1 +|2 |Item 2 |Item 2 +|3 |Item 3 |Item 3 +|4 |Item 4 |Item 4 +|footer 1|footer 2|footer 3 +|========================== +--------------------------------------------------------------------- + +.A table with externally sourced CSV data +[format="csv",cols="^1,4*2",options="header"] +|=================================================== +ID,Customer Name,Contact Name,Customer Address,Phone +include::customers.csv[] +|=================================================== + +.AsciiDoc source +--------------------------------------------------------------------- + [format="csv",cols="^1,4*2",options="header"] + |=================================================== + ID,Customer Name,Contact Name,Customer Address,Phone + include::customers.csv[] + |=================================================== +--------------------------------------------------------------------- + + +.DVS formatted table +[width="70%",format="dsv"] +|==================================== +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +|==================================== + +.AsciiDoc source +--------------------------------------------------------------------- +[width="70%",format="dsv"] +|==================================== +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +|==================================== +--------------------------------------------------------------------- + + +.Horizontal and vertical source data +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= + +Short cells can be entered horizontally, longer cells vertically. The +default behavior is to strip leading and trailing blank lines within a +cell. These characteristics aid readability and data entry. + +.AsciiDoc source +--------------------------------------------------------------------- +.Windtrainer workouts +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= +--------------------------------------------------------------------- + + +.Default and verse styles +[cols=",^v",options="header"] +|=================================== +|Default paragraphs |Centered verses +2*|Per id. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +|=================================== + +.AsciiDoc source +--------------------------------------------------------------------- +[cols=",^v",options="header"] +|=================================== +|Default paragraphs |Centered verses +2*|Per id. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +|=================================== +--------------------------------------------------------------------- + + +.Horizontal and vertial headings +[cols="h,4*",options="header",width="50%"] +|================================== +| |West |Central |East | Total +|Q1 |270 |292 |342 | 904 +|Q2 |322 |276 |383 | 981 +|Q3 |298 |252 |274 | 824 +|Q4 |344 |247 |402 | 993 +|================================== + +.AsciiDoc source +--------------------------------------------------------------------- +.Horizontal and vertial headings +[cols="h,4*",options="header",width="50%"] +|================================== +| |West |Central |East | Total +|Q1 |270 |292 |342 | 904 +|Q2 |322 |276 |383 | 981 +|Q3 |298 |252 |274 | 824 +|Q4 |344 |247 |402 | 993 +|================================== +--------------------------------------------------------------------- + + +.AsciiDoc style in first column, Literal in second +[cols="asciidoc,literal",options="header",grid="cols"] +|================================== +|Output markup |AsciiDoc source +2*| +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== + +.AsciiDoc source +[listing] +..................................................................... +[cols="asciidoc,literal",options="header",grid="cols"] +|================================== +|Output markup |AsciiDoc source +2*| +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== +..................................................................... + + +.Cell containing lots of example markup elements +|==================================================================== +|'URLs': +https://asciidoc.org/[The AsciiDoc home page], +https://asciidoc.org/, +mailto:joe.bloggs@example.com[email Joe Bloggs], +joe.bloggs@example.com, +callto:joe.bloggs[]. + +'Link': See <>. + +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''. + +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^. +Some ^super text^ and ~some sub text~ + +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark, +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right +double arrow, <= left double arrow. +|==================================================================== + +[[X1]] +.AsciiDoc source +--------------------------------------------------------------------- +|==================================================================== +|'URLs': +https://asciidoc.org/[The AsciiDoc home page], +https://asciidoc.org/, +mailto:joe.bloggs@example.com[email Joe Bloggs], +joe.bloggs@example.com, +callto:joe.bloggs[]. + +'Link': See <>. + +'Emphasized text', *Strong text*, +Monospaced text+, ``Quoted text''. + +'Subscripts and superscripts': e^{amp}#960;i^+1 = 0. H~2~O and x^10^. +Some ^super text^ and ~some sub text~ + +'Replacements': (C) copyright, (TM) trademark, (R) registered trademark, +-- em dash, ... ellipsis, -> right arrow, <- left arrow, => right +double arrow, <= left double arrow. +|==================================================================== +--------------------------------------------------------------------- + + +.Nested table +[width="75%",cols="1,2a"] +|============================================== +|Normal cell + +|Cell with nested table + +[cols="2,1"] +!============================================== +!Nested table cell 1 !Nested table cell 2 +!============================================== + +|============================================== + +.AsciiDoc source +--------------------------------------------------------------------- +[width="75%",cols="1,2a"] +|============================================== +|Normal cell + +|Cell with nested table + +[cols="2,1"] +!============================================== +!Nested table cell 1 !Nested table cell 2 +!============================================== + +|============================================== +--------------------------------------------------------------------- + + +.Spans, alignments and styles +[cols="e,m,^,>s",width="25%"] +|================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +^|8 +|9 2+>|10 +|================ + +.AsciiDoc source +--------------------------------------------------------------------- +.Spans, alignments and styles +[cols="e,m,^,>s",width="25%"] +|================ +|1 >s|2 |3 |4 +^|5 2.2+^.^|6 .3+<.>m|7 +^|8 +|9 2+>|10 +|================ +--------------------------------------------------------------------- + +.Three panes +[cols="a,2a"] +|================================== +| +[float] +Top Left Pane +~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +.2+| +[float] +Right Pane +~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +| +[float] +Bottom Left Pane +~~~~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== + +.AsciiDoc source +[listing] +..................................................................... +.Three panes +[cols="a,2a"] +|================================== +| +[float] +Top Left Pane +~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +.2+| +[float] +Right Pane +~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +----------------------------------- +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. +----------------------------------- + +.Code filter example +[source,python] +----------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') + if word in keywords[language]: + return quote + word + quote + else: + return word +----------------------------------- + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +| +[float] +Bottom Left Pane +~~~~~~~~~~~~~~~~ +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +Consul *necessitatibus* per id, +consetetur, eu pro everti postulant +homero verear ea mea, qui. + +- Lorem ipsum dolor sit amet, + consectetuer adipiscing elit. + * Fusce euismod commodo velit. + * Qui in magna commodo, est labitur + dolorum an. Est ne magna primis + adolescens. Sit munere ponderum + dignissim et. Minim luptatum et vel. + * Vivamus fringilla mi eu lacus. + * Donec eget arcu bibendum nunc + consequat lobortis. +- Nulla porttitor vulputate libero. + . Fusce euismod commodo velit. + . Vivamus fringilla mi eu lacus. + +|================================== +..................................................................... + + +== Combinations of 'align', 'frame', 'grid', 'valign' and 'halign' attributes + +:frame: all +:grid: all +:halign: left +:valign: top + +[options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== + +.AsciiDoc source +--------------------------------------------------------------------- +:frame: all +:grid: all +:halign: left +:valign: top + +[options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== +--------------------------------------------------------------------- + + +:frame: sides +:grid: rows +:halign: center +:valign: middle + +.Table test +[width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== + +.AsciiDoc source +--------------------------------------------------------------------- +:frame: sides +:grid: rows +:halign: center +:valign: middle + +.Table test +[width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== +--------------------------------------------------------------------- + + +:frame: topbot +:grid: cols +:halign: right +:valign: bottom + +[align="right",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== + +.AsciiDoc source +--------------------------------------------------------------------- +:frame: topbot +:grid: cols +:halign: right +:valign: bottom + +[align="right",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== +--------------------------------------------------------------------- + + +:frame: none +:grid: none +:halign: left +:valign: top + +[align="center",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== + +.AsciiDoc source +--------------------------------------------------------------------- +:frame: none +:grid: none +:halign: left +:valign: top + +[align="center",width="50%",options="header"] +|==== +||frame | grid |valign |halign +v|  +  +  +|{frame} | {grid} |{valign} |{halign} +|==== +--------------------------------------------------------------------- + +:frame!: +:grid!: +:halign!: +:valign!: + diff -Nru asciidoc-8.6.10/tests/inputs/oldtables.txt asciidoc-10.1.2/tests/inputs/oldtables.txt --- asciidoc-8.6.10/tests/inputs/oldtables.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/oldtables.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,64 @@ +AsciiDoc Old Tables +=================== + +Examples of the AsciiDoc 'old tables' syntax. This syntax was used in +AsciiDoc versions up to 8.2.7 and has since been deprecated in favor +of the 'new tables' syntax. + +Simple table: + +`---`--- +1 2 +3 4 +5 6 +-------- + +Table with title, header and footer: + +.An example table +[grid="all"] +`-----------.-------------- +Column 1 Column 2 +--------------------------- +1 Item 1 +2 Item 2 +3 Item 3 +--------------------------- +6 Three items +--------------------------- + +Four columns totaling 15% of the 'pagewidth', CSV data: + +[frame="all"] +````~15 +1,2,3,4 +a,b,c,d +A,B,C,D +~~~~~~~~ + +A table with a numeric ruler and externally sourced CSV data: + +[frame="all", grid="all"] +`15`20`25`20`~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +ID,Customer Name,Contact Name,Customer Address,Phone +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +"AROUT","Around the Horn","Thomas Hardy","120 Hanover Sq. +London","(171) 555-7788" +"BERGS","Berglunds snabbkop","Christina Berglund","Berguvsvagen 8 +Lulea","0921-12 34 65" +"BLAUS","Blauer See Delikatessen","Hanna Moos","Forsterstr. 57 +Mannheim","0621-08460" +"BLONP","Blondel pere et fils","Frederique Citeaux","24, place Kleber +Strasbourg","88.60.15.31" +"BOLID","Bolido Comidas preparadas","Martin Sommer","C/ Araquil, 67 +Madrid","(91) 555 22 82" +"BONAP","Bon app'","Laurence Lebihan","12, rue des Bouchers +Marseille","91.24.45.40" +"BOTTM","Bottom-Dollar Markets","Elizabeth Lincoln","23 Tsawassen Blvd. +Tsawassen","(604) 555-4729" +"BSBEV","B's Beverages","Victoria Ashworth","Fauntleroy Circus +London","(171) 555-1212" +"CACTU","Cactus Comidas para llevar","Patricio Simpson","Cerrito 333 +Buenos Aires","(1) 135-5555" +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + diff -Nru asciidoc-8.6.10/tests/inputs/open-block-test.txt asciidoc-10.1.2/tests/inputs/open-block-test.txt --- asciidoc-8.6.10/tests/inputs/open-block-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/open-block-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,117 @@ += Additional Open Block and Paragraph styles + + +[comment] +Lorum ipsum... + +[comment] +-- +Lorum ipsum... +-- + +[example] +Lorum ipsum... + +[example] +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[sidebar] +Lorum ipsum... + +[sidebar] +.A title +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[NOTE] +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[CAUTION] +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[IMPORTANT] +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[WARNING] +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[TIP] +-- +Lorum ipsum... + +Lorum ipsum... +-- + +[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] +-- +As he spoke there was the sharp sound of horses' hoofs and +grating wheels against the curb, followed by a sharp pull at the +bell. Holmes whistled. + +"A pair, by the sound," said he. "Yes," he continued, glancing +out of the window. "A nice little brougham and a pair of +beauties. A hundred and fifty guineas apiece. There's money in +this case, Watson, if there is nothing else." +-- + +[verse, William Blake, from Auguries of Innocence] +-- +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +-- + +[source,python] +-- +y = 15 + +if y == 24: + x = 42 +-- + +[latex] +-- +$y = \int_0^\infty \gamma^2 \cos(x) dx$ +-- + +[graphviz] +-- +digraph G { rankdir=LR; Graphviz->AsciiDoc->HTML} +-- + +[music] +-- +\version "2.10.0" +\paper { + ragged-right = ##t +} +{ + \time 3/4 + \clef bass + c2 e4 g2. f4 e d c2 r4 +} +-- diff -Nru asciidoc-8.6.10/tests/inputs/rcs-id-marker-test.txt asciidoc-10.1.2/tests/inputs/rcs-id-marker-test.txt --- asciidoc-8.6.10/tests/inputs/rcs-id-marker-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/rcs-id-marker-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,6 @@ +RCS $Id$ Marker Test +==================== +$Id: mydoc.txt,v 1.5 2009/05/17 17:58:44 jbloggs Exp $ + + +Lorum ipsum... diff -Nru asciidoc-8.6.10/tests/inputs/slidy-example.txt asciidoc-10.1.2/tests/inputs/slidy-example.txt --- asciidoc-8.6.10/tests/inputs/slidy-example.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/slidy-example.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,174 @@ +Slidy Example Slideshow +======================= +:author: Joe Bloggs +:copyright: Foobar Inc. +:backend: slidy +:max-width: 45em +:data-uri: +:icons: + + +This preamble will appear on a separate slide. + + +AsciiDoc Elements +----------------- +Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla. Odio +sed pede litora. + +[float] +=== Titles inside delimited blocks must be floated +Porta nisl metus. Justo porttitor vel. Cras consequat tincidunt id sed +conubia. Feugiat felis justo. Nunc amet nulla. Eu ac orci mollis. + +.Tiger +image::images/tiger.png[] + + +Incremental Elements +-------------------- +The remaining elements on this page are incremental, press the space +bar to reveal them. + +[role="incremental"] +- Rhoncus pede justo. +- Velit pede dolor. +- Iaculis commodo et. +- Volutpat tristique nec. + +[role="incremental"] +-- +Sagittis in vestibulum. Habitasse ante nulla enim bibendum nulla. Odio +sed pede litora. +-- + +[role="incremental"] +. Rhoncus pede justo. +. Velit pede dolor. +. Iaculis commodo et. +. Volutpat tristique nec. + + +Outline Elements +---------------- +The following list is a Slidy 'outline' list -- nested bulleted or +numbered lists are expanded when the enclosing list item (the ones +with blue bullet points or numbers) are clicked. + +[role="outline"] +- Rhoncus pede justo. + * Rhoncus pede justo. + * Velit pede dolor. + +- Velit pede dolor. + * Iaculis commodo et. ++ +NOTE: 'Note' admonition paragraph. + + * Volutpat tristique nec. ++ +image::images/tiger.png[] + * Iaculis commodo et. + * Volutpat tristique nec. + +- Iaculis commodo et. +[role="outline"] + . Rhoncus pede justo. + ** Velit pede dolor. + ** Iaculis commodo et. + . Volutpat tristique nec. + +- Volutpat tristique nec. + + +AsciiDoc Elements +----------------- +NOTE: 'Note' admonition paragraph. + +IMPORTANT: 'Important' admonition paragraph. + +.Sidebar +********************************************************************* +Faucibus sagittis commodo sed et eu. Quam nullam ornare. Sed vel est. +Mauris urna lobortis interdum placerat per id magnis enim. +********************************************************************* + + +AsciiDoc Elements +----------------- +A quote block: + +[quote, Bertrand Russell, The World of Mathematics (1956)] +____________________________________________________________________ +A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher. +____________________________________________________________________ + +A verse block: + +[verse, William Blake, from Auguries of Innocence] +__________________________________________________ +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. +__________________________________________________ + + +AsciiDoc Elements +----------------- +.Horizontal and vertical source data +[width="80%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= + + +Filters +------- +[source,python] +.Python source +--------------------------------------------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +--------------------------------------------------------------------- + +//// +The music generation block is ignored for testing as it generates a PNG +that is unique to the combination of lilypond and libpng used, which is +easily different from environment to environment + +[music] +.Music +--------------------------------------------------------------------- +\version "2.10.0" +\paper { + ragged-right = ##t +} +{ + \time 3/4 + \clef bass + c2 e4 g2. f4 e d c2 r4 +} +--------------------------------------------------------------------- + +//// diff -Nru asciidoc-8.6.10/tests/inputs/source-highlight-filter.txt asciidoc-10.1.2/tests/inputs/source-highlight-filter.txt --- asciidoc-8.6.10/tests/inputs/source-highlight-filter.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/source-highlight-filter.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,275 @@ +Source Code Highlight Filter +============================ + +The AsciiDoc distribution includes a 'source' filter for highlighting +code syntax. + + +DocBook Outputs +--------------- +AsciiDoc encloses the source code in a DocBook 'programlisting' +element and leaves source code highlighting to the DocBook toolchain +(dblatex has a particularly nice programlisting highlighter). The +DocBook programlisting element is assigned two attributes: + +. The 'language' attribute is set to the AsciiDoc 'language' + attribute. +. The 'linenumbering' attribute is set to the AsciiDoc 'src_numbered' + attribute ('numbered' or 'unnumbered'). + + +HTML Outputs +------------ +You have the choice of three HTML source code highlighters, your +selection is determined by the 'source-highlighter' attribute (defaults +to 'source-highlight'): + +NOTE: Set the 'source-highlighter' attribute from the asciidoc(1) +command-line or in the document header (not in the document body, +because the configuration file conditional macros are processed at +load time). + +=== GNU Source Highlight +The default highlighter is the +https://www.gnu.org/software/src-highlite/[GNU source-highlight] which +can highlight 'html4', 'html5' and 'xhtml11' outputs. The GNU +source-highlight must be installed and the 'source-highlight' command +must reside in the shell search 'PATH'. + +=== Highlight +You can use +http://www.andre-simon.de/doku/highlight/en/highlight.html[Highlight] +syntax highlighter for 'xhtml11', 'html5' and 'html4' outputs (set the +'source-highlighter' attribute to 'highlighter'). + +- The 'highlight' command must reside in the shell search 'PATH'. +- To make Highlighter your default highlighter put the following line + your `~/.asciidoc/asciidoc.conf` file: + + source-highlighter=highlight + +- The AsciiDoc 'encoding' attribute is passed to Highlighter using the + `--encoding` command-line option. + +=== Pygments +The https://pygments.org/[Pygments] syntax highlighter can be used for +'xhtml11' and 'html5' outputs (set the 'source-highlighter' attribute +to 'pygments'). + +- The 'pygmentize' command must reside in the shell search 'PATH'. +- You can customize Pygments CSS styles by editing + `./stylesheets/pygments.css`. The `pygments.css` CSS file was + generated with: + + from pygments.formatters import HtmlFormatter + print HtmlFormatter().get_style_defs('.highlight') + +- To make Pygments your default highlighter put the following line + your `~/.asciidoc/asciidoc.conf` file: + + source-highlighter=pygments + +- The AsciiDoc 'encoding' attribute is passed to Pygments using the + `-O` command-line option. + + +Block attributes +---------------- +The following attributes can be included in source code block +attribute lists. + +- 'style' and 'language' are mandatory. +- 'style', 'language' and 'src_numbered' are the first three + positional attributes in that order. +- The 'args' attribute allows the inclusion of arbitrary (highlighter + dependent) command options. + +// + +style:: + Set to 'source'. +language:: + The source code language name. ++ +NOTE: The language names vary between highlighters -- consult the +selected highlighter manual. + +src_numbered:: + Set to 'numbered' to include line numbers. +src_tab:: + Set tab size (GNU source-highlight only). +args:: + Include this attribute value in the highlighter command-line (HTML + outputs) or in the `programlisting` element (DocBook). + + +Testing +------- +Test the filter by converting the test file to HTML with AsciiDoc: + + $ asciidoc -v ./filters/source/source-highlight-filter-test.txt + $ firefox ./filters/source/source-highlight-filter-test.html & + + +Examples +-------- + +Source code paragraphs +~~~~~~~~~~~~~~~~~~~~~~ +The `source` paragraph style will highlight a paragraph of source +code. These three code paragraphs: + +--------------------------------------------------------------------- +[source,python] +if n < 0: print 'Hello World!' + +:language: python + +[source] +if n < 0: print 'Hello World!' + +[source,ruby,numbered] +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" +--------------------------------------------------------------------- + +Render this highlighted source code: + +[source,python] +if n < 0: print 'Hello World!' + +:language: python + +[source] +if n < 0: print 'Hello World!' + +[source,ruby,numbered] +[true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + + +Unnumbered source code listing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This source-highlight filtered block: + +--------------------------------------------------------------------- + [source,python] + --------------------------------------------------------------------- + ''' A multi-line + comment.''' + def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word + --------------------------------------------------------------------- +--------------------------------------------------------------------- + +Renders this highlighted source code: + +[source,python] +--------------------------------------------------------------------- +''' A multi-line + comment.''' +def sub_word(mo): + ''' Single line comment.''' + word = mo.group('word') # Inline comment + if word in keywords[language]: + return quote + word + quote + else: + return word +--------------------------------------------------------------------- + +Numbered source code listing with callouts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This source-highlight filtered block: + +--------------------------------------------------------------------- + [source,ruby,numbered] + --------------------------------------------------------------------- + # + # Useful Ruby base class extensions. + # + + class Array + + # Execute a block passing it corresponding items in + # +self+ and +other_array+. + # If self has less items than other_array it is repeated. + + def cycle(other_array) # :yields: item, other_item + other_array.each_with_index do |item, index| + yield(self[index % self.length], item) + end + end + + end + + if $0 == __FILE__ # \<1> + # Array#cycle test + # true => 0 + # false => 1 + # true => 2 + # false => 3 + # true => 4 + puts 'Array#cycle test' # \<2> + [true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + end + end + --------------------------------------------------------------------- + + \<1> First callout. + \<2> Second callout. + +--------------------------------------------------------------------- + +Renders this highlighted source code: + +[source,ruby,numbered] +--------------------------------------------------------------------- +# +# Useful Ruby base class extensions. +# + +class Array + + # Execute a block passing it corresponding items in + # +self+ and +other_array+. + # If self has less items than other_array it is repeated. + + def cycle(other_array) # :yields: item, other_item + other_array.each_with_index do |item, index| + yield(self[index % self.length], item) + end + end + +end + +if $0 == __FILE__ # <1> + # Array#cycle test + # true => 0 + # false => 1 + # true => 2 + # false => 3 + # true => 4 + puts 'Array#cycle test' # <2> + [true, false].cycle([0, 1, 2, 3, 4]) do |a, b| + puts "#{a.inspect} => #{b.inspect}" + end +end +--------------------------------------------------------------------- + +<1> First callout. +<2> Second callout. + +[TIP] +===== +- If the source 'language' attribute has been set (using an + 'AttributeEntry' or from the command-line) you don't have to specify + it in each source code block. +- You should place callout markers inside source code comments to + ensure they are not misinterpreted and mangled by the highlighter. +===== diff -Nru asciidoc-8.6.10/tests/inputs/testcases.conf asciidoc-10.1.2/tests/inputs/testcases.conf --- asciidoc-8.6.10/tests/inputs/testcases.conf 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/testcases.conf 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,12 @@ +[replacements] +test-replacement=TEST_REPLACEMENT + +[test-template] +This template is overridden and should not be displayed. + +[test-template] +Template line 1. + +[+test-template] +Template line 2. + diff -Nru asciidoc-8.6.10/tests/inputs/testcases.txt asciidoc-10.1.2/tests/inputs/testcases.txt --- asciidoc-8.6.10/tests/inputs/testcases.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/testcases.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,817 @@ +// +// A collection of AsciiDoc test cases. +// + +Test 'Cases' +============ +:author: Joe Bloggs +// Web page meta data. +:title: Test Cases +:keywords: AsciiDoc, DocBook, EPUB, slideshow +:description: AsciiDoc is a text document format for writing short documents, + + articles, books, slideshows and UNIX man pages. +:replacements.(\w)'(\w): \1’\2 +:test-attribute: TEST_ATTRIBUTE + + +== Passthrough attributes == +ifdef::basebackend-docbook[] +:passtest: pass:[*lorum ipsum*] +endif::basebackend-docbook[] +ifdef::basebackend-html[] +:passtest: pass:[*lorum ipsum*] +endif::basebackend-html[] +{passtest} + +ifdef::basebackend-docbook[] +:passtest: pass:specialcharacters,quotes[*lorum ipsum*] +endif::basebackend-docbook[] +ifdef::basebackend-html[] +:passtest: pass:specialcharacters,quotes[*lorum ipsum*] +endif::basebackend-html[] +{passtest} + + +== Author attributes == +\{eval:expression}, \{sys:command} and \{sys2:command}, \{counter:c1} + +Hello *{author}* ({firstname} {lastname}, {authorinitials}). + +{firstname,lastname,surname#}first name or last name or surname. + +{firstname+lastname+surname#}first name and last name and surname. + +{firstname+lastname#}first name and last name. + + +== System attributes == +{counter:c1} {counter:c2:99} {counter:c3:A} + +{c1} = 1, {c2} = 99, {c3} = A + +{counter:c1} {counter:c2:99} {counter:c3:A} +{c1} {c2} {c3} + +{c1} = 2, {c2} = 100, {c3} = B + +{set:y:Foobar} +y: {y} + +{set:y!} + +y: {y} + +:x: 3 +:y: {eval:{x}+4} + +{x}, {y} + +{set:y:{x}} + +{x}, {y} + + +== Quoted text attributes == + +A=_X_, (_X_), _X_, [_X_] _X_ + +A=*_X_*, (`_X_`), _`X`_, [*_X_*] +_X_+ _X_ + +// These two illustrate that nesting doesn't always work. +[_*X*_] _+X+_ + +[[_intro]] +<<_intro>> <<_intro,intro>> xref:_intro[] _intro_ + +// Quote attributes. +[foo]#fun with text#. +[foo bar]*fun with text*. +[foo]+fun with text+. +[foo]_fun with text_. +[foo]'fun with text'. +[foo]``fun with text''. +[foo]`fun with text'. + +[foo]$$fun with text$$. + +[foo]+++fun with text+++. + +[red]#Obvious# and [big red yellow-background]*very obvious*. + +[underline]#Underline text#, [overline]#overline text# +and [line-through]#line-through text#. + +[firstletter]##T##esting 123 ... + +(``+1\n+'') if (usually ``+-1\n+'') + +(``++1\n++'') if (usually ``++-1\n++'') + +(`{author}') and `{author}' + + +== Configuration attribute entries == + +:listdef-labeled.style: horizontal +term:: definition + +:listdef-labeled.style: vertical +term:: definition + +ifdef::backend-xhtml11[] +<> + +:xref2-inlinemacro.: {2?{2}} + +<> + +:xref2-inlinemacro.: {2=[{1}]} +endif::[] + + +== role attribute == + +[role="test"] +Paragraph with a role attribute. + +[role="test"] +- first +- second +- third + + +== Break list nesting == +1. List 1. +2. List 1. + +// New list. +a. List 2. +b. List 2. + + +== Listing Blocks == +[subs="quotes"] +------------------------------------------ +$ ls *-al* +------------------------------------------ + +[listing] +.......................................... +[subs="quotes"] +------------------------------------------ +$ ls *-al* +------------------------------------------ +.......................................... + +.Listing +------------------------------------------ +$ ls -al +------------------------------------------ + +.Listing example +========================================== +------------------------------------------ +$ ls -al +------------------------------------------ +========================================== + +.Python paragraph +[source,python] +if n < 0: print 'Hello World!' + +.Titled Python listing +[source,python] +------------------------------------------ +if n < 0: print 'Hello World!' +------------------------------------------ + +.Python listing example +========================================== +[source,python] +------------------------------------------ +if n < 0: print 'Hello World!' +------------------------------------------ +========================================== + + +[[X1,anchor reftext]] +== Links == +An [[X2]] inline anchor. +An [[X3, anchor reftext]] inline anchor with reftext. + +<>; captioned link to <>. + +<> link to inline anchor; captioned link to <>. + +Link to <> anchor. + +An example link to a bibliography entry <>. + +[horizontal] +[[[Test::Unit]]]:: http://ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html + + +== Titles == + +[float] +===== Level 4 ===== +[float] +==== Level 3 ==== +[float] +=== Level 2 === +[float] +== Level 1 == +[float] +Level 4 ++++++++ +[float] +Level 3 +^^^^^^^ +[float] +Level 2 +~~~~~~~ +[float] +Level 1 +------- + +.Block title +Lorum ipsum. + + +== Lists == + +Bulleted: + +- item text +* item text +** item text +*** item text +**** item text +***** item text + +Numbered: + +1. arabic (decimal) numbering +a. loweralpha numbering +A. upperalpha numbering +i) lowerroman numbering +I) upperroman numbering +. arabic (decimal) numbering +.. loweralpha numbering +... lowerroman numbering +.... upperalpha numbering +..... upperroman numbering + +Labeled: + +label:: item text +label;; item text +label::: item text +label:::: item text + +With item anchor: + +one:: Item one. +[[item_two]]two:: Item two. +three:: Item three. + + +== Inline passthroughs == + +- Test pass:[`ABC`]. +- Test `pass:[ABC]`. +- The `++i` and `++j` auto-increments. +- Paths `~/.vim` and `~/docs`. +- The `__init__` method. +- The `{id}` attribute. + +List start number test: + +// The ol start attribute is not valid XHTML 1.1 (but it works in all +// browsers). +ifndef::backend-xhtml11[] +[start=7] +. List item 7. +. List item 8. +endif::backend-xhtml11[] + +== Images + +=== Block images + +[[tiger_image]] +.Tyger tyger +image::../../images/tiger.png[Tyger tyger] + +:height: 250 +:width: 350 +.Tyger tyger two +image::../../images/tiger.png[caption="Figure 2: ", alt="Tiger", align="center"] +:height!: +:width!: + +// Images and icons directories. +:imagesdir: ../../doc +image::music2.png[] + +:icons: +:iconsdir: ../../images/icons +NOTE: Lorum ipsum. + +:icons!: + +ifdef::backend-xhtml11[] +:imagesdir: ../../images +:data-uri: +image:smallnew.png[NEW] 'testing' `123`. + +endif::[] + +:data-uri!: + +=== Inline images + +:imagesdir: ../../images + +Inline image image:smallnew.png[] + +Inline image image:smallnew.png[NEW!] + +Inline image image:smallnew.png["NEW!",title="Small new"] + + +== Admonishments + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +// With icon images. +:icons: +:iconsdir: ../../images/icons + +NOTE: Lorum ipsum. + +TIP: Lorum ipsum. + +WARNING: Lorum ipsum. + +CAUTION: Lorum ipsum. + +IMPORTANT: Lorum ipsum. + +:icons!: + +== Backslash escapes + +.Apostrophe +Don't vs don\'t. + +.Exceptions +There are a number of exceptions to the usual single backslash rule +-- mostly relating to URL macros that have two syntaxes or quoting +ambiguity. Here are some non-standard escape examples: + +[cols="l,v",width="40%",options="header"] +|======================================== +|AsciiDoc | Renders + +2*| +\joe.bloggs@example.com +<\joe.bloggs@example.com> +\mailto:[\joe.bloggs@example.com] + +2*| +\http://www.example.com +\\http://www.example.com[] +\\http://www.example.com[Foobar Limited] + +2*| +A C\++ Library for C++ +\\``double-quotes'' +\*\*F**ile Open\... +|======================================== + + +== Paragraphs + +.Normal paragraph +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +.Literal paragraph +[literal] +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +.Verse paragraph +[verse] +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +.Indented (literal) paragraph + This is a *bold* a line + This is a 'strong' line + This is another _strong_ line + +.Indented with quotes substitution +[subs="quotes"] + This is a *bold* a line + This is a 'strong' line + This is another _strong_ line + +.Literal paragraph with quotes substitution +["literal",subs="quotes"] +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line + +ifndef::basebackend-docbook[] +.Monospaced paragraph with line breaks ++This is a *bold* line+ + ++This is a 'strong' line+ + ++This is another _strong_ line+ + + +.Another monospaced paragraph with line breaks ++This is a *bold* a line + +This is a 'strong' line + +This is another _strong_ line+ + +endif::basebackend-docbook[] + +.Literal block with quotes substitution +[subs="quotes"] +............................. +This is a *bold* a line +This is a 'strong' line +This is another _strong_ line +............................. + +[verse, William Blake, from Auguries of Innocence] +To see a world in a grain of sand, +And a heaven in a wild flower, +Hold infinity in the palm of your hand, +And eternity in an hour. + +[quote, Bertrand Russell, The World of Mathematics (1956)] +A good notation has subtlety and suggestiveness which at times makes +it almost seem like a live teacher. + + +URLs +---- +Mail Addresses +~~~~~~~~~~~~~~ +joe_bloggs@mail_server.com_ + +joe-bloggs@mail-server.com. + +joe-bloggs@mail-server.com,joe-bloggs@mail-server.com, + +mailto:joe-bloggs@mail-server.com[Mail] + +mailto:joe_bloggs@mail_server.com[Mail] + +mailto:joe.bloggs@mail.server.com[Mail] + +joe.bloggs@mail.server.com + +lorum ipsum. + + +Comments +-------- +///////////////////////////////////////////////////////////////////// +A comment +block. +///////////////////////////////////////////////////////////////////// + +// This is a comment line. + +Qui in magna commodo, est labitur dolorum an. Est ne magna primis. +// Inline comment line. +adolescens. Sit munere ponderum dignissim et. Minim luptatum et. + +:showcomments: +// This comment line will be displayed in the output. + +Qui in magna commodo, est labitur dolorum an. Est ne magna primis. +// Visible inline comment line. +adolescens. Sit munere ponderum dignissim et. Minim luptatum et. + +///////////////////////////////////////////////////////////////////// +Comment blocks are never displayed in the output. +///////////////////////////////////////////////////////////////////// + +:showcomments!: + +[[comment_macro]] +.Block title +// Block macro comment does not consume titles or attributes. +Lorum ipsum. + +[[comment_block]] +.Block title +///////////////////////////////////////////////////////////////////// +Delimited comment block does not consume titles or attributes. +///////////////////////////////////////////////////////////////////// +Lorum ipsum. + + +ifdef::basebackend-docbook[] +[glossary] +List of terms +------------- +Using positional attribute to specify section template. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + +[template="glossary"] +List of terms +------------- +Using named 'template' attribute to specify section template. + +[glossary] +A glossary term:: + The corresponding (indented) definition. + +A second glossary term:: + The corresponding (indented) definition. + +endif::basebackend-docbook[] + +Index Terms +----------- +Test 1 ((test1)). + +Test 2 (((test2))). + +Test 3 (((test3,secondary))). + +Test 4 (((test4,secondary,tertiary))). + +Test 5 indexterm2:[test5]. + +Test 6 indexterm:[test6]. + +Test 7 indexterm:[test7,secondary]. + +Test 8 indexterm:[test8,secondary,tertiary]. + +Multi-passthough substitution (see +http://groups.google.com/group/asciidoc/browse_frm/thread/1269dc2feb1a482c) +((`foo`)) +(((foo,`bar`))) +(((foo,`bar`,`two`))) + +Table with fractional column width units +---------------------------------------- +NOTE: 'pagewidth' and 'pageunits' only apply to DocBook outputs. + +:miscellaneous.pagewidth: 17.5 +:miscellaneous.pageunits: cm + +.Horizontal and vertical source data +[width="50%",cols="3,^2,^2,10",options="header"] +|========================================================= +|Date |Duration |Avg HR |Notes + +|22-Aug-08 |10:24 | 157 | +Worked out MSHR (max sustainable heart rate) by going hard +for this interval. + +|22-Aug-08 |23:03 | 152 | +Back-to-back with previous interval. + +|24-Aug-08 |40:00 | 145 | +Moderately hard interspersed with 3x 3min intervals (2min +hard + 1min really hard taking the HR up to 160). + +|========================================================= + +== Table with parent configuration file and header attribute entry + +[cols="asciidoc"] +|==== +| +- Attribute entry from header: {test-attribute} +- Replacement from `testcases.conf` configuration file: test-replacement +|==== + +== Table column specifiers with merged cells +See +http://groups.google.com/group/asciidoc/browse_thread/thread/c9238380a1f2507a + +[cols="<1m,>1,^1s, ^1e"] +|============================================ + .2+| .2+|1- A 2+|2- B + |i- a |ii- b + |Values 1 |v1 |v2 |v3 + |Values 2 |v4 |v5 |v6 +|============================================ + +Floating tables and images +-------------------------- +.Simple table +[float="left",width="15%",floatstyle="[htbp]"] +|======= +|1 |2 |A +|3 |4 |B +|5 |6 |C +|======= + +.Tiger +[float="right",floatstyle="[htbp]"] +image::images/tiger.png["Tiger image"] + +unfloat::[] + +Section level offsets +--------------------- +At level 1 + +:leveloffset: -1 +Section title +^^^^^^^^^^^^^ +At level 2 + +:leveloffset: 0 +Section title +~~~~~~~~~~~~~ +At level 2 + +:leveloffset: 2 +Section title +------------- +At level 3 + +:leveloffset!: +:numbered!: + +Section level offsets +--------------------- +At level 1 + +Single-quoted attributes +------------------------ +[quote,'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'] +_____________________________________________________________________ +Sir, a woman's preaching is like a dog's walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +_____________________________________________________________________ + +["quote","'http://en.wikipedia.org/wiki/Samuel_Johnson[Samuel Johnson]'"] +_____________________________________________________________________ +Sir, a woman's preaching is like a dog's walking on his hind legs. It +is not done well; but you are surprised to find it done at all. +_____________________________________________________________________ + +Footnotes +--------- +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote:[footnote one. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel.] +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnoteref:["F2","footnote two. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel."] +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel +footnoteref:[F2]. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote:[https://asciidoc.org/ Qui in magna commodo, +est labitur dolorum an. Est ne magna primis adolescens. Sit munere +ponderum dignissim et. Minim luptatum et vel +image:images/smallnew.png[]] +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et vel. +footnote:[https://asciidoc.org/] +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +vel footnote:[https://asciidoc.org/[AsciiDoc website].]. +Qui in magna commodo, est labitur dolorum an. Est ne magna primis +adolescens. Sit munere ponderum dignissim et. Minim luptatum et +footnoteref:[F3,A footnote, "with an image" +image:images/smallnew.png[]]. +footnote:[With [square brackets\]] Qui in magna commodo, est labitur +dolorum an. Est ne magna primis. + + +Rulers and page breaks +---------------------- + +Lorum ipsum... + +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Lorum ipsum... + +<<< + +Lorum ipsum... + + +这是一个测试 +------------ +Double-with character titles. +<<_这是一个测试,link to auto-generated section ID>>. + + +ifdef::backend-html5[] +HTML 5 audio and video block macros +----------------------------------- +audio::images/example.ogg[] + +.Audio tag test +audio::images/example.ogg[] + +video::images/gizmo.ogv[width=200,options="nocontrols,autoplay"] + +.Example video +video::images/gizmo.ogv[] + +video::http://www.808.dk/pics/video/gizmo.ogv[] + +++++ + + + +++++ + +endif::backend-html5[] + + +== Block macros + +:rs458: 2 + +ifeval::[{rs458}==2] +RS458 is 2. +endif::[] +ifeval::[not ({rs458}==2)] +This will not be processed. +endif::[] + +// Test eval block macro. +eval::[Section.setlevel(1)] + +// Test template concatenation. +{template:test-template} + +// Test ascii-ids attribute. +:ascii-ids: +== àn îd without accénts +Lorum ipsum... + +:ascii-ids!: +== àn îd with accénts +Lorum ipsum... + + +== Inline macros +http://groups.google.com/group/asciidoc/[A URL with [square +brackets\]]. + +== Equation +.Equation +[latexmath] +[floatstyle="[htbp]"] +++++++++++++++++++++++++++++++++++++++++++++ +\[C = \alpha + \beta Y^{\gamma} + \epsilon\] +++++++++++++++++++++++++++++++++++++++++++++ + +== Example +.Example +[floatstyle="[htbp]"] +++++++++++++++++++++++++++++++++++++++++++++ +Formal figures, tables, equations and examples can float in docbook backend +++++++++++++++++++++++++++++++++++++++++++++ diff -Nru asciidoc-8.6.10/tests/inputs/utf8-bom-test.txt asciidoc-10.1.2/tests/inputs/utf8-bom-test.txt --- asciidoc-8.6.10/tests/inputs/utf8-bom-test.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/utf8-bom-test.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,9 @@ +UTF-8 BOM Test +============== + +Include file with UTF-8 BOM: + +:leveloffset: 1 +include::{docname}.txt[depth=1] + +Lorum ipsum... diff -Nru asciidoc-8.6.10/tests/inputs/utf8-examples.txt asciidoc-10.1.2/tests/inputs/utf8-examples.txt --- asciidoc-8.6.10/tests/inputs/utf8-examples.txt 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/inputs/utf8-examples.txt 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,217 @@ +UTF-8 encoded sample plain-text file +==================================== + +Markus Kuhn [ˈmaʳkÊŠs kuËn] — 2002-07-25 + + +The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279. + + +Using Unicode/UTF-8, you can write in emails and source code things such as + +== Mathematics and sciences + + ∮ Eâ‹…da = Q, n → ∞, ∑ f(i) = ∠g(i), ⎧⎡⎛┌─────â”⎞⎤⎫ + ⎪⎢⎜│a²+b³ ⎟⎥⎪ + ∀x∈â„: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ + ⎪⎢⎜⎷ c₈ ⎟⎥⎪ + â„• ⊆ â„•â‚€ ⊂ ℤ ⊂ â„š ⊂ ℠⊂ â„‚, ⎨⎢⎜ ⎟⎥⎬ + ⎪⎢⎜ ∞ ⎟⎥⎪ + ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ + ⎪⎢⎜ ⎳aâ±-bâ±âŽŸâŽ¥âŽª + 2Hâ‚‚ + Oâ‚‚ ⇌ 2Hâ‚‚O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣âŽi=1 ⎠⎦⎭ + + +== Linguistics and dictionaries + +ði ıntəˈnæʃənÉ™l fəˈnÉ›tık É™soÊŠsiˈeıʃn + +Y [ˈÊpsilÉ”n], Yen [jÉ›n], Yoga [ˈjoËgÉ‘] + + +== APL + + ((Vâ³V)=â³â´V)/Vâ†,V ⌷â†â³â†’â´âˆ†âˆ‡âŠƒâ€¾âŽâ•âŒˆ + + +== Nicer typography in plain text files + +- ‘single’ and “double†quotes +- Curly apostrophes: “We’ve been here†+- ‚deutsche‘ „Anführungszeichen“ +- †, ‡, ‰, •, 3–4, —, −5/+5, â„¢, … +- ASCII safety test: 1lI|, 0OD, 8B +- the euro symbol: 14.95 € + + +== Combining characters + +STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ + +== Greek (in Polytonic) + +[verse, The Greek anthem] +________________________________ +Σὲ γνωÏίζω ἀπὸ τὴν κόψη +τοῦ σπαθιοῦ τὴν Ï„ÏομεÏá½µ, +σὲ γνωÏίζω ἀπὸ τὴν ὄψη +ποὺ μὲ βία μετÏάει Ï„á½´ γῆ. + +᾿Απ᾿ Ï„á½° κόκκαλα βγαλμένη +τῶν ῾Ελλήνων Ï„á½° ἱεÏá½± +καὶ σὰν Ï€Ïῶτα ἀνδÏειωμένη +χαῖÏε, ὦ χαῖÏε, ᾿ΕλευθεÏιά! +________________________________ + +[verse,From a speech of Demosthenes in the 4th century BC] +______________________________________________________________ +Οá½Ï‡á½¶ ταá½Ï„á½° παÏίσταταί μοι γιγνώσκειν, ὦ ἄνδÏες ᾿Αθηναῖοι, +ὅταν τ᾿ εἰς Ï„á½° Ï€Ïάγματα ἀποβλέψω καὶ ὅταν Ï€Ïὸς τοὺς +λόγους οὓς ἀκούω· τοὺς μὲν Î³á½°Ï Î»á½¹Î³Î¿Ï…Ï‚ πεÏὶ τοῦ +τιμωÏήσασθαι Φίλιππον á½Ïῶ γιγνομένους, Ï„á½° δὲ Ï€Ïάγματ᾿ +εἰς τοῦτο Ï€Ïοήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αá½Ï„οὶ +Ï€ÏότεÏον κακῶς σκέψασθαι δέον. οá½Î´á½³Î½ οὖν ἄλλο μοι δοκοῦσιν +οἱ Ï„á½° τοιαῦτα λέγοντες á¼¢ τὴν ὑπόθεσιν, πεÏὶ ἧς βουλεύεσθαι, +οá½Ï‡á½¶ τὴν οὖσαν παÏιστάντες ὑμῖν á¼Î¼Î±Ïτάνειν. á¼Î³á½¼ δέ, ὅτι μέν +ποτ᾿ á¼Î¾á¿†Î½ τῇ πόλει καὶ Ï„á½° αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον +τιμωÏήσασθαι, καὶ μάλ᾿ ἀκÏιβῶς οἶδα· á¼Ï€á¾¿ á¼Î¼Î¿á¿¦ γάÏ, οὠπάλαι +γέγονεν ταῦτ᾿ ἀμφότεÏα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν +Ï€Ïολαβεῖν ἡμῖν εἶναι τὴν Ï€Ïώτην, ὅπως τοὺς συμμάχους +σώσομεν. á¼á½°Î½ Î³á½°Ï Ï„Î¿á¿¦Ï„Î¿ βεβαίως ὑπάÏξῃ, τότε καὶ πεÏὶ τοῦ +τίνα τιμωÏήσεταί τις καὶ ὃν Ï„Ïόπον á¼Î¾á½³ÏƒÏ„αι σκοπεῖν· Ï€Ïὶν δὲ +τὴν á¼€Ïχὴν á½€Ïθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι πεÏὶ τῆς +τελευτῆς á½Î½Ï„ινοῦν ποιεῖσθαι λόγον. + +Δημοσθένους, Γ´ ᾿Ολυνθιακὸς +______________________________________________________________ + + +== Georgian: + +.From a Unicode conference invitation +გთხáƒáƒ•áƒ— áƒáƒ®áƒšáƒáƒ•áƒ” გáƒáƒ˜áƒáƒ áƒáƒ— რეგისტრáƒáƒªáƒ˜áƒ Unicode-ის მეáƒáƒ—ე სáƒáƒ”რთáƒáƒ¨áƒáƒ áƒ˜áƒ¡áƒ +კáƒáƒœáƒ¤áƒ”რენციáƒáƒ–ე დáƒáƒ¡áƒáƒ¡áƒ¬áƒ áƒ”ბáƒáƒ“, რáƒáƒ›áƒ”ლიც გáƒáƒ˜áƒ›áƒáƒ áƒ—ებრ10-12 მáƒáƒ áƒ¢áƒ¡, +ქ. მáƒáƒ˜áƒœáƒªáƒ¨áƒ˜, გერმáƒáƒœáƒ˜áƒáƒ¨áƒ˜. კáƒáƒœáƒ¤áƒ”რენცირშეჰკრებს ერთáƒáƒ“ მსáƒáƒ¤áƒšáƒ˜áƒáƒ¡ +ექსპერტებს ისეთ დáƒáƒ áƒ’ებში რáƒáƒ’áƒáƒ áƒ˜áƒªáƒáƒ ინტერნეტი დრUnicode-ი, +ინტერნáƒáƒªáƒ˜áƒáƒœáƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ დრლáƒáƒ™áƒáƒšáƒ˜áƒ–áƒáƒªáƒ˜áƒ, Unicode-ის გáƒáƒ›áƒáƒ§áƒ”ნებრ+áƒáƒžáƒ”რáƒáƒªáƒ˜áƒ£áƒš სისტემებსáƒ, დრგáƒáƒ›áƒáƒ§áƒ”ნებით პრáƒáƒ’რáƒáƒ›áƒ”ბში, შრიფტებში, +ტექსტების დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბáƒáƒ¡áƒ დრმრáƒáƒ•áƒáƒšáƒ”ნáƒáƒ•áƒáƒœ კáƒáƒ›áƒžáƒ˜áƒ£áƒ¢áƒ”რულ სისტემებში. + + +== Russian + +.From a Unicode conference invitation +ЗарегиÑтрируйтеÑÑŒ ÑÐµÐ¹Ñ‡Ð°Ñ Ð½Ð° ДеÑÑтую Международную Конференцию по +Unicode, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ ÑоÑтоитÑÑ 10-12 марта 1997 года в Майнце в Германии. +ÐšÐ¾Ð½Ñ„ÐµÑ€ÐµÐ½Ñ†Ð¸Ñ Ñоберет широкий круг ÑкÑпертов по вопроÑам глобального +Интернета и Unicode, локализации и интернационализации, воплощению и +применению Unicode в различных операционных ÑиÑтемах и программных +приложениÑÑ…, шрифтах, верÑтке и многоÑзычных компьютерных ÑиÑтемах. + + +== Thai (UCS Level 2) + +Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese +classic 'San Gua'): + + [----------------------------|------------------------] + ๠à¹à¸œà¹ˆà¸™à¸”ินฮั่นเสื่อมโทรมà¹à¸ªà¸™à¸ªà¸±à¸‡à¹€à¸§à¸Š พระปà¸à¹€à¸à¸¨à¸à¸­à¸‡à¸šà¸¹à¹Šà¸à¸¹à¹‰à¸‚ึ้นใหม่ + สิบสองà¸à¸©à¸±à¸•à¸£à¸´à¸¢à¹Œà¸à¹ˆà¸­à¸™à¸«à¸™à¹‰à¸²à¹à¸¥à¸–ัดไป สององค์ไซร้โง่เขลาเบาปัà¸à¸à¸² + ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนัà¸à¸«à¸™à¸² + โฮจิ๋นเรียà¸à¸—ัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัภ+ เหมือนขับไสไล่เสือจาà¸à¹€à¸„หา รับหมาป่าเข้ามาเลยอาสัภ+ à¸à¹ˆà¸²à¸¢à¸­à¹‰à¸­à¸‡à¸­à¸¸à¹‰à¸™à¸¢à¸¸à¹à¸¢à¸à¹ƒà¸«à¹‰à¹à¸•à¸à¸à¸±à¸™ ใช้สาวนั้นเป็นชนวนชื่นชวนใจ + พลันลิฉุยà¸à¸¸à¸¢à¸à¸µà¸à¸¥à¸±à¸šà¸à¹ˆà¸­à¹€à¸«à¸•à¸¸ ช่างอาเพศจริงหนาฟ้าร้องไห้ + ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูà¸à¸¹à¹‰à¸šà¸£à¸£à¸¥à¸±à¸‡à¸à¹Œ ฯ + +(The above is a two-column text. If combining characters are handled +correctly, the lines of the second column should be aligned with the +| character above.) + + +== Ethiopian + +.Proverbs in the Amharic language +[verse] +ሰማይ አይታረስ ንጉሥ አይከሰስᢠ+ብላ ካለአእንደአባቴ በቆመጠáŠá¢ +ጌጥ ያለቤቱ á‰áˆáŒ¥áŠ“ áŠá‹á¢ +ደሀ በሕáˆáˆ™ ቅቤ ባይጠጣ ንጣት በገደለá‹á¢ +የአá ወለáˆá‰³ በቅቤ አይታሽáˆá¢ +አይጥ በበላ ዳዋ ተመታᢠ+ሲተረጉሙ ይደረáŒáˆ™á¢ +ቀስ በቀስᥠዕንá‰áˆ‹áˆ በእáŒáˆ© ይሄዳáˆá¢ +ድር ቢያብር አንበሳ ያስርᢠ+ሰዠእንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርáˆá¢ +እáŒá‹œáˆ­ የከáˆá‰°á‹áŠ• ጉሮሮ ሳይዘጋዠአይድርáˆá¢ +የጎረቤት ሌባᥠቢያዩት ይስቅ ባያዩት ያጠáˆá‰…ᢠ+ሥራ ከመáታት áˆáŒ„ን ላá‹á‰³á‰µá¢ +ዓባይ ማደሪያ የለá‹á¥ áŒáŠ•á‹µ á‹­á‹ž ይዞራáˆá¢ +የእስላሠአገሩ መካ የአሞራ አገሩ ዋርካᢠ+ተንጋሎ ቢተበተመáˆáˆ¶ ባá‰á¢ +ወዳጅህ ማር ቢሆን ጨርስህ አትላሰá‹á¢ +እáŒáˆ­áˆ…ን በáራሽህ áˆáŠ­ ዘርጋᢠ+ + +== Runes + +ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛠᚻᛖ ᛒᚢᛞᛖ áš©áš¾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ áš¹á›áš¦ ᚦᚪ ᚹᛖᛥᚫ + +(Old English, which transcribed into Latin reads ``He cwaeth that he +bude thaem lande northweardum with tha Westsae.'' and means ``He said +that he lived in the northern land near the Western Sea.'') + + +== Braille + + â¡Œâ â §â ‘ â ¼â â ’ â¡â œâ ‡â ‘⠹⠰⠎ ⡣⠕⠌ + + â¡â œâ ‡â ‘â ¹ â ºâ â Ž ⠙⠑â â ™â ’ â žâ • ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ â Šâ Ž â â • ⠙⠳⠃⠞ + â ±â â žâ ‘⠧⠻ â â ƒâ ³â ž â ¹â â žâ ² ⡹⠑ ⠗⠑⠛⠊⠌⠻ â •â ‹ ⠙⠊⠎ ⠃⠥⠗⠊â â ‡ â ºâ â Ž + â Žâ Šâ ›â â « ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹â â â â ‚ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ â ¥â â ™â »â žâ â …⠻⠂ + â â â ™ ⠹⠑ â ¡â Šâ ‘â ‹ â â ³â —â â »â ² ⡎⠊⠗⠕⠕⠛⠑ â Žâ Šâ ›â â « â Šâ žâ ² â¡â â ™ + ⡎⠊⠗⠕⠕⠛⠑⠰⠎ â â â â ‘ â ºâ â Ž ⠛⠕⠕⠙ â ¥â â •â  â °â¡¡â â â ›â ‘â ‚ â ‹â •â — â â â ¹â ¹â ”â › ⠙⠑ + â ¡â •â Žâ ‘ â žâ • â â ¥â ž ⠙⠊⠎ â ™â â â ™ â žâ •â ² + + ⡕⠇⠙ â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² + + â¡â ”⠙⠖ â¡Š ⠙⠕â â °â ž â â ‘â â  â žâ • â Žâ â ¹ â ¹â â ž â¡Š â …â â ªâ ‚ â •â ‹ â â ¹ + â ªâ  â …â â ªâ ‡â «â ›â ‘â ‚ â ±â â ž ⠹⠻⠑ â Šâ Ž â â œâ žâ Šâ Šâ ¥â ‡â œâ ‡â ¹ ⠙⠑â â ™ â â ƒâ ³â ž + â  â ™â •â •â —â ¤â â â Šâ ‡â ² â¡Š â â Šâ £â ž â ™â â §â ‘ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ â â ¹â Žâ ‘⠇⠋⠂ â žâ • + ⠗⠑⠛⠜⠙ â  â Šâ •â ‹â ‹â ”â ¤â â â Šâ ‡ â â Ž ⠹⠑ ⠙⠑â â ™â ‘â Œ â â Šâ ‘â Šâ ‘ â •â ‹ â Šâ —â •â â â •â â ›â »â ¹ + â ” ⠹⠑ â žâ —â â ™â ‘â ² ⡃⠥⠞ ⠹⠑ â ºâ Šâ Žâ ™â •â  â •â ‹ ⠳⠗ â â â Šâ ‘⠌⠕⠗⠎ + â Šâ Ž â ” ⠹⠑ â Žâ Šâ â Šâ ‡â ‘â † â â â ™ â â ¹ â ¥â â ™â â ‡â ‡â ªâ « â ™â â â ™â Ž + â ©â â ‡â ‡ â â •â ž ⠙⠊⠌⠥⠗⠃ â Šâ žâ ‚ â •â — ⠹⠑ â¡Šâ ³â â žâ —⠹⠰⠎ ⠙⠕â â ‘ â ‹â •â —â ² ⡹⠳ + ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ â â »â â Šâ ž â â ‘ â žâ • â —â ‘â â ‘â â žâ ‚ â ‘â â â ™â â žâ Šâ Šâ â ‡â ‡â ¹â ‚ â ¹â â ž + â¡â œâ ‡â ‘â ¹ â ºâ â Ž â â Ž ⠙⠑â â ™ â â Ž â  â ™â •â •â —â ¤â â â Šâ ‡â ² + +(The first couple of paragraphs of "A Christmas Carol" by Dickens) + + +== Compact font selection example text + + ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 + abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ + –—‘“â€â€žâ€ â€¢â€¦â€°â„¢Å“ŠŸž€ ΑΒΓΔΩαβγδω ÐБВГДабвгд + ∀∂∈â„∧∪≡∞ ↑↗↨↻⇣ â”┼╔╘░►☺♀ ï¬ï¿½â‘€â‚‚ἠḂӥẄÉËâŽ×Աრ+ + +== Greetings in various languages + +Hello world, ΚαλημέÏα κόσμε, コンニãƒãƒ + + +== Box drawing alignment tests + +--------------------------------------------------------------------- + â–ˆ + â–‰ + â•”â•â•â•¦â•â•â•— ┌──┬──┠╭──┬──╮ ╭──┬──╮ â”â”â”┳â”â”┓ ┎┒â”┑ â•· â•» â”┯┓ ┌┰┠▊ ╱╲╱╲╳╳╳ + ║┌─╨─â”â•‘ │╔â•â•§â•â•—│ │╒â•â•ªâ•â••â”‚ │╓─â•â”€â•–│ ┃┌─╂─â”┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ â”╋┥ â–‹ ╲╱╲╱╳╳╳ + ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ â•¿ │┃ â”╅╆┓ ╵ ╹ â”—â”·â”› └┸┘ â–Œ ╱╲╱╲╳╳╳ + â• â•¡ ╳ â•žâ•£ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┠╎ â”┅┅┓ ┋ ■╲╱╲╱╳╳╳ + ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â–Ž + ║└─╥─┘║ │╚â•â•¤â•â•â”‚ │╘â•â•ªâ•â•›â”‚ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ â•Ž ╠┇ ┋ â– + â•šâ•â•â•©â•â•â• └──┴──┘ ╰──┴──╯ ╰──┴──╯ â”—â”â”â”»â”â”â”› ▗▄▖▛▀▜ └╌╌┘ â•Ž â”—â•â•â”› ┋ â–▂▃▄▅▆▇█ + â–▀▘▙▄▟ +--------------------------------------------------------------------- diff -Nru asciidoc-8.6.10/tests/test_a2x.py asciidoc-10.1.2/tests/test_a2x.py --- asciidoc-8.6.10/tests/test_a2x.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/test_a2x.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,34 @@ +# flake8: noqa E501 + +from asciidoc import a2x +import pytest + + +@pytest.mark.parametrize( + "input,expected_argv,expected_opts,expected_args", + ( + ( + ['a2x', '--xsltproc-opts', '-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0', '--asciidoc-opts', '-a pacman_date=2020-07-05 -a srcext=.src.tar.gz -a pkgext=.pkg.tar.gz', '../doc/alpm-hooks.5.asciidoc'], + ['--xsltproc-opts', '-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0', '--asciidoc-opts', '-a pacman_date=2020-07-05 -a srcext=.src.tar.gz -a pkgext=.pkg.tar.gz', '../doc/alpm-hooks.5.asciidoc'], + {'attributes': [], 'asciidoc_opts': ['-a', 'pacman_date=2020-07-05', '-a', 'srcext=.src.tar.gz', '-a', 'pkgext=.pkg.tar.gz'], 'copy': False, 'conf_file': None, 'destination_dir': None, 'doctype': None, 'backend': None, 'epubcheck': False, 'format': 'pdf', 'icons': False, 'icons_dir': None, 'keep_artifacts': False, 'lynx': False, 'no_xmllint': False, 'dry_run': False, 'resources': [], 'resource_manifest': None, 'skip_asciidoc': False, 'stylesheet': None, 'safe': False, 'dblatex_opts': '', 'backend_opts': '', 'fop': False, 'fop_opts': '', 'xsltproc_opts': '-param man.endnotes.list.enabled 0 -param man.endnotes.are.numbered 0', 'xsl_file': None, 'verbose': 0}, + ['../doc/alpm-hooks.5.asciidoc'], + ), + ( + ['a2x', '-vv', '-L', "--asciidoc-opts=-f ../build/mscgen-filter.conf -f ../build/diag-filter.conf -f ../build/docinfo-releaseinfo.conf -a srcdir='/home/user/code/osmo-dev/src/osmo-gsm-manuals/tests' -a commondir='../common'", '--dblatex-opts=-s ../build/custom-dblatex.sty -P draft.mode=yes -P draft.watermark=0', '-a', 'docinfo', '-a', 'revnumber=DRAFT ', '-a', 'revdate=unknown', 'test-usermanual.adoc'], + ['-vv', '-L', "--asciidoc-opts=-f ../build/mscgen-filter.conf -f ../build/diag-filter.conf -f ../build/docinfo-releaseinfo.conf -a srcdir='/home/user/code/osmo-dev/src/osmo-gsm-manuals/tests' -a commondir='../common'", '--dblatex-opts=-s ../build/custom-dblatex.sty -P draft.mode=yes -P draft.watermark=0', '-a', 'docinfo', '-a', 'revnumber=DRAFT ', '-a', 'revdate=unknown', 'test-usermanual.adoc'], + {'attributes': ['docinfo', 'revnumber=DRAFT ', 'revdate=unknown'], 'asciidoc_opts': ['-f', '../build/mscgen-filter.conf', '-f', '../build/diag-filter.conf', '-f', '../build/docinfo-releaseinfo.conf', '-a', 'srcdir=/home/user/code/osmo-dev/src/osmo-gsm-manuals/tests', '-a', 'commondir=../common'], 'copy': False, 'conf_file': None, 'destination_dir': None, 'doctype': None, 'backend': None, 'epubcheck': False, 'format': 'pdf', 'icons': False, 'icons_dir': None, 'keep_artifacts': False, 'lynx': False, 'no_xmllint': True, 'dry_run': False, 'resources': [], 'resource_manifest': None, 'skip_asciidoc': False, 'stylesheet': None, 'safe': False, 'dblatex_opts': '-s ../build/custom-dblatex.sty -P draft.mode=yes -P draft.watermark=0', 'backend_opts': '', 'fop': False, 'fop_opts': '', 'xsltproc_opts': '', 'xsl_file': None, 'verbose': 2}, + ['test-usermanual.adoc'], + ), + ( + ['a2x', '-v', "--asciidoc-opts=-v -f doc/asciidoc.conf -a manmanual='Pakku Manual' -a mansource='Pakku' -a manversion=0.14-36g22678d2", 'doc/pakku.conf.5.txt'], + ['-v', "--asciidoc-opts=-v -f doc/asciidoc.conf -a manmanual='Pakku Manual' -a mansource='Pakku' -a manversion=0.14-36g22678d2", 'doc/pakku.conf.5.txt'], + {'attributes': [], 'asciidoc_opts': ['-v', '-f', 'doc/asciidoc.conf', '-a', 'manmanual=Pakku Manual', '-a', 'mansource=Pakku', '-a', 'manversion=0.14-36g22678d2'], 'copy': False, 'conf_file': None, 'destination_dir': None, 'doctype': None, 'backend': None, 'epubcheck': False, 'format': 'pdf', 'icons': False, 'icons_dir': None, 'keep_artifacts': False, 'lynx': False, 'no_xmllint': False, 'dry_run': False, 'resources': [], 'resource_manifest': None, 'skip_asciidoc': False, 'stylesheet': None, 'safe': False, 'dblatex_opts': '', 'backend_opts': '', 'fop': False, 'fop_opts': '', 'xsltproc_opts': '', 'xsl_file': None, 'verbose': 1}, + ['doc/pakku.conf.5.txt'], + ), + ) +) +def test_parse_args(input, expected_argv, expected_opts, expected_args): + argv, opts, args = a2x.parse_args(input) + assert argv == expected_argv + assert opts == expected_opts + assert args == expected_args diff -Nru asciidoc-8.6.10/tests/testasciidoc.conf asciidoc-10.1.2/tests/testasciidoc.conf --- asciidoc-8.6.10/tests/testasciidoc.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/testasciidoc.conf 2022-02-18 01:52:22.000000000 +0000 @@ -6,32 +6,47 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Test cases +% requires +['source-highlight'] + % source -data/testcases.txt +inputs/testcases.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Filters +% requires +['dot', 'lilypond'] + % source -data/filters-test.txt +inputs/filters-test.txt + +% artifacts +['inputs/graphviz1.png', 'inputs/graphviz2.png', 'inputs/music1.md5', 'inputs/music1.png', 'inputs/music2.md5', 'inputs/music2.png'] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Tables +% requires +['source-highlight'] + % source -../examples/website/newtables.txt +inputs/newtables.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Old tables % source -data/oldtables.txt +inputs/oldtables.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Source highlighter +% requires +['source-highlight'] + % source -../doc/source-highlight-filter.txt +inputs/source-highlight-filter.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example article @@ -44,13 +59,13 @@ {'docdate':None} % source -../doc/article.txt +inputs/article.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example article with embedded images (data URIs) % source -../doc/article.txt +inputs/article.txt % name article-data-uri @@ -62,19 +77,19 @@ ['--section-numbers'] % attributes -{'docdate':None, 'data-uri':True, 'icons':True} +{'docdate':None, 'data-uri':True, 'icons':True, 'imagesdir': '../../'} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example article with included docinfo file. % source -../doc/article.txt +inputs/article.txt % name article-docinfo % backends -['docbook'] +['docbook','docbook5'] % options ['--section-numbers'] @@ -89,7 +104,7 @@ ['--section-numbers'] % source -../doc/book.txt +inputs/book.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example multi-part book @@ -98,7 +113,7 @@ ['--section-numbers'] % source -../doc/book-multi.txt +inputs/book-multi.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Man page @@ -108,7 +123,7 @@ {'docdate':None} % source -../doc/asciidoc.1.txt +inputs/asciidoc.1.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Example slideshow @@ -116,8 +131,17 @@ % backends ['slidy'] +% requires +['source-highlight'] + +% attributes +{'imagesdir': '../../', 'iconsdir': '../../images/icons'} + % source -../doc/slidy-example.txt +inputs/slidy-example.txt + +% artifacts +['../slidy-example__1.md5','../slidy-example__1.png'] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ASCIIMathML @@ -129,7 +153,7 @@ ['xhtml11','html5'] % source -../doc/asciimathml.txt +inputs/asciimath.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeXMathML @@ -141,22 +165,28 @@ ['xhtml11','html5'] % source -../doc/latexmathml.txt +inputs/latexmathml.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeX Math % backends -['docbook'] +['docbook','docbook5'] % source -../doc/latexmath.txt +inputs/latexmath.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LaTeX Filter +% requires +['latex', 'dvipng'] + % source -../doc/latex-filter.txt +inputs/latex-filter.txt + +% artifacts +['inputs/latex-filter__1.md5','inputs/latex-filter__1.svg','inputs/latex-filter__2.md5','inputs/latex-filter__2.svg','inputs/latex1.md5','inputs/latex1.svg','inputs/latex2.md5','inputs/latex2.png','inputs/latex3.md5','inputs/latex3.svg'] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% !User Guide @@ -165,31 +195,37 @@ ['--section-numbers'] % source -../doc/asciidoc.txt +inputs/asciidoc.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UTF-8 Examples % source -data/utf8-examples.txt +inputs/utf8-examples.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Additional Open Block and Paragraph styles +% requires +['source-highlight', 'dot'] + % source -data/open-block-test.txt +inputs/open-block-test.txt + +% artifacts +['inputs/open-block-test__1.md5','inputs/open-block-test__1.png','inputs/open-block-test__2.png','inputs/open-block-test__3.md5','inputs/open-block-test__3.png'] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% English language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-en-article-test % source -data/lang-en-test.txt +inputs/lang-en-test.txt % options [('--doctype','article')] @@ -201,13 +237,13 @@ English language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-en-book-test % source -data/lang-en-test.txt +inputs/lang-en-test.txt % options [('--doctype','book')] @@ -219,22 +255,22 @@ English language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-en-man-test.txt +inputs/lang-en-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Russian language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-ru-article-test % source -data/lang-ru-test.txt +inputs/lang-ru-test.txt % options [('--doctype','article')] @@ -246,13 +282,13 @@ Russian language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-ru-book-test % source -data/lang-ru-test.txt +inputs/lang-ru-test.txt % options [('--doctype','book')] @@ -264,22 +300,22 @@ Russian language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-ru-man-test.txt +inputs/lang-ru-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% French language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-fr-article-test % source -data/lang-fr-test.txt +inputs/lang-fr-test.txt % options [('--doctype','article')] @@ -291,13 +327,13 @@ French language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-fr-book-test % source -data/lang-fr-test.txt +inputs/lang-fr-test.txt % options [('--doctype','book')] @@ -309,22 +345,22 @@ French language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-fr-man-test.txt +inputs/lang-fr-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% German language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-de-article-test % source -data/lang-de-test.txt +inputs/lang-de-test.txt % options [('--doctype','article')] @@ -336,13 +372,13 @@ German language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-de-book-test % source -data/lang-de-test.txt +inputs/lang-de-test.txt % options [('--doctype','book')] @@ -354,22 +390,22 @@ German language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-de-man-test.txt +inputs/lang-de-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Hungarian language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-hu-article-test % source -data/lang-hu-test.txt +inputs/lang-hu-test.txt % options [('--doctype','article')] @@ -381,13 +417,13 @@ Hungarian language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-hu-book-test % source -data/lang-hu-test.txt +inputs/lang-hu-test.txt % options [('--doctype','book')] @@ -399,22 +435,22 @@ Hungarian language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-hu-man-test.txt +inputs/lang-hu-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Spanish language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-es-article-test % source -data/lang-es-test.txt +inputs/lang-es-test.txt % options [('--doctype','article')] @@ -426,13 +462,13 @@ Spanish language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-es-book-test % source -data/lang-es-test.txt +inputs/lang-es-test.txt % options [('--doctype','book')] @@ -444,22 +480,22 @@ Spanish language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-es-man-test.txt +inputs/lang-es-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Brazilian Portuguese language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-pt-BR-article-test % source -data/lang-pt-BR-test.txt +inputs/lang-pt-BR-test.txt % options [('--doctype','article')] @@ -471,13 +507,13 @@ Brazilian Portuguese language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-pt-BR-book-test % source -data/lang-pt-BR-test.txt +inputs/lang-pt-BR-test.txt % options [('--doctype','book')] @@ -489,22 +525,22 @@ Brazilian Portuguese language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-pt-BR-man-test.txt +inputs/lang-pt-BR-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Ukrainian language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-uk-article-test % source -data/lang-uk-test.txt +inputs/lang-uk-test.txt % options [('--doctype','article')] @@ -516,13 +552,13 @@ Ukrainian language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-uk-book-test % source -data/lang-uk-test.txt +inputs/lang-uk-test.txt % options [('--doctype','book')] @@ -534,22 +570,22 @@ Ukrainian language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-uk-man-test.txt +inputs/lang-uk-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Dutch language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-nl-article-test % source -data/lang-nl-test.txt +inputs/lang-nl-test.txt % options [('--doctype','article')] @@ -561,13 +597,13 @@ Dutch language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-nl-book-test % source -data/lang-nl-test.txt +inputs/lang-nl-test.txt % options [('--doctype','book')] @@ -579,22 +615,22 @@ Dutch language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-nl-man-test.txt +inputs/lang-nl-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Italian language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-it-article-test % source -data/lang-it-test.txt +inputs/lang-it-test.txt % options [('--doctype','article')] @@ -606,13 +642,13 @@ Italian language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-it-book-test % source -data/lang-it-test.txt +inputs/lang-it-test.txt % options [('--doctype','book')] @@ -624,22 +660,22 @@ Italian language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-it-man-test.txt +inputs/lang-it-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Czech language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-cs-article-test % source -data/lang-cs-test.txt +inputs/lang-cs-test.txt % options [('--doctype','article')] @@ -651,13 +687,13 @@ Czech language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-cs-book-test % source -data/lang-cs-test.txt +inputs/lang-cs-test.txt % options [('--doctype','book')] @@ -669,22 +705,22 @@ Czech language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-cs-man-test.txt +inputs/lang-cs-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Romanian language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-ro-article-test % source -data/lang-ro-test.txt +inputs/lang-ro-test.txt % options [('--doctype','article')] @@ -696,13 +732,13 @@ Romanian language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-ro-book-test % source -data/lang-ro-test.txt +inputs/lang-ro-test.txt % options [('--doctype','book')] @@ -714,22 +750,22 @@ Romanian language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-ro-man-test.txt +inputs/lang-ro-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Japanese language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-ja-article-test % source -data/lang-ja-test.txt +inputs/lang-ja-test.txt % options [('--doctype','article')] @@ -741,13 +777,13 @@ Japanese language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-ja-book-test % source -data/lang-ja-test.txt +inputs/lang-ja-test.txt % options [('--doctype','book')] @@ -759,22 +795,22 @@ Japanese language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-ja-man-test.txt +inputs/lang-ja-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RCS $Id$ marker test % source -data/rcs-id-marker-test.txt +inputs/rcs-id-marker-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% UTF-8 BOM test % source -data/utf8-bom-test.txt +inputs/utf8-bom-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Deprecated quote attributes @@ -783,19 +819,19 @@ {'deprecated-quotes':''} % source -data/deprecated-quotes.txt +inputs/deprecated-quotes.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Swedish language file (article) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-sv-article-test % source -data/lang-sv-test.txt +inputs/lang-sv-test.txt % options [('--doctype','article')] @@ -807,13 +843,13 @@ Swedish language file (book) % backends -['docbook','xhtml11','html4','html5'] +['docbook','docbook5','xhtml11','html4','html5'] % name lang-sv-book-test % source -data/lang-sv-test.txt +inputs/lang-sv-test.txt % options [('--doctype','book')] @@ -825,10 +861,10 @@ Swedish language file (manpage) % backends -['docbook'] +['docbook','docbook5'] % source -data/lang-sv-man-test.txt +inputs/lang-sv-man-test.txt %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Last Updated field not displayed in HTML backends @@ -840,7 +876,7 @@ lang-en-no-last-updated-test % source -data/lang-en-test.txt +inputs/lang-en-test.txt % attributes {'footer-style':'none'} @@ -855,9 +891,79 @@ lang-en-last-updated-is-revdate-test % source -data/lang-en-test.txt +inputs/lang-en-test.txt % attributes {'footer-style':'revdate'} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +!Generated chapter IDs normalized to ASCII test + +% source +inputs/ascii-ids1.txt + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Newline Tests (Default With DOS) + +% backends +['html5'] + +% name +newline-dos + +% source +inputs/newline.txt + +% attributes +{'toc':True} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Newline Tests (Override To UNIX) + +% backends +['html5'] + +% name +newline-unix + +% source +inputs/newline.txt + +% options +[('--attribute','newline=\\n')] + +% attributes +{'toc':True} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Newline Tests (Override To MAC) + +% backends +['html5'] + +% name +newline-mac + +% source +inputs/newline.txt + +% options +[('--attribute','newline=\\r')] + +% attributes +{'toc':True} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +Include Line Ranges + +% requires +['source-highlight'] + +% backends +['html5'] + +% name +include-lines + +% source +inputs/include-lines-test.txt diff -Nru asciidoc-8.6.10/tests/test_asciidoc.py asciidoc-10.1.2/tests/test_asciidoc.py --- asciidoc-8.6.10/tests/test_asciidoc.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/test_asciidoc.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,65 @@ +from asciidoc import asciidoc +import io +import pytest + + +@pytest.mark.parametrize( + "input,expected", + ( + ( + '{attach}file.txt', + '

    \r\n' + ), + ( + '\\{attach}file{0}.txt', + '

    \r\n' + ), + ( + '\\{attach}file.txt', + '

    {attach}file.txt

    \r\n' + ), + ( + '\\{0}file.txt', + '

    {0}file.txt

    \r\n' + ), + ( + 'link:{attach}file.txt[file]', + '

    \r\n' + ), + ( + 'link:\\{attach}file.txt[file]', + '

    ' + + 'file

    \r\n' + ), + ( + 'link:\\{attach}file\\{0}.txt[file\\{bar}too\\{1}]', + '\r\n' + ), + ( + 'image:\\{attach}file.jpg[]', + '

    \r\n' + + '{attach}file.jpg\r\n' + + '

    \r\n' + ), + ( + 'image:\\{attach}file.jpg[foo]', + '

    \r\n' + + 'foo\r\n

    \r\n' + ), + ( + 'image:\\{attach}file.jpg[\\{bar}?]', + '

    \r\n' + + '{bar}?\r\n

    \r\n' + ), + ) +) +def test_ignore_attribute(input, expected): + infile = io.StringIO(input) + outfile = io.StringIO() + options = [ + ('--out-file', outfile), + ('--no-header-footer', '') + ] + asciidoc.execute('asciidoc', options, [infile]) + assert outfile.getvalue() == expected diff -Nru asciidoc-8.6.10/tests/testasciidoc.py asciidoc-10.1.2/tests/testasciidoc.py --- asciidoc-8.6.10/tests/testasciidoc.py 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/tests/testasciidoc.py 2022-02-18 01:52:22.000000000 +0000 @@ -1,41 +1,29 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 -USAGE = '''Usage: testasciidoc.py [OPTIONS] COMMAND +__version__ = '0.4.0' -Run AsciiDoc conformance tests specified in configuration FILE. -Commands: - list List tests - run [NUMBER] [BACKEND] Execute tests - update [NUMBER] [BACKEND] Regenerate and update test data - -Options: - -f, --conf-file=CONF_FILE - Use configuration file CONF_FILE (default configuration file is - testasciidoc.conf in testasciidoc.py directory) - --force - Update all test data overwriting existing data''' - - -__version__ = '0.1.1' -__copyright__ = 'Copyright (C) 2009 Stuart Rackham' - - -import os, sys, re, difflib -import time - -if sys.platform[:4] == 'java': - # Jython cStringIO is more compatible with CPython StringIO. - import cStringIO as StringIO -else: - import StringIO - -import asciidocapi - - -BACKENDS = ('html4','xhtml11','docbook','html5') # Default backends. -BACKEND_EXT = {'html4':'.html', 'xhtml11':'.html', 'docbook':'.xml', - 'slidy':'.html','html5':'.html'} +import difflib +import io +import os +from pathlib import Path +import re +import shutil +import sys + +sys.path.append(str(Path(__file__).resolve().parent.parent)) +from asciidoc import asciidoc # noqa: E402 + +# Default backends. +BACKENDS = ('html4', 'xhtml11', 'docbook', 'docbook5', 'html5') +BACKEND_EXT = { + 'html4': '.html', + 'xhtml11': '.html', + 'docbook': '.xml', + 'docbook5': '.xml', + 'slidy': '.html', + 'html5': '.html' +} def iif(condition, iftrue, iffalse=None): @@ -45,7 +33,7 @@ False value defaults to 0 if the true value is a number. """ if iffalse is None: - if isinstance(iftrue, basestring): + if isinstance(iftrue, str): iffalse = '' if type(iftrue) in (int, float): iffalse = 0 @@ -54,52 +42,32 @@ else: return iffalse + def message(msg=''): - print >>sys.stderr, msg + print(msg, file=sys.stderr) + def strip_end(lines): """ Strip blank strings from the end of list of strings. """ - for i in range(len(lines)-1,-1,-1): + for i in range(len(lines) - 1, -1, -1): if not lines[i]: del lines[i] else: break + def normalize_data(lines): """ Strip comments and trailing blank strings from lines. """ - result = [ s for s in lines if not s.startswith('#') ] + result = [s for s in lines if not s.startswith('#')] strip_end(result) return result -def mock_localtime(f, _localtime=time.localtime): - """Mock time module to generate stable output.""" - _frozentime = 0X3DE170D6 - _frozentz = 'Pacific/Auckland' - - def _frozen_localtime(t=_frozentime + 1): - assert t > _frozentime, 'File created before first public release' - return _localtime(_frozentime) - - def generate_expected(self, backend): - time.localtime = _frozen_localtime - os.environ['TZ'] = _frozentz - time.tzset() - try: - return f(self, backend) - finally: - time.localtime = _localtime - del os.environ['TZ'] - time.tzset() - return generate_expected - - class AsciiDocTest(object): - def __init__(self): self.number = None # Test number (1..). self.name = '' # Optional test name. @@ -109,8 +77,12 @@ self.options = [] self.attributes = {'asciidoc-version': 'test'} self.backends = BACKENDS + self.artifacts = [] # list of generated artifacts to delete + self.requires = [] # list of dependencies to check for for the test + self.confdir = None self.datadir = None # Where output files are stored. self.disabled = False + self.passed = self.skipped = self.failed = 0 def backend_filename(self, backend): """ @@ -118,9 +90,10 @@ the test name and output file type. """ return '%s-%s%s' % ( - os.path.normpath(os.path.join(self.datadir, self.name)), - backend, - BACKEND_EXT[backend]) + os.path.normpath(os.path.join(self.datadir, self.name)), + backend, + BACKEND_EXT[backend] + ) def parse(self, lines, confdir, datadir): """ @@ -131,38 +104,43 @@ self.datadir = datadir lines = Lines(lines) while not lines.eol(): - l = lines.read_until(r'^%') - if l: - if not l[0].startswith('%'): - if l[0][0] == '!': + text = lines.read_until(r'^%') + if text: + if not text[0].startswith('%'): + if text[0][0] == '!': self.disabled = True - self.title = l[0][1:] + self.title = text[0][1:] else: - self.title = l[0] - self.description = l[1:] + self.title = text[0] + self.description = text[1:] continue - reo = re.match(r'^%\s*(?P[\w_-]+)', l[0]) + reo = re.match(r'^%\s*(?P[\w_-]+)', text[0]) if not reo: - raise (ValueError, 'illegal directive: %s' % l[0]) + raise ValueError directive = reo.groupdict()['directive'] - data = normalize_data(l[1:]) + data = normalize_data(text[1:]) if directive == 'source': if data: self.source = os.path.normpath(os.path.join( - self.confdir, os.path.normpath(data[0]))) + self.confdir, os.path.normpath(data[0]) + )) elif directive == 'options': self.options = eval(' '.join(data)) - for i,v in enumerate(self.options): - if isinstance(v, basestring): - self.options[i] = (v,None) + for i, v in enumerate(self.options): + if isinstance(v, str): + self.options[i] = (v, None) elif directive == 'attributes': self.attributes.update(eval(' '.join(data))) elif directive == 'backends': self.backends = eval(' '.join(data)) elif directive == 'name': self.name = data[0].strip() + elif directive == 'requires': + self.requires = eval(' '.join(data)) + elif directive == 'artifacts': + self.artifacts = eval(' '.join(data)) else: - raise (ValueError, 'illegal directive: %s' % l[0]) + raise ValueError if not self.title: self.title = self.source if not self.name: @@ -179,34 +157,45 @@ Returns True if the output test data file is missing or out of date. """ return self.is_missing(backend) or ( - os.path.getmtime(self.source) - > os.path.getmtime(self.backend_filename(backend))) + os.path.getmtime(self.source) + > os.path.getmtime(self.backend_filename(backend)) + ) + + def clean_artifacts(self): + for artifact in self.artifacts: + loc = os.path.join(self.confdir, artifact) + if os.path.exists(loc): + os.unlink(loc) def get_expected(self, backend): """ Return expected test data output for backend. """ - f = open(self.backend_filename(backend)) - try: - result = f.readlines() - # Strip line terminators. - result = [ s.rstrip() for s in result ] - finally: - f.close() - return result + with open( + self.backend_filename(backend), + encoding='utf-8', + newline='' + ) as open_file: + return open_file.readlines() - @mock_localtime def generate_expected(self, backend): """ Generate and return test data output for backend. """ - asciidoc = asciidocapi.AsciiDocAPI() - asciidoc.options.values = self.options - asciidoc.attributes = self.attributes - infile = self.source - outfile = StringIO.StringIO() - asciidoc.execute(infile, outfile, backend) - return outfile.getvalue().splitlines() + outfile = io.StringIO() + options = self.options[:] + options.append(('--out-file', outfile)) + options.append(('--backend', backend)) + for k, v in self.attributes.items(): + if v == '' or k[-1] in '!@': + s = str(k) + elif v is None: + s = k + '!' + else: + s = '%s=%s' % (k, v) + options.append(('--attribute', s)) + asciidoc.execute('asciidoc', options, [self.source]) + return outfile.getvalue().splitlines(keepends=True) def update_expected(self, backend): """ @@ -216,12 +205,14 @@ if not os.path.isdir(self.datadir): print('CREATING: %s' % self.datadir) os.mkdir(self.datadir) - f = open(self.backend_filename(backend),'w+') - try: - print('WRITING: %s' % f.name) - f.writelines([ s + os.linesep for s in lines]) - finally: - f.close() + with open( + self.backend_filename(backend), + 'w+', + encoding='utf-8', + newline='' + ) as open_file: + print('WRITING: %s' % open_file.name) + open_file.writelines(lines) def update(self, backend=None, force=False): """ @@ -231,9 +222,14 @@ backends = self.backends else: backends = [backend] + + print('SOURCE: asciidoc: %s' % self.source) for backend in backends: if force or self.is_missing_or_outdated(backend): self.update_expected(backend) + print() + + self.clean_artifacts() def run(self, backend=None): """ @@ -251,7 +247,12 @@ print('SOURCE: asciidoc: %s' % self.source) for backend in backends: fromfile = self.backend_filename(backend) - if not self.is_missing(backend): + skip = False + for require in self.requires: + if shutil.which(require) is None: + skip = True + break + if not skip and not self.is_missing(backend): expected = self.get_expected(backend) strip_end(expected) got = self.generate_expected(backend) @@ -261,7 +262,7 @@ lines.append(line) if lines: result = False - self.failed +=1 + self.failed += 1 lines = lines[3:] print('FAILED: %s: %s' % (backend, fromfile)) message('+++ %s' % fromfile) @@ -275,6 +276,7 @@ else: self.skipped += 1 print('SKIPPED: %s: %s' % (backend, fromfile)) + self.clean_artifacts() else: self.skipped += len(backends) if self.source: @@ -287,41 +289,40 @@ class AsciiDocTests(object): - def __init__(self, conffile): """ - Parse configuration file. + Parse configuration file + :param conffile: """ - self.conffile = os.path.normpath(conffile) + self.conffile = conffile + self.passed = self.failed = self.skipped = 0 # All file names are relative to configuration file directory. self.confdir = os.path.dirname(self.conffile) - self.datadir = self.confdir # Default expected files directory. - self.tests = [] # List of parsed AsciiDocTest objects. + self.datadir = self.confdir # Default expected files directory. + self.tests = [] # List of parsed AsciiDocTest objects. self.globals = {} - f = open(self.conffile) - try: - lines = Lines(f.readlines()) - finally: - f.close() - first = True - while not lines.eol(): - s = lines.read_until(r'^%+$') - s = [ l for l in s if l] # Drop blank lines. - # Must be at least one non-blank line in addition to delimiter. - if len(s) > 1: - # Optional globals precede all tests. - if first and re.match(r'^%\s*globals$',s[0]): - self.globals = eval(' '.join(normalize_data(s[1:]))) - if 'datadir' in self.globals: - self.datadir = os.path.join( + with open(self.conffile, encoding='utf-8') as open_file: + lines = Lines(open_file.readlines()) + first = True + while not lines.eol(): + s = lines.read_until(r'^%+$') + s = [line for line in s if len(line) > 0] # Drop blank lines. + # Must be at least one non-blank line in addition to delimiter. + if len(s) > 1: + # Optional globals precede all tests. + if first and re.match(r'^%\s*globals$', s[0]): + self.globals = eval(' '.join(normalize_data(s[1:]))) + if 'datadir' in self.globals: + self.datadir = os.path.join( self.confdir, - os.path.normpath(self.globals['datadir'])) - else: - test = AsciiDocTest() - test.parse(s[1:], self.confdir, self.datadir) - self.tests.append(test) - test.number = len(self.tests) - first = False + os.path.normpath(self.globals['datadir']) + ) + else: + test = AsciiDocTest() + test.parse(s[1:], self.confdir, self.datadir) + self.tests.append(test) + test.number = len(self.tests) + first = False def run(self, number=None, backend=None): """ @@ -330,7 +331,11 @@ """ self.passed = self.failed = self.skipped = 0 for test in self.tests: - if (not test.disabled or number) and (not number or number == test.number) and (not backend or backend in test.backends): + if ( + (not test.disabled or number) + and (not number or number == test.number) + and (not backend or backend in test.backends) + ): test.run(backend) self.passed += test.passed self.failed += test.failed @@ -355,7 +360,7 @@ Lists tests to stdout. """ for test in self.tests: - print '%d: %s%s' % (test.number, iif(test.disabled,'!'), test.title) + print('%d: %s%s' % (test.number, iif(test.disabled, '!'), test.title)) class Lines(list): @@ -390,47 +395,70 @@ return result -def usage(msg=None): - if msg: - message(msg + '\n') - message(USAGE) - - if __name__ == '__main__': + # guarantee a stable timestamp matching the test fixtures + os.environ['SOURCE_DATE_EPOCH'] = '1038184662' + asciidoc.set_caller(__name__) # Process command line options. - import getopt - try: - opts,args = getopt.getopt(sys.argv[1:], 'f:', ['force']) - except getopt.GetoptError: - usage('illegal command options') - sys.exit(1) - if len(args) == 0: - usage() - sys.exit(1) + from argparse import ArgumentParser + parser = ArgumentParser( + description='Run AsciiDoc conformance tests specified in configuration' + 'FILE.' + ) + msg = 'Use configuration file CONF_FILE (default configuration file is '\ + 'testasciidoc.conf in testasciidoc.py directory)' + parser.add_argument( + '-v', + '--version', + action='version', + version='%(prog)s {}'.format(__version__) + ) + parser.add_argument('-f', '--conf-file', help=msg) + + subparsers = parser.add_subparsers(metavar='command', dest='command') + subparsers.required = True + + subparsers.add_parser('list', help='List tests') + + options = ArgumentParser(add_help=False) + options.add_argument('-n', '--number', type=int, help='Test number to run') + options.add_argument('-b', '--backend', type=str, help='Backend to run') + + subparsers.add_parser('run', help='Execute tests', parents=[options]) + + subparser = subparsers.add_parser( + 'update', + help='Regenerate and update test data', + parents=[options] + ) + subparser.add_argument( + '--force', + action='store_true', + help='Update all test data overwriting existing data' + ) + + args = parser.parse_args() + conffile = os.path.join(os.path.dirname(sys.argv[0]), 'testasciidoc.conf') - force = False - for o,v in opts: - if o == '--force': - force = True - if o in ('-f','--conf-file'): - conffile = v + force = 'force' in args and args.force is True + if args.conf_file is not None: + conffile = args.conf_file if not os.path.isfile(conffile): message('missing CONF_FILE: %s' % conffile) sys.exit(1) tests = AsciiDocTests(conffile) - cmd = args[0] + cmd = args.command number = None backend = None - for arg in args[1:3]: - try: - number = int(arg) - except ValueError: - backend = arg + if 'number' in args: + number = args.number + if 'backend' in args: + backend = args.backend if backend and backend not in BACKENDS: - message('illegal BACKEND: %s' % backend) + message('illegal BACKEND: {:s}'.format(backend)) sys.exit(1) - if number is not None and number not in range(1, len(tests.tests)+1): - message('illegal test NUMBER: %d' % number) + if number is not None and (number < 1 or number > len(tests.tests)): + message('illegal test NUMBER: {:d}'.format(number)) sys.exit(1) if cmd == 'run': tests.run(number, backend) @@ -440,5 +468,3 @@ tests.update(number, backend, force=force) elif cmd == 'list': tests.list() - else: - usage('illegal COMMAND: %s' % cmd) diff -Nru asciidoc-8.6.10/tests/test_collections.py asciidoc-10.1.2/tests/test_collections.py --- asciidoc-8.6.10/tests/test_collections.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/test_collections.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,37 @@ +import pytest +from asciidoc.collections import AttrDict, DefaultAttrDict, InsensitiveDict + + +def test_attr_dict(): + d = AttrDict() + d.a = 1 + d['b'] = 2 + assert d['a'] == 1 + assert d.b == 2 + del d['a'] + del d.b + assert 'a' not in d + assert 'b' not in d + assert d.c is None + + with pytest.raises(AttributeError): + del d.c + + +def test_default_attr_dict(): + d = DefaultAttrDict() + with pytest.raises(AttributeError): + d.a + d._default = 'test' + + assert d.a == 'test' + + +def test_insensitive_dict(): + d = InsensitiveDict() + d['A'] = 1 + assert d['a'] == 1 + d['aBaBa'] = 2 + assert 'AbAbA' in d + del d['abaBA'] + assert ('ababa' in d) is False diff -Nru asciidoc-8.6.10/tests/test_plugin.py asciidoc-10.1.2/tests/test_plugin.py --- asciidoc-8.6.10/tests/test_plugin.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/test_plugin.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,18 @@ + + +from asciidoc.message import Message +from asciidoc.plugin import Plugin + +from .utils import Struct, TEST_DIR + +PLUGIN_DIR = TEST_DIR / 'plugin' +CONFIG = Struct(get_load_dirs=lambda: [str(PLUGIN_DIR)], verbose=True) + + +def test_plugin_list(capsys) -> None: + plugin = Plugin('backend', Message(None, None, CONFIG, None), CONFIG) + plugin.list([]) + captured = capsys.readouterr() + backend_dir = PLUGIN_DIR / 'backends' + assert captured.out == "{}\n{}\n".format(backend_dir / 'bar', backend_dir / 'foo') + assert captured.err == '' diff -Nru asciidoc-8.6.10/tests/test_utils.py asciidoc-10.1.2/tests/test_utils.py --- asciidoc-8.6.10/tests/test_utils.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/test_utils.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,138 @@ +import pytest +from pytest_mock import MockerFixture +from typing import Optional, Tuple + +from asciidoc import utils + + +@pytest.mark.parametrize( + "input,expected", + ( + ('/home/user', '/home/user'), + ('~', None), + ) +) +def test_userdir(mocker: MockerFixture, input: str, expected: Optional[str]) -> None: + mocker.patch('os.path.expanduser', return_value=input) + assert utils.userdir() == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + (' a ', 'a'), + ('"a"', 'a'), + (' "b ', '"b'), + (' b" ', 'b"'), + ('""', '""'), + ), +) +def test_strip_quotes(input: str, expected: str) -> None: + assert utils.strip_quotes(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + (('a', 'b'), ('a', 'b')), + (('', 'a', 'b'), ('a', 'b')), + (('a', 'b', ''), ('a', 'b', '')), + (('', 'a', 'b', ''), ('a', 'b', '')), + ), +) +def test_lstrip_list(input: Tuple[str, ...], expected: Tuple[str, ...]) -> None: + assert utils.lstrip_list(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + (('a', 'b'), ('a', 'b')), + (('', 'a', 'b'), ('', 'a', 'b')), + (('a', 'b', ''), ('a', 'b')), + (('', 'a', 'b', ''), ('', 'a', 'b')), + ), +) +def test_rstrip_list(input: Tuple[str, ...], expected: Tuple[str, ...]) -> None: + assert utils.rstrip_list(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + (('a', 'b'), ('a', 'b')), + (('', 'a', 'b'), ('a', 'b')), + (('a', 'b', ''), ('a', 'b')), + (('', 'a', 'b', ''), ('a', 'b')), + ), +) +def test_strip_list(input: Tuple[str, ...], expected: Tuple[str, ...]) -> None: + assert utils.strip_list(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + ((1,), True), + ([1], True), + ('a', False), + ), +) +def test_is_array(input, expected): + assert utils.is_array(input) == expected + + +@pytest.mark.parametrize( + "n,d,expected", + ( + (42.0, 0, 42), + (42.4, 0, 42), + (42.5, 0, 43), + (42.6, 0, 43), + (42.9, 0, 43), + (42.0, 2, 42), + (42.5, 2, 42.5), + (42.550, 2, 42.55), + (42.554, 2, 42.55), + (42.555, 2, 42.56), + (42.556, 2, 42.56), + (42.559, 2, 42.56), + ), +) +def test_py2round(n: float, d: int, expected: float) -> None: + assert utils.py2round(n, d) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + ('"hello","world"', {'1': 'hello', '2': 'world'}), + ('"hello", planet="earth"', {'1': 'hello'}), + ) +) +def test_get_args(input, expected): + assert utils.get_args(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + ('"hello", "world"', {}), + ('planet="earth"', {'planet': 'earth'}), + ('"hello",planet="earth"', {'planet': 'earth'}), + ('planet="earth",foo="bar"', {'planet': 'earth', 'foo': 'bar'}), + ) +) +def test_get_kwargs(input, expected): + assert utils.get_kwargs(input) == expected + + +@pytest.mark.parametrize( + "input,expected", + ( + ('1,2,3', [1, 2, 3]), + ('"a", "b", "c"', ['a', 'b', 'c']) + ) +) +def test_parse_to_list(input, expected): + assert utils.parse_to_list(input) == expected diff -Nru asciidoc-8.6.10/tests/utils.py asciidoc-10.1.2/tests/utils.py --- asciidoc-8.6.10/tests/utils.py 1970-01-01 00:00:00.000000000 +0000 +++ asciidoc-10.1.2/tests/utils.py 2022-02-18 01:52:22.000000000 +0000 @@ -0,0 +1,17 @@ +from pathlib import Path + +TEST_DIR = Path(__file__).resolve().parent / '__test_data__' + + +class Struct: + """ + Use this to make "mock" version of asciidoc classes. Usage is passing in kwargs, + and these are set to the properties of the class. + + >>> a = Struct(foo=1, bar=2) + >>> a.foo + 1 + >>> a.bar + 2 + """ + def __init__(self, **entries): self.__dict__.update(entries) diff -Nru asciidoc-8.6.10/text.conf asciidoc-10.1.2/text.conf --- asciidoc-8.6.10/text.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/text.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -# text.conf -# Used by the AsciiDoc a2x(1) toolchain wrapper utility. -# Filters to add leading blank line and margin indent to verbatim -# block elements so lynx(1) generated text output looks nicer. - -[paradef-default] -verse-style=template="verseparagraph",filter="echo; echo; sed 's/^/ /'" - -[paradef-literal] -filter=echo; echo; sed 's/^/ /' - -[blockdef-listing] -filter=echo; sed 's/^/ /' - -[blockdef-literal] -filter=echo; sed 's/^/ /' diff -Nru asciidoc-8.6.10/themes/flask/flask.css asciidoc-10.1.2/themes/flask/flask.css --- asciidoc-8.6.10/themes/flask/flask.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/themes/flask/flask.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,597 +0,0 @@ -/* Shared CSS for AsciiDoc xhtml11 and html5 backends */ - -/* Default font. */ -body { - font-family: Georgia,serif; -} - -/* Title font. */ -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Arial,Helvetica,sans-serif; -} - -body { - margin: 1em 5% 1em 5%; -} - -a { - color: blue; - text-decoration: underline; -} -a:visited { - color: fuchsia; -} - -em { - font-style: italic; - color: navy; -} - -strong { - font-weight: bold; - color: #083194; -} - -h1, h2, h3, h4, h5, h6 { - color: #527bbd; - margin-top: 1.2em; - margin-bottom: 0.5em; - line-height: 1.3; -} - -h1, h2, h3 { - border-bottom: 2px solid silver; -} -h2 { - padding-top: 0.5em; -} -h3 { - float: left; -} -h3 + * { - clear: left; -} -h5 { - font-size: 1.0em; -} - -div.sectionbody { - margin-left: 0; -} - -hr { - border: 1px solid silver; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -ul, ol, li > p { - margin-top: 0; -} -ul > li { color: #aaa; } -ul > li > * { color: black; } - -pre { - padding: 0; - margin: 0; -} - -#author { - color: #527bbd; - font-weight: bold; - font-size: 1.1em; -} -#email { -} -#revnumber, #revdate, #revremark { -} - -#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} -#footer-text { - float: left; - padding-bottom: 0.5em; -} -#footer-badges { - float: right; - padding-bottom: 0.5em; -} - -#preamble { - margin-top: 1.5em; - margin-bottom: 1.5em; -} -div.imageblock, div.exampleblock, div.verseblock, -div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, -div.admonitionblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.admonitionblock { - margin-top: 2.0em; - margin-bottom: 2.0em; - margin-right: 10%; - color: #606060; -} - -div.content { /* Block element content. */ - padding: 0; -} - -/* Block element titles. */ -div.title, caption.title { - color: #527bbd; - font-weight: bold; - text-align: left; - margin-top: 1.0em; - margin-bottom: 0.5em; -} -div.title + * { - margin-top: 0; -} - -td div.title:first-child { - margin-top: 0.0em; -} -div.content div.title:first-child { - margin-top: 0.0em; -} -div.content + div.title { - margin-top: 0.0em; -} - -div.sidebarblock > div.content { - background: #ffffee; - border: 1px solid #dddddd; - border-left: 4px solid #f0f0f0; - padding: 0.5em; -} - -div.listingblock > div.content { - border: 1px solid #dddddd; - border-left: 5px solid #f0f0f0; - background: #f8f8f8; - padding: 0.5em; -} - -div.quoteblock, div.verseblock { - padding-left: 1.0em; - margin-left: 1.0em; - margin-right: 10%; - border-left: 5px solid #f0f0f0; - color: #777777; -} - -div.quoteblock > div.attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock > pre.content { - font-family: inherit; - font-size: inherit; -} -div.verseblock > div.attribution { - padding-top: 0.75em; - text-align: left; -} -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -} - -div.admonitionblock .icon { - vertical-align: top; - font-size: 1.1em; - font-weight: bold; - text-decoration: underline; - color: #527bbd; - padding-right: 0.5em; -} -div.admonitionblock td.content { - padding-left: 0.5em; - border-left: 3px solid #dddddd; -} - -div.exampleblock > div.content { - border-left: 3px solid #dddddd; - padding-left: 0.5em; -} - -div.imageblock div.content { padding-left: 0; } -span.image img { border-style: none; } -a.image:visited { color: white; } - -dl { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -dt { - margin-top: 0.5em; - margin-bottom: 0; - font-style: normal; - color: navy; -} -dd > *:first-child { - margin-top: 0.1em; -} - -ul, ol { - list-style-position: outside; -} -ol.arabic { - list-style-type: decimal; -} -ol.loweralpha { - list-style-type: lower-alpha; -} -ol.upperalpha { - list-style-type: upper-alpha; -} -ol.lowerroman { - list-style-type: lower-roman; -} -ol.upperroman { - list-style-type: upper-roman; -} - -div.compact ul, div.compact ol, -div.compact p, div.compact p, -div.compact div, div.compact div { - margin-top: 0.1em; - margin-bottom: 0.1em; -} - -tfoot { - font-weight: bold; -} -td > div.verse { - white-space: pre; -} - -div.hdlist { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -div.hdlist tr { - padding-bottom: 15px; -} -dt.hdlist1.strong, td.hdlist1.strong { - font-weight: bold; -} -td.hdlist1 { - vertical-align: top; - font-style: normal; - padding-right: 0.8em; - color: navy; -} -td.hdlist2 { - vertical-align: top; -} -div.hdlist.compact tr { - margin: 0; - padding-bottom: 0; -} - -.comment { - background: yellow; -} - -.footnote, .footnoteref { - font-size: 0.8em; -} - -span.footnote, span.footnoteref { - vertical-align: super; -} - -#footnotes { - margin: 20px 0 20px 0; - padding: 7px 0 0 0; -} - -#footnotes div.footnote { - margin: 0 0 5px 0; -} - -#footnotes hr { - border: none; - border-top: 1px solid silver; - height: 1px; - text-align: left; - margin-left: 0; - width: 20%; - min-width: 100px; -} - -div.colist td { - padding-right: 0.5em; - padding-bottom: 0.3em; - vertical-align: top; -} -div.colist td img { - margin-top: 0.3em; -} - -@media print { - #footer-badges { display: none; } -} - -#toc { - margin-bottom: 2.5em; -} - -#toctitle { - color: #527bbd; - font-size: 1.1em; - font-weight: bold; - margin-top: 1.0em; - margin-bottom: 0.1em; -} - -div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { - margin-top: 0; - margin-bottom: 0; -} -div.toclevel2 { - margin-left: 2em; - font-size: 0.9em; -} -div.toclevel3 { - margin-left: 4em; - font-size: 0.9em; -} -div.toclevel4 { - margin-left: 6em; - font-size: 0.9em; -} - -span.aqua { color: aqua; } -span.black { color: black; } -span.blue { color: blue; } -span.fuchsia { color: fuchsia; } -span.gray { color: gray; } -span.green { color: green; } -span.lime { color: lime; } -span.maroon { color: maroon; } -span.navy { color: navy; } -span.olive { color: olive; } -span.purple { color: purple; } -span.red { color: red; } -span.silver { color: silver; } -span.teal { color: teal; } -span.white { color: white; } -span.yellow { color: yellow; } - -span.aqua-background { background: aqua; } -span.black-background { background: black; } -span.blue-background { background: blue; } -span.fuchsia-background { background: fuchsia; } -span.gray-background { background: gray; } -span.green-background { background: green; } -span.lime-background { background: lime; } -span.maroon-background { background: maroon; } -span.navy-background { background: navy; } -span.olive-background { background: olive; } -span.purple-background { background: purple; } -span.red-background { background: red; } -span.silver-background { background: silver; } -span.teal-background { background: teal; } -span.white-background { background: white; } -span.yellow-background { background: yellow; } - -span.big { font-size: 2em; } -span.small { font-size: 0.6em; } - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } - - -/* - * xhtml11 specific - * - * */ - -tt { - font-family: monospace; - font-size: inherit; - color: navy; -} - -div.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -div.tableblock > table { - border: 3px solid #527bbd; -} -thead, p.table.header { - font-weight: bold; - color: #527bbd; -} -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - - -/* - * html5 specific - * - * */ - -.monospaced { - font-family: monospace; - font-size: inherit; - color: navy; -} - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #527bbd; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #527bbd; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #527bbd; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} - - -/* - * manpage specific - * - * */ - -body.manpage h1 { - padding-top: 0.5em; - padding-bottom: 0.5em; - border-top: 2px solid silver; - border-bottom: 2px solid silver; -} -body.manpage h2 { - border-style: none; -} -body.manpage div.sectionbody { - margin-left: 3em; -} - -@media print { - body.manpage div#toc { display: none; } -} - - -/* - * Theme specific overrides of the preceding (asciidoc.css) CSS. - * - */ -body { - font-family: Garamond, Georgia, serif; - font-size: 17px; - color: #3E4349; - line-height: 1.3em; -} -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Garmond, Georgia, serif; - font-weight: normal; - border-bottom-width: 0; - color: #3E4349; -} -div.title, caption.title { color: #596673; font-weight: bold; } -h1 { font-size: 240%; } -h2 { font-size: 180%; } -h3 { font-size: 150%; } -h4 { font-size: 130%; } -h5 { font-size: 115%; } -h6 { font-size: 100%; } -#header h1 { margin-top: 0; } -#toc { - color: #444444; - line-height: 1.5; - padding-top: 1.5em; -} -#toctitle { - font-size: 20px; -} -#toc a { - border-bottom: 1px dotted #999999; - color: #444444 !important; - text-decoration: none !important; -} -#toc a:hover { - border-bottom: 1px solid #6D4100; - color: #6D4100 !important; - text-decoration: none !important; -} -div.toclevel1 { margin-top: 0.2em; font-size: 16px; } -div.toclevel2 { margin-top: 0.15em; font-size: 14px; } -em, dt, td.hdlist1 { color: black; } -strong { color: #3E4349; } -a { color: #004B6B; text-decoration: none; border-bottom: 1px dotted #004B6B; } -a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } -a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } -div.tableblock > table, table.tableblock { border: 3px solid #E8E8E8; } -th.tableblock, td.tableblock { border: 1px solid #E8E8E8; } -ul > li > * { color: #3E4349; } -pre, tt, .monospaced { font-family: Consolas,Menlo,'Deja Vu Sans Mono','Bitstream Vera Sans Mono',monospace; } -tt, .monospaced { font-size: 0.9em; color: black; -} -div.exampleblock > div.content, div.sidebarblock > div.content, div.listingblock > div.content { border-width: 0 0 0 3px; border-color: #E8E8E8; } -div.verseblock { border-left-width: 0; margin-left: 3em; } -div.quoteblock { border-left-width: 3px; margin-left: 0; margin-right: 0;} -div.admonitionblock td.content { border-left: 3px solid #E8E8E8; } diff -Nru asciidoc-8.6.10/themes/volnitsky/volnitsky.css asciidoc-10.1.2/themes/volnitsky/volnitsky.css --- asciidoc-8.6.10/themes/volnitsky/volnitsky.css 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/themes/volnitsky/volnitsky.css 1970-01-01 00:00:00.000000000 +0000 @@ -1,438 +0,0 @@ -/* - * AsciiDoc 'volnitsky' theme for xhtml11 and html5 backends. - * Based on css from http://volnitsky.com, which was in turn based on default - * theme from AsciiDoc - * - * FIXME: The styling is still a bit rough in places. - * - */ - -/* Default font. */ -body { - font-family: Georgia,"Times New Roman",Times,serif; -} - -/* Title font. */ -h1, h2, h3, h4, h5, h6, -div.title, caption.title, -thead, p.table.header, -#toctitle, -#author, #revnumber, #revdate, #revremark, -#footer { - font-family: Candara,Arial,sans-serif; -} - - -#toc a { - border-bottom: 1px dotted #999999; - color: #3A3A4D !important; - text-decoration: none !important; -} -#toc a:hover { - border-bottom: 1px solid #6D4100; - color: #6D4100 !important; - text-decoration: none !important; -} -a { color: #666688; text-decoration: none; border-bottom: 1px dotted #666688; } -a:visited { color: #615FA0; border-bottom: 1px dotted #615FA0; } -a:hover { color: #6D4100; border-bottom: 1px solid #6D4100; } - -em { - font-style: italic; - color: #444466; -} - -strong { - font-weight: bold; - color: #444466; -} - -h1, h2, h3, h4, h5, h6 { - color: #666688; - margin-bottom: 0.5em; - line-height: 1.3; - letter-spacing:+0.15em; -} - -h1, h2, h3 { border-bottom: 2px solid #ccd; } -h2 { padding-top: 0.5em; } -h3 { float: left; } -h3 + * { clear: left; } - -div.sectionbody { - margin-left: 0; -} - -hr { - border: 1px solid #444466; -} - -p { - margin-top: 0.5em; - margin-bottom: 0.5em; -} - -ul, ol, li > p { - margin-top: 0; -} - -pre { - padding: 0; - margin: 0; -} - -#author { - color: #444466; - font-weight: bold; - font-size: 1.1em; -} - -#footer { - font-size: small; - border-top: 2px solid silver; - padding-top: 0.5em; - margin-top: 4.0em; -} - -#footer-text { - float: left; - padding-bottom: 0.5em; -} - -#footer-badges { - float: right; - padding-bottom: 0.5em; -} - -#preamble { - margin-top: 1.5em; - margin-bottom: 1.5em; -} - -div.tableblock, div.imageblock, div.exampleblock, div.verseblock, -div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock, -div.admonitionblock { - margin-top: 1.5em; - margin-bottom: 1.5em; -} - -div.admonitionblock { - margin-top: 2.5em; - margin-bottom: 2.5em; -} - -div.content { /* Block element content. */ - padding: 0; -} - -/* Block element titles. */ -div.title, caption.title { - color: #444466; - font-weight: bold; - text-align: left; - margin-top: 1.0em; - margin-bottom: 0.5em; -} -div.title + * { - margin-top: 0; -} - -td div.title:first-child { - margin-top: 0.0em; -} -div.content div.title:first-child { - margin-top: 0.0em; -} -div.content + div.title { - margin-top: 0.0em; -} - -div.sidebarblock > div.content { - background: #ffffee; - border: 1px solid silver; - padding: 0.5em; -} - -div.listingblock > div.content { - border: 1px solid silver; - background: #f4f4f4; - padding: 0.5em; -} - -div.quoteblock { - padding-left: 2.0em; - margin-right: 10%; -} -div.quoteblock > div.attribution { - padding-top: 0.5em; - text-align: right; -} - -div.verseblock { - padding-left: 2.0em; - margin-right: 10%; -} -div.verseblock > pre.content { - font-family: inherit; -} -div.verseblock > div.attribution { - padding-top: 0.75em; - text-align: left; -} -/* DEPRECATED: Pre version 8.2.7 verse style literal block. */ -div.verseblock + div.attribution { - text-align: left; -} - -div.admonitionblock .icon { - vertical-align: top; - font-size: 1.1em; - font-weight: bold; - text-decoration: underline; - color: #444466; - padding-right: 0.5em; -} -div.admonitionblock td.content { - padding-left: 0.5em; - border-left: 2px solid silver; -} - -div.exampleblock > div.content { - border-left: 2px solid silver; - padding: 0.5em; -} - -div.imageblock div.content { padding-left: 0; } -span.image img { border-style: none; } -a.image:visited { color: white; } - -dl { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -dt { - margin-top: 0.5em; - margin-bottom: 0; - font-style: normal; - color: #444466; -} -dd > *:first-child { - margin-top: 0.1em; -} - -ul, ol { - list-style-position: outside; -} -ol.arabic { - list-style-type: decimal; -} -ol.loweralpha { - list-style-type: lower-alpha; -} -ol.upperalpha { - list-style-type: upper-alpha; -} -ol.lowerroman { - list-style-type: lower-roman; -} -ol.upperroman { - list-style-type: upper-roman; -} - -div.compact ul, div.compact ol, -div.compact p, div.compact p, -div.compact div, div.compact div { - margin-top: 0.1em; - margin-bottom: 0.1em; -} - -div.tableblock > table { - border: 3px solid #444466; -} -thead { - font-weight: bold; - color: #444466; -} -tfoot { - font-weight: bold; -} -td > div.verse { - white-space: pre; -} -p.table { - margin-top: 0; -} -/* Because the table frame attribute is overriden by CSS in most browsers. */ -div.tableblock > table[frame="void"] { - border-style: none; -} -div.tableblock > table[frame="hsides"] { - border-left-style: none; - border-right-style: none; -} -div.tableblock > table[frame="vsides"] { - border-top-style: none; - border-bottom-style: none; -} - - -div.hdlist { - margin-top: 0.8em; - margin-bottom: 0.8em; -} -div.hdlist tr { - padding-bottom: 15px; -} -dt.hdlist1.strong, td.hdlist1.strong { - font-weight: bold; -} -td.hdlist1 { - vertical-align: top; - font-style: normal; - padding-right: 0.8em; - color: #444466; -} -td.hdlist2 { - vertical-align: top; -} -div.hdlist.compact tr { - margin: 0; - padding-bottom: 0; -} - -.comment { - background: yellow; -} - -@media print { - #footer-badges { display: none; } -} - -#toctitle { - color: #666688; - font-size: 1.2em; - font-weight: bold; - margin-top: 1.0em; - margin-bottom: 0.1em; -} - -div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 { margin-top: 0; margin-bottom: 0; } -div.toclevel1 { margin-top: 0.3em; margin-left: 0; font-size: 1.0em; } -div.toclevel2 { margin-top: 0.25em; margin-left: 2em; font-size: 0.9em; } -div.toclevel3 { margin-left: 4em; font-size: 0.8em; } -div.toclevel4 { margin-left: 6em; font-size: 0.8em; } - -body { - margin: 1em 5%; - max-width: 55em; - padding-left: 0; - -} - -.monospaced, tt, div.listingblock > div.content { - font-family: Consolas, "Andale Mono", "Courier New", monospace; - color: #004400; - background: #f4f4f4; - max-width: 80em; - line-height: 1.2em; -} - -.paragraph p { - line-height: 1.5em; - margin-top: 1em; -} - -.paragraph p, li, dd, .content { max-width: 45em; } -.admonitionblock { max-width: 35em; } - -div.sectionbody div.ulist > ul > li { - list-style-type: square; - color: #aaa; -} - div.sectionbody div.ulist > ul > li > * { - color: black; - /*font-size: 50%;*/ - } - - -div.sectionbody div.ulist > ul > li div.ulist > ul > li { - color: #ccd ; -} - div.sectionbody div.ulist > ul > li div.ulist > ul > li > * { - color: black ; - } - -em { - font-style: normal ! important; - font-weight: bold ! important; - color: #662222 ! important; - letter-spacing:+0.08em ! important; -} - -span.underline { text-decoration: underline; } -span.overline { text-decoration: overline; } -span.line-through { text-decoration: line-through; } - -/* - * html5 specific - * - * */ - -table.tableblock { - margin-top: 1.0em; - margin-bottom: 1.5em; -} -thead, p.tableblock.header { - font-weight: bold; - color: #666688; -} -p.tableblock { - margin-top: 0; -} -table.tableblock { - border-width: 3px; - border-spacing: 0px; - border-style: solid; - border-color: #444466; - border-collapse: collapse; -} -th.tableblock, td.tableblock { - border-width: 1px; - padding: 4px; - border-style: solid; - border-color: #444466; -} - -table.tableblock.frame-topbot { - border-left-style: hidden; - border-right-style: hidden; -} -table.tableblock.frame-sides { - border-top-style: hidden; - border-bottom-style: hidden; -} -table.tableblock.frame-none { - border-style: hidden; -} - -th.tableblock.halign-left, td.tableblock.halign-left { - text-align: left; -} -th.tableblock.halign-center, td.tableblock.halign-center { - text-align: center; -} -th.tableblock.halign-right, td.tableblock.halign-right { - text-align: right; -} - -th.tableblock.valign-top, td.tableblock.valign-top { - vertical-align: top; -} -th.tableblock.valign-middle, td.tableblock.valign-middle { - vertical-align: middle; -} -th.tableblock.valign-bottom, td.tableblock.valign-bottom { - vertical-align: bottom; -} - - diff -Nru asciidoc-8.6.10/.travis.yml asciidoc-10.1.2/.travis.yml --- asciidoc-8.6.10/.travis.yml 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -language: python -python: - - 2.6 - - 2.7 -install: - # 12.04 LTS ships an outdated texlive https://launchpad.net/bugs/712521 - - sudo add-apt-repository --yes ppa:texlive-backports/ppa - - sudo apt-get update -yq2 - - sudo apt-get install -yq2 --no-install-recommends dvipng graphviz imagemagick lilypond source-highlight texlive-latex-base -script: - - time python tests/testasciidoc.py update - - python asciidoc.py --doctest - - python asciidocapi.py - - time python tests/testasciidoc.py run - - git clean -x -f doc tests/data diff -Nru asciidoc-8.6.10/vim/syntax/asciidoc.vim asciidoc-10.1.2/vim/syntax/asciidoc.vim --- asciidoc-8.6.10/vim/syntax/asciidoc.vim 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/vim/syntax/asciidoc.vim 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ -" Vim syntax file -" Language: AsciiDoc -" Author: Stuart Rackham (inspired by Felix -" Obenhuber's original asciidoc.vim script). -" URL: http://asciidoc.org/ -" Licence: GPL (http://www.gnu.org) -" Remarks: Vim 6 or greater -" Limitations: -" -" - Nested quoted text formatting is highlighted according to the outer -" format. -" - If a closing Example Block delimiter may be mistaken for a title -" underline. A workaround is to insert a blank line before the closing -" delimiter. -" - Lines within a paragraph starting with equals characters are -" highlighted as single-line titles. -" - Lines within a paragraph beginning with a period are highlighted as -" block titles. - - -if exists("b:current_syntax") - finish -endif - -syn clear -syn sync fromstart -syn sync linebreaks=100 - -" Run :help syn-priority to review syntax matching priority. -syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED -syn match asciidocBackslash /\\/ -syn region asciidocIdMarker start=/^\$Id:\s/ end=/\s\$$/ -syn match asciidocCallout /\\\@/ -syn match asciidocOpenBlockDelimiter /^--$/ -syn match asciidocLineBreak /[ \t]+$/ containedin=asciidocList -syn match asciidocRuler /^'\{3,}$/ -syn match asciidocPagebreak /^<\{3,}$/ -syn match asciidocEntityRef /\\\@\?[0-9A-Za-z_]\@!/ -syn match asciidocAttributeRef /\\\@.]\{,3}\)\?\([a-z]\)\?\)\?|/ containedin=asciidocTableBlock contained -syn region asciidocTableBlock matchgroup=asciidocTableDelimiter start=/^|=\{3,}$/ end=/^|=\{3,}$/ keepend contains=ALL -syn match asciidocTablePrefix /\(\S\@.]\{,3}\)\?\([a-z]\)\?\)\?!/ containedin=asciidocTableBlock contained -syn region asciidocTableBlock2 matchgroup=asciidocTableDelimiter2 start=/^!=\{3,}$/ end=/^!=\{3,}$/ keepend contains=ALL - -syn match asciidocListContinuation /^+$/ -syn region asciidocLiteralBlock start=/^\.\{4,}$/ end=/^\.\{4,}$/ contains=asciidocCallout,asciidocToDo keepend -syn region asciidocListingBlock start=/^-\{4,}$/ end=/^-\{4,}$/ contains=asciidocCallout,asciidocToDo keepend -syn region asciidocCommentBlock start="^/\{4,}$" end="^/\{4,}$" contains=asciidocToDo -syn region asciidocPassthroughBlock start="^+\{4,}$" end="^+\{4,}$" - -" Allowing leading \w characters in the filter delimiter is to accomodate -" the pre version 8.2.7 syntax and may be removed in future releases. -syn region asciidocFilterBlock start=/^\w*\~\{4,}$/ end=/^\w*\~\{4,}$/ - -syn region asciidocMacroAttributes matchgroup=asciidocRefMacro start=/\\\@>\)\|^$/ contains=asciidocQuoted.* keepend -syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@ - -[replacements] -ifdef::asciidoc7compatible[] -# Superscripts. -\^(.+?)\^=\1 -# Subscripts. -~(.+?)~=\1 -endif::asciidoc7compatible[] - -[ruler-blockmacro] -
    - -[pagebreak-blockmacro] -
    - -[blockdef-pass] -asciimath-style=template="asciimathblock",subs=() -latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py" - -[macros] -# math macros. -# Special characters are escaped in HTML math markup. -(?su)[\\]?(?Pasciimath):(?P\S*?)\[(?P.*?)(?asciimath)::(?P\S*?)(\[(?P.*?)\])$=#[specialcharacters] -(?su)[\\]?(?Platexmath):(?P\S*?)\[(?:\$\s*)?(?P.*?)(?:\s*\$)?(?latexmath)::(?P\S*?)(\[(?:\\\[\s*)?(?P.*?)(?:\s*\\\])?\])$=#[specialcharacters] - -[asciimath-inlinemacro] -`{passtext}` - -[asciimath-blockmacro] -
    -
    -
    {title}
    -`{passtext}` -
    - -[asciimathblock] -
    -
    -
    {title}
    -`|` -
    - -[latexmath-inlinemacro] -${passtext}$ - -[latexmath-blockmacro] -
    -
    -
    {title}
    -{backslash}[{passtext}{backslash}] -
    - -[latexmathblock] -
    -
    -
    {title}
    -\[|\] -
    - -[image-inlinemacro] - - -{data-uri%}{alt={target}} -{data-uri#}{alt={target}} -{link#} - - -[image-blockmacro] -
    - -
    {caption={figure-caption} {counter:figure-number}. }{title}
    -
    - -[unfloat-blockmacro] -
    - -[toc-blockmacro] -template::[toc] - -[indexterm-inlinemacro] -# Index term. -{empty} - -[indexterm2-inlinemacro] -# Index term. -# Single entry index term that is visible in the primary text flow. -{1} - -[footnote-inlinemacro] -# footnote:[]. -
    [{0}]
    - -[footnoteref-inlinemacro] -# footnoteref:[], create reference to footnote. -{2%}
    [{1}]
    -# footnoteref:[,], create footnote with ID. -{2#}
    [{2}]
    - -[callout-inlinemacro] -ifndef::icons[] -<{index}> -endif::icons[] -ifdef::icons[] -ifndef::data-uri[] -{index} -endif::data-uri[] -ifdef::data-uri[] -{index} -endif::data-uri[] -endif::icons[] - -# Comment line macros. -[comment-inlinemacro] -{showcomments#}
    {passtext}
    - -[comment-blockmacro] -{showcomments#}

    {passtext}

    - -[literal-inlinemacro] -# Inline literal. -{passtext} - -# List tags. -[listtags-bulleted] -list=
    {title?
    {title}
    }
      |
    -item=
  • |
  • -text=

    |

    - -[listtags-numbered] -# The start attribute is not valid XHTML 1.1 but all browsers support it. -list=
    {title?
    {title}
    }
      |
    -item=
  • |
  • -text=

    |

    - -[listtags-labeled] -list=
    {title?
    {title}
    }
    |
    -entry= -label= -term=
    |
    -item=
    |
    -text=

    |

    - -[listtags-horizontal] -list=
    {title?
    {title}
    }{labelwidth?}{itemwidth?}|
    -label=| -term=|
    -entry=| -item=| -text=

    |

    - -[listtags-qanda] -list=
    {title?
    {title}
    }
      |
    -entry=
  • |
  • -label= -term=

    |

    -item= -text=

    |

    - -[listtags-callout] -ifndef::icons[] -list=
    {title?
    {title}
    }
      |
    -item=
  • |
  • -text=

    |

    -endif::icons[] -ifdef::icons[] -list=
    {title?
    {title}
    }|
    -ifndef::data-uri[] -item={listindex}| -endif::data-uri[] -ifdef::data-uri[] -item={listindex}| -endif::data-uri[] -text=| -endif::icons[] - -[listtags-glossary] -list=
    {title?
    {title}
    }
    |
    -label= -entry= -term=
    |
    -item=
    |
    -text=

    |

    - -[listtags-bibliography] -list=
    {title?
    {title}
    }
      |
    -item=
  • |
  • -text=

    |

    - -[tags] -# Quoted text. -emphasis={1?}|{1?} -strong={1?}|{1?} -monospaced={1?}|{1?} -singlequoted={lsquo}{1?}|{1?}{rsquo} -doublequoted={ldquo}{1?}|{1?}{rdquo} -unquoted={1?}|{1?} -superscript={1?}|{1?} -subscript={1?}|{1?} - -ifdef::deprecated-quotes[] -# Override with deprecated quote attributes. -emphasis={role?}|{role?} -strong={role?}|{role?} -monospaced={role?}|
    {role?} -singlequoted={role?}{1,2,3?}{amp}#8216;|{amp}#8217;{1,2,3?}{role?} -doublequoted={role?}{1,2,3?}{amp}#8220;|{amp}#8221;{1,2,3?}{role?} -unquoted={role?}{1,2,3?}|{1,2,3?}{role?} -superscript={role?}|{role?} -subscript={role?}|{role?} -endif::deprecated-quotes[] - -# Inline macros -[http-inlinemacro] -{0={name}:{target}} -[https-inlinemacro] -{0={name}:{target}} -[ftp-inlinemacro] -{0={name}:{target}} -[file-inlinemacro] -{0={name}:{target}} -[irc-inlinemacro] -{0={name}:{target}} -[mailto-inlinemacro] -{0={target}} -[link-inlinemacro] -{0={target}} -[callto-inlinemacro] -{0={target}} -# anchor:id[text] -[anchor-inlinemacro] - -# [[id,text]] -[anchor2-inlinemacro] - -# [[[id]]] -[anchor3-inlinemacro] -[{1}] -# xref:id[text] -[xref-inlinemacro] -{0=[{target}]} -# <> -[xref2-inlinemacro] -{2=[{1}]} - -# Special word substitution. -[emphasizedwords] -{words} -[monospacedwords] -{words} -[strongwords] -{words} - -# Paragraph substitution. -[paragraph] -
    {title?
    {title}
    }

    -| -

    - -[admonitionparagraph] -template::[admonitionblock] - -# Delimited blocks. -[listingblock] -
    -
    {caption=}{title}
    -
    -
    
    -|
    -
    -
    - -[literalblock] -
    -
    {title}
    -
    -
    
    -|
    -
    -
    - -[sidebarblock] -
    -
    -
    {title}
    -| -
    - -[openblock] -
    -
    {title}
    -
    -| -
    - -[partintroblock] -template::[openblock] - -[abstractblock] -template::[quoteblock] - -[quoteblock] -
    -
    {title}
    -
    -| -
    -
    -{citetitle}{attribution?
    } -— {attribution} -
    - -[verseblock] -
    -
    {title}
    -
    -|
    -
    -
    -{citetitle}{attribution?
    } -— {attribution} -
    - -[exampleblock] -
    -
    {caption={example-caption} {counter:example-number}. }{title}
    -
    -| -
    - -[admonitionblock] -
    - - - -
    -{data-uri%}{icons#}{caption} -{data-uri#}{icons#}{caption} -{icons%}
    {caption}
    -
    -
    {title}
    -| -
    -
    - -# Tables. -[tabletags-default] -colspec= -bodyrow=| -headdata=| -bodydata=| -paragraph=

    |

    - -[tabletags-header] -paragraph=

    |

    - -[tabletags-emphasis] -paragraph=

    |

    - -[tabletags-strong] -paragraph=

    |

    - -[tabletags-monospaced] -paragraph=

    |

    - -[tabletags-verse] -bodydata=
    |
    -paragraph= - -[tabletags-literal] -bodydata=
    |
    -paragraph= - -[tabletags-asciidoc] -bodydata=
    |
    -paragraph= - -[table] -
    - - -{colspecs} -{headrows#} -{headrows} -{headrows#} -{footrows#} -{footrows} -{footrows#} - -{bodyrows} - -
    {caption={table-caption} {counter:table-number}. }{title}
    -
    - -#-------------------------------------------------------------------- -# Deprecated old table definitions. -# - -[miscellaneous] -# Screen width in pixels. -pagewidth=800 -pageunits= - -[old_tabledef-default] -template=old_table -colspec= -bodyrow=| -headdata=| -footdata=| -bodydata=| - -[old_table] -
    - - -{colspecs} -{headrows#} -{headrows} -{headrows#} -{footrows#} -{footrows} -{footrows#} - -{bodyrows} - -
    {caption={table-caption}}{title}
    -
    - -# End of deprecated old table definitions. -#-------------------------------------------------------------------- - -[floatingtitle] -{title} - -[preamble] -# Untitled elements between header and first section title. -
    -
    -| -
    -
    - -# Document sections. -[sect0] -{title} -| - -[sect1] -
    -{numbered?{sectnum} }{title} -
    -| -
    -
    - -[sect2] -
    -{numbered?{sectnum} }{title} -| -
    - -[sect3] -
    -{numbered?{sectnum} }{title} -| -
    - -[sect4] -
    -{title} -| -
    - -[appendix] -
    -{numbered?{sectnum} }{appendix-caption} {counter:appendix-number:A}: {title} -
    -| -
    -
    - -[toc] -
    -
    {toc-title}
    - -
    - -[header] - - - - - - - - -{title} -{title%}{doctitle=} -ifdef::linkcss[] - -ifdef::quirks[] - -endif::quirks[] -ifeval::["{source-highlighter}"=="pygments"] - -endif::[] - -# DEPRECATED: 'pygments' attribute. -ifdef::pygments[] - -ifdef::toc2[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -ifndef::disable-javascript[] -ifdef::linkcss[] - - - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::disable-javascript[] -ifdef::asciimath[] -ifdef::linkcss[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::asciimath[] -ifdef::latexmath[] -ifdef::linkcss[] - -endif::linkcss[] -ifndef::linkcss[] - -endif::linkcss[] -endif::latexmath[] -ifdef::mathjax[] - - -endif::mathjax[] -{docinfo1,docinfo2#}{include:{docdir}/docinfo.html} -{docinfo,docinfo2#}{include:{docdir}/{docname}-docinfo.html} -template::[docinfo] - - -# Article, book header. -ifndef::doctype-manpage[] - -endif::doctype-manpage[] -# Man page header. -ifdef::doctype-manpage[] - -endif::doctype-manpage[] -
    - -[footer] -
    -{disable-javascript%

    } - - - - -[footer-date] -# Default footer date is document modification time -ifeval::["{footer-style=default}"!="revdate"] - {docdate} {doctime} -endif::[] -# If set to "revdate", it'll be set to the revision date -ifeval::["{footer-style=default}"=="revdate"] - {revdate} -endif::[] - -ifdef::doctype-manpage[] -[synopsis] -template::[sect1] -endif::doctype-manpage[] - -ifdef::quirks[] -include::xhtml11-quirks.conf[] -endif::quirks[] diff -Nru asciidoc-8.6.10/xhtml11-quirks.conf asciidoc-10.1.2/xhtml11-quirks.conf --- asciidoc-8.6.10/xhtml11-quirks.conf 2017-10-04 20:19:21.000000000 +0000 +++ asciidoc-10.1.2/xhtml11-quirks.conf 1970-01-01 00:00:00.000000000 +0000 @@ -1,61 +0,0 @@ -# -# xhtml11-quirks.conf -# -# Workarounds for IE6's broken # and incomplete CSS2. -# - -[image-blockmacro] -
    - -
    {caption={figure-caption} {counter:figure-number}: }{title}
    -
    - -[sidebarblock] -
    -
    - -[quoteblock] -
    -
    {title}
    -
    -| -
    -
    -{citetitle}
    -— {attribution} -
    - -[verseblock] -
    -
    {title}
    -
    -|
    -
    -
    -{citetitle}
    -— {attribution} -
    - -[exampleblock] -
    -
    {caption={example-caption} {counter:example-number}: }{title}
    -
    -| -
    - -[sect2] -
    -# The
    is because the IE6 adjacent-sibling CSS selector is broken. -{numbered?{sectnum} }{title}
    -| -
    -