From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29077 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Leena Murgai Newsgroups: gmane.text.pandoc Subject: Re: Help with a filter converting citations to sidenotes Date: Fri, 20 Aug 2021 09:12:05 -0700 (PDT) Message-ID: <93663960-bbfe-40a1-b3ba-25fefe58e7e0n@googlegroups.com> References: <0f2d14e3-a86e-4fa1-b98c-52f540fe82b9n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2238_1657023147.1629475925917" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12574"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCIMDCM26AARBVVI76EAMGQEYQSANJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Aug 20 18:12:09 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f60.google.com ([209.85.210.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mH77o-0002zC-T7 for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 Aug 2021 18:12:08 +0200 Original-Received: by mail-ot1-f60.google.com with SMTP id b25-20020a9d60d9000000b00519be3bdc04sf4842515otk.7 for ; Fri, 20 Aug 2021 09:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=bc2IOiHCAEYl6RWH53RQIjLWba9uYRZsDN4h1Q60yr8=; b=AYU+6XcONTr881BtsXW/YcSLeMhY3TJs/WSY1fAdQ/6+Xj+CJpEtLwMvPyZNLFS/dG Mn+EX1xRFCqbUdZqJWsqZO3uA/ctMB18J0DXik/9nvuxT7NJ/yRGxJhAx7ao2REwcwy5 u0gZz2cl7nJYqh43xnX/Ka7FAFm/CMmqvtiNlO3BZosa9nWenFWtqqxlivP4uLrhfRdD WOxKe8XYV37hpJ8ZRtVI46qdF9LIrdBkLs/gWyWxq0PYafem7BddsBVdsyCCUgAsxj7i E4XZhhXcW2gnGEv812Eigbr3qyeQGPdedF7deSwzA1hAjCHaeuYh8y558X2QQ6KbSSlu pzHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=bc2IOiHCAEYl6RWH53RQIjLWba9uYRZsDN4h1Q60yr8=; b=c8Sk8r6W9WnDPGcn+mSxLs+EcyBP3rzwSq3Ycr+1RqguwyH7H5LartY2AOF5TBkuh9 HGp/non2mxaN2EYZJThUUEljC1+pXdMqv/Vlt5QS4NnhnT2/62VXdVg4Q5csJ6Frj4FV Z3wW+lTRBTdGgPjndRnLAqgmGRH3OQvwy5mcCfHL4m+gkl2Q4H8yW0uHhGuNDZi/CvAn cCLAPAYZuOH7Eq0w/fAal3rD47mDNOfRDHeoKrwsCUIZsDpo6utnd6tHFVXWe1Anye/4 X/+so/aw6mez4xa32YO1a4Jp+OE9I3GJOVFv39qCRCMjTHDahVW9P/KAtafPLaQd3y09 gAOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=bc2IOiHCAEYl6RWH53RQIjLWba9uYRZsDN4h1Q60yr8=; b=bwZz139tJ065CneKrhb+RF3Cz6c8a/iyOM3AGgNCYxLohFyOTVhEiu2nr/I7QqSOdX bFFobhiQZvVRt2NrYy7liN+zhmXxjyVJrob9C+C4n8X1VwAFUi6mre1KejKKCnWwMGB+ mV8lmngmjBGtCrl041nsgMuvDM25xbTomtrQzjLYGl7LlnocqKjE3jWRfvW7bn51AUff I+styRo+22kS3/Q8kpnbROKL89DRe44zvdnYsSrI8Uv3gKfdwodHkOEqopTTA7ovFojA nbVe7F1QJoNSx+sEX2SGgCnMCvp1lFoBgcQAXrJ99cWHIfk4pHX5ymEzo0yZ/N/u8Qky aKug== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533ESy2cdV+Ui2KjYH24zTVBTbJmRTo/0ZaBPB2jS04XMjCKyl3v Rw0GBpnU08i/ZFMdtccnZeI= X-Google-Smtp-Source: ABdhPJwGdb0KMYYSblKnTnrkVpnWbl2TVYt3EctRIVnBPAAGYTkwuOOxINtDqNhB3o15KxcRtuNoKA== X-Received: by 2002:a05:6830:2443:: with SMTP id x3mr17947830otr.12.1629475927919; Fri, 20 Aug 2021 09:12:07 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:180d:: with SMTP id bh13ls2491287oib.5.gmail; Fri, 20 Aug 2021 09:12:06 -0700 (PDT) X-Received: by 2002:aca:1b19:: with SMTP id b25mr3594074oib.138.1629475926459; Fri, 20 Aug 2021 09:12:06 -0700 (PDT) In-Reply-To: X-Original-Sender: leenamurgai-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:29077 Archived-At: ------=_Part_2238_1657023147.1629475925917 Content-Type: multipart/alternative; boundary="----=_Part_2239_95191479.1629475925917" ------=_Part_2239_95191479.1629475925917 Content-Type: text/plain; charset="UTF-8" Maybe the order I run the filters in matters? On Friday, 20 August 2021 at 09:07:24 UTC-7 Leena Murgai wrote: > Yeah, I tried looking there, I couldn't find what I wanted. I'm sure I'm > missing something. > > The question is how to access it? As in what's the code? For example, each > citation (https://pandoc.org/lua-filters.html#type-citation) has the > fields id, mode, prefix, suffix, note_num, hash. Which one contains the > text I want? What's the code to get the list of inlines I want > (corresponding to the text in the citation)? > On Friday, 20 August 2021 at 08:59:52 UTC-7 William Lupton wrote: > >> Do you mean the citations themselves? These are in el.citations. See >> https://pandoc.org/lua-filters.html#type-cite and >> https://pandoc.org/lua-filters.html#type-citation. >> >> On Fri, 20 Aug 2021 at 16:36, Leena Murgai wrote: >> >>> So far I have the following, which puts the [linked_item_number] in the >>> passage and in the marginnote but I'm missing the rest of the >>> text_that_goes_in_the_bibliography. >>> >>> function Cite(el) >>> return { >>> pandoc.Span(el.content), >>> pandoc.RawInline('html5', ' '), >>> pandoc.Span(el.content), >>> pandoc.RawInline('html5', ' ') >>> } >>> end >>> >>> On Thursday, 19 August 2021 at 20:32:11 UTC-7 Leena Murgai wrote: >>> >>>> Hi there, >>>> >>>> I'm converting from LaTeX to HTML5. I'd like to put my citations in >>>> 'sidenote's rather than at the end of the doc. In practice, this just means >>>> I want the output html: to look like >>>> >>>> [linked_item_number] >>>> text_that_goes_in_the_bibliography >>>> >>>> How do I access the element that goes into the citation, i.e. >>>> text_that_goes_in_the_bibliography? >>>> >>>> Any advice 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-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/pandoc-discuss/eda3d7b4-befd-4f42-9455-8a37373d33a6n%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/93663960-bbfe-40a1-b3ba-25fefe58e7e0n%40googlegroups.com. ------=_Part_2239_95191479.1629475925917 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maybe the order I run the filters in matters?

On Friday, 20 August 2021 at 09= :07:24 UTC-7 Leena Murgai wrote:
Yeah, I tried looking there, I couldn't find what I= wanted. I'm sure I'm missing something.

The que= stion is how to access it? As in what's the code? For example, each cit= ation (https://pandoc.org/lua-filters.html#type-citation) ha= s the fields=C2=A0id,=C2=A0mode,=C2=A0prefix,=C2=A0suffix,=C2=A0<= span style=3D"font-weight:bold">note_num,=C2=A0hash. Which one contains the text I want? What's the= code to get the list of inlines I want (corresponding to the text in the c= itation)?
On Friday, 20 August 2021 at 08:59:52 UTC-7 William Lupton wrote:
=
Do you m= ean the citations themselves? These are in el.citations. See=C2=A0htt= ps://pandoc.org/lua-filters.html#type-cite and=C2=A0https://= pandoc.org/lua-filters.html#type-citation.

On Fri, 20 Aug 2021 at 16:36, Leena Murgai <leen= a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
So far I have the following,= which puts the [linked_item_number] in t= he passage and in the marginnote but I'm missing the rest of the text_that_goes_in_the_bibliography.

function Cite(el)
=
=C2=A0 return {=C2=A0
= =C2=A0 =C2=A0=C2=A0pandoc.Span(el.con= tent),
=C2=A0 =C2=A0 pandoc.RawInline('html= 5', ' <span class =3D "marginnote">'), <= /div>
=C2=A0 =C2=A0 pandoc.Span(el.content),=
=C2=A0 =C2=A0 pandoc.RawInline= ('html5', ' </span>')
=C2=A0 =C2=A0 }
en= d

On Thursday, 19 August 2021 at 20:32:11 UTC-7 Leena Mu= rgai wrote:
Hi there,

I'm converting from LaTeX to HTML5.= I'd like to put my citations in 'sidenote's rather than at the= end of the doc. In practice, this just means I want the output html: to lo= ok like

[linked_item_nu= mber] <span class=3Dmarginnote>
text_that_goes_in_the_bibliography</span>
How do I access the element that goes into the citation, i.e. <= font face=3D"Courier New">text_that_goes_in_the_bibliography?

Any advice 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 pandoc-discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/eda= 3d7b4-befd-4f42-9455-8a37373d33a6n%40googlegroups.com.

--
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/93663960-bbfe-40a1-b3ba-25fefe58e7e0n%40googlegroups.= com.
------=_Part_2239_95191479.1629475925917-- ------=_Part_2238_1657023147.1629475925917--