public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "Bernardo C. D. A. Vasconcelos" <bernardovasconcelos-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Lua Filter for \citeauthor and \citetitle in HTML
Date: Mon, 30 Jan 2023 08:49:36 -0800 (PST)	[thread overview]
Message-ID: <4865a325-42c0-4245-b992-b4fbdeab576en@googlegroups.com> (raw)
In-Reply-To: <Y9WjLKlot5OuSwhp@localhost>


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

Thanks for the feedback, Bastien! 
Can you think of a similar example script that contains the function to 
parse the bib data? I searched for it online to no avail.
On Saturday, January 28, 2023 at 7:35:40 PM UTC-3 Bastien Dumont wrote:

> I think that it would be better to run it before citeproc, since you don't 
> want citeproc output (unless you want to still benefit from the 
> "ibid./cited" feature). Citeproc would not help you so much here because it 
> does not tag the different parts of a formatted citation. On the other 
> hand, parsing the bib file would be rather simple if it is in the CSL JSON 
> format: then you would just have to use one of the JSON modules for Lua to 
> import your bibliographic references into a Lua table. If you use 
> Bib(La)TeX, you can convert a .bib file to a .json with `pandoc -f bibtex 
> (or biblatex) -t csljson myfile.bib -o myfile.json`.
>
> Le Saturday 28 January 2023 à 02:07:54PM, Bernardo C. D. A. Vasconcelos a 
> écrit :
> > An HTML equivalent of these commands was proposed in Github, but there 
> was no
> > feasible way for it to be implemented as part of Citeproc. I suggested a 
> Lua
> > filter to achieve this and John said it sounded doable. 
> > 
> > I learned some Lua and experimented, but I didn't come close enough to 
> have
> > something worth sharing. In short: I imagined something like `[@Ref]
> > {.citetitle}` and `[@Ref]{.citeauthor}`. So this would imply: parsing 
> the bib
> > data and saving it to a Lua table (stuck here); filtering spans; 
> checking the
> > type and performing the replacement (not clear to me either what the 
> correct
> > way would be to replace the id with the data or if this would have to run
> > before/after citeproc).
> > 
> > Any pointers would be much appreciated.
> > 
> > --
> > 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 [1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit [2]
> https://groups.google.com/d/msgid/
> > pandoc-discuss/51e71797-b029-4438-be64-6a8a15dd500an%40googlegroups.com.
> > 
> > References:
> > 
> > [1] mailto:pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> > [2] 
> https://groups.google.com/d/msgid/pandoc-discuss/51e71797-b029-4438-be64-6a8a15dd500an%40googlegroups.com?utm_medium=email&utm_source=footer
>
>

-- 
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/4865a325-42c0-4245-b992-b4fbdeab576en%40googlegroups.com.

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

  reply	other threads:[~2023-01-30 16:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-28 22:07 Bernardo C. D. A. Vasconcelos
     [not found] ` <51e71797-b029-4438-be64-6a8a15dd500an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-01-28 22:35   ` Bastien DUMONT
2023-01-30 16:49     ` Bernardo C. D. A. Vasconcelos [this message]
     [not found]       ` <4865a325-42c0-4245-b992-b4fbdeab576en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-01-30 17:21         ` Bastien DUMONT
2023-01-30 17:41           ` John MacFarlane
     [not found]             ` <9786B5A5-9022-4E5B-85DE-39D4A2CAFD8F-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2023-03-08 14:00               ` Bernardo C. D. A. Vasconcelos
     [not found]                 ` <4641cd0b-adb7-408f-b025-f56a0b293be5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-09 12:37                   ` Albert Krewinkel
     [not found]                     ` <87pm9i6qmx.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org>
2023-03-09 14:37                       ` Bernardo C. D. A. Vasconcelos
     [not found]                         ` <555cddba-b706-48f6-acb8-07465e5487a2n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-03-09 18:56                           ` Bernardo C. D. A. Vasconcelos

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=4865a325-42c0-4245-b992-b4fbdeab576en@googlegroups.com \
    --to=bernardovasconcelos-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).