{"id":14007988,"url":"https://github.com/msnoigrs/ox-rst","last_synced_at":"2025-12-18T16:27:11.128Z","repository":{"id":74580290,"uuid":"14111828","full_name":"msnoigrs/ox-rst","owner":"msnoigrs","description":"reStructuredText Back-End for Org-Mode Export Engine","archived":false,"fork":false,"pushed_at":"2025-04-07T07:46:53.000Z","size":133,"stargazers_count":115,"open_issues_count":18,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-23T02:19:40.175Z","etag":null,"topics":["emacs","emacs-lisp","org-mode","restructuredtext"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msnoigrs.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2013-11-04T14:25:11.000Z","updated_at":"2025-04-07T07:46:56.000Z","dependencies_parsed_at":"2024-01-28T10:26:28.577Z","dependency_job_id":"dd603b30-f41b-4f36-a54d-e5847287394f","html_url":"https://github.com/msnoigrs/ox-rst","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnoigrs%2Fox-rst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnoigrs%2Fox-rst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnoigrs%2Fox-rst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msnoigrs%2Fox-rst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msnoigrs","download_url":"https://codeload.github.com/msnoigrs/ox-rst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354616,"owners_count":21416763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emacs","emacs-lisp","org-mode","restructuredtext"],"created_at":"2024-08-10T11:01:08.342Z","updated_at":"2025-12-18T16:27:06.063Z","avatar_url":"https://github.com/msnoigrs.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"#+TITLE: reStructuredText Back-End for Org Export Engine\n#+AUTHOR: Masanao Igarashi\n#+EMAIL: syoux2@gmail.com\n#+DATE: 2019/08/13 00:00\n#+DESCRIPTION:\n#+KEYWORDS:\n#+LANGUAGE: en\n#+OPTIONS: H:4 num:nil toc:t ::t |:t ^:t -:t f:t *:t \u003c:t\n#+OPTIONS: tex:t todo:t pri:nil tags:t texht:nil\n#+OPTIONS: author:t creator:nil email:nil date:t\n\n* Ox-Rst\n\n  *Ox-Rst* exports your [[http://orgmode.org][Org]] documents to reStructuredText.\n  Ox-Rst relies on the Org-mode 9.0 export framework.\n\n* Configuration\n\n  Add the following in your init.el\n\n#+BEGIN_SRC lisp\n  (require 'ox-rst)\n#+END_SRC\n\n* reStructuredText export\n\n  =ox-rst= export back-end generates reStructuredText syntax for\n  an Org mode buffer.\n\n** reStructuredText commands\n\n  To export your org document to, press =C-c C-e=, and then =r=.\n\n*** =C-c C-e r r (org-rst-export-to-rst)=\n\n    Export as a text file written in reStructured syntax.\n    For an Org file, =myfile.org=, the resulting file will be =myfile.rst=.\n    The file will be overwritten without warning.\n\n*** =C-c C-e r R (org-rst-export-as-rst)=\n\n    Export as a temporary buffer. Do not create a file.\n\n** Title, Author, E-Mail and Date\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,#+TITLE: This is the title of the document\n  ,#+AUTHOR: Author\n  ,#+EMAIL: mailaddress@example.com\n  ,#+DATE: 2019/08/13 00:00\n  ,#+OPTIONS: author:t date:t email:t\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  =================================\n  This is the title of the document\n  =================================\n\n      :Author: Author\n      :Contact: mailaddress@example.com\n      :Date: 2019/08/13 00:00\n#+END_SRC\n\n** Headings\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,* Heading 1\n\n  contents 1\n\n  ,** Heading 1-1\n\n  contents 1-1\n\n  ,*** Heading 1-1-3\n\n  contents 1-1-3\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  Heading 1\n  ---------\n\n  contents 1\n\n  Heading 1-1\n  ~~~~~~~~~~~\n\n  contents 1-1\n\n  Heading 1-1-3\n  ^^^^^^^^^^^^^\n\n  contents 1-1-3\n#+END_SRC\n\n** Table of contents\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,#+OPTIONS: toc:t\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  .. contents::\n\n#+END_SRC\n\n** Lists\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,** Lord of the Rings\n  1. The attack of the Rohirrim\n  2. Eowyn's fight with the witch king\n     + this was already my favorite scene in the book\n     + I really like Miranda Otto.\n  3. Peter Jackson being shot by Legolas\n     - on DVD only\n     He makes a really funny face when it happens.\n  But in the end, no individual scenes matter but the film as a whole.\n  Important actors in this film are:\n  - Elijah Wood :: He plays Frodo\n  - Sean Austin :: He plays Sam, Frodo's friend.  I still remember\n    him very well from his role as Mikey Walsh in The Goonies.\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  Lord of the Rings\n  ~~~~~~~~~~~~~~~~~\n\n  1. The attack of the Rohirrim\n\n  2. Eowyn's fight with the witch king\n\n     - this was already my favorite scene in the book\n\n     - I really like Miranda Otto.\n\n  3. Peter Jackson being shot by Legolas\n\n     - on DVD only\n\n     He makes a really funny face when it happens.\n\n  But in the end, no individual scenes matter but the film as a whole.\n  Important actors in this film are:\n\n  Elijah Wood\n      He plays Frodo\n\n  Sean Austin\n      He plays Sam, Frodo's friend.  I still remember\n      him very well from his role as Mikey Walsh in The Goonies.\n#+END_SRC\n\n** Special Characters\n\n   Org:\n#+BEGIN_EXAMPLE\n  special characters * asterisk \\ backspace\n  .. reStructuredText comment line\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  special characters \\* asterisk \\\\ backspace\n  \\.. reStructuredText comment line\n#+END_SRC\n\n** Paragraphs\n\n   *note* Org line breaks =\\\\= will be ignored.\n\n*** Verse block\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+BEGIN_VERSE\n   Great clouds overhead\n        Tiny black birds rise and fall\n        Snow covers Emacs\n\n            -- AlexSchroeder\n  ,#+END_VERSE\n#+END_EXAMPLE\n\n    reStructuredText Line Blocks:\n#+BEGIN_SRC rst\n  | Great clouds overhead\n  |      Tiny black birds rise and fall\n  |      Snow covers Emacs\n  |\n  |          -- AlexSchroeder\n#+END_SRC\n\n*** Quote block\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+BEGIN_QUOTE\n  Everything should be made as simple as possible,\n    but not any simpler -- Albert Einstein\n  ,#+END_QUOTE\n#+END_EXAMPLE\n\n    reStructuredText Literal Blocks:\n#+BEGIN_SRC rst\n::\n\n    Everything should be made as simple as possible,\n      but not any simpler -- Albert Einstein\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+ATTR_RST: :margin 4\n  ,#+BEGIN_QUOTE\n  Everything should be made as simple as possible,\n  but not any simpler -- Albert Einstein\n  ,#+END_QUOTE\n\n  ,#+ATTR_RST: :margin 8\n  ,#+BEGIN_QUOTE\n  Everything should be made as simple as possible,\n  but not any simpler -- Albert Einstein\n  ,#+END_QUOTE\n#+END_EXAMPLE\n\n    reStructuredText Block Quotes:\n#+BEGIN_SRC rst\n  Everything should be made as simple as possible,\n  but not any simpler -- Albert Einstein\n\n      Everything should be made as simple as possible,\n      but not any simpler -- Albert Einstein\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+ATTR_RST: :directive note\n  ,#+BEGIN_QUOTE\n  Everything should be made as simple as possible,\n  but not any simpler -- Albert Einstein\n  ,#+END_QUOTE\n#+END_EXAMPLE\n\n    reStructuredText Directives:\n#+BEGIN_SRC rst\n  .. note::\n\n      Everything should be made as simple as possible,\n      but not any simpler -- Albert Einstein\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+ATTR_RST: :directive sidebar :title sidebar title\n  ,#+BEGIN_QUOTE\n  Everything should be made as simple as possible,\n  but not any simpler -- Albert Einstein\n  ,#+END_QUOTE\n#+END_EXAMPLE\n\n   reStructuredText Directives with title:\n#+BEGIN_SRC rst\n  .. sidebar:: sidebar title\n\n      Everything should be made as simple as possible,\n      but not any simpler -- Albert Einstein\n#+END_SRC\n\n*** Special blocks\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+BEGIN_caution\n  This is the second line of the first paragraph.\n  ,#+END_caution\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. caution::\n\n      This is the second line of the first paragraph.\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+ATTR_RST: :title This is a note admonition.\n  ,#+BEGIN_note\n  This is the second line of the first paragraph.\n  ,#+END_note\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. note:: This is a note admonition.\n\n      This is the second line of the first paragraph.\n#+END_SRC\n\n*** Center block\n\n    Center block will not affect.\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+BEGIN_CENTER\n  center block\n  ,#+END_CENTER\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  center block\n#+END_SRC\n\n** Literal examples\n\n*** example block\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+NAME: label\n  ,#+BEGIN_EXAMPLE\n  example\n  ,#+END EXAMPLE\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  ::\n      :name: label\n\n      example\n#+END_SRC\n\n*** src block\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+BEGIN_SRC lisp\n  (require 'ox-rst)\n  ,#+END_SRC\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. code-block:: lisp\n\n      (require 'ox-rst)\n#+END_SRC\n\n** Emphasis and monospace\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,*bold* /italic/ _underlined_ =verbatim= ~code~ +strike-through+\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  ,**bold** *italic* underlined ``verbatim`` ``code`` strike-through\n#+END_SRC\n\n** Subscript and superscript\n\n   Org:\n#+BEGIN_EXAMPLE\n  H_{2}O\n  E = mc^2\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  H\\ :sub:`2`\\ O\n  E = mc\\ :sup:`2`\\ \n#+END_SRC\n\n** LaTeX fragments\n\n   Org:\n#+BEGIN_EXAMPLE\n   If $a^2=b$ and \\( b=2 \\), then the solution must be\n   either $$ a=+\\sqrt{2} $$ or \\[ a=-\\sqrt{2} \\].\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  If :math:`a^2=b` and :math:`b=2`, then the solution must be\neither \n\n.. math::\n\n    a=+\\sqrt{2}\n\n or \n\n.. math::\n\n    a=-\\sqrt{2}\n\n.\n#+END_SRC\n\n** Horizontal rules\n\n   Org:\n#+BEGIN_EXAMPLE\n  -----\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  ------------\n#+END_SRC\n\n** Comment block\n\n   Comment block will disapper.\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,#+BEGIN_COMMENT\n  comment\n  ,#+END_COMMENT\n#+END_EXAMPLE\n\n** Images and Tables\n\n*** Images\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+ATTR_RST: :alt alternate text :align right\n  [[./image.jpg]]\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. image:: ./image.jpg\n      :alt: alternate text\n      :align: right\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  ,#+CAPTION: image caption\n  ,#+ATTR_RST: :alt alternate text :align center :scale 50%\n  [[./image.jpg]]\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. figure:: ./image.jpg\n      :alt: alternate text\n      :align: center\n      :scale: 50%\n\n      image caption\n#+END_SRC\n\n*** Tables\n\n    Org:\n#+BEGIN_EXAMPLE\n  | TOP1 | TOP2 | TOP3 |\n  | 1    | 2    | 3    |\n  | AAAA | BBBB | CCCC |\n  | END1 | END2 | END3 |\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. table::\n\n      +------+------+------+\n      | TOP1 | TOP2 | TOP3 |\n      +------+------+------+\n      | 1    | 2    | 3    |\n      +------+------+------+\n      | AAAA | BBBB | CCCC |\n      +------+------+------+\n      | END1 | END2 | END3 |\n      +------+------+------+\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  | TOP1 | TOP2 | TOP3 |\n  |------+------+------|\n  | 1    | 2    | 3    |\n  | AAAA | BBBB | CCCC |\n  | END1 | END2 | END3 |\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. table::\n\n      +------+------+------+\n      | TOP1 | TOP2 | TOP3 |\n      +======+======+======+\n      | 1    | 2    | 3    |\n      +------+------+------+\n      | AAAA | BBBB | CCCC |\n      +------+------+------+\n      | END1 | END2 | END3 |\n      +------+------+------+\n#+END_SRC\n\n    Org:\n#+BEGIN_EXAMPLE\n  |------+------+------|\n  | TOP1 | TOP2 | TOP3 |\n  |------+------+------|\n  | 1    | 2    | 3    |\n  |------+------+------|\n  | AAAA | BBBB | CCCC |\n  |------+------+------|\n  | END1 | END2 | END3 |\n  |------+------+------|\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. table::\n\n      +------+------+------+\n      | TOP1 | TOP2 | TOP3 |\n      +======+======+======+\n      | 1    | 2    | 3    |\n      +------+------+------+\n      | AAAA | BBBB | CCCC |\n      +------+------+------+\n      | END1 | END2 | END3 |\n      +------+------+------+\n#+END_SRC\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,#+CAPTION: caption\n  ,#+NAME: label\n  | TOP1 | TOP2 | TOP3 |\n  |------+------+------|\n  | 1    | 2    | 3    |\n  | AAAA | BBBB | CCCC |\n  | END1 | END2 | END3 |\n#+END_EXAMPLE\n\n    reStructuredText:\n#+BEGIN_SRC rst\n  .. table:: caption\n      :name: label\n\n      +------+------+------+\n      | TOP1 | TOP2 | TOP3 |\n      +======+======+======+\n      | 1    | 2    | 3    |\n      +------+------+------+\n      | AAAA | BBBB | CCCC |\n      +------+------+------+\n      | END1 | END2 | END3 |\n      +------+------+------+\n#+END_SRC\n\n** Hyperlinks\n\n*** External hyperlinks\n\n   Org:\n#+BEGIN_EXAMPLE\n  [[http://orgmode.org][Org Mode]]\n\n  [[http://orgmode.org]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  `Org Mode \u003chttp://orgmode.org/\u003e`_\n\n  `http://orgmode.org`_\n#+END_SRC\n\n*** Internal links\n\n   Org:\n#+BEGIN_EXAMPLE\n  This is an \u003c\u003cexample\u003e\u003e cross reference target.\n\n  Internal cross references, like [[example]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  This is an  _`example`  cross reference target.\n\n  Internal cross references, like `example`_\n#+END_SRC\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,* headline\n\n  Internal cross references, [[*headline]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  headline\n  --------\n\n  Internal cross references, `headline`_\n#+END_SRC\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,* headline\n    :PROPERTIES:\n    :CUSTOM_ID: customid\n    :END:\n\n  Internal cross references, headline [[#customid]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  .. _customid:\n\n  headline\n  --------\n\n  Internal cross references, headline `customid`_\n#+END_SRC\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,#+NAME: sampletable\n  | a | b | c |\n  | 1 | 2 | 3 |\n\n  Internal cross references, label [[sampletable]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  .. table::\n    :name: sampletable\n\n    +---+---+---+\n    | a | b | c |\n    +---+---+---+\n    | 1 | 2 | 3 |\n    +---+---+---+\n\n  Internal cross references, label `sampletable`_\n#+END_SRC\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,#+NAME: samplefigure\n  [[./image.jpg]]\n\n  Internal cross references, label [[samplefigure]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  .. _samplefigure:\n\n  .. image:: ./image.jpg\n\n  Internal cross references, label `samplefigure`_\n#+END_SRC\n\n** Footnote\n\n   Org:\n#+BEGIN_EXAMPLE\n  ,* footnote sample\n\n  Org mode[fn:org] is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system.\n\n  reStructuredText[fn:rest] is plaintext that uses simple and intuitive constructs to indicate the structure of a document.\n\n  [fn:org] org-mode [[http://orgmode.org]]\n  [fn:rest] reStructuredText [[http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html]]\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  footnote sample\n  ---------------\n\n  Org mode [2]_  is for keeping notes, maintaining TODO lists, planning projects, and authoring documents with a fast and effective plain-text system.\n\n  reStructuredText [1]_  is plaintext that uses simple and intuitive constructs to indicate the structure of a document.\n\n\n  .. [1] reStructuredText `http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html \u003chttp://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html\u003e`_\n\n  .. [2] org-mode `http://orgmode.org \u003chttp://orgmode.org\u003e`_\n#+END_SRC\n\n** Export reStructuredText fragments\n\n   Org:\n#+BEGIN_EXAMPLE\n  See also @@rst::meth:`mypackage.mymodule.MyClass.mymethod()`@@.\n  \n  #+RST: .. class:: alert\n  \n  ,#+BEGIN_EXPORT rst\n  .. class:: alert\n  ,#+END_EXPORT\n#+END_EXAMPLE\n\n   reStructuredText:\n#+BEGIN_SRC rst\n  See also :meth:`mypackage.mymodule.MyClass.mymethod()`.\n\n  .. class:: alert\n  \n  .. class:: alert\n#+END_SRC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsnoigrs%2Fox-rst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsnoigrs%2Fox-rst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsnoigrs%2Fox-rst/lists"}