From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/26164 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Benct Philip Jonsson Newsgroups: gmane.text.pandoc Subject: Re: Footnotes in revealjs slides Date: Thu, 17 Sep 2020 09:58:29 +0200 Message-ID: <2e985ea9-c2c8-99fb-5515-6775c181e920@gmail.com> References: <47eee52e-3d47-7830-97bf-68d21c6c2bf8@gmail.com> <7c5ae003-b078-442f-b7ac-584614ccdee7n@googlegroups.com> <565a2869-820c-4919-89b9-4f3aa8c5dd31n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------66F54B16EF99CC8686A1E3FB" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39946"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 To: anna ecke <0x616e6e6165636b65-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>, pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBKNORT5QKGQEUAVECCI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Sep 17 09:58:39 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f190.google.com ([209.85.208.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kIooQ-000AGT-HC for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 17 Sep 2020 09:58:38 +0200 Original-Received: by mail-lj1-f190.google.com with SMTP id s11sf622751ljh.8 for ; Thu, 17 Sep 2020 00:58:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1600329518; cv=pass; d=google.com; s=arc-20160816; b=RbhGt3mELs9bfJoyCo0U/Jc6X7ukohKE95EWCN+XeEVqcyFLvTyvRn8vBJwtmSFzoK pRkN5G/ywvtpvPRT4qYLMMkj01pS/07n4IasjCUt6n7Cg94QK952w+ddibRttBVkKfsW msivUmHA18a4IZZftegjwJRePQXb+4xSO+Pn5K2znXlwRUSl50wBk/lcKDTDnmVTnu/u +BqDbAKVryGLUKycKj2w68yQmUWS85wT4vTCkgwiLETIXDE/mZobHSMcKR0MtDQ2RHJm Ox3WDrp0SXlUlV+t6Ls/R8sSOGha7t3CNRwHHWNs8IBZSkhLDYqrvYwdCt6b7vleiTu6 Dxng== 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:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:sender:dkim-signature:dkim-signature; bh=AuWUuj0o9irXjyYeiyZndppgwoAyIIRLVZ26NOzVlME=; b=mBgi0hZo+acNvEuRFinewHrvLGXwFe5TyG1QobE3V1ZfSrwfTd1V3/NQ4B7Ee8+y6T azNmVPA8jbJ0sVbdc0p1zRSO3DdmD9y/S0zE4Kui+1LwFAGlK+6zSKnBmShTf0ZMoXaY PlGMWQKZVLd73r6AgebSDCMfHk1daati+RTp/1dnRiBCFGZR+m7YkZXe+3hZq0oKI9Nr a5DLJPUsCMxH4+Rk+/TkpcoHLLfMRfv0BdQyk1Yf5P3/Fi/QTOa8AQYCT/CdcM4BGxuh tIVt7ysdTr+ATL8D7yCB2uBD4hpdsFOZt1ymREC/Hu/dpLu2AS1ygnUaM0WXmrAdFMVE j4WQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oP5okzR0; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::62a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=AuWUuj0o9irXjyYeiyZndppgwoAyIIRLVZ26NOzVlME=; b=liP7o1TRw5dlnZXFhBaDlyvl1WiWJl4LQcpKGlTCk91VTpH+V5chVKmVhtOX4veeeU 8Hg2wbRCB1DP5q3MFj1gzGoPNOz5atFwxFCJ8nNVnv2bwzukJ3G87M36/nL5YHr4XDXc HaOxvYQUalDvXMUFwy9T3Yexa+TGtBml4WNWJ8fkfarxDpdkadZC81N/dX5SLp6R33si hr/l/JKs/7GErWJh6r2Qb6dwV01HeFge4wyuvEki33A1K4wB6DwURxMvak7Tk55MlHRX 4Qd0zemx3pb0N0C6x4bI0+0MN5huxD9MBpZN7+XpBIzvfe4hNdCpFiL5F5Td9tgUQVR1 hheQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=AuWUuj0o9irXjyYeiyZndppgwoAyIIRLVZ26NOzVlME=; b=QaR5WU2VJDVfbOwafwuHsoL+sy4MH/sLdFVwlTOjky/Vifx5yv5aTsZ7L0aMKeX6Ok 8XwVnPHhG5EKy+yL2Vi7FmAxQ2pFgR+Ljq32SmbiyU5xNEx3Vr7ReqLhuGhLLPOPalYF od6wrNyG/zK9SVAZoyP00NqgnfDfFhQP8X/oVj9AYZ/Xed7gjGtT3lKiFMsxhNB4VZRi SGC+2UOicxIrP80QML28GlkePtLRhpi8vLdGNCf6Y2fRcitDsyUmmb4LSVLG6QO30TqB BNu8QpLdaj8esayNmTX/F7ZZdFZjaZ2Z4kaX2Qxr8UX+HlSmKSMpfohQVAjOjYByTbiF WOLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=AuWUuj0o9irXjyYeiyZndppgwoAyIIRLVZ26NOzVlME=; b=FVII0iWQDL1+F4wG10KD2jiyHX1lMowPLw6IZzHpuD0dqOYRYHuW2ol+Xlad7+UJrc 2AxshuuNithxl8afO6PKckPFf0T/jRO0S2l2jEmF0NQYNAT6L3L9g1ofVLhP6lbePsaR Iyq4Uw47R3XS2AKE5JmBqSgodlAFyoBCi+aV+o16Dw+SCEtTrSpnuYV0dM1U4YTyxyLX +rT6TyNhuNHaE7uVK4arvaR2fdTC1ok/Q0qyKjQ87N1lTchFeX16yIhUq7v0lmAgXjh5 reKDObzQz2xEwsIDB14o94GJFeiGQlZZAaqMuYh6HSHYCFfyWMOjanOsykYjkxhyJ6fX Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530azJLSAnPUCCnPifZ6ALZEV+f63QOXCY6LCvkpAOm69QvgV/uP xvRLUNJxOJjOASLF4lo+9CA= X-Google-Smtp-Source: ABdhPJwvVly6ThlTF1MNvFBy51wLor7RipC+KHC91x5KmY4Oq+a1s6KluQxnfd5U7hCRnDfOj75vmg== X-Received: by 2002:a05:651c:1053:: with SMTP id x19mr2706886ljm.32.1600329517922; Thu, 17 Sep 2020 00:58:37 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:86c8:: with SMTP id n8ls175089ljj.1.gmail; Thu, 17 Sep 2020 00:58:32 -0700 (PDT) X-Received: by 2002:a2e:b0f8:: with SMTP id h24mr9114445ljl.165.1600329512687; Thu, 17 Sep 2020 00:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600329512; cv=none; d=google.com; s=arc-20160816; b=KI0tTKl77Rw0XFL3Tczp/aCahlpIZl5ogC6sk/j1T7sBJYkErIPO0ouuVdOI1QJZ42 wv1rjyi4U0wMXyZM+hWEjkoCAcDEXp0Rj99TDUfjahIq/szpG+Z8y/xHhDORRfDue0qQ /2JRciWTpuKlXK25eyM1KjKoEOjWYdM43YjAq4HhZvZ30Z+ks0frIPsbl3O5R5fJFcPq gih1ENL2zYGs1wU22tH4147d3SNX11oeo2PS4kE/V4ykZ6nxyvZzVO7vOhNqNuK2T4il rlKhu3l6eK0AXDnUmoKtDW2RJrI9O9LtcJt1pnoWmw8nIf/+VV3Z6v419uuHp2b51jwL axVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=0l4O1uSkrmMSktjW4gS2627WUZ6v9ICjE5rsnJL/iP0=; b=CWQo02nXwUHvHt4/D1PcCP5uElMnh2wnPxeDq8QUvhY53ul545+eDQ6aKfdA05Br8b k9BkXAmT9zFRzBUyCK+dhjxo1Bc/BoOtXebQAxomrKBgg/qEyPEaUHTW9F6mQejCYiNK OxANo+18MxzI2oipAYhzDqvXu8V2anlZOOoVEAwVmQeiMdrzqLW38voWuFyfxpwnY1Rq PdUn4C59mK7gTJ9JNfDI9m9OidPRDqqaFDIgbG/E6NlGyuM9bGErFLs+eeWGz3TcGem/ dySRKfXBJMluTNnzxT6W6AnHIpNXDbSknD1CV5OUGekgenXAWx6eD1ybBjCmF/BY1ZvG A/Kg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oP5okzR0; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::62a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com. [2a00:1450:4864:20::62a]) by gmr-mx.google.com with ESMTPS id 143si477506lff.10.2020.09.17.00.58.32 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 00:58:32 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::62a as permitted sender) client-ip=2a00:1450:4864:20::62a; Original-Received: by mail-ej1-x62a.google.com with SMTP id j11so2021258ejk.0 for ; Thu, 17 Sep 2020 00:58:32 -0700 (PDT) X-Received: by 2002:a17:907:2168:: with SMTP id rl8mr29289911ejb.308.1600329511459; Thu, 17 Sep 2020 00:58:31 -0700 (PDT) Original-Received: from [192.168.1.122] (user177.77-105-231.netatonce.net. [77.105.231.177]) by smtp.gmail.com with ESMTPSA id m10sm16069710edf.11.2020.09.17.00.58.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 00:58:30 -0700 (PDT) In-Reply-To: <565a2869-820c-4919-89b9-4f3aa8c5dd31n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> Content-Language: en-US X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oP5okzR0; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2a00:1450:4864:20::62a as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:26164 Archived-At: This is a multi-part message in MIME format. --------------66F54B16EF99CC8686A1E3FB Content-Type: text/plain; charset="UTF-8"; format=flowed On 2020-09-17 00:36, anna ecke wrote: > Okay, that was rude of me - not looking into the zip but only at your > inline example - I'm sorry. Now, I see where the misunderstanding on my end > was coming from, at least, I hope. As a workaround, you are using the `::: > notes` block to define the footnote content. Unfortunately, that wont work > in my case, since I'm actually making use of speaker notes, too. Which are > defined in exactly that block - al least for revealjs. My turn to apologize: since I don't usually use revealjs as slide format I didn't realize that the class `notes` on a div is "magical". If you instead use a class `footnotes` (or anything else but `notes` I guess) around the footnote list it works immediately, without any need for a filter and with all the "magic" happening in the CSS. It should also be possible to combine with speaker notes. Although I don't know how to make the speaker notes actually appear in the notes window the HTML looks OK. A new zip with updated files is attached to this message. It also contains an (example) defaults file, so all you need to type on the command line, if you have a recent version of pandoc is ````shell pandoc -d footnotes.yaml presentation.md -o presentation.html > > I probably have to take a deeper look into lua filtering to get a hold on > all the footnotes in a section and put them in a footer (or into some other > markup) within the section. And I need to prevent the html/revealjs writer > to create the endnotes section. Looking at the native output, the endnote > section does not even exist in the AST. From the beginning, this was the > reason, why I thought making the html/revealjs writer to respect the > reference-location > option would be > preferable compared to a filter-based workaround. > > BPJ schrieb am Mittwoch, 16. September 2020 um 16:34:19 UTC+2: > >> Den tis 15 sep. 2020 23:50anna ecke <0x616e6e6...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> skrev: >> >>> Thank you BP for your input. But I think, we have a small >>> misunderstanding here. I was referring to footnotes >>> , which is a special type of >>> references, I think, not speaker notes. >>> >> >> I too was about *foot*notes, albeit "faked" ones not using Pandoc's native >> footnotes. If you test my setup filter and all and look at my example HTML >> you will see that. By having the filter replace native Pandoc divs with the >> class `notes` with raw HTML for div tags I managed to get an actual div, >> rather than an aside/speaker notes, so that I could style the list inside. >> Did you perhaps not get the zip archive? >> >> It may be possible to write a Lua filter so that native notes within each >> slide/section can be converted to my "faked" format, but I'm afraid that a >> Lua filter would not visit the native note elements in say a section >> container as created by `make_sections()` in linear order, so they might >> end up in the wrong order in a generated list. Albert can probably answer >> whether that problem is still there, or if there is a workaround. Anyway I >> tried to convert footnote markers in a paragraph to empty spans with a >> `note` class and a sequence of reference footnotes into an ordered list >> with Vim `s///` commands and it worked well, so it shouldn't be too hard to >> convert existing native notes to my "faked" version with a decent editor or >> a text filter script. >> >> >> >>> BP schrieb am Montag, 14. September 2020 um 14:17:49 UTC+2: >>> >>>> On 2020-09-14 00:00, anna ecke wrote: >>>>> At the moment, the location where footnotes are rendered into can be >>>>> configured with the option reference-location >>>>> . >>>> Unfortunately, >>>>> it only takes effect when rendering markdown. I'd like to get my >>>> footnotes >>>>> rendered into the same slide it was mentioned/written in. >>>>> >>>>> My question is now, would it make sense to propose this on github as a >>>>> feature request, or should I just go ahead and write a filter for >>>> this? I'm >>>>> not an Haskell expert and I haven't checked out the code base to look >>>> what >>>>> needs to be changed to make that kind of behaviour work or what amount >>>> of >>>>> effort it might take. >>>>> >>>>> Happy to hear any opinion or even receive links the code responsible >>>> for >>>>> this or to projects that have solved this already. >>>>> >>>>> cheers, >>>>> ae >>>>> >>>> >>>> Nothing prevents you from constructing your notes manually, placing note >>>> references as sequential numbers in the text and a list with each note >>>> text at the appropriate list number at the bottom of each slide. >>>> Presumably no links between note markers and notes would be needed in a >>>> slide show, which makes things easier, although you might want to wrap >>>> the note numbers in the text in spans with a class and the lists with >>>> notes in divs with another class for styling. >>>> >>>> Using a little CSS magic and a Lua filter you can both get note >>>> references and note list numbers styled and colored appropriately, *and* >>>> reveal yourself of the need to insert note numbers manually, although >>>> you still need to insert divs with an appropriate class where you want a >>>> note reference to appear, and need to make sure that the notes in the >>>> list come in the right order relative to the note references in the text >>>> of each slide. >>>> >>>> Something like this: >>>> >>>> ``````markdown >>>> ## Slide heading >>>> >>>> The text [mentioning]{.note} some [thing]{.note} or [other]{.note} goes >>>> here. >>>> >>>> :::notes >>>> >>>> 1. Text for note. >>>> 2. Text for note. >>>> 3. Text for note. >>>> >>>> ::: >>>> `````` >>>> >>>> and then in some appropriate place some custom CSS: >>>> >>>> ``````css >>>> span.note:after { >>>> content: counter(note-ref-counter); >>>> vertical-align: super; >>>> color: blue; >>>> font-size: 50%; >>>> } >>>> >>>> div.notes ol { >>>> list-style: none; >>>> font-size: 50%; >>>> } >>>> >>>> section.slide, section.title-slide { >>>> counter-reset: note-ref-counter note-counter; >>>> } >>>> >>>> div.notes ol li:before { >>>> content: counter(note-counter); >>>> vertical-align: super; >>>> color: blue; >>>> display: inline-block; >>>> width: 1em; >>>> margin-left: -1em; >>>> } >>>> >>>> span.note { >>>> counter-increment: note-ref-counter; >>>> } >>>> >>>> div.notes ol li { >>>> counter-increment: note-counter; >>>> } >>>> `````` >>>> >>>> This should give you blue superscript note markers and blue superscript >>>> list markers without any trailing dot, automatically numbered >>>> sequentially for each slide. >>>> I tried to make the count be for the whole file rather than for each >>>> slide, but Chrome insists on resetting the counters to 1 when they have >>>> reached 9. Perhaps someone who understands CSS counters better than I do >>>> knows how to fix that. >>>> >>>> Finally you need to apply the following Lua filter when running Pandoc, >>>> so that the `
` elements wrapping the note lists really are divs and >>>> not `