public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* How to create a Link type for internal link (cross-reference)
@ 2021-10-19 16:51 Harsh Donga
       [not found] ` <90ebc29b-8b23-4deb-bd1e-5ff7deea4c59n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Harsh Donga @ 2021-10-19 16:51 UTC (permalink / raw)
  To: pandoc-discuss


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

Hello, 


First of all, thanks a ton, the support till now has been amazing, truly 
appreciate it!

I had one more query, according to Link's Target 
<https://hackage.haskell.org/package/pandoc-types-1.22/docs/Text-Pandoc-Definition.html#t:Inline> here, 
I can put (text, text) as (URL, title),
what if i want to create an internal link to let's say a paragraph or 
figure.
How can i achieve that?

Thanks in advance!

-- 
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/90ebc29b-8b23-4deb-bd1e-5ff7deea4c59n%40googlegroups.com.

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

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

* Re: How to create a Link type for internal link (cross-reference)
       [not found] ` <90ebc29b-8b23-4deb-bd1e-5ff7deea4c59n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2021-10-19 19:32   ` Gwern Branwen
       [not found]     ` <CAMwO0gySxPyqC4Lh7mmj1UT+8WqGhFxszB+JUnqZKTrzw16jsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2021-10-19 19:40   ` John MacFarlane
  1 sibling, 1 reply; 4+ messages in thread
From: Gwern Branwen @ 2021-10-19 19:32 UTC (permalink / raw)
  To: pandoc-discuss

I think that would depend on your output type. I am not sure that all
output formats support that capability, and the syntax of the link may
differ.

If you are outputting to HTML, you can use standard within-page anchor
links. '![Image caption](foo.jpg){#foo}' lets you link to '#foo' as
the URL. Wrapping a paragraph in '<span
class="paragraph-10">...</span>' lets you link to '#paragaph-10' to
jump to that specific paragraph. (This is something I actually do
fairly often on gwern.net - it works particularly well with the popups
because you can hover on the link, and inside the popup will appear a
view of the paragraph or image.)

-- 
gwern
https://www.gwern.net


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

* Re: How to create a Link type for internal link (cross-reference)
       [not found] ` <90ebc29b-8b23-4deb-bd1e-5ff7deea4c59n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  2021-10-19 19:32   ` Gwern Branwen
@ 2021-10-19 19:40   ` John MacFarlane
  1 sibling, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2021-10-19 19:40 UTC (permalink / raw)
  To: Harsh Donga, pandoc-discuss


To link to something with the identifier foo, just create
a regular link with URL #foo


Harsh Donga <harsh-7+aFW328pE6p1wGUEcWPqti2O/JbrIOy@public.gmane.org> writes:

> Hello, 
>
>
> First of all, thanks a ton, the support till now has been amazing, truly 
> appreciate it!
>
> I had one more query, according to Link's Target 
> <https://hackage.haskell.org/package/pandoc-types-1.22/docs/Text-Pandoc-Definition.html#t:Inline> here, 
> I can put (text, text) as (URL, title),
> what if i want to create an internal link to let's say a paragraph or 
> figure.
> How can i achieve that?
>
> Thanks in advance!
>
> -- 
> 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/90ebc29b-8b23-4deb-bd1e-5ff7deea4c59n%40googlegroups.com.


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

* Re: How to create a Link type for internal link (cross-reference)
       [not found]     ` <CAMwO0gySxPyqC4Lh7mmj1UT+8WqGhFxszB+JUnqZKTrzw16jsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2021-10-19 21:06       ` John MacFarlane
  0 siblings, 0 replies; 4+ messages in thread
From: John MacFarlane @ 2021-10-19 21:06 UTC (permalink / raw)
  To: Gwern Branwen, pandoc-discuss

Gwern Branwen <gwern-v26ZT+9V8bxeoWH0uzbU5w@public.gmane.org> writes:

> I think that would depend on your output type. I am not sure that all
> output formats support that capability, and the syntax of the link may
> differ.

In general we do treat #foo as an internal link to an anchor foo,
not just in HTML but in other output formats. (Can't guarantee
that it works in all, but that's the ambition.)


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

end of thread, other threads:[~2021-10-19 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 16:51 How to create a Link type for internal link (cross-reference) Harsh Donga
     [not found] ` <90ebc29b-8b23-4deb-bd1e-5ff7deea4c59n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2021-10-19 19:32   ` Gwern Branwen
     [not found]     ` <CAMwO0gySxPyqC4Lh7mmj1UT+8WqGhFxszB+JUnqZKTrzw16jsw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-19 21:06       ` John MacFarlane
2021-10-19 19:40   ` John MacFarlane

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