Sublime Forum

Can't build from plain text

#1

Hello,

I want to build a docx file from plain text format, i. e. regular text disregarding any Markdown formatting. Currently, the build file looks like this:

{
  "selector": "text.html.markdown",
  "working_dir": "$file_path",
  "cmd": [
    "pandoc",
    "-f", "plain",
    "-t", "docx",
    "-o", "$file_base_name.docx",
   	"$file_name"
  ]
}

In the output, I am getting this error:

Unknown reader: plain
[Finished in 0.1s with exit code 1]
[cmd: ['pandoc', '-f', 'plain', '-t', 'docx', '-o', 'octagon105.docx', 'octagon105.md']]
[dir: /home/igor/Mega/Writing/2017-03 Octagon]
[path: /sbin:/bin:/usr/sbin:/usr/bin:/snap/bin]

Could someone help? Pandoc documentation says “plain” should be a recognized format.

0 Likes

#2

I don’t see plain in the input format pandoc docs, only in the output format.

0 Likes

#3

Aha! So, there’s no way to work in plain text in Sublime? That’s too bad. Thanks for the answer in any case.

0 Likes

#4

Your error is coming from pandoc, not Sublime Text. If you try the same command in a terminal, you will see it fail there as well. From what I can tell from the pandoc documentation, it does not support plain text input; only plain text output.

0 Likes

#5

I’ll ask in Pandoc’s discussion group and get back here.

0 Likes