我想使用 DITA OT 3.0.3 将 Markdown 样式的 DITA 内容转换为 HTML5 样式的输出。
我检查了语法页面,我理解它是第 1 段将是 shortdesc。
“LwDITA 兼容文档 (MDITA) 的第一段被视为 shortdesc 元素。在通用 Markdown 文档中,所有段落都出现在正文元素内。”
这是我执行的命令。
dita --input=sequence.ditamap --format html5
以下是我的示例文件。
序列.ditamap:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Working in the garage</title>
<topicref href="input.md" format="markdown" />
</map>
输入.md:
# title {.task}
Some Description
1. steps1
step1 content
2. steps2
step2 content
This is step result.
它将在 out 目录上生成 index.html 和 input.html。我希望 index.html 上 input.html 的链接有悬停文本,但它没有。
我的期望是悬停文本显示“一些描述”。我是怎么了?
我还尝试过其他情况:
三#1 input.md:
Some Description(new)
# title {.task}
Some Description
它说[filter] Content is not allowed in prolog.
尝试#2 sequence.ditamap:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>Working in the garage</title>
<topicref href="input.md" format="markdown">
<topicmeta>
<shortdesc>Some Description(2nd new)</shortdesc>
</topicmeta>
</topicref>
</map>
在这种情况下,没有错误,但这些 shortdesc 描述不会出现在输出中。
这是 input.html 输出的一部分。
<head>
:
:
<meta name="DC.Type" content="task">
<meta name="DC.Format" content="HTML5">
<meta name="DC.Identifier" content="title">
<link rel="stylesheet" type="text/css" href="commonltr.css">
<title>title</title></head>
<body id="title">
:
:
<h1 class="title topictitle1" id="ariaid-title1">title </h1>
<div class="body taskbody">
<section class="section context"></section>
<ol class="ol steps">
</ol>
<section class="section result"></section></div>
:
:
</body>
那么,如何启用生成 HTML5 输出的 shortdesc 呢?还是到目前为止不可能?
参考:
- Markdown DITA 语法参考我检查了这个页面以进行语法检查。
- shortdesc我也检查了这个,并试图在 ditamap 上写“shortdesc”。
- 简短描述的目的我的预期输出类似于此页面。
- 下载 DITA-OT DITA-OT 下载链接。