summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hodgson <hello@twshodgson.net>2023-02-12 22:32:40 +0100
committerGitHub <noreply@github.com>2023-02-12 13:32:40 -0800
commit351a8e6c7ce6ccd20eb62bd43f7f5cc9048c65d8 (patch)
tree9d6f6aa61c7a647eac514c542b6780eb46361cdb
parent20d957a3255efb03b78352c4c31850e690bb58c0 (diff)
URL style in ConTeXt (#8612)
Previously, a URL like this would be in monospace text: `\useURL[url1][https://example.com]`. Now, it will match the main text unless the `linkstyle` variable is set, which controls the styling of all links. Closes #8602. Added documentation for `urlstyle` variable in the ConTeXt template, and added detail to its documentation in the LaTeX template.
-rw-r--r--MANUAL.txt8
-rw-r--r--data/templates/default.context1
-rw-r--r--test/writer.context1
-rw-r--r--test/writers-lang-and-dir.context1
4 files changed, 9 insertions, 2 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index 2d5e06460..3b9ed3d3b 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1,7 +1,7 @@
---
title: Pandoc User's Guide
author: John MacFarlane
-date: February 8, 2023
+date: February 12, 2023
---
# Synopsis
@@ -2950,7 +2950,7 @@ Pandoc uses these variables when [creating a PDF] with a LaTeX engine.
: causes links to be printed as footnotes
`urlstyle`
-: style for URLs (e.g., tt, same)
+: style for URLs (e.g., `tt`, `rm`, `sf`, and, the default, `same`)
#### Front matter
@@ -3075,6 +3075,10 @@ Pandoc uses these variables when [creating a PDF] with ConTeXt.
`toc`
: include table of contents (can also be set using
`--toc/--table-of-contents`)
+
+`urlstyle`
+: typeface style for links without link text, e.g. `normal`, `bold`, `slanted`, `boldslanted`,
+ `type`, `cap`, `small`
`whitespace`
: spacing between paragraphs, e.g. `none`, `small` (using
diff --git a/data/templates/default.context b/data/templates/default.context
index b0c90b4a5..da66d599e 100644
--- a/data/templates/default.context
+++ b/data/templates/default.context
@@ -23,6 +23,7 @@ $endif$
style=$linkstyle$,
color=$linkcolor$,
contrastcolor=$linkcontrastcolor$]
+\setupurl[style=$urlstyle$]
% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
diff --git a/test/writer.context b/test/writer.context
index 4915a2d5e..342ee2a90 100644
--- a/test/writer.context
+++ b/test/writer.context
@@ -6,6 +6,7 @@
style=,
color=,
contrastcolor=]
+\setupurl[style=]
% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
diff --git a/test/writers-lang-and-dir.context b/test/writers-lang-and-dir.context
index 90bcc1275..3f7399d72 100644
--- a/test/writers-lang-and-dir.context
+++ b/test/writers-lang-and-dir.context
@@ -4,6 +4,7 @@
style=,
color=,
contrastcolor=]
+\setupurl[style=]
% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]