技术信息开发之DITA快速入门

发布时间 2023-09-07 17:36:05作者: 蹇爱黄

官网说明:https://docs.oasis-open.org/dita/v1.0/archspec/topicover.html

1.各种Topic类型

General Topic

<topic id = "topic">
<title>some little topics</title>
<body>
  <p>Here's a little topic.</p>
  <ul>
  <li>Some item</li>
  <li>Another item</li>
  </ul>
</body>
</topic>

Concept Topic

<concept id="concept">
<title>Bird Calling</title>
    <conbody>
    <p>Bird calling attracts birds.</p>
    <example>
    <p>Bird calling requires learning:</p>
    <ul>
        <li>Popular and classical bird songs</li>
        <li>How to whistle like a bird</li>
    </ul>
    </example>
    </conbody>
</concept>

Task Topic

<task id="ertx">
<title>Creating an ERTX file</title>
    <taskbody>
    <context>Each morning before breakfast you need to
    create a fresh ERTX file.</context>
    <steps>
    <step><cmd>Start ERTX.</cmd></step></steps>
    <step><cmd>Click New ERTX File.</cmd></step></steps>
    </steps>
    <result>You now have your ERTX file for today!</result>
    </taskbody>
</task>

Reference Topic

<task id="ertx">
<title>Creating an ERTX file</title>
  <taskbody>
  <context>Each morning before breakfast you need to
    create a fresh ERTX file.</context>
  <steps>
    <step><cmd>Start ERTX.</cmd></step></steps>
    <step><cmd>Click New ERTX File.</cmd></step></steps>
    </steps>
    <result>You now have your ERTX file for today!</result>
   </taskbody>
</task>

DITA MAP

<topicref href="A.dita" collection-type="sequence">
<topicref href="A1.dita"/>
<topicref href="A2.dita"/>
</topicref>
<reltable>
<relrow>
    <relcell>A.dita</relcell>
    <relcell>B.dita</relcell>
</relrow>
</reltable>

task.dita

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="replace" xml:lang="zh-cn">
<title>更换燃气灶电池</title>
<shortdesc></shortdesc>
<taskbody>
<prereq>前提条件:无比需要关闭阀门</prereq>
<steps>
  <step>
    <cmd>打开电池盒</cmd>
  </step>
  <step>
    <cmd>去除旧电池</cmd>
  </step>
  <step>
    <cmd>装上新电池</cmd>
  </step>
  <step>
    <cmd>合上电池盖</cmd>
  </step>
</steps>
</taskbody>
</task>

**concept.dita**
电火花原理 电火花由电池点火发出。

脉冲点火的工作原理:输气管→阀体通孔→气阀芯→电磁阀阀门→引射管→喷嘴(与空气一次混合)→炉头→风门→火盖(与空气二次混合),遇火后燃烧

**map.ditamap** ```xml 更换燃气灶电池 ``` DITA OT:一个开源的DITA发布工具 bin/dita --input=sourfile --format=pdf

本文内容来自:https://techcomm-book.readthedocs.io/zh_CN/latest/5-info-develop/dita.html#dita-ot