jgm / pandoc

Universal markup converter
https://pandoc.org
Other
34.62k stars 3.38k forks source link

Underlying hyperlinks .mmd to .docx #1918

Closed orschiro closed 9 years ago

orschiro commented 9 years ago

Dear all,

I am using the following command to convert my .mmd file written in Scrivener to a .docx:

pandoc -S -o draft.docx --filter pandoc-citeproc draft.mmd

The link written in Scrivener looks as follows and is correctly underlined:

image

On conversion, however, hyperlinks are not underlined in the resulting .docx. Can pandoc support the user here with a flag or should all correct hyperlinking already be done in the markdown file?

In that case I would have to write:

[http://www.un.org/en/development/desa/news/population/world-urbanization-prospects-2014.html](http://www.un.org/en/development/desa/news/population/world-urbanization-prospects-2014.html)

This, however, is not possible in Scrivener. I appreciate your response. I am just trying to understand whether the issue is to be looked from the editor side (Scrivener) or whether there is potential for pandoc to assist the user here.

Thanks!

Robert

jgm commented 9 years ago

Is your URL in your mmd source inside <...> (that's an official Markdown autolink). Or is it "bare"? If the latter, you can turn on the autolink_bare_uris extension:

pandoc -f markdown+autolink_bare_uris

or just slap < and > around the URL in your source.

orschiro commented 9 years ago

Or is it "bare"? If the latter, you can turn on the autolink_bare_uris extension:

Yes it is bare.

pandoc -f markdown+autolink_bare_uris

Thanks for the solution!