主字体中的 ConTeXt url

主字体中的 ConTeXt url

我有一个这样的网址:\useURL[url1][https://example.com]\from[url1]

(这是来自的输出潘多克

我希望它是文档的主字体,而不是单色字体。使用 LaTeX 和 hyperref.sty,我会添加\urlstyle{same}。ConTeXt 有与此相当的字体吗?

这是 MWE,是 Pandoc 的输出:

% Enable hyperlinks
\setupinteraction
  [state=start,
  style=,
  color=,
  contrastcolor=]

% make chapter, section bookmarks visible when opening document
\placebookmarks[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][chapter, section]
\setupinteractionscreen[option={bookmark,title}]

\setuppagenumbering[location={footer,middle}]
\setupbackend[export=yes]
\setupstructure[state=start,method=auto]

% use microtypography
\definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes]
\definefontfeature[default:tnum][default][tnum=yes, pnum=no]
\definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes]
\setupalign[hz,hanging]
\setupitaliccorrection[global, always]

\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted

\definefallbackfamily[mainface][rm][CMU Serif][preset=range:greek, force=yes]
\definefontfamily[mainface][rm][Latin Modern Roman]
\definefontfamily[mainface][mm][Latin Modern Math]
\definefontfamily[mainface][ss][Latin Modern Sans]
\definefontfamily[mainface][tt][Latin Modern Typewriter][features=none]
\setupbodyfont[mainface]

\setupwhitespace[medium]

\setuphead[chapter]            [style=\tfd\setupinterlinespace,header=empty]
\setuphead[section]            [style=\tfc\setupinterlinespace]
\setuphead[subsection]         [style=\tfb\setupinterlinespace]
\setuphead[subsubsection]      [style=\bf]
\setuphead[subsubsubsection]   [style=\sc]
\setuphead[subsubsubsubsection][style=\it]

\setuphead[chapter, section, subsection, subsubsection, subsubsubsection, subsubsubsubsection][number=no]

\definedescription
  [description]
  [headstyle=bold, style=normal, location=hanging, width=broad, margin=1cm, alternative=hanging]

\setupitemize[autointro]    % prevent orphan list intro
\setupitemize[indentnext=no]

\defineitemgroup[enumerate]
\setupenumerate[each][fit][itemalign=left,distance=.5em,style={\feature[+][default:tnum]}]

\setupfloat[figure][default={here,nonumber}]
\setupfloat[table][default={here,nonumber}]

\setupxtable[frame=off]
\setupxtable[head][topframe=on,bottomframe=on]
\setupxtable[body][]
\setupxtable[foot][bottomframe=on]


\starttext

\useURL[url1][https://example.com]\from[url1]

\stoptext

答案1

我认为你在寻找\setupurl

\starttext
Text \useURL[url1][https://example.com]\from[url1]

\setupurl
  [style=]

Text \useURL[url1][https://example.com]\from[url1]

\stoptext

不同风格的网址

相关内容