public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* [markdown > epub] Internal links?
@ 2019-04-22 12:26 Guillaume Enguehard
       [not found] ` <18cfd2af-0d89-4208-8200-d3f62ca016c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume Enguehard @ 2019-04-22 12:26 UTC (permalink / raw)
  To: pandoc-discuss


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

Dear all,

I try to create an epub with internal links using markdown as an input (a 
kind of wikipedia with an epub extension). I am using pandoc 1.12.4.2 on 
Debian 8.5.

My links look like that: 

% Test
>
> #Title 1
> [link]: #Title 1
>
> This is a [link](#Title 2) to Title 2.
>
> #Titre 2
>
> This is a [link] to Title 1.
>

Then I convert the file into an epub with the following command:

 pandoc test5.txt -o test5.epub
>

But the output has no internal links anymore... Do you know how to proceed?

Thank you

--
Enguehard, GUillaume 

-- 
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/18cfd2af-0d89-4208-8200-d3f62ca016c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

[-- Attachment #2: test5.epub --]
[-- Type: application/epub+zip, Size: 3721 bytes --]

[-- Attachment #3: test5.txt --]
[-- Type: text/plain, Size: 114 bytes --]

% Test

#Title 1
[link]: #Title 1

This is a [link](#Title 2) to Title 2.

#Titre 2

This is a [link] to Title 1.

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

* Re: [markdown > epub] Internal links?
       [not found] ` <18cfd2af-0d89-4208-8200-d3f62ca016c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2019-04-22 17:32   ` Guillaume Enguehard
  0 siblings, 0 replies; 2+ messages in thread
From: Guillaume Enguehard @ 2019-04-22 17:32 UTC (permalink / raw)
  To: pandoc-discuss


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

Okay, I figured out what the problem was. The reference of internal links 
does not support capital letters, spaces and apostrophes. Therefore, 
capital letters should be replaced by lower-case letters, spaces by dashes 
and apostrophes by nothing at all.

Instead of:

% Test
>>
>> #Title 1
>> [link]: *#Title 1*
>>
>> This is a [link](*#Title 2*) to Title 2.
>>
>> #Titre 2
>>
>> This is a [link] to Title 1.
>>
>
We should write:

% Test
>
> #Title 1
> [link]: *#title-1*
>
> This is a [link](*#title-2*) to Title 2.
>
> #Titre 2
>
> This is a [link] to Title 1.
>

and it works.

I was using Zim Wiki, and this software does not automatically create valid 
references from files when exporting to markdown or html. Thus, all files 
should be named without capital letters, spaces and apostrophes.

--
Enguehard, Guillaume

-- 
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/f1379c7e-ac81-40d3-bf2c-72b67da53ded%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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

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

end of thread, other threads:[~2019-04-22 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-22 12:26 [markdown > epub] Internal links? Guillaume Enguehard
     [not found] ` <18cfd2af-0d89-4208-8200-d3f62ca016c6-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2019-04-22 17:32   ` Guillaume Enguehard

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