From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32105 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bernardo C. D. A. Vasconcelos" Newsgroups: gmane.text.pandoc Subject: Lua Filter for \citeauthor and \citetitle in HTML Date: Sat, 28 Jan 2023 14:07:54 -0800 (PST) Message-ID: <51e71797-b029-4438-be64-6a8a15dd500an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4262_1370400436.1674943674253" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21970"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDUKFWODQ4ARBO5Z22PAMGQERSW7HLI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jan 28 23:07:58 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f191.google.com ([209.85.167.191]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pLtMc-0005TO-I5 for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 28 Jan 2023 23:07:58 +0100 Original-Received: by mail-oi1-f191.google.com with SMTP id bh37-20020a056808182500b0036b54c5123bsf3495137oib.23 for ; Sat, 28 Jan 2023 14:07:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=1CjS22MM09SlhdhEw4ZxBOOhfTkYyIL2l0K6qe72+Wk=; b=c4/7w1x3lIg5c9bxauoCJ+4B08UVTJ/QCeTteVQ9d8uQzOssrKs0OfDa1aJogq45N6 LDciQNDInxadhypfAUAXj+ep/gzwOSVlcP7GZnCLpVvKN6g5waiwDZol6Po2c1c6G5fZ W9qIAaA6qgznsgZB3O5gD0yYCHRZVcZ/q738UgUGhpq06pCrkrlNnL7d+8zj1rC77+m7 z28QLlS7NtNX8r3Vu8xyBL08ZvknKlx9OJY6SZRGvtWZX23497AvAYSdQF9n7/FBfrjb hghm3Q7WSx5utRgcKsZei8ys0oScaDZB68uu+utCyJTiAdF5a22j3lRSnGlhRNeHv75/ RdzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=1CjS22MM09SlhdhEw4ZxBOOhfTkYyIL2l0K6qe72+Wk=; b=les+VHE3BGFe2mnpa7u7aioqNLHQ98XUVlx1oBouhw78BKL+KxeryrTVJd83KPAHZQ 2CylaCW6lR9tBZQQFtpGuWfD6ydH4PNNv4liD2m4qqAG0+3T1m+x9AtY/TAfQ6KyW9FB lPPNKXgj1KQjyeJN50qmT4Uqr5nE26b4IQvpIBwsSJ74ONqMiJ0qkYGhwmJAFEU5ADzb BVM9aZaWPp+lAc1VwUqhIXkjY3jyipWaGzjNLCOX8WvuN3BKm9QFdXfzhtcpbo7TjSmR NYa8zpimILncgXxy21KVi0jC48KueYXpOROcKYuHHK9RjZPOWUH+aGmtd7WfF5GS5XT3 +wDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:message-id:to:from:date :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=1CjS22MM09SlhdhEw4ZxBOOhfTkYyIL2l0K6qe72+Wk=; b=AOXZJ4RSpe5zhjy/u/SYCvkNpNI594c35He2q+Zv5/+GiSntsFbg6a0xreOJQBWncf kfBT0lLyIUdQJCL2bR4jMN9vM3myCXuUuqT6+e0uoo/FLKasc7v/VOtjs1ee21jvmmRq gvNmtIifzLQOAezpQICB6Q7m22wMsxMwqVlA2pRJsb/0HoeDeEPWGsy3HzKYSjhj3u/9 lgaBnO+MjBfQHdFU+ckk5OA6OdHWwWcp17DWsUUXwdteApig5Ls2pAThQPtuLDBdDhOk ijMgkJUyYTc1GxZPFeUqUZYGMJxHMC63ZDlAa5HeEprnsxfgJYktrrzT5ho8q5Dlswc6 3lgg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKXInbDroj0ZGHTqSz2rkrTSkhte3d6W57WyXn7Ihl4zKg7phX5W DMZQ8XsDiSiH29Ud2mvmqOw= X-Google-Smtp-Source: AK7set9YQmFYFsni/05lZpqWLul3NUnNXMMrUyZfOUezW3JjwJAqL2A/yWlyHFZg9LnAwUnldXr//A== X-Received: by 2002:a05:6870:c1cc:b0:163:4d72:f84 with SMTP id i12-20020a056870c1cc00b001634d720f84mr958760oad.127.1674943677200; Sat, 28 Jan 2023 14:07:57 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:b96:b0:163:2c39:4a44 with SMTP id lg22-20020a0568700b9600b001632c394a44ls3641542oab.8.-pod-prod-gmail; Sat, 28 Jan 2023 14:07:55 -0800 (PST) X-Received: by 2002:a05:6870:56ac:b0:144:922e:337d with SMTP id p44-20020a05687056ac00b00144922e337dmr3677478oao.25.1674943674854; Sat, 28 Jan 2023 14:07:54 -0800 (PST) X-Original-Sender: bernardovasconcelos-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32105 Archived-At: ------=_Part_4262_1370400436.1674943674253 Content-Type: multipart/alternative; boundary="----=_Part_4263_196212727.1674943674253" ------=_Part_4263_196212727.1674943674253 Content-Type: text/plain; charset="UTF-8" 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 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/51e71797-b029-4438-be64-6a8a15dd500an%40googlegroups.com. ------=_Part_4263_196212727.1674943674253 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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.=C2=A0

I learned some Lua and experimented, but I didn't come close e= nough to have something worth sharing. In short: I imagined something like = `[@Ref]{.citetitle}` and `[@Ref]{.citeauthor}`. So this would imply: parsin= g 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 wh= at the correct way would be to replace the id with the data or if this woul= d have to run before/after citeproc).

Any pointe= rs would be much appreciated.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/51e71797-b029-4438-be64-6a8a15dd500an%40googlegroups.= com.
------=_Part_4263_196212727.1674943674253-- ------=_Part_4262_1370400436.1674943674253--