From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32106 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Lua Filter for \citeauthor and \citetitle in HTML Date: Sat, 28 Jan 2023 22:35:24 +0000 Message-ID: References: <51e71797-b029-4438-be64-6a8a15dd500an@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34937"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRBN6G22PAMGQEXNWSSAA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sat Jan 28 23:35:42 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f55.google.com ([209.85.167.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pLtnS-0008n2-JL for gtp-pandoc-discuss@m.gmane-mx.org; Sat, 28 Jan 2023 23:35:42 +0100 Original-Received: by mail-lf1-f55.google.com with SMTP id y26-20020a0565123f1a00b004b4b8aabd0csf3700453lfa.16 for ; Sat, 28 Jan 2023 14:35:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674945340; cv=pass; d=google.com; s=arc-20160816; b=wKjPUsFhkoALafsKOx2tpGbKyWRhmYt1gR1JGYOdiLH0l0hvl0SFxEJ4UKFN2j9HZG hqe/KIwq25eqrbQknTo9ugd61QUl3wpjUYYyXfltmrHHj2W2MBn7XWsNzVA6qTmmDcWl 4+zfynbD//sGHhzjwdBK4EKc6rcTDR7+ey//4d0+/bK4QFNM5DC2LaleCp2Tq7auPXJV YilOHUFcMvfDfJiLKF5LYJQSNKmimJkCSh/Iuf75yfRvKkcdhkFoNaGzuukPNJpHAEo+ QqAWNTsnytreCpjsA0HdKRZ9xVnTrVaW/adWJ0JWjwMiP/Kbco5ZS7Wh5YwsuruktZ29 prEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:dkim-signature; bh=GixlQSu5zFs7jX00yY+e7RObnEoa+9TMaLZQsJsA8eE=; b=W55ervCdXAaYzqGk0rWmHUlmoziRpSAkJcX9KUOXgxRSPBpva/ckDUOBba1az/Fv98 hJ86MwHbTrB9DEwFTfJGpya9WN3mCCwZgjB2+rXvS21BxvDUmyam07Fwaqch7wICKzgj whfLE7XGgbEqh6jjr9pZFIOUkl6r/EwfJcVQHgdWfIKfybdQ17lE4mGncjoZVW5x/lH9 uhilkZfPhAM6YBlNnuOmKzabPWS+F/l9Q0fOcFOK3dOCY5qkGthDi1VgF3NQYJ35VNev ICXwxMS0oPJMKqvBIpevp1pC1m/kbC/WelKGwJYelChX76JB27+j0z1ec+W+6rh2MPfM 9EIw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=n5GSxkKK; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=GixlQSu5zFs7jX00yY+e7RObnEoa+9TMaLZQsJsA8eE=; b=rkRSqDi8HzJPdGA7kXqNbpNCB+SAdr/sYFYa7i/qtJF5xVMrUSczCrwsg7UZk0w+i/ a1/rjirqZy90Zxtyouy3dfpDYgzuVjHeNw7HxNFeiOE0Com2zgqQ7jtUaIsH2HaccsRi rfy3NzG9v/h8iMK/Ecm1lXMFnS34ljNKVgKA2NNlnKsbZbICVdSd6Xv5kXKKQuvB44qu WmWSVt5/Ou5IjADvqM/EZyZzijCOW5qwvMcjBZGBUut0hsENBaO4V2zrxEsa0/Wo5P4p QkP2idjJ/tz1jlutaeGIOM+zaaXbUZr29tiH86zg4Rmn6 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-authentication-results:x-original-sender:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=GixlQSu5zFs7jX00yY+e7RObnEoa+9TMaLZQsJsA8eE=; b=zRa+DWrfmsXS0iMPQ4limnb4A6dHS0NlF6Ix4a6TBgIn2KjH0w2G5F9/QO/6GvjNeZ q1EWIQZoLAS7MkQgWAtfqC5Sqr09gHFFLVtcxIcjT0kDp4UhEAbl5Bt6iHaDS+HCecDq YBXWEIreJLx+SkjY0+TqJIE7F5LGcYlMjI7A+jMLGaw+YdWU9cTTKsAE+7yb5HdU7kMa jGMrD027MrkJSrAJmpx9/vGDU8uREj+9srcyoB6eIqjlk1kRCnQnMpT2CpLlrqSCMCXI Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWQPLhGrEKIZficFFg14Qy7xL4xcKOkTgTPI5EzAGKx5DADhr41 yXT9UzQnGsx3B3s/OqX0xOc= X-Google-Smtp-Source: AK7set+4Om9UkEjRWa2zM7coJQ+491EXkdzw2F74VqTnkBtSuSeiHJ5uDujeAbxYxTZb7cyamskuFA== X-Received: by 2002:a05:6512:1091:b0:4d7:7335:b84b with SMTP id j17-20020a056512109100b004d77335b84bmr1898016lfg.352.1674945340794; Sat, 28 Jan 2023 14:35:40 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:9048:0:b0:28b:86c7:a456 with SMTP id n8-20020a2e9048000000b0028b86c7a456ls1184189ljg.11.-pod-prod-gmail; Sat, 28 Jan 2023 14:35:34 -0800 (PST) X-Received: by 2002:a2e:9614:0:b0:27f:df4a:3c1f with SMTP id v20-20020a2e9614000000b0027fdf4a3c1fmr11108509ljh.42.1674945334524; Sat, 28 Jan 2023 14:35:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674945334; cv=none; d=google.com; s=arc-20160816; b=Pz+Ax252KiKIDCm52mu8jFGOuDmN57NfoGExj4KxwbDWCf3e+yBprpnyMQFq0THplG WCm/Hfv8UUgj99YEr4FV06sk2yAhpPG/9VEddXTeuXDU0UC4VX26OPtccpNmuGlHaCEy yZ4Mr3JZ8pVNfh8SP2I7U3U9O2UdegjGvDO8+TsQv7np+JorBTnbgFlAniihxvx82q4Z v0IZLiGK91VBHTRKJt1W5N4557J5CJHlbmYTwRx3L5Y5N5e5JwKyMRLds8/+CqEUua1U t6gBXs3mt3AOMMZ/FIkPwEHka6iXfs9vx9nDE3KMtw1EUEAD1sHexzrG8X66y+Q0OGXF KQ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=+VU51FVJyyDH3c9l4oNEcz42fDuaoHlfnvCl/S10tHs=; b=Jh/Csu+Agf/FIARQvw3woWM4YlJM7bZiF/RxU02L9/U6RyXZr0u61RzmSLU8rJft8x tqYAX+nsG60tZGVx7G/pBeMKQDeGNSdAwOAW+H5ONjUaI+nmbF66+XI3AZ1YCtDGGrZ5 IBF3torgU9mtJgjMVq3FV1tBOw//HcyL35XL5h7DkcEd/HdWc0zV1aRRZE5RywImjit7 jKQMxrn6/p7M57WGlhVwDGPLvbZXAoTEGPbm9ZaTdF5OkeW7kJqoXvi4ocFUJ8tCE6ib eJbdwZhzYEXPeI8qlFlQ3wsPM0fd6FPXk4Apzx2oiWKYtN8QoLmF/mLFr3yf1cgnWV5J /oNA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=n5GSxkKK; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id 3-20020a05651c12c300b0028d0067c3d4si39132lje.2.2023.01.28.14.35.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Jan 2023 14:35:34 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C898A24045F for ; Sat, 28 Jan 2023 23:35:33 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4P48R81vyQz6tmS for ; Sat, 28 Jan 2023 23:35:32 +0100 (CET) Content-Disposition: inline In-Reply-To: <51e71797-b029-4438-be64-6a8a15dd500an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=n5GSxkKK; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:32106 Archived-At: 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./cite= d" feature). Citeproc would not help you so much here because it does not t= ag 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 y= ou would just have to use one of the JSON modules for Lua to import your bi= bliographic references into a Lua table. If you use Bib(La)TeX, you can con= vert a .bib file to a .json with `pandoc -f bibtex (or biblatex) -t csljson= myfile.bib -o myfile.json`. Le Saturday 28 January 2023 =C3=A0 02:07:54PM, Bernardo C. D. A. Vasconcelo= s a =C3=A9crit : > An HTML equivalent of these commands was proposed in Github, but there wa= s 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 >=20 > I learned some Lua and experimented, but I didn't come close enough to ha= ve > 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 corr= ect > way would be to replace the id with the data or if this would have to run > before/after citeproc). >=20 > Any pointers would be much appreciated. >=20 > -- > 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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [2]https://groups.google.com/d/m= sgid/ > pandoc-discuss/51e71797-b029-4438-be64-6a8a15dd500an%40googlegroups.com. >=20 > References: >=20 > [1] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [2] https://groups.google.com/d/msgid/pandoc-discuss/51e71797-b029-4438-b= e64-6a8a15dd500an%40googlegroups.com?utm_medium=3Demail&utm_source=3Dfooter --=20 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 e= mail 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/Y9WjLKlot5OuSwhp%40localhost.