New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aligning Word output styles to pre-existing Word template? #26
Comments
See https://github.com/jelovirt/com.elovirta.ooxml/wiki/Templates and https://github.com/jelovirt/com.elovirta.ooxml/wiki/Extending There is no list of element to style mapping. We could add a mapping to the wiki documentation, but the problem is that the listing will quickly become out of date. |
Shouldn't we aim to have a fixed, 1:1 mapping of DITA element --> Word style? |
No, because the mapping is always specific to Word template. We can create mapping from e.g. |
This is a very fair point. I would still welcome a default mapping with a caveat that it will need updating for every user's template - it would give a useful starting point especially for anyone implementing this as a solo project :-) |
A default mapping already exists, but it's just not documented in the wiki, it's only in the stylesheets. Them mapping basically works so that for all structures that have a mapping, that's the one that's used; all other elements will fall back to using the default style. |
Thanks, that's clear; so some DITA elements may have no specific Word style target? I would propose mapping as much as possible in basic DITA (ideally everything) to one of the default Word styles (no matter how bad ;-) ) just to make it easier for implementers to find something and change it in the publishing pipeline. |
Yes, all elements will map to some style. In most cases it's |
That's the problem :-) I'd like to find a table somewhere with a "comprehensive" (as practical) set of DITA styles that I can just change to fit my local template, rather than have to add new rows. I'm happy to propose something if it helps... |
We can document the current mapping in the wiki, but like I said, it will be out of date quickly. And, because all styles are read from the Word template, the mapping is always specific to the template. Thus, if you don't use the default template that comes with the plugin, you always have to map DITA structures to styles. So there is no way you can skip that step. |
I think we agree - I don't want to skip the step of mapping, it's just about how to do the mapping. If there's already a fairly comprehensive mapping (even though it will always be wrong!) I can just edit the existing links instead of creating them from zero. Maybe I didn't understand correctly? |
As an implementer it's much less overhead for me to generate a couple of examples, compare the output with the current configs, and modify < - - > test a few times to get the correct setup. |
Yes, I though you were talking about documentation, when you wanted to have a file with the mapping to edit. You have to create a stylesheet to change the mapping. An example of such a customization should be in the wiki. |
If most items on either end of the pipeline default to the same thing it's more work to track down what changes to make - but with a default mapping, even if the result is wrong at least it's different... |
OK, I'lll take a look at the wiki and try to figure it out :-) |
I will be honest - I am not understanding how to do this mapping. I can't understand how to read "this DITA element becomes that Word style" in the xsl (sorry!)... Specifically, I can't find |
That file doesn't contain those mappings. See e.g. document.topic.xsl or document.pr-d.xsl |
Can't we do this like: Please note the person who is converting the document using template, it should be his responsiblity to make sure that all the styles are present in template he is using. |
Thanks for the great work so far! 馃
I need to do one last tweak to the plugin before I can put in into production:
I have a Word template with highly customized styles.
These aren't always the styles used by the DITA-Word converter.
Which angle is best/simplest to start from in order to align them?
Edit the Word template to match whatever heading/numberedlist/bulletlist/emphasis etc. are already mapped in the plugin? Is there a full listing of these I can see?
Or edit some config file in the plugin (if so, which one please?) to match my existing Word setup (it is not too complex, it has numbered headings 1-9, bullet list, normal, I use the default Word HTML Code a lot... and that's almost everything)?
The text was updated successfully, but these errors were encountered: