doc/ja/docbook.ja.conf
changeset 1489 a64fdaf60f9d
child 5115 ea7b982b6c08
equal deleted inserted replaced
1488:08c7851969cc 1489:a64fdaf60f9d
       
     1 #
       
     2 # docbook.conf
       
     3 #
       
     4 # Asciidoc configuration file.
       
     5 # Modified docbook backend for Japanese.
       
     6 #
       
     7 
       
     8 [miscellaneous]
       
     9 outfilesuffix=.xml
       
    10 # Printable page width in pts.
       
    11 pagewidth=380
       
    12 pageunits=pt
       
    13 
       
    14 [attributes]
       
    15 basebackend=docbook
       
    16 basebackend-docbook=
       
    17 
       
    18 [replacements]
       
    19 # Line break markup is dropped (there is no DocBook line break tag).
       
    20 (?m)^(.*)\s\+$=\1
       
    21 # Superscripts.
       
    22 \^(.+?)\^=<superscript>\1</superscript>
       
    23 # Subscripts.
       
    24 ~(.+?)~=<subscript>\1</subscript>
       
    25 
       
    26 [ruler-blockmacro]
       
    27 # Only applies to HTML so don't output anything.
       
    28 
       
    29 [image-inlinemacro]
       
    30 <inlinemediaobject>
       
    31   <imageobject>
       
    32   <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
       
    33   </imageobject>
       
    34   <textobject><phrase>{1={target}}</phrase></textobject>
       
    35 </inlinemediaobject>
       
    36 
       
    37 [image-blockmacro]
       
    38 <figure{id? id="{id}"}><title>{title}</title>
       
    39 {title%}<informalfigure{id? id="{id}"}>
       
    40 <mediaobject>
       
    41   <imageobject>
       
    42   <imagedata fileref="{target}"{width? contentwidth="{width}pt"}{height? contentdepth="{height}pt"}/>
       
    43   </imageobject>
       
    44   <textobject><phrase>{1={target}}</phrase></textobject>
       
    45 </mediaobject>
       
    46 {title#}</figure>
       
    47 {title%}</informalfigure>
       
    48 
       
    49 [indexterm-inlinemacro]
       
    50 # Inline index term.
       
    51 # Generate separate index entries for primary, secondary and tertiary
       
    52 # descriptions.
       
    53 # Primary only.
       
    54 {2%}<indexterm>
       
    55 {2%}  <primary>{1}</primary>
       
    56 {2%}</indexterm>
       
    57 # Primary and secondary.
       
    58 {2#}{3%}<indexterm>
       
    59 {2#}{3%}  <primary>{1}</primary><secondary>{2}</secondary>
       
    60 {2#}{3%}</indexterm>
       
    61 {2#}{3%}<indexterm>
       
    62 {2#}{3%}  <primary>{2}</primary>
       
    63 {2#}{3%}</indexterm>
       
    64 # Primary, secondary and tertiary.
       
    65 {3#}<indexterm>
       
    66   <primary>{1}</primary><secondary>{2}</secondary><tertiary>{3}</tertiary>
       
    67 {3#}</indexterm>
       
    68 {3#}<indexterm>
       
    69   <primary>{2}</primary><secondary>{3}</secondary>
       
    70 {3#}</indexterm>
       
    71 {3#}<indexterm>
       
    72   <primary>{3}</primary>
       
    73 {3#}</indexterm>
       
    74 
       
    75 [indexterm2-inlinemacro]
       
    76 # Inline index term.
       
    77 # Single entry index term that is visible in the primary text flow.
       
    78 <indexterm>
       
    79   <primary>{1}</primary>
       
    80 </indexterm>
       
    81 {1}
       
    82 
       
    83 [footnote-inlinemacro]
       
    84 # Inline footnote.
       
    85 <footnote><simpara>{0}</simpara></footnote>
       
    86 
       
    87 [callout-inlinemacro]
       
    88 # Inline callout.
       
    89 <co id="{coid}"/>
       
    90 
       
    91 [tags]
       
    92 # Bulleted, numbered and labeled list tags.
       
    93 ilist=<itemizedlist{id? id="{id}"}>{title?<title>{title}</title>}|</itemizedlist>
       
    94 ilistitem=<listitem>|</listitem>
       
    95 ilisttext=<simpara>|</simpara>
       
    96 olist=<orderedlist{id? id="{id}"}>{title?<title>{title}</title>}|</orderedlist>
       
    97 olist2=<orderedlist{id? id="{id}"} numeration="loweralpha">|</orderedlist>
       
    98 olistitem=<listitem>|</listitem>
       
    99 olisttext=<simpara>|</simpara>
       
   100 vlist=<variablelist{id? id="{id}"}>{title?<title>{title}</title>}|</variablelist>
       
   101 vlistentry=<varlistentry>|</varlistentry>
       
   102 vlistterm=<term>|</term>
       
   103 vlisttext=<simpara>|</simpara>
       
   104 vlistitem=<listitem>|</listitem>
       
   105 # Horizontal labeled list (implemented with two column table).
       
   106 # Hardwired column widths to 30%,70% because the current crop of PDF
       
   107 # generators do not auto calculate column widths.
       
   108 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}>
       
   109 hlistentry=<row>|</row>
       
   110 hlisttext=<simpara>|</simpara>
       
   111 hlistterm=<entry><simpara>|</simpara></entry>
       
   112 hlistitem=<entry>|</entry>
       
   113 
       
   114 # Question and Answer list.
       
   115 qlist=<qandaset{id? id="{id}"}>{title?<title>{title}</title>}|</qandaset>
       
   116 qlistentry=<qandaentry>|</qandaentry>
       
   117 qlistterm=<question><simpara>|</simpara></question>
       
   118 qlistitem=<answer>|</answer>
       
   119 qlisttext=<simpara>|</simpara>
       
   120 # Bibliography list.
       
   121 blist=|
       
   122 blistitem=<bibliomixed>|</bibliomixed>
       
   123 blisttext=<bibliomisc>|</bibliomisc>
       
   124 # Glossary list.
       
   125 glist=|
       
   126 glistentry=<glossentry>|</glossentry>
       
   127 glistterm=<glossterm>|</glossterm>
       
   128 glistitem=<glossdef>|</glossdef>
       
   129 glisttext=<simpara>|</simpara>
       
   130 # Callout list.
       
   131 colist=<calloutlist{id? id="{id}"}>{title?<title>{title}</title>}|</calloutlist>
       
   132 colistitem=<callout arearefs="{coids}">|</callout>
       
   133 colisttext=<simpara>|</simpara>
       
   134 
       
   135 # Quoted text
       
   136 emphasis=<emphasis>|</emphasis>
       
   137 strong=<emphasis role="strong">|</emphasis>
       
   138 monospaced=<literal>|</literal>
       
   139 quoted={amp}#8220;|{amp}#8221;
       
   140 
       
   141 # Inline macros
       
   142 [http-inlinemacro]
       
   143 <ulink url="{name}:{target}">{0={name}:{target}}</ulink>
       
   144 [https-inlinemacro]
       
   145 <ulink url="{name}:{target}">{0={name}:{target}}</ulink>
       
   146 [ftp-inlinemacro]
       
   147 <ulink url="{name}:{target}">{0={name}:{target}}</ulink>
       
   148 [file-inlinemacro]
       
   149 <ulink url="{name}:{target}">{0={name}:{target}}</ulink>
       
   150 [mailto-inlinemacro]
       
   151 <ulink url="{name}:{target}">{0={target}}</ulink>
       
   152 #<email>{target}</email>
       
   153 [link-inlinemacro]
       
   154 <ulink url="{target}">{0={target}}</ulink>
       
   155 # anchor:id[text]
       
   156 [anchor-inlinemacro]
       
   157 <anchor id="{target}" xreflabel="{0=[{target}]}"/>
       
   158 # [[id,text]]
       
   159 [anchor2-inlinemacro]
       
   160 <anchor id="{1}" xreflabel="{2=[{1}]}"/>
       
   161 # [[[id]]]
       
   162 [anchor3-inlinemacro]
       
   163 <anchor id="{1}" xreflabel="[{1}]"/>[{1}]
       
   164 # xref:id[text]
       
   165 [xref-inlinemacro]
       
   166 <link linkend="{target}">{0}</link>
       
   167 {2%}<xref linkend="{target}"/>
       
   168 # <<id,text>>
       
   169 [xref2-inlinemacro]
       
   170 <link linkend="{1}">{2}</link>
       
   171 {2%}<xref linkend="{1}"/>
       
   172 
       
   173 
       
   174 # Special word macros
       
   175 [emphasizedwords]
       
   176 <emphasis>{words}</emphasis>
       
   177 [monospacedwords]
       
   178 <literal>{words}</literal>
       
   179 [strongwords]
       
   180 <emphasis role="strong">{words}</emphasis>
       
   181 
       
   182 # Paragraph substitution.
       
   183 [paragraph]
       
   184 <formalpara{id? id="{id}"}><title>{title}</title><para>
       
   185 {title%}<simpara{id? id="{id}"}>
       
   186 |
       
   187 {title%}</simpara>
       
   188 {title#}</para></formalpara>
       
   189 {empty}
       
   190 
       
   191 [admonitionparagraph]
       
   192 <{name}{id? id="{id}"}><simpara>|</simpara></{name}>
       
   193 
       
   194 [literalparagraph]
       
   195 # The literal block employs the same markup.
       
   196 template::[literalblock]
       
   197 
       
   198 [verseparagraph]
       
   199 template::[verseblock]
       
   200 
       
   201 # Delimited blocks.
       
   202 [literalblock]
       
   203 <example><title>{title}</title>
       
   204 <literallayout{id? id="{id}"} class="{font=monospaced}">
       
   205 |
       
   206 </literallayout>
       
   207 {title#}</example>
       
   208 
       
   209 [listingblock]
       
   210 <example><title>{title}</title>
       
   211 <screen>
       
   212 |
       
   213 </screen>
       
   214 {title#}</example>
       
   215 
       
   216 [verseblock]
       
   217 <formalpara{id? id="{id}"}><title>{title}</title><para>
       
   218 {title%}<literallayout{id? id="{id}"}>
       
   219 {title#}<literallayout>
       
   220 |
       
   221 </literallayout>
       
   222 {title#}</para></formalpara>
       
   223 
       
   224 [sidebarblock]
       
   225 <sidebar{id? id="{id}"}>
       
   226 <title>{title}</title>
       
   227 |
       
   228 </sidebar>
       
   229 
       
   230 [backendblock]
       
   231 |
       
   232 
       
   233 [quoteblock]
       
   234 # The epigraph element may be more appropriate than blockquote.
       
   235 <blockquote{id? id="{id}"}>
       
   236 <title>{title}</title>
       
   237 <attribution>
       
   238 {attribution}
       
   239 <citetitle>{citetitle}</citetitle>
       
   240 </attribution>
       
   241 |
       
   242 </blockquote>
       
   243 
       
   244 [exampleblock]
       
   245 <{title?example}{title!informalexample}{id? id="{id}"}>
       
   246 <title>{title}</title>
       
   247 |
       
   248 </{title?example}{title!informalexample}>
       
   249 
       
   250 [admonitionblock]
       
   251 <{name}{id? id="{id}"}>
       
   252 <title>{title}</title>
       
   253 |
       
   254 </{name}>
       
   255 
       
   256 # Tables.
       
   257 [tabledef-default]
       
   258 template=table		
       
   259 colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}"/>
       
   260 bodyrow=<row>|</row>
       
   261 bodydata=<entry>|</entry>
       
   262 
       
   263 [table]
       
   264 <{title?table}{title!informaltable}{id? id="{id}"} pgwide="0"
       
   265 frame="{frame=topbot}"
       
   266 {grid%rowsep="0" colsep="0"}
       
   267 {eval:\{"none":"rowsep=\"0\" colsep=\"0\"", "cols":"rowsep=\"0\" colsep=\"1\"", "all":"rowsep=\"1\" colsep=\"1\"", "rows":"rowsep=\"1\" colsep=\"0\"" \}["{grid}"]}
       
   268 >
       
   269 <title>{title}</title>
       
   270 <tgroup cols="{cols}">
       
   271 {colspecs}
       
   272 {headrows#}<thead>
       
   273 {headrows}
       
   274 {headrows#}</thead>
       
   275 {footrows#}<tfoot>
       
   276 {footrows}
       
   277 {footrows#}</tfoot>
       
   278 <tbody>
       
   279 {bodyrows}
       
   280 </tbody>
       
   281 </tgroup>
       
   282 </{title?table}{title!informaltable}>
       
   283 
       
   284 [specialsections]
       
   285 ifdef::doctype-article[]
       
   286 ^Abstract$=sect-abstract
       
   287 endif::doctype-article[]
       
   288 
       
   289 ifdef::doctype-book[]
       
   290 ^Colophon$=sect-colophon
       
   291 ^Dedication$=sect-dedication
       
   292 ^Preface$=sect-preface
       
   293 endif::doctype-book[]
       
   294 
       
   295 ^Index$=sect-index
       
   296 ^(Bibliography|References)$=sect-bibliography
       
   297 ^Glossary$=sect-glossary
       
   298 ^Appendix [A-Z][:.](?P<title>.*)$=sect-appendix
       
   299 
       
   300 # Special sections.
       
   301 [sect-preface]
       
   302 <preface{id? id="{id}"}>
       
   303 <title>{title}</title>
       
   304 |
       
   305 </preface>
       
   306 
       
   307 [sect-index]
       
   308 <index{id? id="{id}"}>
       
   309 <title>{title}</title>
       
   310 |
       
   311 </index>
       
   312 
       
   313 [sect-bibliography]
       
   314 <bibliography{id? id="{id}"}>
       
   315 <title>{title}</title>
       
   316 |
       
   317 </bibliography>
       
   318 
       
   319 [sect-glossary]
       
   320 <glossary{id? id="{id}"}>
       
   321 <title>{title}</title>
       
   322 |
       
   323 </glossary>
       
   324 
       
   325 [sect-appendix]
       
   326 <appendix{id? id="{id}"}>
       
   327 <title>{title}</title>
       
   328 |
       
   329 </appendix>
       
   330 
       
   331 
       
   332 [header-declarations]
       
   333 <?xml version="1.0" encoding="{encoding}"?>
       
   334 <!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">
       
   335 
       
   336 #-------------------------
       
   337 # article document type
       
   338 #-------------------------
       
   339 ifdef::doctype-article[]
       
   340 
       
   341 [header]
       
   342 template::[header-declarations]
       
   343 
       
   344 <article lang="ja">
       
   345 {doctitle#}<articleinfo>
       
   346     <title>{doctitle}</title>
       
   347     <date>{date}</date>
       
   348     {authored#}<author>
       
   349         <firstname>{firstname}</firstname>
       
   350         <othername>{middlename}</othername>
       
   351         <surname>{lastname}</surname>
       
   352         <affiliation><address><email>{email}</email></address></affiliation>
       
   353     {authored#}</author>
       
   354 
       
   355 # If file named like source document with -revhistory.xml suffix exists
       
   356 # include it as the document history, otherwise use current revision.
       
   357 {revisionhistory#}{include:{docdir}/{docname}-revhistory.xml}
       
   358 {revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
       
   359 
       
   360     <corpname>{companyname}</corpname>
       
   361 {doctitle#}</articleinfo>
       
   362 
       
   363 [footer]
       
   364 </article>
       
   365 
       
   366 [preamble]
       
   367 # Untitled elements between header and first section title.
       
   368 |
       
   369 
       
   370 [sect-abstract]
       
   371 <abstract{id? id="{id}"}>
       
   372 |
       
   373 </abstract>
       
   374 
       
   375 [sect1]
       
   376 <section{id? id="{id}"}>
       
   377 <title>{title}</title>
       
   378 |
       
   379 </section>
       
   380 
       
   381 [sect2]
       
   382 <section{id? id="{id}"}>
       
   383 <title>{title}</title>
       
   384 |
       
   385 </section>
       
   386 
       
   387 [sect3]
       
   388 <section{id? id="{id}"}>
       
   389 <title>{title}</title>
       
   390 |
       
   391 </section>
       
   392 
       
   393 [sect4]
       
   394 <section{id? id="{id}"}>
       
   395 <title>{title}</title>
       
   396 |
       
   397 </section>
       
   398 
       
   399 endif::doctype-article[]
       
   400 
       
   401 #-------------------------
       
   402 # manpage document type
       
   403 #-------------------------
       
   404 ifdef::doctype-manpage[]
       
   405 
       
   406 [replacements]
       
   407 # The roff format does not substitute special characters so just print them as
       
   408 # text.
       
   409 \(C\)=(C)
       
   410 \(TM\)=(TM)
       
   411 
       
   412 [header]
       
   413 template::[header-declarations]
       
   414 <refentry>
       
   415 <refmeta>
       
   416 <refentrytitle>{mantitle}</refentrytitle>
       
   417 <manvolnum>{manvolnum}</manvolnum>
       
   418 </refmeta>
       
   419 <refnamediv>
       
   420     <refname>{manname}</refname>
       
   421     <refpurpose>{manpurpose}</refpurpose>
       
   422 </refnamediv>
       
   423 
       
   424 [footer]
       
   425 </refentry>
       
   426 
       
   427 # Section macros
       
   428 [sect-synopsis]
       
   429 <refsynopsisdiv{id? id="{id}"}>
       
   430 |
       
   431 </refsynopsisdiv>
       
   432 
       
   433 [sect1]
       
   434 <refsect1{id? id="{id}"}>
       
   435 <title>{title}</title>
       
   436 |
       
   437 </refsect1>
       
   438 
       
   439 [sect2]
       
   440 <refsect2{id? id="{id}"}>
       
   441 <title>{title}</title>
       
   442 |
       
   443 </refsect2>
       
   444 
       
   445 [sect3]
       
   446 <refsect3{id? id="{id}"}>
       
   447 <title>{title}</title>
       
   448 |
       
   449 </refsect3>
       
   450 
       
   451 endif::doctype-manpage[]
       
   452 
       
   453 #-------------------------
       
   454 # book document type
       
   455 #-------------------------
       
   456 ifdef::doctype-book[]
       
   457 
       
   458 [header]
       
   459 template::[header-declarations]
       
   460 
       
   461 <book lang="ja">
       
   462 {doctitle#}<bookinfo>
       
   463     <title>{doctitle}</title>
       
   464     <date>{date}</date>
       
   465     {authored#}<author>
       
   466         <firstname>{firstname}</firstname>
       
   467         <othername>{middlename}</othername>
       
   468         <surname>{lastname}</surname>
       
   469         <affiliation><address><email>{email}</email></address></affiliation>
       
   470     {authored#}</author>
       
   471 
       
   472 # If file named like source document with -revhistory.xml suffix exists
       
   473 # include it as the document history, otherwise use current revision.
       
   474 {revisionhistory#}{include:{docdir}/{docname}-revhistory.xml}
       
   475 {revisionhistory%}<revhistory><revision><revnumber>{revision}</revnumber><date>{date}</date>{revremark?<revremark>{revremark}</revremark>}</revision></revhistory>
       
   476 
       
   477     <corpname>{companyname}</corpname>
       
   478 {doctitle#}</bookinfo>
       
   479 
       
   480 [footer]
       
   481 </book>
       
   482 
       
   483 [preamble]
       
   484 # Preamble is not allowed in DocBook book so wrap it in a preface. 
       
   485 <preface{id? id="{id}"}>
       
   486 <title>Preface</title>
       
   487 |
       
   488 </preface>
       
   489 
       
   490 [sect-dedication]
       
   491 <dedication{id? id="{id}"}>
       
   492 |
       
   493 </dedication>
       
   494 
       
   495 [sect-colophon]
       
   496 <colophon{id? id="{id}"}>
       
   497 |
       
   498 </colophon>
       
   499 
       
   500 [sect0]
       
   501 <part{id? id="{id}"}>
       
   502 <title>{title}</title>
       
   503 |
       
   504 </part>
       
   505 
       
   506 [sect1]
       
   507 <chapter{id? id="{id}"}>
       
   508 <title>{title}</title>
       
   509 |
       
   510 </chapter>
       
   511 
       
   512 [sect2]
       
   513 <section{id? id="{id}"}>
       
   514 <title>{title}</title>
       
   515 |
       
   516 </section>
       
   517 
       
   518 [sect3]
       
   519 <section{id? id="{id}"}>
       
   520 <title>{title}</title>
       
   521 |
       
   522 </section>
       
   523 
       
   524 [sect4]
       
   525 <section{id? id="{id}"}>
       
   526 <title>{title}</title>
       
   527 |
       
   528 </section>
       
   529 
       
   530 endif::doctype-book[]
       
   531 
       
   532 ifdef::sgml[]
       
   533 #
       
   534 # Optional DocBook SGML.
       
   535 #
       
   536 # Most of the differences between DocBook XML and DocBook SGML boils
       
   537 # down to the empty element syntax: SGML does not like the XML empty
       
   538 # element <.../> syntax, use <...> instead.
       
   539 #
       
   540 [miscellaneous]
       
   541 outfilesuffix=.sgml
       
   542 
       
   543 [header-declarations]
       
   544 <!DOCTYPE {eval:\{"article":"article", "book":"book", "manpage":"refentry"\}["{doctype}"]} PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
       
   545 
       
   546 [tabledef-default]
       
   547 colspec=<colspec colwidth="{colwidth}{pageunits}" align="{colalign}">
       
   548 
       
   549 [image-inlinemacro]
       
   550 <inlinemediaobject>
       
   551   <imageobject>
       
   552   <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
       
   553   </imageobject>
       
   554   <textobject><phrase>{1={target}}</phrase></textobject>
       
   555 </inlinemediaobject>
       
   556 
       
   557 [image-blockmacro]
       
   558 <figure><title>{title}</title>
       
   559 {title%}<informalfigure>
       
   560 <mediaobject>
       
   561   <imageobject>
       
   562   <imagedata fileref="{target}"{width? width="{width}pt"}{height? depth="{height}pt"}>
       
   563   </imageobject>
       
   564   <textobject><phrase>{1={target}}</phrase></textobject>
       
   565 </mediaobject>
       
   566 {title#}</figure>
       
   567 {title%}</informalfigure>
       
   568 
       
   569 # Inline macros
       
   570 [xref-inlinemacro]
       
   571 <link linkend="{target}">{0}</link>
       
   572 {2%}<xref linkend="{target}">
       
   573 [xref2-inlinemacro]
       
   574 # <<id,text>>
       
   575 <link linkend="{1}">{2}</link>
       
   576 {2%}<xref linkend="{1}">
       
   577 [anchor-inlinemacro]
       
   578 <anchor id="{target}" xreflabel="{0=[{target}]}">
       
   579 [anchor2-inlinemacro]
       
   580 # [[id,text]]
       
   581 <anchor id="{1}" xreflabel="{2=[{1}]}">
       
   582 
       
   583 endif::sgml[]