markdown-input.dita 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <topic id="markdown-input">
  5. <title>Markdown content</title>
  6. <shortdesc>
  7. <xref keyref="markdown"/> is a lightweight markup language that allows you to write using an easy-to-read plain text
  8. format and convert to structurally valid markup as necessary.</shortdesc>
  9. <prolog>
  10. <metadata>
  11. <keywords>
  12. <indexterm><xmlatt>format</xmlatt></indexterm>
  13. <indexterm>authoring formats<indexterm>Markdown</indexterm></indexterm>
  14. <indexterm>Markdown</indexterm>
  15. <indexterm>CommonMark</indexterm>
  16. </keywords>
  17. </metadata>
  18. </prolog>
  19. <body>
  20. <p>In the words of its creators:</p>
  21. <lq>“The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is
  22. that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been
  23. marked up with tags or formatting instructions.”</lq>
  24. <p>DITA Open Toolkit now allows you to use Markdown files directly in topic references and export DITA content as
  25. Markdown.</p>
  26. <p>These features enable lightweight authoring scenarios that allow subject matter experts to contribute to DITA
  27. publications without writing in XML, and support publishing workflows that include DITA content in Markdown-based
  28. publishing systems.</p>
  29. <section>
  30. <title>Adding Markdown topics</title>
  31. <p>To add a Markdown topic to a DITA publication, create a topic reference in your map and set the
  32. <xmlatt>format</xmlatt> attribute to <codeph>markdown</codeph> so the toolkit will recognize the source file
  33. as Markdown and convert it to DITA:</p>
  34. <p><codeblock outputclass="language-xml normalize-space show-line-numbers show-whitespace">&lt;?xml version="1.0" encoding="utf-8"?>
  35. &lt;!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
  36. &lt;map>
  37. &lt;topicref href="markdown-dita-topic.md" <b>format="markdown"</b>/>
  38. &lt;/map></codeblock></p>
  39. <p>The <codeph>markdown</codeph> format uses a relatively lenient document parsing approach to support a wide
  40. range of content and Markdown syntax constructs. </p>
  41. <note>The Markdown support is based on
  42. <xref keyref="commonmark"/>, a strongly defined, highly compatible specification of Markdown.</note>
  43. </section>
  44. </body>
  45. </topic>