public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How to format visible reference links?
@ 2023-11-11 16:36 Cev Ing
       [not found] ` <bce4c86a-f712-4204-9477-43003279a07en-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Cev Ing @ 2023-11-11 16:36 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 871 bytes --]

At the end of my Markdown document is a list with all Internet references. 
Example:

### 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"

When I format the document to HTML, I just get a empty item list.

Referenzen 
   
   - 
   - 
   

How to make the references visible?

-- 
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/bce4c86a-f712-4204-9477-43003279a07en%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1348 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to format visible reference links?
       [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>
  0 siblings, 1 reply; 5+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2023-11-11 17:20 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

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

Your markdown is being parsed as reference link definitions as explained at
https://pandoc.org/MANUAL.html#reference-links (see the note at the bottom
of the section stating that reference link definitions can occur within
list items).

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"

Some people might suggest that you should use citations!


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

> At the end of my Markdown document is a list with all Internet references.
> Example:
>
> ### 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"
>
> When I format the document to HTML, I just get a empty item list.
>
> Referenzen
>
>    -
>    -
>
>
> How to make the references visible?
>
> --
> 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/bce4c86a-f712-4204-9477-43003279a07en%40googlegroups.com
> <https://groups.google.com/d/msgid/pandoc-discuss/bce4c86a-f712-4204-9477-43003279a07en%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_xxgZLE-AHfxvWQ1yFsMX_WRwQq1Yf0DeyzCCeEZzS5xJ_A%40mail.gmail.com.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to format visible reference links?
       [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>
  0 siblings, 1 reply; 5+ messages in thread
From: Cev Ing @ 2023-11-11 18:20 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 1044 bytes --]



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.

[-- Attachment #1.2: Type: text/html, Size: 1938 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to format visible reference links?
       [not found]         ` <7ab32601-e03d-4587-a563-e329a1987781n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2023-11-11 18:51           ` 'William Lupton' via pandoc-discuss
       [not found]             ` <CAEe_xxhCgWUKDBB8HmPdAkbTWk+C2N0OD5F8Yah41qGSB8kdAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: 'William Lupton' via pandoc-discuss @ 2023-11-11 18:51 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to format visible reference links?
       [not found]             ` <CAEe_xxhCgWUKDBB8HmPdAkbTWk+C2N0OD5F8Yah41qGSB8kdAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2023-11-11 19:20               ` Cev Ing
  0 siblings, 0 replies; 5+ messages in thread
From: Cev Ing @ 2023-11-11 19:20 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 934 bytes --]


William Lupton schrieb am Samstag, 11. November 2023 um 19:51:18 UTC+1:


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


I use now two lists:

## Referenzen

- [John Witulski][1]
- [Vorlesung Compilerbau (5) - Bottom-Up Parsing][2]
- [Chez Scheme][3]
- [Quellcode][4]

[1]: https://www.youtube.com/@johnwitulski18
[2]: https://www.youtube.com/watch?v=Rl70mXyDxII
[3]: https://cisco.github.io/ChezScheme/
[4]: javascript:tangle();
 
This is ok. The overhead is just one link. I have only a few URLs.

-- 
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/2451849d-db82-4adf-ae6c-f009fe8d6e45n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 1577 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-11-11 19:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-11 16:36 How to format visible reference links? 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
     [not found]             ` <CAEe_xxhCgWUKDBB8HmPdAkbTWk+C2N0OD5F8Yah41qGSB8kdAQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2023-11-11 19:20               ` Cev Ing

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).