From aa7aa8067a63b3159b4a2c65ed37fe50ee0824e5 Mon Sep 17 00:00:00 2001
From: John Thiltges <jthiltges2@unl.edu>
Date: Mon, 11 Jan 2021 16:47:21 -0600
Subject: [PATCH] Make the facilities document use Times New Roman, for NSF
 reasons

Requested by Derek in FD 28042
---
 .gitlab-ci.yml  |  2 +-
 pandoc-build.sh | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100755 pandoc-build.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 64d91849..2bcafe54 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,6 +34,6 @@ deploy:
     - curl -L -o - ${HUGO_TARBALL} | tar -zx -C ${HUGOTMP}
     - curl -L https://raw.githubusercontent.com/unlhcc/singularity-dockerfiles/master/IMAGELIST.md > static/markdown/singularity-images.md
     - ${HUGOTMP}/hugo --ignoreCache -b ${BASE_URL} -v
-    - pandoc -s content/facilities.md -o public/facilities.docx
+    - ./pandoc-build.sh
     - rsync -avz --delete public/ $DEPLOY_ROOT
     - rm -rf ${HUGOTMP}
diff --git a/pandoc-build.sh b/pandoc-build.sh
new file mode 100755
index 00000000..c0c30b96
--- /dev/null
+++ b/pandoc-build.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# Make the facilities document use Times New Roman, for NSF reasons
+
+# Create a pandoc document, and change the font
+pushd ${HUGOTMP}
+echo "hello world" | pandoc -o reference.docx
+unzip -q reference.docx word/theme/theme1.xml
+sed -i 's/Calibri/Times New Roman/' word/theme/theme1.xml
+sed -i 's/Cambria/Times New Roman/' word/theme/theme1.xml
+zip -q -r --move reference.docx word
+popd
+
+pandoc --reference-doc=${HUGOTMP}/reference.docx -s content/facilities.md -o public/facilities.docx
-- 
GitLab