public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: "T. Kurt Bond"
	<tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: pandoc context template forces linkstyle, linkcolor, and linkcontrastcolor off by default
Date: Wed, 09 Jun 2021 15:28:51 -0700	[thread overview]
Message-ID: <m2pmwuvfj0.fsf@MacBook-Pro-2.hsd1.ca.comcast.net> (raw)
In-Reply-To: <CAN1EhV-hvWkLtcDMqJy8QZCvKK18TF+O3Uyf+gWtPTeubtRxWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


The current behavior is consistent with how things work with
latex.  Rather than using the defaults, we specify black
unmarked links by default.  The reason is that this is best
for documents that are to be printed.

I can see arguments on both sides, but the current behavior
is consistent across formats.

"T. Kurt Bond" <tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I'm always surprised when I produce a PDF with pandoc via context output
> and the hyperlinks are indistinguishable from normal text so I can't tell
> where they are.  It turns out that the template for context output
> unconditionally sets linkstyle, linkcolor, and contrastcolor to the values
> of the variables $linkstyle$, $linkcolor$, and $linkcontrastcolor$ *even if
> the user hasn't specified them.*  This forces those all off.
>
> Here's the code from pandoc -D context (pandoc version 2.14.0.1):
>
> % Enable hyperlinks
> \setupinteraction
>   [state=start,
> $if(title)$
>   title={$title$},
> $endif$
> $if(subtitle)$
>   subtitle={$subtitle$},
> $endif$
> $if(author)$
>   author={$for(author)$$author$$sep$; $endfor$},
> $endif$
> $if(keywords)$
>   keyword={$for(keywords)$$keywords$$sep$; $endfor$},
> $endif$
>   style=$linkstyle$,
>   color=$linkcolor$,
>   contrastcolor=$linkcontrastcolor$]
>
> I think the last three lines should be
>
> $if(linkstyle)$
>   style=$linkstyle$,
> $endif$
> $if(linkcolor)$
>   color=$linkcolor$,
> $endif$
> $if(linkcontrastcolor)$
>   contrastcolor=$linkcontrastcolor$
> $endif$
>   ]
>
> instead, so the style, color, and contrast color are only set if the user
> specifies those variables.  This way the document gets the default ConTeXt
> style, color, and contrast color.
>
> -- 
> T. Kurt Bond, tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, https://tkurtbond.github.io
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAN1EhV-hvWkLtcDMqJy8QZCvKK18TF%2BO3Uyf%2BgWtPTeubtRxWA%40mail.gmail.com.


      parent reply	other threads:[~2021-06-09 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 19:49 T. Kurt Bond
     [not found] ` <CAN1EhV-hvWkLtcDMqJy8QZCvKK18TF+O3Uyf+gWtPTeubtRxWA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-06-09 22:28   ` John MacFarlane [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pmwuvfj0.fsf@MacBook-Pro-2.hsd1.ca.comcast.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=tkurtbond-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).