public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Benjamin Bray <benrbray-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: HTML Writer / Support CSL Recommendation for Linked Titles
Date: Wed, 11 Aug 2021 09:39:36 -0700 (PDT)	[thread overview]
Message-ID: <bbeac639-d5a2-4e3f-8104-e61f7e208bc5n@googlegroups.com> (raw)
In-Reply-To: <m2v94c6jqv.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 3283 bytes --]

Thanks for the quick reply!  I created an issue here 
<https://github.com/jgm/citeproc/issues/86>.

On Thursday, August 12, 2021 at 1:15:20 AM UTC+9 John MacFarlane wrote:

>
> I didn't know about this CSL advice. Why don't you submit an issue
> on jgm/citeproc and we can look into how it might be done?
> That way I won't lose track.
>
>
> Benjamin Bray <benr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > The CSL specification has a recommendation for automatically linking 
> titles 
> > <
> https://github.com/citation-style-language/documentation/blob/master/specification.rst#appendix-vi-links> 
>
> > when the citation style does not explicitly render the URL. See also 
> this discussion 
> > on GitHub 
> > <https://github.com/citation-style-language/documentation/issues/76>.
> >
> > How hard would it be for Pandoc to support this recommendation, at least 
> in 
> > the HTML writer? Would this be a desirable change? 
> >
> > I poked a round a bit in the source (for instance here 
> > <
> https://github.com/jgm/pandoc/blob/407de98b5e3971c84c7e89de5f2a9d317b4d4557/src/Text/Pandoc/Writers/HTML.hs#L813-L853>), 
>
> > but it wasn't clear to me where I might hook in to add this 
> functionality. 
> > Pointers to the correct location would be appreciated! I might be able 
> to 
> > put together a PR.
> >
> > My use case is Hakyll, where I want to use Pandoc to generate a 
> > bibliography, but I want a hyperlinked title instead of raw URLs. I 
> could 
> > hack something together to modify the HTML manually, but since there's 
> an 
> > official CSL recommendation, it might be a nice feature to have in 
> Pandoc 
> > itself.
> >
> > Thanks,
> > Ben
> >
> > _____
> >
> > For reference, here is a snippet of the mentioned spec:
> >
> > If the bibliography entry for an item does not render any of the above 
> > identifiers (doi,pmcid,pmid,url), then set the anchor of the link as the 
> > item title. If title is not rendered, then set the anchor of the link as 
> > the full bibliography entry for the item. Set the target of the link as 
> one 
> > of the following, in order of priority:
> >
> > 1. doi: prepend with "https://doi.org/"
> > 2. pmcid: prepend with "https://www.ncbi.nlm.nih.gov/pmc/articles/"
> > 3. pmid: prepend with "https://www.ncbi.nlm.nih.gov/pubmed/"
> > 4. url: output as is
> >
> > If the item data does not include any of the above identifiers, do not 
> > include a link.
> >
> >
> > -- 
> > 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pandoc-discuss/1370960d-9f5f-4da0-8078-741ac861c3fbn%40googlegroups.com
> .
>

-- 
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/bbeac639-d5a2-4e3f-8104-e61f7e208bc5n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 6535 bytes --]

      parent reply	other threads:[~2021-08-11 16:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-11 15:55 Benjamin Bray
     [not found] ` <1370960d-9f5f-4da0-8078-741ac861c3fbn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-08-11 16:15   ` John MacFarlane
     [not found]     ` <m2v94c6jqv.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2021-08-11 16:39       ` Benjamin Bray [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=bbeac639-d5a2-4e3f-8104-e61f7e208bc5n@googlegroups.com \
    --to=benrbray-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@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).