ref: 88ccea37f65b87312292b2b1a107c39927c6a2c3
dir: /sys/src/cmd/hg/doc/ja/docbook.ja.conf/
# # docbook.conf # # Asciidoc configuration file. # Modified docbook backend for Japanese. # [miscellaneous] outfilesuffix=.xml # Printable page width in pts. pagewidth=380 pageunits=pt [attributes] basebackend=docbook basebackend-docbook= [replacements] # Line break markup is dropped (there is no DocBook line break tag). (?m)^(.*)\s\+$=\1 # Superscripts. \^(.+?)\^=<superscript>\1</superscript> # Subscripts. ~(.+?)~=<subscript>\1</subscript> [ruler-blockmacro] # Only applies to HTML so don't output anything. [image-inlinemacro] <inlinemediaobject> <imageobject> <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/> </imageobject> <textobject><phrase>{1={target}}</phrase></textobject> </inlinemediaobject> [image-blockmacro] <figure{id? id="{id}"}><title>{title}</title> {title%}<informalfigure{id? id="{id}"}> <mediaobject> <imageobject> <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/> </imageobject> <textobject><phrase>{1={target}}</phrase></textobject> </mediaobject> {title#}</figure> {title%}</informalfigure> [indexterm-inlinemacro] # Inline index term. # Generate separate index entries for primary, secondary and tertiary # descriptions. # Primary only. {2%}<indexterm> {2%} <primary>{1}</primary> {2%}</indexterm> # Primary and secondary. {2#}{3%}<indexterm> {2#}{3%} <primary>{1}</primary><secondary>{2}</secondary> {2#}{3%}</indexterm> {2#}{3%}<indexterm> {2#}{3%} <primary>{2}</primary> {2#}{3%}</indexterm> # Primary, secondary and tertiary. {3#}<indexterm> <primary>{1}</primary><secondary>{2}</secondary><tertiary>{3}</tertiary> {3#}</indexterm> {3#}<indexterm> <primary>{2}</primary><secondary>{3}</secondary> {3#}</indexterm> {3#}<indexterm> <primary>{3}</primary> {3#}</indexterm> [indexterm2-inlinemacro] # Inline index term. # Single entry index term that is visible in the primary text flow. <indexterm> <primary>{1}</primary> </indexterm> {1} [footnote-inlinemacro] # Inline footnote. <footnote><simpara>{0}</simpara></footnote> [callout-inlinemacro] # Inline callout. <co id="{coid}"/> [tags] # Bulleted, numbered and labeled list tags. ilist=<itemizedlist{id? id="{id}"}>{title?<title>{title}</title>}|</itemizedlist> ilistitem=<listitem>|</listitem> ilisttext=<simpara>|</simpara> olist=<orderedlist{id? id="{id}"}>{title?<title>{title}</title>}|</orderedlist> olist2=<orderedlist{id? id="{id}"} numeration="loweralpha">|</orderedlist> olistitem=<listitem>|</listitem> olisttext=<simpara>|</simpara> vlist=<variablelist{id? id="{id}"}>{title?<title>{title}</title>}|</variablelist> vlistentry=<varlistentry>|</varlistentry> vlistterm=<term>|</term> vlisttext=<simpara>|</simpara> vlistitem=<listitem>|</listitem> # 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. hlist=<{title?table}{title!informaltable}{id? id="{id}"} tabstyle="{style=hlabeledlist}" pgwide="0" frame="none" colsep="0" rowsep="0">{title?<title>{title}</title>}<tgroup cols="2"><colspec colwidth="{1=3}*"/><colspec colwidth="{2=7}*"/><tbody valign="top">|</tbody></tgroup><{title?/table}{title!/informaltable}> hlistentry=<row>|</row> hlisttext=<simpara>|</simpara> hlistterm=<entry><simpara>|</simpara></entry> hlistitem=<entry>|</entry> # Question and Answer list. qlist=<qandaset{id? id="{id}"}>{title?<title>{title}</title>}|</qandaset> qlistentry=<qandaentry>|</qandaentry> qlistterm=<question><simpara>|</simpara></question> qlistitem=<answer>|</answer> qlisttext=<simpara>|</simpara> # Bibliography list. blist=| blistitem=<bibliomixed>|</bibliomixed> blisttext=<bibliomisc>|</bibliomisc> # Glossary list. glist=| glistentry=<glossentry>|</glossentry> glistterm=<glossterm>|</glossterm> glistitem=<glossdef>|</glossdef> glisttext=<simpara>|</simpara> # Callout list. colist=<calloutlist{id? id="{id}"}>{title?<title>{title}</title>}|</calloutlist> colistitem=<callout arearefs="{coids}">|</callout> colisttext=<simpara>|</simpara> # Quoted text emphasis=<emphasis>|</emphasis> strong=<emphasis role="strong">|</emphasis> monospaced=<literal>|</literal> quoted={amp}#8220;|{amp}#8221; # Inline macros [http-inlinemacro] <ulink url="{name}:{target}">{0={name}:{target}}</ulink> [https-inlinemacro] <ulink url="{name}:{target}">{0={name}:{target}}</ulink> [ftp-inlinemacro] <ulink url="{name}:{target}">{0={name}:{target}}</ulink> [file-inlinemacro] <ulink url="{name}:{target}">{0={name}:{target}}</ulink> [mailto-inlinemacro] <ulink url="{name}:{target}">{0={target}}</ulink> #<email>{target}</email> [link-inlinemacro] <ulink url="{target}">{0={target}}</ulink> # anchor:id[text] [anchor-inlinemacro] <anchor id="{target}" xreflabel="{0=[{target}]}"/> # [[id,text]] [anchor2-inlinemacro] <anchor id="{1}" xreflabel="{2=[{1}]}"/> # [[[id]]] [anchor3-inlinemacro] <anchor id="{1}" xreflabel="[{1}]"/>[{1}] # xref:id[text] [xref-inlinemacro] <link linkend="{target}">{0}</link> {2%}<xref linkend="{target}"/> # <<id,text>> [xref2-inlinemacro] <link linkend="{1}">{2}</link> {2%}<xref linkend="{1}"/> # Special word macros [emphasizedwords] <emphasis>{words}</emphasis> [monospacedwords] <literal>{words}</literal> [strongwords] <emphasis role="strong">{words}</emphasis> # Paragraph substitution. [paragraph] <formalpara{id? id="{id}"}><title>{title}</title><para> {title%}<simpara{id? id="{id}"}> | {title%}</simpara> {title#}</para></formalpara> {empty} [admonitionparagraph] <{name}{id? id="{id}"}><simpara>|</simpara></{name}> [literalparagraph] # The literal block employs the same markup. template::[literalblock] [verseparagraph] template::[verseblock] # Delimited blocks. [literalblock] <example><title>{title}</title> <literallayout{id? id="{id}"} class="{font=monospaced}"> | </literallayout> {title#}</example> [listingblock] <example><title>{title}</title> <screen> | </screen> {title#}</example> [verseblock] <formalpara{id? id="{id}"}><title>{title}</title><para> {title%}<literallayout{id? id="{id}"}> {title#}<literallayout> | </literallayout> {title#}</para></formalpara> [sidebarblock] <sidebar{id? id="{id}"}> <title>{title}</title> | </sidebar> [backendblock] | [quoteblock] # The epigraph element may be more appropriate than blockquote. <blockquote{id? id="{id}"}> <title>{title}</title> <attribution> {attribution} <citetitle>{citetitle}</citetitle> </attribution> | </blockquote> [exampleblock] <{title?example}{title!informalexample}{id? id="{id}"}> <title>{title}</title> | </{title?example}{title!informalexample}> [admonitionblock] <{name}{id? id="{id}"}> <title>{title}</title> | </{name}> # Tables. [tabledef-default] template=table colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}"/> bodyrow=<row>|</row> bodydata=<entry>|</entry> [table] <{title?table}{title!informaltable}{id? id="{id}"} pgwide="0" frame="{frame=topbot}" {grid%rowsep="0" colsep="0"} {eval:\{"none":"rowsep=\"0\" colsep=\"0\"", "cols":"rowsep=\"0\" colsep=\"1\"", "all":"rowsep=\"1\" colsep=\"1\"", "rows":"rowsep=\"1\" colsep=\"0\"" \}["{grid}"]} > <title>{title}</title> <tgroup cols="{cols}"> {colspecs} {headrows#}<thead> {headrows} {headrows#}</thead> {footrows#}<tfoot> {footrows} {footrows#}</tfoot> <tbody> {bodyrows} </tbody> </tgroup> </{title?table}{title!informaltable}> [specialsections] ifdef::doctype-article[] ^Abstract$=sect-abstract endif::doctype-article[] ifdef::doctype-book[] ^Colophon$=sect-colophon ^Dedication$=sect-dedication ^Preface$=sect-preface endif::doctype-book[] ^Index$=sect-index ^(Bibliography|References)$=sect-bibliography ^Glossary$=sect-glossary ^Appendix [A-Z][:.](?P<title>.*)$=sect-appendix # Special sections. [sect-preface] <preface{id? id="{id}"}> <title>{title}</title> | </preface> [sect-index] <index{id? id="{id}"}> <title>{title}</title> | </index> [sect-bibliography] <bibliography{id? id="{id}"}> <title>{title}</title> | </bibliography> [sect-glossary] <glossary{id? id="{id}"}> <title>{title}</title> | </glossary> [sect-appendix] <appendix{id? id="{id}"}> <title>{title}</title> | </appendix> [header-declarations] <?xml version="1.0" encoding="{encoding}"?> <!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> #------------------------- # article document type #------------------------- ifdef::doctype-article[] [header] template::[header-declarations] <article lang="ja"> {doctitle#}<articleinfo> <title>{doctitle}</title> <date>{date}</date> {authored#}<author> <firstname>{firstname}</firstname> <othername>{middlename}</othername> <surname>{lastname}</surname> <affiliation><address><email>{email}</email></address></affiliation> {authored#}</author> # If file named like source document with -revhistory.xml suffix exists # include it as the document history, otherwise use current revision. {revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} {revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory> <corpname>{companyname}</corpname> {doctitle#}</articleinfo> [footer] </article> [preamble] # Untitled elements between header and first section title. | [sect-abstract] <abstract{id? id="{id}"}> | </abstract> [sect1] <section{id? id="{id}"}> <title>{title}</title> | </section> [sect2] <section{id? id="{id}"}> <title>{title}</title> | </section> [sect3] <section{id? id="{id}"}> <title>{title}</title> | </section> [sect4] <section{id? id="{id}"}> <title>{title}</title> | </section> 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] <refentry> <refmeta> <refentrytitle>{mantitle}</refentrytitle> <manvolnum>{manvolnum}</manvolnum> </refmeta> <refnamediv> <refname>{manname}</refname> <refpurpose>{manpurpose}</refpurpose> </refnamediv> [footer] </refentry> # Section macros [sect-synopsis] <refsynopsisdiv{id? id="{id}"}> | </refsynopsisdiv> [sect1] <refsect1{id? id="{id}"}> <title>{title}</title> | </refsect1> [sect2] <refsect2{id? id="{id}"}> <title>{title}</title> | </refsect2> [sect3] <refsect3{id? id="{id}"}> <title>{title}</title> | </refsect3> endif::doctype-manpage[] #------------------------- # book document type #------------------------- ifdef::doctype-book[] [header] template::[header-declarations] <book lang="ja"> {doctitle#}<bookinfo> <title>{doctitle}</title> <date>{date}</date> {authored#}<author> <firstname>{firstname}</firstname> <othername>{middlename}</othername> <surname>{lastname}</surname> <affiliation><address><email>{email}</email></address></affiliation> {authored#}</author> # If file named like source document with -revhistory.xml suffix exists # include it as the document history, otherwise use current revision. {revisionhistory#}{include:{docdir}/{docname}-revhistory.xml} {revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory> <corpname>{companyname}</corpname> {doctitle#}</bookinfo> [footer] </book> [preamble] # Preamble is not allowed in DocBook book so wrap it in a preface. <preface{id? id="{id}"}> <title>Preface</title> | </preface> [sect-dedication] <dedication{id? id="{id}"}> | </dedication> [sect-colophon] <colophon{id? id="{id}"}> | </colophon> [sect0] <part{id? id="{id}"}> <title>{title}</title> | </part> [sect1] <chapter{id? id="{id}"}> <title>{title}</title> | </chapter> [sect2] <section{id? id="{id}"}> <title>{title}</title> | </section> [sect3] <section{id? id="{id}"}> <title>{title}</title> | </section> [sect4] <section{id? id="{id}"}> <title>{title}</title> | </section> 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] <!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook V4.1//EN"> [tabledef-default] colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}"> [image-inlinemacro] <inlinemediaobject> <imageobject> <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}> </imageobject> <textobject><phrase>{1={target}}</phrase></textobject> </inlinemediaobject> [image-blockmacro] <figure><title>{title}</title> {title%}<informalfigure> <mediaobject> <imageobject> <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}> </imageobject> <textobject><phrase>{1={target}}</phrase></textobject> </mediaobject> {title#}</figure> {title%}</informalfigure> # Inline macros [xref-inlinemacro] <link linkend="{target}">{0}</link> {2%}<xref linkend="{target}"> [xref2-inlinemacro] # <<id,text>> <link linkend="{1}">{2}</link> {2%}<xref linkend="{1}"> [anchor-inlinemacro] <anchor id="{target}" xreflabel="{0=[{target}]}"> [anchor2-inlinemacro] # [[id,text]] <anchor id="{1}" xreflabel="{2=[{1}]}"> endif::sgml[]