public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "'William Lupton' via pandoc-discuss" <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: How to format visible reference links?
Date: Sat, 11 Nov 2023 18:51:00 +0000	[thread overview]
Message-ID: <CAEe_xxhCgWUKDBB8HmPdAkbTWk+C2N0OD5F8Yah41qGSB8kdAQ@mail.gmail.com> (raw)
In-Reply-To: <7ab32601-e03d-4587-a563-e329a1987781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3352 bytes --]

The reference links aren't part of the AST. That's why they don't show up.
But I think you know this!

I don't know of a simple way of achieving what you want to achieve.

However, the details of your references are in the AST where they are
referenced. So with this input:

### Referenzen

[1]

- [1]: https://www.youtube.com/@johnwitulski18 "John Witulski"
- [2]: https://www.youtube.com/watch?v=Rl70mXyDxII "Vorlesung Compilerbau
(5) - Bottom-Up Parsing"
- [3]: https://cisco.github.io/ChezScheme/ "Chez Scheme"

...you get this AST (reporting using pandoc-ext/logging):

(#) blocks Blocks[3] {
  [1] Header {
    attr: Attr {
      attributes: AttributeList {}
      classes: List {}
      identifier: "referenzen"
    }
    content: Inlines[1] {
      [1] Str "Referenzen"
    }
    level: 3
  }
  [2] Para {
    content: Inlines[1] {
      [1] Link {
        attr: Attr {
          attributes: AttributeList {}
          classes: List {}
          identifier: ""
        }
        content: Inlines[1] {
          [1] Str "1"
        }
        target: "https://www.youtube.com/@johnwitulski18"
        title: "John Witulski"
      }
    }
  }
  [3] BulletList {
    content: List[3] {
      [1] Blocks {}
      [2] Blocks {}
      [3] Blocks {}
    }
  }
}

...so you could write a lua filter to collect the info from the links and
output it at the bottom.

But I can't help feeling that you'd then really just be implementing your
own simple version of citeproc!

Using citations isn't too hard, but there are definitely more moving parts.
I could provide a mock-up if that would be helpful.

On Sat, 11 Nov 2023 at 18:20, Cev Ing <ceving-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
>
> William Lupton schrieb am Samstag, 11. November 2023 um 18:20:32 UTC+1:
>
> To prevent this, you could escape the opening square brackets like this
> (I've also put the URLs in angle brackets):
>
> ### Referenzen
>
> - \[1]: <https://www.youtube.com/@johnwitulski18> "John Witulski"
> - \[2]: <https://www.youtube.com/watch?v=Rl70mXyDxII> "Vorlesung
> Compilerbau (5) - Bottom-Up Parsing"
> - \[3]: <https://cisco.github.io/ChezScheme/> "Chez Scheme"
>
>
> I tried that, but then the reference-links stop working. I do not want to
> prevent the reference-links, instead I want both: working links in the text
> and a list of all links at the bottom.
>
>
> --
> 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/7ab32601-e03d-4587-a563-e329a1987781n%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/7ab32601-e03d-4587-a563-e329a1987781n%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/CAEe_xxhCgWUKDBB8HmPdAkbTWk%2BC2N0OD5F8Yah41qGSB8kdAQ%40mail.gmail.com.

[-- Attachment #2: Type: text/html, Size: 5473 bytes --]

  parent reply	other threads:[~2023-11-11 18:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11 16:36 Cev Ing
     [not found] ` <bce4c86a-f712-4204-9477-43003279a07en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-11 17:20   ` 'William Lupton' via pandoc-discuss
     [not found]     ` <CAEe_xxgZLE-AHfxvWQ1yFsMX_WRwQq1Yf0DeyzCCeEZzS5xJ_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-11 18:20       ` Cev Ing
     [not found]         ` <7ab32601-e03d-4587-a563-e329a1987781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2023-11-11 18:51           ` 'William Lupton' via pandoc-discuss [this message]
     [not found]             ` <CAEe_xxhCgWUKDBB8HmPdAkbTWk+C2N0OD5F8Yah41qGSB8kdAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-11 19:20               ` Cev Ing

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=CAEe_xxhCgWUKDBB8HmPdAkbTWk+C2N0OD5F8Yah41qGSB8kdAQ@mail.gmail.com \
    --to=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).