简体   繁体   English

Pandoc:将docx转换为markdown时有条件中断

[英]Pandoc: Conditional breaks when converting docx to markdown

I have a docx document which contains conditional breaks ( Ctrl + - ). 我有一个docx文档,其中包含条件换行符( Ctrl + - )。 I'm converting them to markdown and later (with jekyll) to HTML. 我将它们转换为markdown,稍后(使用jekyll)转换为HTML。 Unfortunately, the conditional breaks are lost. 不幸的是,条件中断丢失了。 A workaround is to edit the generated markdown document and insert ­ 解决方法是编辑生成的降价文档并插入­ , but this is not a solution since I need to generate the markdown from the docx regulary. ,但这不是解决方案,因为我需要定期从docx生成markdown。

How can I tell pandoc to keep the conditional breaks? 我如何告诉Pandoc保留条件性休息时间?

Edit: It does not only occur when converting to markdown, the conditional breaks are also lost when converting directly to HTML. 编辑:不仅在转换为降价时发生,直接转换为HTML时,条件中断也会丢失。

Unfortunately, Word doesn't use the unicode character 'SOFT HYPHEN' (U+00AD) but instead creates it's own XML element <w:softHyphen/> internally in it's docx format. 不幸的是,Word没有使用Unicode字符'SOFT HYPHEN'(U + 00AD),而是在内部以docx格式创建了自己的XML元素<w:softHyphen/>

A pandoc issue has been filed to adjust the docx reader. 已提交pandoc问题以调整docx阅读器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从 html 转换为 docx 格式时,Pandoc 不渲染 SVG 图像 - Pandoc is not rendering SVG images when converting from html to docx format Pandoc在转换为Markdown时会丢弃“未知” HTML元素 - Pandoc drops “unknown” HTML elements when converting to markdown 为什么pandoc在将html转换为markdown时会保留span和div标签? - Why pandoc keeps span and div tags when converting html to markdown? pandoc:从markdown转换时添加onload等html事件 - pandoc: add html events such as onload when converting from markdown 使用Pandoc将HTML中的多行代码段转换为Markdown - Converting multiline code snippets in HTML to Markdown with pandoc 使用 pandoc for html/pdf/docx 在 markdown 中正确调整 PNG 图像的大小 - correctly sizing PNG images in markdown with pandoc for html/pdf/docx 从 markdown 转换为 HTML 时,使用 Pandoc Lua 过滤器替换 HTML 标签 - Replace HTML tags using Pandoc Lua filter when converting from markdown to HTML 使用 Pandoc 从 HTML 转换为 Markdown 时为代码块添加正确的语法名称 - Add proper syntax name to code blocks when converting from HTML to Markdown with Pandoc 在pypandoc(pandoc)中将较大的HTML文件转换为docx的问题 - Issues converting larger HTML files to docx in pypandoc (pandoc) Pandoc:从 Markdown 转换为 HTML 时将字体系列更改为 sans - Pandoc: Change font family to sans while converting from Markdown to HTML
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM