TEI XML 轉 DOCX
出自DILA Wiki
使用 TEI: XSL stylesheets for TEI XML
Template
word template 在以下路徑:
Stylesheets-dev/profiles/dila/docx/template.docx
手動編輯 template.docx 之後,裡面的 style id 會變動,造成 teitodocx 連不到正確的樣式。 可使用以下程式修正:
ruby fix-template.rb
Graphic
SVG
svg 不能插入 word, 要先轉為 png
ruby svg2png.rb
Table
如果使用 Web 版 Office 365 或 Mac Pages 開啟,表格可能會有問題, 如果在 Windows 下使用 MS Word 開啟就沒問題。
版面配置
橫向
xml 的 body 最後加上:
<milestone><orientation type='landscape'/></milestone>
已知問題
- 表格的 cell 跨列不能正確轉出,已在 Github 提出 issue,確認問題存在。
- <seg rend="xxx"> 不會轉成樣式
- 雖然 <p rend="xxx"> 會轉成樣式,但是如果在 cell 裡就不會轉出。