我想用DITA 3.0.3将我的标记样式的DITA内容转换为HTML5样式的输出。
我检查了语法页,我理解它,因为第1段将是短的。
"LwDITA兼容文档(MDITA)第一段被视为一个短代码元素。在通用Markdown文档中,所有段落都出现在主体元素中。“
这是我执行的命令。
dita --input=sequence.ditamap --format html5下面是我的样本文件。
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" />
</map>input.md:
# title {.task}
Some Description
1. steps1
step1 content
2. steps2
step2 content
This is step result.它将在out目录上生成index.html和input.html。我希望到input.html on index.html的链接有悬停文本,但它没有。
我的期望是悬停文本显示“一些描述”。我做错什么事了?
我还审理了其他案件:
Tri #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>在这种情况下,没有出现错误,但是这些短路描述不会出现在输出上。
以下是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输出生成短程序呢?还是到目前为止还不可能?
参考文献:
发布于 2018-05-03 12:07:03
引用DITA地图中的标记文件,如下所示:
<topicref href="input.md" format="mdita" />似乎使这种改进成为可能,因为它把每一段都看作是一个短处。但是,Markdown文件有一个属性,它将其标识为DITA任务:
# title {.task}而且这不再适用于"mdita“格式,这可能是因为LightWeight DITA标准没有提供一种可能性来声明某个Markdown文件应该转换为DITA任务。我将尝试与雅诺·埃洛韦塔取得联系,他创造了Markdown to DITA转换器,看看他对此有什么看法。
https://stackoverflow.com/questions/50113148
复制相似问题