Pandoc and markdown compile errors

Hello,

I have compiled a a file from Scrivener3 as markdown (.md) and then as plain text (.txt). The wrote the file in Scrivener 3 using basic markdown: **, *, numbered lists, but nothing too fancy. When I run pandoc from the terminal to creat a pdf, I get this error:

pandoc myplaintext1.txt -o .pdf
Error producing PDF.
! Package inputenc Error: Unicode character (U+2003)
(inputenc) not set up for use with LaTeX.

See the inputenc package documentation for explanation.
Type H for immediate help.

l.139 …d writing assignments in this course. [NOTE: there is nothing at all unusual about line 139 that I can tell. In fact, even if I delete the paragraph containing this sentence, it still throws the same error.]
Try running pandoc with --pdf-engine=xelatex.[/size]

If I copy and past the same file into a plaintext editor such as TextEdit or Atom, save it, and then run the same pandoc command, I encounter no problems. Everything works as it should. So I’m thinking there is something in the Scrivener compiled plain text and .md file that pandoc doesn’t like. But I’m not sufficiently familiar with the inner workings of latex or pandoc to know what. Any advice would be appreciated.

p.s. - If I try runing pandoc with pdf-engine=xelatex I get this:

[WARNING] Missing character: There is no in font [lmroman10-regular]:mapping=tex-text;!
[WARNING] Missing character: There is no in font [lmroman10-regular]:mapping=tex-text;!
[WARNING] Missing character: There is no in font [lmroman10-regular]:mapping=tex-text;!

Thanks in advance.

Unicode character 2003 is an “Em Space”, which might look like an ordinary space depending on the font (and maybe Atom pastes it as a normal space for some reason). Whatever the case you definitely would need something like XeLaTeX or some adjustment to the preamble to print it. The character can be searched for, if you copy and paste it from the Character Viewer tool into Scrivener’s Find pane.

As to the post script, I bet that’s the same spot—the standard LaTeX Modern font probably doesn’t have that space character so you get a warning about it. You can use extended Unicode, but to avoid warnings like that you do need to use a font that actually has the glyph in its font table.

Latin Modern has an em-space. Loading the package xunicode should work if you’re using xelatex (it’s flaky, YMMV), or just replace each instance of the U+2003 character with the command \quad.

Edit: It looks like xunicode doesn’t convert U+2003. Are you using the fontspec package?