doc and docx do not have working html links

TJ Luoma's Avatar

TJ Luoma

08 Apr, 2021 05:26 PM

// Please enter a detailed description of the issue // Description of the issue:

When I export a .doc or .docx file, the resulting file, when opened in MS Word, does not have working links.

// Please enter a list of steps required to reproduce the issue // Steps to reproduce:

  1. create markdown file with links
  2. export as .doc or .docx
  3. open in MSWord and try to click links

// If applicable please attach a sample document that causes the issue for you.

// Configuration (do not edit) Marked 2 1016 (Setapp)

macOS Version: 11.3

allowPageBreakInCode: YES
bookTxtIsLeanpub: NO
summaryMdIsGitBook: NO
codeIsPoetry: NO
codeCanWrap: YES
collapsibleHeadlines: NO
convertGithubCheckboxes: YES
convertGithubEmoji: YES
convertYAMLToMMD: NO
defaultMathJaxConfig: TeX-AMS-MML_HTMLorMML
defaultPreviewStyle: 100
defaultProcessor: Discount (GFM)
enableMiniMap: NO
excludeBlockQuotesFromCounts: NO
excludeFootnotesFromCounts: NO
excludeVerbatimFromCounts: NO
excludeCaptionsFromCounts: NO
folderPreviewExtensionsArray: md, markdown, txt, mdown, html, opml
githubNewlines: YES
h1IsPageBreak: NO
h2IsPageBreak: NO
hrIsPageBreak: NO
includeMathJax: NO
includeKatex: NO
limitTextWidth: NO
mathNumberEquations: NO
mathNumberEquationsSide: 0
mathNumberEquationsAMSOnly: NO
minimalJavaScript: NO
permissionGranted: NO
printHeaderFirstPage: NO
printFooterFirstPage: NO
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
useCustomPreprocessor: NO
useFirstH1AsPrintTitle: YES

  1. Support Staff 1 Posted by Brett on 08 Apr, 2021 06:58 PM

    Brett's Avatar

    To put it bluntly, Marked's DOCX export is insufficient in many ways.
    It's always been on my list to rebuild the whole engine, but somehow I
    have not gotten around to it in the last decade.

    Links don't work, images are hit and miss, document styles aren't
    preserved... Marked is great at PDFs, but Word documents are a bit of a
    hack. I would note that exporting to RTF does give you working links in
    Pages, though I don't know how Word handles RTF files.

    In short, my humblest apologies, this is a long-known issue.


  2. 2 Posted by Timothy J. Luom... on 08 Apr, 2021 07:22 PM

    Timothy J. Luoma's Avatar

    This works:

    Export to RTF —> open RTF in Nissus Writer —> export to Docx

    I don’t do this so often that it’s a major hardship.


  3. Support Staff 3 Posted by Brett on 08 Apr, 2021 07:41 PM

    Brett's Avatar

    That's an embarrassing amount of work. Hopefully I'll figure out the
    missing pieces sooner than later.


  4. 4 Posted by Timothy J. Luom... on 08 Apr, 2021 10:05 PM

    Timothy J. Luoma's Avatar

    Don’t sweat it too much… Turns out that pandoc can do MD->DOCX so I can use that for now.

  5. Support Staff 5 Posted by Brett on 08 Apr, 2021 10:12 PM

    Brett's Avatar

    Yeah, I was actually considering embedding pandoc for that purpose. It's
    powerful from the command line, but a pain to try to put a good GUI on.
    But a good reference DOCX will give you great results.


  6. 6 Posted by Timothy J. Luom... on 23 Jun, 2021 02:25 PM

    Timothy J. Luoma's Avatar

    You may already know this, but just in case:

    I installed <> on my M1 Mac mini, and when I tried to run one, it said that I had to install multimarkdown.

    But it was already installed.

    However, it was installed at `/opt/homebrew/bin/multimarkdown` instead of `/usr/local/bin/multimarkdown` and I assume that was why it was not spotted.

    I made a link from the `brew` one to `/usr/local/bin` and MST seemed happy enough to use it.



  7. Support Staff 7 Posted by Brett on 23 Jun, 2021 05:06 PM

    Brett's Avatar

    Yeah, brew on M1 installs everything to /opt/homebrew. I always thought
    it was safe to hardcode /usr/local because WHY WOULD THAT EVER CHANGE?
    So I've been updating my own scripts to use `brew --prefix` but it's
    harder with stuff like Services that have no guarantee that brew is
    installed. I'll add some logic for that, I guess.

    FYI, I symlinked /opt/homebrew/bin to /usr/local/bin. /usr/local is
    supposed to be for x86 builds now, but I haven't suffered any
    consequences from doing so, yet... at least all of my scripts with
    hardcoded paths aren't complaining.


Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Already uploaded files

  • 35.8 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac