You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using custom styles with the span syntax pandoc will create a new style in the output document, even where the style exists in the source document.
For instance in the following, example1 will appear rendered correctly, but example2 will have an additional default style defined with the same name, overriding the style when viewed in Word.
The following style (example1) will work as expected <div custom-style="example1">this works
great</div> however when using span tags the style will be defined again, overriding the previous
as you can see<span custom-style="example2">this doesn't work great</span>. This makes me sad :(
If we run the above through pandoc with a reference document that shows example1 highlighted yellow and example2 highlighted green, we get the following:
If I understand correctly, spans with custom styles should generate character styles, while divs generate paragraph styles. Isn't that the issue here? A paragraph style named example2 isn't the same as a character style named example2.
@kronicd Could you re-upload custom-reference.docx, input.txt, output.docx files after correction that you made, if possible.
@kronicd , @jgm Is there any possibility in conversion of html to docx file, i could add custom style for display:flex on any element <div style="display:flex">content</div>
When using custom styles with the span syntax pandoc will create a new style in the output document, even where the style exists in the source document.
For instance in the following, example1 will appear rendered correctly, but example2 will have an additional default style defined with the same name, overriding the style when viewed in Word.
If we run the above through pandoc with a reference document that shows example1 highlighted yellow and example2 highlighted green, we get the following:
cat input.txt | pandoc -f markdown --reference-doc='custom-reference.docx' --output testabcd.docx
I have attached all files here, this issue should be trivial to replicate with the files and command provided.
custom-reference.docx
input.txt
testabcd.docx
The text was updated successfully, but these errors were encountered: