Open me-kell opened 1 month ago
Pandoc is also adding some settings in word/settings.xml
not existing in the input document:
<w:displayHorizontalDrawingGridEvery w:val="0"/>
<w:displayVerticalDrawingGridEvery w:val="0"/>
<w:doNotTrackMoves/>
<w:drawingGridHorizontalSpacing w:val="360"/>
<w:drawingGridVerticalSpacing w:val="360"/>
<w:embedSystemFonts/>
<w:footnotePr>
<w:footnote w:id="0"/>
<w:footnote w:id="-1"/>
</w:footnotePr>
<w:hyphenationZone w:val="425"/>
<w:listSeparator w:val=";"/>
<w:proofState w:grammar="clean" w:spelling="clean"/>
<w:rsids/>
<w:savePreviewPicture/>
<w:stylePaneFormatFilter w:val="0004"/>
We do carry over some things from the reference.docx. But if we just used everything, we'd get corrupt files (tried that; see e.g. #9522). So we use a conservative approach to guarantee that the docx we produced is not corrupt. It may be that we can be less conservative about some things. See also #7240.
Here is the code relevant to generating settings.xml:
https://github.com/jgm/pandoc/blob/main/src/Text/Pandoc/Writers/Docx.hs#L474-L577
The styles AlertTok , AnnotationTok , AttributeTok , BaseNTok , BuiltInTok , CharTok , CommentTok , CommentVarTok , ConstantTok , ControlFlowTok , DataTypeTok , DecValTok , DocumentationTok , ErrorTok , ExtensionTok , FloatTok , FunctionTok , ImportTok , InformationTok , KeywordTok , NormalTok , OperatorTok , OtherTok, PreprocessorTok , RegionMarkerTok , SourceCode , SpecialCharTok , SpecialStringTok , StringTok , VariableTok , VerbatimStringTok , WarningTok
are for syntax highlighting. They are generated and depend on the highlighting style you specify. If you specify --no-highlight
, they should not appear.
PS. Also please state your pandoc version.
Don't add any other styles in the output document other than the ones existing in the input document when converting with the option
--reference-doc
(and the extension+styles
)Currently when converting a DOCX-Document with the
+styles
extension and itself as--reference-doc
withfollowing styles are added in the output document (which were not in the input document):
AlertTok
,AnnotationTok
,AttributeTok
,BaseNTok
,BuiltInTok
,CharTok
,CommentTok
,CommentVarTok
,ConstantTok
,ControlFlowTok
,DataTypeTok
,DecValTok
,DocumentationTok
,ErrorTok
,ExtensionTok
,FloatTok
,FunctionTok
,ImportTok
,InformationTok
,KeywordTok
,NormalTok
,OperatorTok
,OtherTok
,PreprocessorTok
,RegionMarkerTok
,SourceCode
,SpecialCharTok
,SpecialStringTok
,StringTok
,VariableTok
,VerbatimStringTok
,WarningTok
The input.docx is an empty document created with a "clean"
Normal.dotm
.Is there a way to disable the creation of those styles when the
--reference-doc
option is given?