* Internal References in MarkDown @ 2014-06-16 10:36 Sebastian Humenda 2014-06-16 12:16 ` Wagner Macedo 2014-06-16 15:13 ` Wagner Macedo 0 siblings, 2 replies; 10+ messages in thread From: Sebastian Humenda @ 2014-06-16 10:36 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 685 bytes --] Hello, I am trying to reference internal labels within a MarkDown document. I thought the following might work: Please click [here][link] [link]: Some other text. Does this only work for referencing external links? It also seems that Pandoc ``eats'' paragraphs ust containing [xxx]:. Even the JSon output doesn't show this text. I have tried to implement a pandoc filter myself to add this feature. Thanks Sebastian -- Web: http://www.crustulus.de | Blog: http://www.crustulus.de/cgi-bin/blog.cgi?de-0 Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html FreeDict: Free multilingual dictionary databases - http://www.freedict.org [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Internal References in MarkDown 2014-06-16 10:36 Internal References in MarkDown Sebastian Humenda @ 2014-06-16 12:16 ` Wagner Macedo [not found] ` <CAKGY2P=_trQqo3Hjv4fkwBOLmh9ekVKVOgGLQoaz8yLySzsLEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-06-16 15:13 ` Wagner Macedo 1 sibling, 1 reply; 10+ messages in thread From: Wagner Macedo @ 2014-06-16 12:16 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 1590 bytes --] I think you can use the '#' to reference internal links. So your text would be Please click [here][link] [link]: #name-of-label -- Wagner Macedo On 16 June 2014 07:36, Sebastian Humenda <shumenda-Mmb7MZpHnFY@public.gmane.org> wrote: > Hello, > > I am trying to reference internal labels within a MarkDown document. I > thought > the following might work: > > Please click [here][link] > > [link]: Some other text. > > Does this only work for referencing external links? It also seems that > Pandoc > ``eats'' paragraphs ust containing [xxx]:. Even the JSon output doesn't > show > this text. I have tried to implement a pandoc filter myself to add this > feature. > > Thanks > Sebastian > -- > Web: http://www.crustulus.de | Blog: > http://www.crustulus.de/cgi-bin/blog.cgi?de-0 > Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html > FreeDict: Free multilingual dictionary databases - http://www.freedict.org > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKGY2P%3D_trQqo3Hjv4fkwBOLmh9ekVKVOgGLQoaz8yLySzsLEg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 2966 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CAKGY2P=_trQqo3Hjv4fkwBOLmh9ekVKVOgGLQoaz8yLySzsLEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Internal References in MarkDown [not found] ` <CAKGY2P=_trQqo3Hjv4fkwBOLmh9ekVKVOgGLQoaz8yLySzsLEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-06-16 13:22 ` Sebastian Humenda 2014-06-16 13:38 ` Wagner Macedo 2014-06-16 13:50 ` BP Jonsson 0 siblings, 2 replies; 10+ messages in thread From: Sebastian Humenda @ 2014-06-16 13:22 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 708 bytes --] Hello Wagner, Wagner Macedo schrieb am 16.06.2014, 9:16 -0300: >I think you can use the '#' to reference internal links. So your text would >be > > Please click [here][link] > > [link]: #name-of-label Piping this through pandoc leads to: <p>Please click <a href="#name-of-label">here</a></p> The label has fully vanished and the link is broken. Or did I misunderstood the concept? BTW, I am using pandoc 1.12.3.3. Thanks Sebastian -- Web: http://www.crustulus.de | Blog: http://www.crustulus.de/cgi-bin/blog.cgi?de-0 Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html FreeDict: Free multilingual dictionary databases - http://www.freedict.org [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Internal References in MarkDown 2014-06-16 13:22 ` Sebastian Humenda @ 2014-06-16 13:38 ` Wagner Macedo 2014-06-16 13:50 ` BP Jonsson 1 sibling, 0 replies; 10+ messages in thread From: Wagner Macedo @ 2014-06-16 13:38 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 1761 bytes --] Oh, I see now what you probably want. As far as I know, Pandoc doesn't have option to make anchors, but you can use a header as workaround, so ### {#name-of-label} Please click [here][link] [link]: #name-of-label So, the link will point to the nameless header. -- Wagner Macedo On 16 June 2014 10:22, Sebastian Humenda <shumenda-Mmb7MZpHnFY@public.gmane.org> wrote: > Hello Wagner, > > Wagner Macedo schrieb am 16.06.2014, 9:16 -0300: > >I think you can use the '#' to reference internal links. So your text > would > >be > > > > Please click [here][link] > > > > [link]: #name-of-label > Piping this through pandoc leads to: > > <p>Please click <a href="#name-of-label">here</a></p> > > The label has fully vanished and the link is broken. Or did I > misunderstood the > concept? > > BTW, I am using pandoc 1.12.3.3. > > Thanks > Sebastian > -- > Web: http://www.crustulus.de | Blog: > http://www.crustulus.de/cgi-bin/blog.cgi?de-0 > Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html > FreeDict: Free multilingual dictionary databases - http://www.freedict.org > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKGY2PnVnGMcwqEKA5Gq7-s8PBR_pesWUEgJAR_s_F4_h2Y1qQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 3407 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Internal References in MarkDown 2014-06-16 13:22 ` Sebastian Humenda 2014-06-16 13:38 ` Wagner Macedo @ 2014-06-16 13:50 ` BP Jonsson [not found] ` <539EF63D.5030001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 1 sibling, 1 reply; 10+ messages in thread From: BP Jonsson @ 2014-06-16 13:50 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 2014-06-16 15:22, Sebastian Humenda skrev: > Hello Wagner, > > Wagner Macedo schrieb am 16.06.2014, 9:16 -0300: >> I think you can use the '#' to reference internal links. So your text would >> be >> >> Please click [here][link] >> >> [link]: #name-of-label > Piping this through pandoc leads to: > > <p>Please click <a href="#name-of-label">here</a></p> > > The label has fully vanished and the link is broken. Or did I misunderstood the > concept? > > BTW, I am using pandoc 1.12.3.3. `#name-of-label` needs to be the id of an existing text element: header : # Some header {#name-of-label} span : <span id="name-of-label">...</span> div : <div id="name-of-label">...</div> codeblock : ```{#name-of-label} inline code : `...`{#name-of-label} or an anchor which exists in the document you are going to embed your output in, if applicable. If you need an anchor/label just anywhere use an empty span: <span id="name-of-label"></span> Ugly, but works! You will need pandoc 1.12.4.2 to have it work in LaTeX, before that use <span id="name-of-label"></span>\label{name-of-label} or just the `\label{name-of-label}` if you only target LaTeX. /bpj ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <539EF63D.5030001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Internal References in MarkDown [not found] ` <539EF63D.5030001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2014-06-16 14:08 ` Wagner Macedo 2014-06-16 14:36 ` Sebastian Humenda 1 sibling, 0 replies; 10+ messages in thread From: Wagner Macedo @ 2014-06-16 14:08 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 2605 bytes --] Thanks for the tips. I didn't know some of those. -- Wagner Macedo On 16 June 2014 10:50, BP Jonsson <bpj-J3H7GcXPSITLoDKTGw+V6w@public.gmane.org> wrote: > 2014-06-16 15:22, Sebastian Humenda skrev: > > Hello Wagner, >> >> Wagner Macedo schrieb am 16.06.2014, 9:16 -0300: >> >>> I think you can use the '#' to reference internal links. So your text >>> would >>> be >>> >>> Please click [here][link] >>> >>> [link]: #name-of-label >>> >> Piping this through pandoc leads to: >> >> <p>Please click <a href="#name-of-label">here</a></p> >> >> The label has fully vanished and the link is broken. Or did I >> misunderstood the >> concept? >> >> BTW, I am using pandoc 1.12.3.3. >> > > `#name-of-label` needs to be the id of an existing text element: > > header > : # Some header {#name-of-label} > span > : <span id="name-of-label">...</span> > div > : <div id="name-of-label">...</div> > codeblock > : ```{#name-of-label} > inline code > : `...`{#name-of-label} > > or an anchor which exists in the document you are going to embed your > output in, if applicable. > > If you need an anchor/label just anywhere use an empty span: > > <span id="name-of-label"></span> > > Ugly, but works! > You will need pandoc 1.12.4.2 to have it work in LaTeX, > before that use > > <span id="name-of-label"></span>\label{name-of-label} > > or just the `\label{name-of-label}` if you only target LaTeX. > > /bpj > > -- > 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/ > msgid/pandoc-discuss/539EF63D.5030001%40gmail.com. > For more options, visit https://groups.google.com/d/optout. > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKGY2PkjXf7OjahOTzcbjcFUjtz%2B-0L5xUxjTL_BABu-YvLWUw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 4296 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Internal References in MarkDown [not found] ` <539EF63D.5030001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2014-06-16 14:08 ` Wagner Macedo @ 2014-06-16 14:36 ` Sebastian Humenda 1 sibling, 0 replies; 10+ messages in thread From: Sebastian Humenda @ 2014-06-16 14:36 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 1405 bytes --] Hello, thank you for your replies. BP Jonsson schrieb am 16.06.2014, 15:50 +0200: >2014-06-16 15:22, Sebastian Humenda skrev: >>Wagner Macedo schrieb am 16.06.2014, 9:16 -0300: >>>I think you can use the '#' to reference internal links. So your text would >>>be >>> >>> Please click [here][link] >>> >>> [link]: #name-of-label >>Piping this through pandoc leads to: >> >> <p>Please click <a href="#name-of-label">here</a></p> >> >>The label has fully vanished and the link is broken. Or did I misunderstood the >>concept? >> >>BTW, I am using pandoc 1.12.3.3. > >`#name-of-label` needs to be the id of an existing text element: I can not apply one of those elements you have suggested. I need a element-independent anchor which jumps to an arbitrary paragraph. Embedding HTML is no option because I don't want to restrict the output to HTML. I thought of extending Pandoc's Markdown to fetch all "[label]:" which are single paragraphs, but Pandoc let those paragraphs simply vanish in the JSon tree and therefore it's unreplaceable. Is there any chance that Pandoc would implement that natively? Thanks Sebastian -- Web: http://www.crustulus.de | Blog: http://www.crustulus.de/cgi-bin/blog.cgi?de-0 Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html FreeDict: Free multilingual dictionary databases - http://www.freedict.org [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Internal References in MarkDown 2014-06-16 10:36 Internal References in MarkDown Sebastian Humenda 2014-06-16 12:16 ` Wagner Macedo @ 2014-06-16 15:13 ` Wagner Macedo [not found] ` <CAKGY2Pkyw=p8akPnNq7A4HjYQegg7-Hy=VH6FnoAwWY3mn8GWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 1 reply; 10+ messages in thread From: Wagner Macedo @ 2014-06-16 15:13 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 1526 bytes --] Using <span id="name-of-label"></span> worked for me for both html and latex -- Wagner Macedo On 16 June 2014 07:36, Sebastian Humenda <shumenda-Mmb7MZpHnFY@public.gmane.org> wrote: > Hello, > > I am trying to reference internal labels within a MarkDown document. I > thought > the following might work: > > Please click [here][link] > > [link]: Some other text. > > Does this only work for referencing external links? It also seems that > Pandoc > ``eats'' paragraphs ust containing [xxx]:. Even the JSon output doesn't > show > this text. I have tried to implement a pandoc filter myself to add this > feature. > > Thanks > Sebastian > -- > Web: http://www.crustulus.de | Blog: > http://www.crustulus.de/cgi-bin/blog.cgi?de-0 > Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html > FreeDict: Free multilingual dictionary databases - http://www.freedict.org > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAKGY2Pkyw%3Dp8akPnNq7A4HjYQegg7-Hy%3DVH6FnoAwWY3mn8GWg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout. [-- Attachment #2: Type: text/html, Size: 2716 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <CAKGY2Pkyw=p8akPnNq7A4HjYQegg7-Hy=VH6FnoAwWY3mn8GWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Internal References in MarkDown [not found] ` <CAKGY2Pkyw=p8akPnNq7A4HjYQegg7-Hy=VH6FnoAwWY3mn8GWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-06-16 15:39 ` BP Jonsson [not found] ` <539F0FCB.8090307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 10+ messages in thread From: BP Jonsson @ 2014-06-16 15:39 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw 2014-06-16 17:13, Wagner Macedo skrev: > Using <span id="name-of-label"></span> worked for me for both html and latex It does, if you use a new enough version of pandoc. In too old versions neither <span> nor <div> work at all with anything but HTML, because then pandoc saw them just as raw HTML. Recent versions parse them, the LaTeX writer sees them and inserts a `\label`. > > -- > Wagner Macedo > > > On 16 June 2014 07:36, Sebastian Humenda <shumenda-Mmb7MZpHnFY@public.gmane.org> wrote: > >> Hello, >> >> I am trying to reference internal labels within a MarkDown document. I >> thought >> the following might work: >> >> Please click [here][link] >> >> [link]: Some other text. >> >> Does this only work for referencing external links? It also seems that >> Pandoc >> ``eats'' paragraphs ust containing [xxx]:. Even the JSon output doesn't >> show >> this text. I have tried to implement a pandoc filter myself to add this >> feature. >> >> Thanks >> Sebastian >> -- >> Web: http://www.crustulus.de | Blog: >> http://www.crustulus.de/cgi-bin/blog.cgi?de-0 >> Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html >> FreeDict: Free multilingual dictionary databases - http://www.freedict.org >> > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/539F0FCB.8090307%40gmail.com. For more options, visit https://groups.google.com/d/optout. ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <539F0FCB.8090307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: Internal References in MarkDown [not found] ` <539F0FCB.8090307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2014-06-18 16:58 ` Sebastian Humenda 0 siblings, 0 replies; 10+ messages in thread From: Sebastian Humenda @ 2014-06-18 16:58 UTC (permalink / raw) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw [-- Attachment #1: Type: text/plain, Size: 920 bytes --] Hello, BP Jonsson schrieb am 16.06.2014, 17:39 +0200: >2014-06-16 17:13, Wagner Macedo skrev: >>Using <span id="name-of-label"></span> worked for me for both html and latex > >It does, if you use a new enough version of pandoc. >In too old versions neither <span> nor <div> work at all with >anything but HTML, because then pandoc saw them just as >raw HTML. Recent versions parse them, the LaTeX writer sees them >and inserts a `\label`. Ok, I use Pandoc 1.12.3.3 and this feature was introduced later. While I would have prefered to use the "[label]:" Syntax, because it is already there in MarkDown, it will work for me. Thanks for your answers Sebastian -- Web: http://www.crustulus.de | Blog: http://www.crustulus.de/cgi-bin/blog.cgi?de-0 Freies Latein-Deutsch-Wörterbuch: http://www.crustulus.de/freedict.de.html FreeDict: Free multilingual dictionary databases - http://www.freedict.org [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-06-18 16:58 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-06-16 10:36 Internal References in MarkDown Sebastian Humenda 2014-06-16 12:16 ` Wagner Macedo [not found] ` <CAKGY2P=_trQqo3Hjv4fkwBOLmh9ekVKVOgGLQoaz8yLySzsLEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-06-16 13:22 ` Sebastian Humenda 2014-06-16 13:38 ` Wagner Macedo 2014-06-16 13:50 ` BP Jonsson [not found] ` <539EF63D.5030001-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2014-06-16 14:08 ` Wagner Macedo 2014-06-16 14:36 ` Sebastian Humenda 2014-06-16 15:13 ` Wagner Macedo [not found] ` <CAKGY2Pkyw=p8akPnNq7A4HjYQegg7-Hy=VH6FnoAwWY3mn8GWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-06-16 15:39 ` BP Jonsson [not found] ` <539F0FCB.8090307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2014-06-18 16:58 ` Sebastian Humenda
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).