You need to use the lang and otherlang variables as described in the manual http://pandoc.org/MANUAL if I recall correctly.

Alternatively/additionally write a latex file containing a preamble fragment where you load polyglossia and any languages and fonts you need with the options you need in the usual polyglossia/fontspec way and include it with the -H option. You also need to mark spans/divs containing extra languages with lang and dir attributes as appropriate. Use your browser's page search function to find these terms in the manual.

I saw your other question about font/language switching yesterday and started to write some documentation for the filter I use to make those things easier. Alas I couldn't finish and today there is a national holiday in Sweden. I'll get back to it tomorrow. Basically you can use spans with a single short class like .g for greek and the filter will inject  latex markup, docx custom style names or extended (html) attributes you have declared to correspond to the class in your metadata.

I can comfort you that you are much better off than I was when I started doing multilingual work with Pandoc. We had no filters, no native spans or divs and no built-in multilingual/polyglossia support back then. Everything had to be done in -H files and with raw latex in the markdown, which was a pain because I needed to make things available in HTML as well.

I'll also update my latex template on github which contains some stuff for fontspec font loading.

I hope this helps. I'm afraid I won't be able to check my mail for the rest of the day.


tis 6 juni 2017 kl. 09:02 skrev Lyndon Drake <lyndon-S8RYeTzMgQ3QT0dZR+AlfA@public.gmane.org>:
Sorry, I probably wasn't clear: I followed the instruction from Pandoc and switched to xelatex. Now I'm stuck trying to configure the language options.


On Tuesday, June 6, 2017 at 7:41:32 AM UTC+1, BP wrote:
You need  the --latex-engine=xelatex option.

tis 6 juni 2017 kl. 07:53 skrev Lyndon Drake <lyn...-S8RYeTzMgQ1hl2p70BpVqQ@public.gmane.orgm>:
Hi all,

Many apologies as I'm sure this is all obvious once one knows, but I'm a bit stuck. I've got some Pandoc Markdown files which I'm trying to convert to PDF using Pandoc. They include various non-ascii characters, all in unicode. If I run:

/usr/local/bin/pandoc -f markdown+pipe_tables+grid_tables+yaml_metadata_block --filter pandoc-citeproc --filter pandoc-csv2table -s -o formatted/Draft3.pdf text/metadata.yaml text/1-Introduction.md


I get the following:

! Package inputenc Error: Unicode char ṣ (U+1E63)

(inputenc)                not set up for use with LaTeX.


See the inputenc package documentation for explanation.

Type  H <return>  for immediate help.

 ...                                              

                                                  

l.125   Vandenhoeck \& Ruprecht, 1990), 39--62.}


Try running pandoc with --latex-engine=xelatex.

pandoc: Error producing PDF



So the next step was to switch to xelatex based on the helpful suggestion from pandoc. As long as I don't try to use any babel or polyglossia environments, or biblatex, this works fine. But as I want to use both, I'm a bit stuck. First thing is that it looks like the default template tries to use babel rather than polyglossia if xetex is the engine. Is there a reason for this? (I want to use the biblatex-sbl style for my bibliography, and they recommend polyglossia.)

I want to use English (UK) as my main language, with Hebrew and Syriac as other languages (I've also got some ancient Greek, but the main font I've chosen works fine and the output looks good for that without using a separate language environment).

As a starting point, what language options do I set in my YAML metadata to enable those other two language environments, and how do I specify the fonts for them?

Here's my YAML metadata file so far:

---
  author: Lyndon Drake
  documentclass: memoir
  toc: true
  papersize: a4
  fontsize: 12pt
  top-level-division: chapter
  number-sections: true
  mainfont: Skolar PE Light
  mainfontoptions: Numbers=OldStyle
  bibliography: /Users/lyndon/Documents/Media/Bibliography/0lib.bib
  csl: /Users/lyndon/Documents/Media/Bibliography/society-of-biblical-literature-fullnote-bibliography.csl
  notes-after-punctuation: true
---

Many thanks in advance for any help on this,
Lyndon

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/99f9330e-3a82-4a0d-8bb4-4ec2513723fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhAMLTJrfZG28bac8X%2BSj589%3DvqJ18WswEax%3D1iEukafgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.