From 7716caaf2a967fa79acf835bf0d29a1abc966ab1 Mon Sep 17 00:00:00 2001
From: Frederik Elwert <frederik.elwert@web.de>
Date: Sun, 14 Jun 2020 19:38:02 +0200
Subject: [PATCH] Make polyglossia package options list-aware in the LaTeX
 template. (#6444)

---
 data/templates/default.latex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/templates/default.latex b/data/templates/default.latex
index 4ceca434c..92ab9fe13 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -328,9 +328,9 @@ $if(lang)$
 \ifxetex
   % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
   \usepackage{polyglossia}
-  \setmainlanguage[$polyglossia-lang.options$]{$polyglossia-lang.name$}
+  \setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$}
 $for(polyglossia-otherlangs)$
-  \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$}
+  \setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$}
 $endfor$
 \else
   \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}