From 4136ec0f4ae30d2b2a41260d3af3c894c79fe705 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Tue, 7 Jun 2016 10:08:49 -0700
Subject: [PATCH] latex template: fix for obscure hyperref/xelatex issue.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Here's a minimal case:

    \documentclass[]{article}
    \usepackage{hyperref}
    \begin{document}
    \section{\%á}
    \end{document}

Without this change, this fails on the second invocation of xelatex.
See https://tex.stackexchange.com/questions/313266/and-non-ascii-characters-in-headings

This affects inputs this like

    # %á

with pdf output via xelatex.
---
 data/templates                   | 2 +-
 tests/lhs-test.latex             | 4 ++--
 tests/lhs-test.latex+lhs         | 4 ++--
 tests/writer.latex               | 4 ++--
 tests/writers-lang-and-dir.latex | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/data/templates b/data/templates
index 1a62e8390..feffd7c64 160000
--- a/data/templates
+++ b/data/templates
@@ -1 +1 @@
-Subproject commit 1a62e83904c9dee869b0b2b33613e4c4c07977b3
+Subproject commit feffd7c64abab863abd3f6458d1c445d6bfe7fc4
diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex
index a5b0ff87f..5f376328a 100644
--- a/tests/lhs-test.latex
+++ b/tests/lhs-test.latex
@@ -21,8 +21,8 @@
 \usepackage{microtype}
 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
 }{}
-\usepackage{hyperref}
-\hypersetup{unicode=true,
+\usepackage[unicode=true]{hyperref}
+\hypersetup{
             pdfborder={0 0 0},
             breaklinks=true}
 \urlstyle{same}  % don't use monospace font for urls
diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs
index 8ab9a2ef0..b6db76e6f 100644
--- a/tests/lhs-test.latex+lhs
+++ b/tests/lhs-test.latex+lhs
@@ -21,8 +21,8 @@
 \usepackage{microtype}
 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
 }{}
-\usepackage{hyperref}
-\hypersetup{unicode=true,
+\usepackage[unicode=true]{hyperref}
+\hypersetup{
             pdfborder={0 0 0},
             breaklinks=true}
 \urlstyle{same}  % don't use monospace font for urls
diff --git a/tests/writer.latex b/tests/writer.latex
index 7e7a02f58..03e7133b7 100644
--- a/tests/writer.latex
+++ b/tests/writer.latex
@@ -21,8 +21,8 @@
 \usepackage{microtype}
 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
 }{}
-\usepackage{hyperref}
-\hypersetup{unicode=true,
+\usepackage[unicode=true]{hyperref}
+\hypersetup{
             pdftitle={Pandoc Test Suite},
             pdfauthor={John MacFarlane; Anonymous},
             pdfborder={0 0 0},
diff --git a/tests/writers-lang-and-dir.latex b/tests/writers-lang-and-dir.latex
index 346675353..badb0eb82 100644
--- a/tests/writers-lang-and-dir.latex
+++ b/tests/writers-lang-and-dir.latex
@@ -21,8 +21,8 @@
 \usepackage{microtype}
 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
 }{}
-\usepackage{hyperref}
-\hypersetup{unicode=true,
+\usepackage[unicode=true]{hyperref}
+\hypersetup{
             pdfborder={0 0 0},
             breaklinks=true}
 \urlstyle{same}  % don't use monospace font for urls