Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sections #13

Open
diakovidis opened this issue Dec 14, 2017 · 6 comments
Open

Sections #13

diakovidis opened this issue Dec 14, 2017 · 6 comments

Comments

@diakovidis
Copy link

According to my understanding, docx sections (<w:sectPr>) are not currently supported. What would be the effort implementing this future?

@gimsieke
Copy link
Contributor

I think we do process some of the page-related sectPr properties, namely the page dimensions, orientation, breaks, and footnote properties. In which properties are you particularly interested?

@gimsieke
Copy link
Contributor

In terms of converting them into DocBook sections or the like, we are unlikely to support it in this docx2hub library. Splitting a document into sections will be done by another library, evolve-hub. You will find a sample setup in the docx2jats demo.

@diakovidis
Copy link
Author

I am working with a document which has 3 sections. The 2nd one has a 2 column layout. <w:cols w:num="2" w:sep="1" w:space="284"/> . Trying to pass it through docx2hub and then into hub2docx, the resulting new docx contains one section for the whole document.

@diakovidis
Copy link
Author

Doesn't evolve-hub require some kind of information for that splitting, which in this case is missing in the Flat hub?

@gimsieke
Copy link
Contributor

I see. If we were to support columns, we need to change a couple of things:

  • add CSS column properties to the Hub XML schema (via CSSa)
  • actually wrap the content with different column settings in divs (section-like elements without document hierarchy semantics, as opposed to regular DocBook elements such as section)
  • attach the column properties as CSSa attributes to these divs
  • test whether this does not break existing test sets and maybe adapt the evolve-hub postprocessing so that it supports divs (it probably does already)

If page sizes change within the document and if we need to convey the page size information to the Hub XML format, we need to apply divs to the resulting document anyway.

So yes, I acknowledge it’s a legitimate feature request if you need to convey the column information. In most of our workflows, we treat Word as a manuscript editing tool, where column counts and dimensions are negligible.

I think implementing this is a matter of a person day or so. But we wouldn’t prioritize it because we didn’t ever need to know the column count.

Of course if you need it urgently you can pay us for implementing it earlier, or set up some crowdfunding.

@gimsieke
Copy link
Contributor

Doesn't evolve-hub require some kind of information for that splitting, which in this case is missing in the Flat hub?

Yes, that’s exactly the point: evolve-hub expects some configuration for hierarchization, while docx2hub is a step that is mostly configuration-free.
As I said, we never saw any significant document-structuring information in column-count specifications, therefore we discarded it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants