msnoigrs / ox-rst Goto Github PK
View Code? Open in Web Editor NEWreStructuredText Back-End for Org-Mode Export Engine
reStructuredText Back-End for Org-Mode Export Engine
Upon installing ox-rst
with package-install
, I get an error buffer with the message:
ox-rst.el:33:1:Error: Symbol’s function definition is void: org-define-error
I'm running Emacs 25.1.1 on Ubuntu and org-version
yields Org-mode version 9.1.6 (9.1.6-57-gec8590-elpa @ /redacted/.emacs.d/elpa/org-20180219/)
Any idea of how to fix?
Thanks for this package!
I have installed ox-nikola (and therefore ox-rst) via MELPA.
Whenn footnotes span over multiple lines, the second and subsequent line are not indented so there are errors in the resulting html.
org input:
Testtext[fn:1]
[fn:1] First line of footnote text
Second line of footnote text
Third line of footnote text
rst output:
Testtext [1]_
.. [1] First line of footnote text
Second line of footnote text
Third line of footnote text
Is this a bug or is there another way to achieve the desired output?
Thanks and best regards
Stefan
Hi,
I noticed that links to other ".org" files are not correctly exported:
[[file:somefile.org]]
is exported to
'somefile. <somefile.>'_
Normally we would expect it to create something like 'somefile.rst <somefile.rst>'_
right ?
When org-export-preserve-breaks is set and I try to export org file below:
#+OPTIONS: H:1 ^:nil toc:nil num:nil creator:nil author:nil
This is a test org file for ox-rst preserve-breaks option.
Each line of this paragraph expects to be prefixed by "| ".
* Header 1. Prefix not expected.
Paragraph under Header-1.
It might include some *bold* or /italic/ words.
Prefix expected.
- Item-1 Prefix not expected.
- Item-2 Prefix not expected.
** Header-2 Prefix not expected.
Single line paragraph. Prefix not expected.
I expect the following:
| This is a test org file for ox-rst preserve-breaks option.
| Each line of this paragraph expects to be prefixed by "| ".
Header 1. Prefix not expected.
------------------------------
| Paragraph under Header-1.
| It might include some **bold** or *italic* words.
| Prefix expected.
- Item-1 Prefix not expected.
- Item-2 Prefix not expected.
Header-2 Prefix not expected.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Single line paragraph. Prefix not expected.
However I actually get the following:
| This is a test org file for ox-rst preserve-breaks option.
| Each line of this paragraph expects to be prefixed by "| ".
|
| Header 1. Prefix not expected.
--------------------------------
| Paragraph under Header-1.
| It might include some **| bold** | or *| italic* | words.
| Prefix expected.
|
- | Item-1 Prefix not expected.
|
- | Item-2 Prefix not expected.
|
| Header-2 Prefix not expected.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Single line paragraph. Prefix not expected.
|
Unlike Markdown requiring the mark to keep line break at the end of the line, reStructuredText requires it at the beggining of the line.
Given the result above, org-mode export framework divides text into small pieces of plain-texts, such as bolded string and the body of the items, so I think prefixing "| " to the lines should be done in org-rst-paragraph.
For example:
org
Here is a citation reference \cite{CIT2002}.
rst
Here is a citation reference: [CIT2002]_.
.. [CIT2002] This is the citation. It's just like a footnote,
except the label is textual.
or should this be part of ox-bibtex?
http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=contrib/lisp/ox-bibtex.el;hb=HEAD
Debugger entered--Lisp error: (wrong-type-argument stringp nil) |
string-match(".(jpeg|jpg|png|gif|svg|svgz|swf)'" nil) |
#[(rule) "\302^HA "\205\f^@\303\304\305"\207" [rule link string-match throw exit t] 3](%28"file" .))
mapc(#[(rule) "\302^HA "\205\f^@\303\304\305"\207" [rule link string-match throw exit t] 3](%28"file" .) ("fuzzy" . ".(jpeg|jpg|png|gif|svg|svgz|swf)'") ("http" . ".(jpeg|jpg|png|gif|svg|svgz|swf)'") ("https" . ".(jpeg|jpg|png|gif|svg|svgz$
byte-code("\301\302^H"\210\303\207" [rules mapc #[(rule) "\302^HA "\205\f^@\303\304\305"\207" [rule link string-match throw exit t] 3] nil] 3)
my-org-export-inline-image-p(nil (("file" . ".(jpeg|jpg|png|gif|svg|svgz|swf)'") ("fuzzy" . ".(jpeg|jpg|png|gif|svg|svgz|swf)'") ("http" . ".(jpeg|jpg|png|gif|svg|svgz|swf)'") ("https" . ".(jpeg|jpg|png|gif|svg|svgz|swf)'")))
org-rst-link((link (:type "HTTP" :path "//localhost:8080/api/v2" :raw-link "HTTP://localhost:8080/api/v2" :application nil :search-option nil :begin 1363 :end 1391 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph (:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blank 1 :post-affiliated 1285 :parent (section (:begin $
org-export-data((link (:type "HTTP" :path "//localhost:8080/api/v2" :raw-link "HTTP://localhost:8080/api/v2" :application nil :search-option nil :begin 1363 :end 1391 :contents-begin nil :contents-end nil :post-blank 0 :parent (paragraph (:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blank 1 :post-affiliated 1285 :parent (section (:beg$
#[(element) "\302^H "\207" [element info org-export-data] 3](%28link %28:type "HTTP" :path "//localhost:8080/api/v2" :raw-link "HTTP://localhost:8080/api/v2" :application nil :search-option nil :begin 1363 :end 1391 :contents-begin nil :contents-end nil :post-blank 0 :parent %28paragraph %28:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blan$
mapconcat%28#[%28element) "\302^H "\207" [element info org-export-data] 3] (#("The system is accessible via a REST API.\nThe base URL for all requests is " 0 40 (:parent (paragraph (:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blank 1 :post-affiliated 1285 :parent (section (:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :p$
org-export-data((paragraph (:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blank 1 :post-affiliated 1285 :parent (section (:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :post-blank 1 :parent (headline (:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outline :contents-begin 1285 :contents-end 12802 :lev$
#[(element) "\302^H "\207" [element info org-export-data] 3](%28paragraph %28:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blank 1 :post-affiliated 1285 :parent %28section %28:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :post-blank 1 :parent %28headline %28:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outli$
mapconcat%28#[%28element) "\302^H "\207" [element info org-export-data] 3] ((paragraph (:begin 1285 :end 1392 :contents-begin 1285 :contents-end 1392 :post-blank 1 :post-affiliated 1285 :parent (section (:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :post-blank 1 :parent (headline (:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hidd$
org-export-data((section (:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :post-blank 1 :parent (headline (:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outline :contents-begin 1285 :contents-end 12802 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :co$
#[(element) "\302^H "\207" [element info org-export-data] 3](%28section %28:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :post-blank 1 :parent %28headline %28:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outline :contents-begin 1285 :contents-end 12802 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-bl$
mapconcat%28#[%28element) "\302^H "\207" [element info org-export-data] 3] ((section (:begin 1285 :end 1393 :contents-begin 1285 :contents-end 1392 :post-blank 1 :parent (headline (:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outline :contents-begin 1285 :contents-end 12802 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil$
org-export-data((headline (:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outline :contents-begin 1285 :contents-end 12802 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :CATEGORY "howto" :title (#("REST API" 0 8 (:parent #0))) :parent (o$
#[(element) "\302^H "\207" [element info org-export-data] 3](%28headline %28:raw-value "REST API" :begin 1274 :end 12802 :pre-blank 0 :hiddenp outline :contents-begin 1285 :contents-end 12802 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :CATEGORY "howto" :t$
mapconcat%28#[%28element) "\302^H "\207" [element info org-export-data] 3] ((headline (:raw-value "Install" :begin 1 :end 810 :pre-blank 0 :hiddenp outline :contents-begin 19 :contents-end 810 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp 0 :quotedp nil :CATEGORY "howto" :titl$
org-export-data((org-data nil (headline (:raw-value "Install" :begin 1 :end 810 :pre-blank 0 :hiddenp outline :contents-begin 19 :contents-end 810 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 1 :footnote-section-p nil :archivedp nil :commentedp 0 :quotedp nil :CATEGORY "howto" :title (#("Install" 0 7 (:parent #1))) :parent #$
org-export-as(rst nil nil nil (:output-file "./howto.rst")) |
org-export-to-file(rst "./howto.rst" nil nil nil nil nil) |
org-rst-export-to-rst(nil nil nil nil) |
org-export-dispatch(nil) |
#(org-export-dispatch nil nil) |
funcall(# org-export-dispatch nil nil) |
(with-no-warnings (funcall ad--addoit-function function record-flag keys)) |
(setq ad-return-value (with-no-warnings (funcall ad--addoit-function function record-flag keys)))
(let ((ido-ubiquitous-next-override (ido-ubiquitous-get-command-override function))) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function function record-flag keys))))
(ido-ubiquitous-with-override (ido-ubiquitous-get-command-override function) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function function record-flag keys))))
(let (ad-return-value) (ido-ubiquitous-with-override (ido-ubiquitous-get-command-override function) (setq ad-return-value (with-no-warnings (funcall ad--addoit-function function record-flag keys)))) ad-return-value)
ad-Advice-call-interactively(# org-export-dispatch nil nil)
apply(ad-Advice-call-interactively # (org-export-dispatch nil nil))
call-interactively(org-export-dispatch nil nil) |
command-execute(org-export-dispatch)
C-c C-e r r just generates an error:
Symbol's function defniition is void: org-element-insert-before
Note: Exporter menu is present for Export to reStructuredText
org-element-insert-before is defined on org-element.el in earlier versions of org-mode, but not in 8.2.10??
rst supports arbitrary fields (date, author, etc are examples). However, I do not see any way to add arbitrary fields through org mode. It supports some (date, author, etc). But what if I want a field called "Blah"?
My use case is that I'm using ox-rst to export org docs to rst for use in a static site generator. Each post should have a Tags field (think blog posts). Right now I have to hand edit the .rst file that ox-rst produces, which is a pain.
Context: I use Pelican (http://docs.getpelican.com/en/stable/) for my static site generator. It takes in several input formats (rst, md, etc).
I write my posts in rst, but really want to use org. Hence, ox-rst.
My ideal workflow would be where I can just write in Org, and export without having to edit the final rst file. Where this fails is the fact that fields like "Date" are indented in the output ox-rst produces.
I honestly don't know if Pelican is at fault, or ox-rst is not conforming. But is there a way to have the date not be indented so that I need not manually edit the rst files?
Thanks,
When using a CUSTOM_ID
property, if a reference like [[#myid][text to display]]
is used, then instead of the exported document having text to display
appear for the link, only myid
appears. Also, when just [[#myid]]
is used, the exported link only displays myid
and not the name of the headline possessing this id.
Hello,
When I want to export I have this line that starts in the code block. ":number-lines: 0". I would like to turn this off because this break me problems with readthedocs.io (the code does not appear)
Here is my sample code org
#+BEGIN_SRC restclient :exports results :var urlws="http://127.0.0.1" secret="secret" id-instance="BPJ92"
POST :urlws/myalerts?id-instance=:id-instance&secret=:secret
#+END_SRC
#+RESULTS:
#+BEGIN_SRC js
[
{
"id": 1,
"title": "A Title 1",
"message": "A message lorem lipsum alert 1",
"destination": "local",
"deleteurl": "http://127.0.0.1/delete/1/"
},
{
"id": 2,
"title": "A Title 2",
"message": "A message lorem lipsum alert 2",
"destination": "local",
"deleteurl": "http://127.0.0.1/delete/2/"
}
]
// POST http://127.0.0.1/myalerts?id-instance=BPJ92&secret=secret
// HTTP/1.1 200 OK
// Host: 127.0.0.1
// Connection: close
// X-Powered-By: PHP/7.0.12
// Access-Control-Allow-Origin: *
// Cache-Control: no-cache
// Content-Type: application/json
// Date: Mon, 24 Oct 2016 17:16:33 GMT
// Request duration: 0.017809s
#+END_SRC
after export :
.. code-block:: js
:number-lines: 0
[
{
"id": 1,
"title": "A Title 1",
"message": "A message lorem lipsum alert 1",
"destination": "local",
"deleteurl": "http://127.0.0.1/delete/1/"
},
{
"id": 2,
"title": "A Title 2",
"message": "A message lorem lipsum alert 2",
"destination": "local",
"deleteurl": "http://127.0.0.1/delete/2/"
}
]
// POST http://127.0.0.1/myalerts?id-instance=BPJ92&secret=secret
// HTTP/1.1 200 OK
// Host: 127.0.0.1
// Connection: close
// X-Powered-By: PHP/7.0.12
// Access-Control-Allow-Origin: *
// Cache-Control: no-cache
// Content-Type: application/json
// Date: Mon, 24 Oct 2016 17:28:32 GMT
// Request duration: 0.017208s
https://github.com/masayuko/ox-rst/blob/master/ox-rst.el#L1346
Thank you for this plugin. Regards
Thanks for a great package.
In verbatim org blocks, consecutive *
from start of the string becomes escaped when converting it to restrucured text.
Examples:
=* foo *= -> ``\* foo *``
=** foo *= -> ``\*\* foo *``
What is the background if this behavior? I don't know restructured text very well but using sphinx to export it to other formats preserve the backslash.
I'd like to have literal *
in verbatim blocks but can't figure out how to do that.
Looking at the regexp in the code it confirms this behavior:
(string-match "\\`*" text)
I've been trying to avoid this issue by using this instead but not sure if it's what is intended:
(string-match "`+" text)
Hi there,
this issue comes with the latest release, since the previous one was working flawlessly.
Any org file that was previously correctly exported now fails with this error.
I have been using Emacs for more than a while but I am not an elisp writer/debugger (damn me!)
My config:
emacs 24.5 or 25.1.2 or 25.2
org 20171218
This is the failing block:
#+BEGIN_note The current revision is *20171019.1* #+END_note
If I remove the dot everything works fine, But the presence of the dot leads to the error in the subject.
Also, the bolding through '*' should be only on one word, inside a "BEGIN/END" block.
Thanks,
akall
Here are a couple of examples from the org manual
* This literal works well
#+BEGIN_EXAMPLE
Some example from a text file.
#+END_EXAMPLE
* This literal does not work well
Here is an example
: Some example from a text file.
One problem here is that the second pair of back-ticks ends up on a line by itself.
``Some example from a text file.
``
https://github.com/msnoigrs/ox-rst/blob/master/ox-rst.el#L1404 uses org-ascii-*
.
Therefore https://github.com/msnoigrs/ox-rst/blob/master/ox-rst.el#L34 needs
(require 'ox-ascii)
Hi again,
By the way, ox-rst is great, really working really well except for this one issue.
It appears to me that ox-rst will only properly create rst tables if there are lines around all elements.
ie
| top | right |
| here | there |
will not be converted properly, but
|-------+--------|
| top | right |
|-------+--------|
| here | there |
|-------+--------|
will be converted properly.
For example, the following will also not be converted properly
|-------+--------|
| top | right |
| here | there |
|-------+--------|
Larrabee
headline
:PROPERTIES:
:ID: customid
:END:
Internal cross references, headline [[id:customid][something else]]
Generates:
:Author: Immanuel Litzroth
.. contents::
Internal cross references, headline customid
_
Dear Masayuko
The ox-rst is work well for me. Thank you.
late week I was git pull, then find out #+BEGIN_EXPORT rst don't work.
(sample)
#+BEGIN_EXPORT rst
.. class:: alert
#+END_EXPORT
(output)
.. EXPORT::
\.. lass:: alert
version commit 7b6095c
Best Regards
Lloyd
I installed Org mode 8.3beta and tried ox-rst. Strangely, it added section numbers automatically to headings. For example, when I export the following
*** Testing
**** Introduction
***** Introduction
****** Introduction
:PROPERTIES:
:BEAMER_OPT: allowframebreaks
:END:
- Introduction
I get
Testing
=======
:Author: Joon Ro
.. contents::
1 Introduction
--------------
1.1 Introduction
~~~~~~~~~~~~~~~~
1.1.1 Introduction
^^^^^^^^^^^^^^^^^^
- Introduction
I have a org link with elisp:(org-rst-export-to-rst nil t)
, inside the Testing
subtree which I use to export the subtree.
There seems to be some problem with #+ATTR_RST not being exported for images. Example:
#+title: Test RST image export
#+author: Jan Janský
Attrs fail here:
#+attr_rst: :width 50% :align center
[[./Desktop/image.jpg]]
But work fine here:
#+attr_rst: :margin 2
#+begin_quote
Just a quote.
#+end_quote
is exported as
=====================
Test RST image export
=====================
:Author: Jan Janský
.. contents::
Attrs fail here:
.. image:: ./Desktop/image.jpg
But work fine here:
Just a quote.
I am using orgmode v. 9.1.9 on Debian/Linux Emacs v. 26.1 and ox-rst from melpa v. 20190813.427.
Thanks, best regards,
Jan Janský
I just installed the latest version of ox-rst (20170418.758) via the Emacs packages facilities, and added the following to an otherwise empty ~/.emacs (just to make sure).
(require 'ox-rst)
When trying to export from within org-mode using C-c C-e, I get the usual export menu, but no rst option shows up. Also, calling org-rst-export-to-rst directly results only in the following message.
Unknown "nil" back-end: Aborting export
My Emacs (Aquamacs 3.3 GNU Emacs 25.1.1) has only loaded a few other packages incl. org-mode version 9.1 (package 20170911). BTW: I found it confusing that the Readme at https://github.com/masayuko/ox-rst says "Ox-Rst relies on the Org-mode 9.0 export framework", while the actual source of ox-rst.el says "Package-Requires: ((emacs "24.4") (org "8.2.4"))".
For completeness, I tried other additional exporters like ox-pandoc, and those work.
What am I missing?
Thank you!
Best,
Torsten
I'm actually using ox-nikola to try convert an orgmode file to .rst. One file worked, but one with links to the web failed with this error.
I traced it back to ox-rst. It seems ox-rst is calling this function in converting org links, but the function is not a part of ox.el (at least, not in the latest orgmode package from the orgmode ELPA repo? (20150202)). Which version of org is this written against?
I have tried using the latest org package, and also the builtin orgmode from emacs 24.4, but get the same error.
I know that ox has been a bit of a moving target this past year or so, wondering if something has changed, yet again, affecting your code? Pretty interested to find a fix because this alternative looks a lot more flexible than the plugin for Nikola.
When I export my org document to the rst format, the source blocks of 'emacs-lisp' are converted to'commonlisp'. However, this has to be 'common-lisp' or 'lisp', or emacs-lisp for the pygments exporter to work correctly for using readthedocs.
Grepping through the package code, I see that the conversion definition is correct. Why am I getting the export as commonlisp ?
I tried using ox-pandoc as well, org-pandoc-export-as-rst, but have the same export result as 'commonlisp'. The repo in question is my dotemacs config https://github.com/shrysr/dotemacs/
In my org source I have:
#+date: <2019-07-23>
This gets translated to a wrong rst date:
:Date: 23 00mm 19
I think yyyy-mm-dd
is a very common date format:
xsd:date
, borrowed from ISO whicheverorg-time-stamp
produces the same (at least for me), but with a week-day attached, eg <2019-07-23 Tue>
I've got this error while exporting with Emacs 24.4:
Debugger entered--Lisp error: (wrong-number-of-arguments #[(templates) "\212eb\210\306�\307\310\306\311#\205\\�\312 �\313 !\314=\203X�\315 \"�\316\317 \"\211� \316\320 \"E\211��\235\203<�\321\322\316\323 \"\"\210\202W��\203W� �B�\316\324 \"b\210\325\306x\210`|\210\212�c\210)+)\202��*\207" [record object templates value begin signature nil re-search-forward "{{{[-A-Za-z0-9_]" t org-element-context org-element-type macro org-macro-expand org-element-property :begin :args error "Circular macro expansion: %s" :key :end " "] 6 ("/usr/share/emacs/24.4/lisp/org/org-macro.elc" . 3797)] 3) org-macro-replace-all((("modification-time" . "(eval (format-time-string \"$1\" '(22011 7223 28980 721000)))") ("input-file" . "mydoc.org") ("time" . "(eval (format-time-string \"$1\"))") ("property" . "(eval (org-entry-get nil \"$1\" 'selective))")) nil ("SUBTITLE" "TITLE" "DATE" "AUTHOR")) org-export-as(rst nil nil nil (:output-file "./mydoc.rst")) org-export-to-file(rst "./mydoc.rst" nil nil nil nil nil) org-rst-export-to-rst(nil nil nil nil) org-export-dispatch(nil) call-interactively(org-export-dispatch nil nil) command-execute(org-export-dispatch)
Hi,
Thanks for building this incredible ox-rst
package, it makes my life a lot easier in working with software guys who use Sphinx for creating documentation.
I've noticed that */i/*
, bold with emphasis, will be exported to ***i***
, and I wonder if it is a legal syntax in rst for I am using Sphnix to compile and get this warning message:
WARNING: Inline strong start-string without end-string.
I don't understand rst format but I presume it will be a easy fix?
-Yi
Thanks for a great package! I am trying to understand how inline tasks work with ox-rst
. Here is an example of conversion with emacs 27.2 (org 9.5-b83ae59):
org:
*** TODO [#A] Test item
:PROPERTIES:
:CREATED:[2021-08-04 Wed 20:41]
:END:
translates to rst:
TODO Test Item
^^^^^^^^^^^^^^
:CREATED:[2021-08-04 Wed 20:41]
Is this the expected conversion? Or am I missing an export option? I have tried todo:t
and tasks:t
, but they don't seem to change behavior.
As a side note, it would be nice to convert todo items to rst admonitions to take advantage of sphinx.ext.todo
.
When exporting a link of the form [[/images/test.png]]
under Win10 (I don't have a choice at work), the resulting rst is .. image:: c:/images/test.png
.
My indended result would be: .. image:: /images/ex-lst-lang.PNG
Are my expectations wrong or can that be fixed?
Thanks a lot!
Stefan
When I try to export any file with a hyperlink:
This an example [[http://orgmode.org][Org Mode]].
I get the error:
Symbol's value as variable is void: org-link-escape-chars-browser
I found a commit message (for org) saying that this variable has been removed - http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=adcaf91648c1af347be28af5372df607808fe49d - but I don't know where it's referenced.
I had melpa set up so I don't know the exact version number of org-mode I had installed, but it was dated December 24, 2016 and I'm using emacs 26.0.50.2.
Exactly this error marsmining/ox-twbs#13 happens to me with ox-rst and org-mode master branch. Commenting out export-block
lines fixed it.
I'm a bit of a newcomer to the emacs ecosystem, so please forgive me if this is just user error.
Attempting to install the package in spacemacs results in the following error:
An error occurred while installing ox-rst (error: (error Package ‘emacs-26.1’ is unavailable))
I have tried in the user configuration section of .spacemacs
I have also tried (what feels like the more idiomatically correct spacemacs method) of adding ox-rst to the dotspacemacs-additional-packages
function in .spacemacs.
Hi and thx for your work
i was wondering if there was anyway to import rst files to org with this? if not do you know of another method?
thx!
Z
Hi,
When I try to use ox-rst
to convert a org file to rst format, it throw this error:
Wrong type argument: sequencep, :input-buffer
A minimal example is
* Headline
A sentence
If the org file has a table, I will get this error:
org-at-table.el-p: Symbol's function definition is void: org-table-begin
I am using org-mode 8.3beta, and ox-rst is installed from melpa.
On the generated rst
file there is numbering items before each item like:
1.2 Prerequisites
~~~~~~~~~~~~~~~~~
1.3 Using Docker
~~~~~~~~~~~~~~~~
1.4.1.2 Create app
~~~~~~~~~~~~~~~~~~
Is it possible to remove the numbering before all items like:
Prerequisites
~~~~~~~~~~~~~
Using Docker
~~~~~~~~~~~~~
Create app
~~~~~~~~~~
It seems ox-rst currently exports latex math expressions (such as \( K \)
) as-is. It would be great if it converts $ \alpha $
or \( \alpha \)
to :math:
\alpha``and$$ \alpha $$
or`[ \alpha ]` to
.. math::
\alpha
where \alpha
being an example of a math expression.
Export of two or more org links with same name/label results in an invalid reST file. This is caused by ox-rst exporting references as named links instead of anonymous links.
Thus this .org notation:
[[https://example.com][this]] and [[http://example2.com][this]]
is exported as
`this <https://example.com>`_ and `this <http://example2.com>`_
creating an invalid reST file.
The solution would be to
and thus to export the above fragment like this:
`this <https://example.com>`__ and `this <http://example2.com>`__
Thanks and regards,
Jan Janský
Example org input:
#+LANGUAGE: en
#+OPTIONS: ':t author:nil email:nil date:nil toc:nil
#+BEGIN_SRC python
def foo(x):
if x % 2 == 0:
return 42
return 1337
#+END_SRC
Output:
.. code:: python
def foo(x):
if x % 2 == 0:
return 42
return 1337
Notice that there is a tab before return 42
in the output.
If I disable tabulations in my .emacs
config file with (setq-default indent-tabs-mode nil)
, then the export works as expected, there is no tabulation.
The main issue I have is the non-determinism: depending on the local Emacs configuration, the export will be different, which is annoying when the output is committed in a git repository with several people working on it.
Here is an example from the org manual for exporting quoted LaTeX ---
This is the line right before.
#+LATEX: Literal LaTeX code for export
This is the line right after.
That gets exported as
This is the line right before.
Literal LaTeX code for export
This is the line right after.
When I do the analogous export to rst, of these lines
This is the line right before.
#+RST: Literal RST code for export
This is the line right after.
The resulting rst has extra newlines, making unwanted paragraphs.
This is the line right before.
Literal RST code for export
This is the line right after.
Since I have a lot of latex in my org files, I routinely have lines at the beginning like
#+latex_header: \newcommand{\BB}{\mathbb{B}}
These definitions are necessary for the TeX to be formatted properly. They aren't however being copied into the generated rst file. I have org-version 9.0.5 in emacs 26.3 and ox-rst-20191013.551
Hi,
Has anyone tried using ox-rst as a cli script?
I'd like to just run a script from the command line that is called org2rst
and uses ox-rst underneath. So, an elisp script.
Hi,
Apart from #10 , I also noticed a strange behaviour in exporting tables. In the following image, the first table is in org-format, the second table is the exported rst-format.
Notice the separator |
in the middle in table 2, does no line up (should be underneath the +
), and I have to remove two spaces, while for the last separate, I have to add three spaces to make the table format correct, otherwise, the Spnix throws this error message:
ERROR: Malformed table.
I only see this strange behaviour in 3 out of 20-ish tables I was exporting, and I don't know why it was triggered since the org-table looks perfectly fine.
-Yi
BEGIN_QUOTE is exported to a literal block.
In Org Mode, BEGIN_EXAMPLE corresponds to literal blocks, not BEGIN_QUOTE:
http://orgmode.org/manual/Literal-examples.html
BEGIN_QUOTE is just for indenting. The equivalent in rst is a quote block:
http://docutils.sourceforge.net/docs/user/rst/quickref.html#block-quotes
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.