sphinxcontrib-erlangdomain

Sphinx extension sphinxcontrib-erlangdomain


License
BSD-3-Clause
Install
pip install sphinxcontrib-erlangdomain==0.2.1

Documentation

Erlang Domain

Author: SHIBUKAWA Yoshiki <yoshiki at shibu.jp>

About

This is the Erlang domain for Sphinx. Since version 1.0, Sphinx delivers a new feature -- Domain. It will enable other language support except Python and C language.

This extension provides directives and roles to write Erlang documents.

The Erlang domain (name erl) supports following objects:

URLs

PyPI: https://pypi.org/project/sphinxcontrib-erlangdomain/
Detail Document: https://sphinxcontrib-erlangdomain.readthedocs.io/en/latest/

Quick Sample

This is source:

.. erl:module:: lists

.. erl:function:: append(ListOfLists) -> List1

   :type ListOfLists:  [[*term()*]]
   :rtype:  [*term()*]

   Returns a list in which all the sub-lists of ListOfLists
   have been appended. For example:

   .. code-block:: erlang

      > lists:append([[1, 2, 3], [a, b], [4, 5, 6]]).
      [1,2,3,a,b,4,5,6]

.. erl:function:: append(List1, List2) -> List3

   :param List1:  First Item.
   :type  List1:  [*term()*]
   :param List2:  Second Item.
   :type  List2:  [*term()*]
   :rtype:  [*term()*]

   Returns a new list List3 which is made from the elements
   of List1 followed by the elements of List2. For example:

   .. code-block:: erlang

      > lists:append("abc", "def").
      "abcdef"

   ``lists:append(A, B)`` is equivalent to ``A ++ B``.

Results:

.. erl:module:: lists

.. erl:function:: append(ListOfLists) -> List1

   :type ListOfLists:  [[*term()*]]
   :rtype:  [*term()*]

   Returns a list in which all the sub-lists of ListOfLists
   have been appended. For example:

   .. code-block:: erlang

      > lists:append([[1, 2, 3], [a, b], [4, 5, 6]]).
      [1,2,3,a,b,4,5,6]

.. erl:function:: append(List1, List2) -> List3

   :param List1:  First Item.
   :type  List1:  [*term()*]
   :param List2:  Second Item.
   :type  List2:  [*term()*]
   :rtype:  [*term()*]

   Returns a new list List3 which is made from the elements
   of List1 followed by the elements of List2. For example:

   .. code-block:: erlang

      > lists:append("abc", "def").
      "abcdef"

   ``lists:append(A, B)`` is equivalent to ``A ++ B``.

Note

This content is copied from https://www.erlang.org/doc/man/lists.html


From other place, you can create cross reference like that:

Looking at how :erl:func:`lists:append/1`
or ``++`` would be implemented in plain Erlang,
it can be seen clearly that the first list is copied.

Results:

Looking at how :erl:func:`lists:append/1` or ++ would be implemented in plain Erlang, it can be seen clearly that the first list is copied.

Install

$ pip3 install -U sphinxcontrib-erlangdomain