aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-03-29 22:39:04 -0700
committerJohn MacFarlane <[email protected]>2025-03-29 22:39:38 -0700
commit021b9cee8d76c95b37e321a389ea59bbb9c0a607 (patch)
tree405c1531e7977b6a5c459d182ace0f9d0375dda4
parent8016196562966868a31e35616075957ef28ac404 (diff)
ms template: put PDF-specific things under a conditional.
Don't inculde them if `pdf-engine` isn't set.
-rw-r--r--data/templates/default.ms26
-rw-r--r--test/writer.ms16
2 files changed, 22 insertions, 20 deletions
diff --git a/data/templates/default.ms b/data/templates/default.ms
index 28d5b6926..b7d918d76 100644
--- a/data/templates/default.ms
+++ b/data/templates/default.ms
@@ -50,10 +50,6 @@ $if(papersize)$
$endif$
.\" color used for strikeout
.defcolor strikecolor rgb 0.7 0.7 0.7
-.\" color for links (rgb)
-.ds PDFHREF.COLOUR 0.35 0.00 0.60
-.\" border for links (default none)
-.ds PDFHREF.BORDER 0 0 0
.\" point size difference between heading levels
.nr PSINCR 1p
.\" heading level above which point size no longer changes
@@ -64,14 +60,6 @@ $endif$
.\" page numbers in footer, centered
.ds CH
.ds CF %
-.\" pdf outline fold level
-.nr PDFOUTLINE.FOLDLEVEL 3
-.\" start out in outline view
-.pdfview /PageMode /UseOutlines
-.\" ***************************************************************
-.\" PDF metadata
-.pdfinfo /Title "$title-meta$"
-.pdfinfo /Author "$author-meta$"
$if(adjusting)$
.ad $adjusting$
$endif$
@@ -85,6 +73,20 @@ $if(has-inline-math)$
delim @@
.EN
$endif$
+$if(pdf-engine)$
+.\" color for links (rgb)
+.ds PDFHREF.COLOUR 0.35 0.00 0.60
+.\" border for links (default none)
+.ds PDFHREF.BORDER 0 0 0
+.\" pdf outline fold level
+.nr PDFOUTLINE.FOLDLEVEL 3
+.\" start out in outline view
+.pdfview /PageMode /UseOutlines
+.\" ***************************************************************
+.\" PDF metadata
+.pdfinfo /Title "$title-meta$"
+.pdfinfo /Author "$author-meta$"
+$endif$
$for(header-includes)$
$header-includes$
$endfor$
diff --git a/test/writer.ms b/test/writer.ms
index c48012e7d..7bca04484 100644
--- a/test/writer.ms
+++ b/test/writer.ms
@@ -38,10 +38,6 @@
.nr FPS (\n[PS] - 2000)
.\" color used for strikeout
.defcolor strikecolor rgb 0.7 0.7 0.7
-.\" color for links (rgb)
-.ds PDFHREF.COLOUR 0.35 0.00 0.60
-.\" border for links (default none)
-.ds PDFHREF.BORDER 0 0 0
.\" point size difference between heading levels
.nr PSINCR 1p
.\" heading level above which point size no longer changes
@@ -52,6 +48,14 @@
.\" page numbers in footer, centered
.ds CH
.ds CF %
+.hy
+.EQ
+delim @@
+.EN
+.\" color for links (rgb)
+.ds PDFHREF.COLOUR 0.35 0.00 0.60
+.\" border for links (default none)
+.ds PDFHREF.BORDER 0 0 0
.\" pdf outline fold level
.nr PDFOUTLINE.FOLDLEVEL 3
.\" start out in outline view
@@ -60,10 +64,6 @@
.\" PDF metadata
.pdfinfo /Title "Pandoc Test Suite"
.pdfinfo /Author "John MacFarlane; Anonymous"
-.hy
-.EQ
-delim @@
-.EN
.TL
Pandoc Test Suite
.AU