Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/pandocPublic

RST output: Generate simple-style tables if possible #4750

Closed
@kaushalmodi

Description

@kaushalmodi

Seethe original request on Google Groups for details.

Here's my original message copy/pasted from that thread:


I am trying to use Org mode to document few Nim (https://nim-lang.org) packages. Nim has an internal HTML documentation generator that parses ReST markup docs and doc-strings.

So I am doing:

pandoc foo.org -o foo.rst

to export Org docs to ReST.

This works mostly fine except that the Nim document generator doesn't parse the grid-style ReST tables generated by Pandoc.

Example:

This style of ReST tables is parsed fine by the Nim doc generator:

  =======  =========  Option   Meaning  -------  ---------  ``+``    All numbers (including positive ones) are preceded by a sign.  ``-``    Only negative numbers are preceded by a sign.  *SPACE*  Negative numbers are preceded by a sign, positive numbers are preceded by a space.  =======  =========

But this style (grid-style) is not:

    +-----------------------------------+-----------------------------------+    | Option                            | Meaning                           |    +===================================+===================================+    | ``+``                             | All numbers (including positive   |    |                                   | ones) are preceded by a sign.     |    +-----------------------------------+-----------------------------------+    | ``-``                             | Only negative numbers are         |    |                                   | preceded by a sign.               |    +-----------------------------------+-----------------------------------+    | *SPACE*                           | Negative numbers are preceded by  |    |                                   | a sign, positive numbers are      |    |                                   | preceded by a space.              |    +-----------------------------------+-----------------------------------+

Here is the Org source:

  | Option    | Meaning                                                                              |  |-----------+--------------------------------------------------------------------------------------|  | =+=       | All numbers (including positive ones) are preceded by a sign.                        |  | =-=       | Only negative numbers are preceded by a sign.                                        |  | /SPACE/   | Negative numbers are preceded by a sign, positive numbers are preceded by a space.   |

Is there a way to choose the former style of ReST table when exporting from Org?

If not, would you please add this feature?

Thanks!


To which,@jgm replied:

In principle, we could change the RST writer so it produces the simple tables when the contents of the table are simple enough (no block structure, no overly long lines).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp