Javadoc Markdown

Posted on  by admin

DocFX supports DocFX Flavored Markdown, aka DFM. It supports all GitHub Flavored Markdown syntax and compatible with CommonMark. Also, DFM adds new syntax to support additional functionalities, including cross reference and file inclusion.

Certain characters can be escaped with a preceding backslash to preserve the literal display of a character instead of its special Markdown meaning.

  • One good justification for using a rich editor for editing Markdown or a Weblog entry is that you can provide some additional features above and beyond what a simple text or code editor can provide.
  • Other languages: MkDocs: A static site generator to help build project documentation using the Markdown language: pycco: A “. Javadoc is a tool which.
  • Eclipse에서 Javadoc 주석을 생성하는 방법이 있습니까?
  • Just as in Javadoc, KDoc comments begin with /. and use tags starting with @ to document specific parts of a. Is Markdown (

The default markdown engine generated by docfx init has been switched to markdig engine, which is built on the top of markdig. Previous markdown engine dfm and dfm-latest will be kept for compatibiilty.

Yaml Header

Yaml header in DFM is considered as the metadata for the Markdown file. It will transform to yamlheader tag when processed.Yaml header MUST be the first thing in the file and MUST take the form of valid YAML set between triple-dashed lines. Here is a basic example:

Cross Reference

Cross reference allows you to link to another topic by using its unique identifier (called UID) instead of using its file path.

For conceptual Markdown files UID can be defined by adding a uid metadata in YAML header:

For reference topics, UIDs are auto generated from source code and can be found in generated YAML files.

You can use one of the following syntax to cross reference a topic with UID defined:

  1. Markdown link: [link_text](xref:uid_of_the_topic)
  2. Auto link: <xref:uid_of_the_topic>
  3. Shorthand form: @'uid_of_the_topic'

All will render to:

If link_text is not specified, DocFX will extract the title from the target topic and use it as the link text.

Do not use the @uid link in brackets (like this: (@uid)). DocFX cannot parse this link. The @uid link should be separated with white spaces. If you need to add a link in brackets, use [](xref:uid).


Hashtag in xref is always treated as separator between file name and anchor name. That means if you have # in UID, it hasto be encoded to %23.

Actually xref format follows URI standard so all reserved characters should be encoded.

For more information, see cross reference.

File Inclusion

DFM adds syntax to include other file parts into current file, the included file will also be considered as in DFM syntax.

There are two types of file inclusion: Inline and block, as similar to inline code span and block code.


YAML header is NOT supported when the file is an inclusion.


Inline file inclusion is in the following syntax, in which <title> stands for the title of the included file, and <filepath> stands for the file path of the included file. The file path can be either absolute or relative.<filepath> can be wrapped by ' or '.


For inline file inclusion, the file included will be considered as containing only inline tags, for example,### header inside the file will not transfer since <h3> is a block tag, while [a](b) will transform to<a href='b'>a</a> since <a> is an inline tag.Also, ending white spaces will be trimmed, considering ending white spaces in inline inclusion in most cases are typos.


Block file inclusion must be in a single line and with no prefix characters before the start [. Content inside the included file will transform using DFM syntax.

Section definition

User may need to define section. Mostly used for code table.Give an example below.

The above blockquote Markdown text will transform to section html as in the following:

Code Snippet

Allows you to insert code with code language specified. The content of specified code path will expand.

  • <language> can be made up of any number of character and '-'. However, the recommended value should follow Highlight.js language names and aliases.
  • <codepath> is the path relative to the file containing this markdown content in file system, which indicates the code snippet file that you want to expand.
  • <queryoption> and <queryoptionvalue> are used together to retrieve part of the code snippet file in the line range or tag name way. We have 2 query string options to represent these two ways:
query string using #query string using ?
1. line range#L{startlinenumber}-L{endlinenumber}?start={startlinenumber}&end={endlinenumber}
2. tagname#{tagname}?name={tagname}
3. multiple region rangeUnsupported?range={rangequerystring}
4. highlight linesUnsupported?highlight={rangequerystring}
5. dedentUnsupported?dedent={dedentlength}
  • In ? query string, the whole file will be included if none of the first three option is specified.
  • If dedent isn't specified, the maximum common indent will be trimmed automatically.
  • <title> can be omitted as it doesn't affect the DocFX markup result, but it can beautify the result of other Markdown engine, like GitHub Preview.

Code Snippet Sample

Tag Name Representation in Code Snippet Source File

DFM currently supports the following <language> values to be able to retrieve by tag name:

  • C family
    • Start with: // <{name}>
    • End with: // </{name}>
    • Languages:actionscript,arduino,assembly (alias: nasm),c (alias: cpp, c++, objective-c, obj-c, objc, objectivec),csharp (alias: cs),cshtml,cuda,d (alias: dlang),fsharp (alias: fs),go (alias: golang),java,javascript (alias: js, node),pascal,php,processing,rust,scala,smalltalk,swift,typescript (alias: ts)
    • File,.asm,.ino,.c,.cc,.cpp,.cs,,.cuh,.d,.fs,.fsi,.fsx,.go,.h,.hpp,.java,.js,.pas,.php,.pde,.rs,.scala,.st,.swift,.ts
  • Basic family
    • Start with: ' <{name}>
    • End with: ' </{name}>
    • Languages:vb,vbhtml,vbnet,vbscript
    • File extensions:.bas,.vb,.vba,.vbhtml,.vbs
  • Markup language family
    • Start with: <!-- <{name}> -->
    • End with: <!-- </{name}> -->
    • Languages:cshtml,html,vbhtml,wsdl,xml,xsl,xslt,xsd,xaml
    • File extensions:.asp,.aspx,.csdl,.cshtml,.edmx,.jsp,.vbhtml,.wsdl,.xaml,.xml,.xsd,.xsl,.xslt,.html
  • Sql family
    • Start with: -- <{name}>
    • End with: -- </{name}>
    • Languages:sql
    • File extensions:.sql
  • Script family
    • Start with: # <{name}>
    • End with: # </{name}>
    • Languages:perl,powershell (alias: posh),python,r,ruby (alias: ru),shell (alias: sh, bash)
    • File extensions:.bash,.pl,.ps1,.py,.r,.ru,.ruby,.sh
  • Special language
    • batchfile
      • Start with: rem <{name}>
      • End with: rem </{name}>
      • Languages:batchfile
      • File extensions:.bat.cmd
    • csharp
      • Start with: #region {name}
      • End with: #endregion
      • Languages:csharp (alias: cs)
      • File extensions:.cs.cshtml
    • erlang
      • Start with: % <{name}>
      • End with: % </{name}>
      • Languages:erlang
      • File extensions:.erl
    • haskell
      • Start with: -- <{name}>
      • End with: -- </{name}>
      • Languages:haskell
      • File extensions:.hs
    • matlab
      • Start with: % <{name}>
      • End with: % </{name}>
      • Languages:matlab
      • File extensions:.matlab
    • lisp
      • Start with: ; <{name}>
      • End with: ; </{name}>
      • Languages:lisp
      • File extensions:.lisp,.lsp
    • lua
      • Start with: -- <{name}>
      • End with: -- </{name}>
      • Languages:lua
      • File extensions:.lua
    • vb
      • Start with: #Region {name}
      • End with: #End Region
      • Languages:vb (alias: vbnet)
      • File extensions:.vb.vbhtml

If dev-lang is not specified, file extension will be used to determine the language.

Code Snippet for Jupyter Notebooks

Allows you to insert code from a code cell of a Jupyter Notebook. The source content in the specified code cell will expand.

Steps to use this:

  1. In your Jupyter Notebook, add metadata to the code cell you will reference:

  2. In your .md file, use name to identify the cell.

Code Snippet for Jupyter Notebooks Sample

For this Jupyter Notebook cell:

Use the markup:

to display the lines of code in the source part of the cell:

Note (Warning/Tip/Important)

Using specific syntax inside block quote to indicate the following content is Note.

The above content will be transformed to the following html:

Here are all the supported note types with the styling of the default theme applied:


This is a note which needs your attention, but it's not super important.


This is a note which needs your attention, but it's not super important.


This is a warning containing some important message.


This is a warning containing some important message.


This is a warning containing some important message.

Tabbed content


  • Start a tab by a special markdown title (any level).
    • Title content should be a markdown link.
    • Link target is #tab/{tabid} or #tab/{tabid}/{condition}
  • Continue by any other content.
  • End by a markdown hr.


The result will be:

Tab group 1:

Tab content-1-1.

Tab content-2-1.

Tab group 2:

Tab content-a-1.

Tab content-b-1.

Tab group 3:

Tab content-1-1.

Tab content-2-1.

Tab group 4:

Tab content-a-2.

Tab content-b-2.


Tab groups with a same set of id are linkable in one page.

In example, tab group 1, 3 have same id set: tabid-1, tabid-2, tab group 2, 4 have same id set: tabid-a, tabid-b.

So tab group 1, 3 are linked, tab group 2, 4 are linked.When tab tabid-1 in tab group 1 is clicked, tab tabid-1 in tab group 3 will be selected in same time.But tab group 2, 4 do not have any changed.


Condition is the tab id of other table groups.



Tab Group 1:

Tab Group 2:

Tab content-a for 1.

Tab content-a for 2.

Tab content-b for 1.

Tab content-b for 2.

When select tabid-1 in tab group 1, you can get content-a or content-b for 1 in group 2.
When select tabid-2 in tab group 1, you can get content-a or content-b for 2 in group 2.


Allows you to add videos to your topics.



You must provide the embed uri of the video you wish to add to your topic.



Javadoc Markdown

Differences introduced by DFM syntax


DFM introduces more syntax to support more functionalities. When GFM does not support them, preview theMarkdown file inside GFM Preview can lead to different results.

YAML header

In GFM, YAML header must start at the very beginning of the Markdown file.In DFM, YAML header contains more powerful meanings. Refer to Yaml Header for details.

Javadoc Markdown

In GFM, it would be rendered as <hr>a: b<hr>.
In DFM, it would be rendered as a YAML header.

If you want to get <hr> in html in DFM, use:

or change content to make it not in YAML format:

Text after block extension

Some block extension in DFM cannot be recognized in GFM.In GFM, it would be treated as a part of paragraph.Then, following content would be treated as a part of paragraph.

For example:

In GFM, it will be rendered as a paragraph with content [!NOTE] This is code. in blockquote.
In DFM, it will be rendered as a code in note.

Please enable JavaScript to view the comments powered by Disqus.
Developer(s)Dimitri van Heesch
Initial release26 October 1997; 23 years ago[1]
Stable release
Written inC++
Operating systemCross-platform
TypeDocumentation generator

Doxygen (/ˈdɒksiən/DOK-see-jən)[3] is a documentation generator[4][5][6][7] and static analysis tool for software source trees. When used as a documentation generator, Doxygen extracts information from specially-formatted comments within the code. When used for analysis, Doxygen uses its parse tree to generate diagrams and charts of the code structure. Doxygen can cross reference documentation and code, so that the reader of a document can easily refer to the actual code.

Doxygen is free software, released under the terms of the GNU General Public License version2 (GPLv2).


Like Javadoc, Doxygen extracts documentation from source file comments. In addition to the Javadoc syntax, Doxygen supports the documentation tags used in the Qt toolkit and can generate output in HyperText Markup Language (HTML) as well as in Microsoft Compiled HTML Help (CHM), Rich Text Format (RTF), Portable Document Format (PDF), LaTeX, PostScript or man pages.


Programming languages supported by Doxygen include C,[8]C++, C#, D, Fortran, IDL, Java, Objective-C,[9]Perl,[10]PHP,[11]Python,[12][13] and VHDL.[14] Other languages can be supported with additional code.

Doxygen runs on most Unix-like systems, macOS, and Windows.

The first version of Doxygen borrowed code from an early version of DOC++, developed by Roland Wunderling and Malte Zöckler at Zuse Institute Berlin. Later, the Doxygen code was rewritten by Dimitri van Heesch.

Doxygen has built-in support to generate inheritance diagrams for C++ classes. For more advanced diagrams and graphs, Doxygen can use the 'dot' tool from Graphviz.[15]

Example code[edit]

The generic syntax of documentation comments is to start a comment with an extra asterisk after the leading comment delimiter '/*':

Many programmers like to mark the start of each line with space-asterisk-space, as follows, but that is not necessary.

Many programmers avoid using C-style comments and instead use C++ style single line comments. Doxygen accepts comments with additional slash as Doxygen comments.

The following illustrates how a C++ source file can be documented.

A screenshot of what the output would look like in HTML

An alternative approach for documenting parameters is shown below. It will produce the same documentation.

Richer markup is also possible. For instance, add equations using LaTeX commands:

Javadoc To Markdown

Doxygen source and development[edit]

The Doxygen sources are currently hosted at GitHub, where the main developer, Dimitri van Heesch, contributes under the user name 'doxygen'.[16] Doxygen is written in C++, and comprises over 300,000 source lines of code. For lexical analysis, the standard tool Lex (or its replacement Flex) is run on over 35,000 lines of lex script. The parsing tool Yacc (or its replacement Bison) is also used, but only for minor tasks; the bulk of language parsing is done by native C++ code. The build process is based on CMake and also involves some Python scripts.

Intellij Javadoc Markdown

See also[edit]


  1. ^ANNOUNCE: doxygen 0.1Archived October 4, 2011, at the Wayback Machine, Announcing: the first release of Doxygen, a C++ documentation system. , From: Dimitri van Heesch, Date: Sun, 26 Oct 1997, Qt-interest Archive
  2. ^
  3. ^FAQ: How did doxygen get its name?
  4. ^Perkel, Jeffrey M. (2015-11-22). 'Get With the Program: DIY tips for adding coding to your analysis arsenal'. The Scientist (Journal). The Scientist.
  5. ^Sabin, Mihaela (2015-11-22). 'Doxygen'. OpenComputing (Wiki). University of New Hampshire. Archived from the original on 2015-11-23.CS1 maint: discouraged parameter (link)
  6. ^'Doxygen'. Free Software Directory (Wiki). 2015-11-22.
  7. ^'Documentation'. Rosetta Code (Wiki). 2015-11-22.
  8. ^'Documentation: C'. Rosetta Code (Wiki). 2015-11-22.
  9. ^'Documentation: Objective-C'. Rosetta Code (Wiki). 2015-11-22.
  10. ^
  11. ^
  12. ^'Automatic Python API documentation generation tools'. wiki (Wiki). 2015-11-22.
  13. ^
  14. ^
  15. ^
  16. ^

External links[edit]

Javadoc Generate Markdown

  • Official website

Javadoc Markdown

Retrieved from ''