doc and docx do not have working html links
// 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:
- create markdown file with links
- export as .doc or .docx
- 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
additionalMathJaxConfig:
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
outlineModeExtensions:
permissionGranted: NO
printHeaderBottomLeft:
printHeaderBottomRight:
printHeaderFirstPage: NO
printFooterFirstPage: NO
printHeaderTopLeft:
printHeaderTopRight:
processHTMLFiles: YES
removeMetadataForPreview: NO
removeYAMLHeaders: NO
scrollToEdit: YES
shouldDetectCritic: YES
shouldHighlightMarkupErrors: NO
shouldLoadCritic: NO
syntaxHighlight: YES
syntaxHighlightOnlyLang: NO
useCustomMarkdownProcessor: NO
customMarkdownProcessor:
useCustomPreprocessor: NO
customPreprocessor:
useFirstH1AsPrintTitle: YES
Keyboard shortcuts
Generic
? | 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
Support Staff 1 Posted by Brett on 08 Apr, 2021 06:58 PM
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.
-Brett
2 Posted by Timothy J. Luom... on 08 Apr, 2021 07:22 PM
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.
Tj
Support Staff 3 Posted by Brett on 08 Apr, 2021 07:41 PM
That's an embarrassing amount of work. Hopefully I'll figure out the
missing pieces sooner than later.
-Brett
4 Posted by Timothy J. Luom... on 08 Apr, 2021 10:05 PM
Don’t sweat it too much… Turns out that pandoc can do MD->DOCX so I can use that for now.
Support Staff 5 Posted by Brett on 08 Apr, 2021 10:12 PM
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.
-Brett
6 Posted by Timothy J. Luom... on 23 Jun, 2021 02:25 PM
You may already know this, but just in case:
I installed <https://brettterpstra.com/projects/markdown-service-tools/> 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.
FYI
Tj
Support Staff 7 Posted by Brett on 23 Jun, 2021 05:06 PM
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.
-Brett