This article includes a list of references, related reading or external links, but its sources remain unclear because it lacks inline citations .(October 2009) |
RD (Ruby Document) is a lightweight markup language for writing Ruby-related documents. It can be embedded in Ruby source code.
RD is a traditional format. In modern Ruby, developers tend to write documents in RDoc instead of RD.
Originally, most documentation in the Ruby world, including for Ruby itself, had been written in RD. Then in 2002, much of it was converted to RDoc format. Although, the Japanese version of the Ruby Reference Manual still remains in RD format.
RD is designed to be written by hand and easily read in its raw form. Most end-users however experience it after it has been converted into HTML or man pages.
RD can be embedded in Ruby code, and pure RD files usually have the extension .rd
.
This document is syntactically correct RD, which attempts to follow the major conventions on section naming as well.
Source | HTML result |
---|---|
=begin = NAME RD sample - A sample RD document = SYNOPSIS here.is_a?(Piece::Of::Code) print <<"END" This indented block will not be scanned for formatting codes or directives, and spacing will be preserved. END = DESCRIPTION Here's some normal text. It includes text that is ((*emphasized*)), ((%keyboard%)), (({code}))-formatted, ((|variable part|)), ((:indexed:)), and (('as-is'))((-footnote-)). == An Example List * This is a bulleted list. * Here's another item. * Nested list item. == An ordered List (1) This is the first item (2) second * Nested unordered list. (3) third (1) Nested ordered list (2) its second item =end =begin html <img src="Example.png" align="right" alt="Figure 1." /> <p> Here's some embedded HTML. In this block I can include images, apply <span style="color: green"> styles</span>, or do anything else I can do with HTML. RD processors that aren't outputting HTML will completely ignore it. </p> =end =begin = COPYRIGHT Copyright 2005 [[J. Random Hacker]] <jrh@cpan.org>. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. =end | NAMERD sample - A sample RD document SYNOPSIShere.is_a?(Piece::Of::Code) print <<"END" This indented block will not be scanned for formatting codes or directives, and spacing will be preserved. END DESCRIPTIONHere's some normal text. It includes text that is emphasized, keyboard, An Example List
An ordered List
COPYRIGHTCopyright 2005 J. Random Hacker <jrh@cpan.org>. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. |
The HyperText Markup Language, or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.
In computer text processing, a markup language is a system for annotating a document in a way that is visually distinguishable from the content. It is used only to format the text, so that when the document is processed for display, the markup language does not appear. The idea and terminology evolved from the "marking up" of paper manuscripts, which is traditionally written with a red pen or blue pencil on authors' manuscripts. Such "markup" typically includes both content corrections, and also typographic instructions, such as to make a heading larger or boldface.
The Standard Generalized Markup Language is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":
Mathematical Markup Language (MathML) is a mathematical markup language, an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae into World Wide Web pages and other documents. It is part of HTML5 and an ISO standard ISO/IEC 40314 since 2015.
An HTML element is a type of HTML document component, one of several types of HTML nodes. HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.
YAML is a human-readable data-serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language (XML) but has a minimal syntax which intentionally differs from SGML. It uses both Python-style indentation to indicate nesting, and a more compact format that uses [...]
for lists and {...}
for maps thus JSON files are valid YAML 1.2.
Doxygen is a documentation generator 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.
A lightweight markup language (LML), also termed a simple or humane markup language, is a markup language with simple, unobtrusive syntax. It is designed to be easy to write using any generic text editor and easy to read in its raw form. Lightweight markup languages are used in applications where it may be necessary to read the raw document as well as the final rendered output.
Plain Old Documentation (pod) is a lightweight markup language used to document the Perl programming language as well as Perl modules and programs.
Javadoc is a documentation generator created by Sun Microsystems for the Java language for generating API documentation in HTML format from Java source code. The HTML format is used for adding the convenience of being able to hyperlink related documents together.
The following tables compare general and technical information for a number of documentation generators. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the stable versions without any add-ons, extensions or external programs. Note that many of the generators listed are no longer maintained.
Textile is a lightweight markup language that uses a text formatting syntax to convert plain text into structured HTML markup. Textile is used for writing articles, forum posts, readme documentation, and any other type of written content published online.
Markdown is a lightweight markup language for creating formatted text using a plain-text editor. John Gruber and Aaron Swartz created Markdown in 2004 as a markup language that is appealing to human readers in its source code form. Markdown is widely used in blogging, instant messaging, online forums, collaborative software, documentation pages, and readme files.
Ddoc is a compiler-embedded documentation generator and associated syntax, for the D programming language, designed by Walter Bright. Its emphasis is on being able to write documentation in code comments in a natural style, minimizing the need for embedded markup and thus improving the legibility of the code comments. It is similar in concept to Doxygen and Javadoc.
eRuby is a templating system that embeds Ruby into a text document. It is often used to embed Ruby code in an HTML document, similar to ASP, JSP and PHP and other server-side scripting languages. The templating system of eRuby combines the ruby code and the plain text to provide flow control and variable substitution, thus making it easy to maintain.
AsciiDoc is a human-readable document format, semantically equivalent to DocBook XML, but using plain-text mark-up conventions. AsciiDoc documents can be created using any text editor and read “as-is”, or rendered to HTML or any other format supported by a DocBook tool-chain, i.e. PDF, TeX, Unix manpages, e-books, slide presentations, etc. Common file extensions for AsciiDoc files are txt
and adoc
.
RDoc, designed by Dave Thomas, is an embedded documentation generator for the Ruby programming language. It analyzes Ruby source code, generating a structured collection of pages for Ruby objects and methods. Code comments can be added in a natural style. RDoc is included as part of the Ruby core distribution. The RDoc software and format are successors to the Ruby Document format.
Haml is a templating system that is designed to avoid writing inline code in a web document and make the HTML cleaner. Haml gives the flexibility to have some dynamic content in HTML. Similar to other web languages like PHP, ASP, JSP and template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates HTML code in order to provide some dynamic content. In order to run Haml code, files need to have a .haml extension. These files are similar to .erb or eRuby files which also help to embed Ruby code while developing a web application.
YARD, is an embedded documentation generator for the Ruby programming language. It analyzes the Ruby source code, generating a structured collection of pages for Ruby objects and methods. Code comments can be added in a natural style.