-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Links in MediaWiki? (pandoc 1.10.1) #756
Comments
At some point I plan to add optional support for [[Wikilinks]] to +++ Milofax [Feb 19 13 03:49 ]:
|
Note: You can always define link references at the end of your
+++ Milofax [Feb 19 13 03:49 ]:
|
I also thought about that but I also want to have these links working when I create a pdf out of the same files. I did a temporary solution by writing a script that does all the work in finding the links that refer to external sources (=WikiPages) and the pdf conversion doesn't break. |
+++ Milofax [Feb 20 13 03:33 ]:
I'm not sure why it wouldn't work for PDF...? Reference links work |
Because I want to use the same Link e.g. [Link] for both formats. In wiki conversion this link should become [[Link]], in pdf, this is still an internal link to a Heading in the document that was made by several md-files, each one representing a wiki page. I know, there's a lot of convention involved. Does that make sense? |
With
becomes
Any idea how I can get this to be a relative link? I'm building from org to HTML and mediawiki, so I'm not keen on using absolute URLs. |
@marcbowes, for the uneducated what should the result be? |
Definitely would appreciate help on rel links still. The actual mediawiki syntax is It seems the org-mode parser only treats the link as a link if it looks like a URI/file etc: https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/Readers/Org.hs#L1145 |
It looks like it's an arbitrary choice to turn unrecognised links into @tarleb am I correct in thinking this? |
Pretty much, yes. It's not completely arbitrary, in that it mirrors emacs' export behavior, but could very well be changed to something different. Issue #1741 and jgm/gitit#471 are related to this. The resolving commit now allows empty urls, making it possible to define new wiki links like this: |
One additional note, though: Org-mode uses the |
That comes out as |
Yes, I was wrong the first time: Thanks for pointing it out! |
Would I have to add that to every page I author? How would this impact the HTML writer? The entire list of my link use-cases (author in org, export to mw and html):
|
Due to my inexperience with org I'm struggling to conceptualise example how Albert's suggestion would work. My original idea was to write a filter to intercept links and rewrite then based on the output format. |
Correction: The wiki syntax for a subpage relative to the current page is |
Not sure if I misunderstood something, but here is what it got:
|
Why do you propose Is there a way I can write some (non-Haskell) tests for this? e.g. something like an examples directory where I can put example input and expected (or proposed) output? EDIT: doh, looks like the |
A fix has been pushed, ensuring the |
Thanks. Is there going to be a release to hackage any time soon or should I pursue building this myself? |
AFAIK the next release will include some bigger changes which might take a while to get right – my guess is 2–6 weeks. @mpickering might be able to give you a better estimate. |
We've had a release. @tarleb, can this issue be closed now, or are there still things that need fixing? |
This can be closed. There is #1812 in case my fix was insufficient. |
With this change the following happens (the
becomes [[RelativePath|RelativePath]] In mediawiki, this means a link relative to the site root, not relative to the current page. |
I try to create internal links in mediawiki that should point in the end to another wiki page. Therefore, I have different md-files that represent a wiki page each.
For wiki, I convert each md-file separately to mediawiki. I also use the pdf conversion which works fine (and where I convert the content at once).
I would like to have the behaviour that internal links as [OtherWikiPage] would be converted to Mediak Wiki like [[OtherWikiPage]]. At the moment, pandoc doesn't interpret it at all.
Is that possible?
Mathias
The text was updated successfully, but these errors were encountered: