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

Implement landscape mode for content (or just tables...?) #173

Closed
ronaldtse opened this issue Dec 10, 2019 · 4 comments
Closed

Implement landscape mode for content (or just tables...?) #173

ronaldtse opened this issue Dec 10, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@ronaldtse
Copy link
Contributor

As seen here: metanorma/metanorma-iso#263 sometimes tables are too wide and require landscape mode.

ITU OB sample: https://github.com/ituob/service-publications-refs/tree/master/974-F.400

There should be a syntax to mark content as "landscape" mode in Metanorma.

@opoudjis
Copy link
Contributor

Page break in asciidoc is:

<<<

Asciidoc markup allows options on pagebreak:

[%landscape]
<<<

[%portrait]
<<<

So the appropriate markup can be introduced, and will need to be converted in Word into section breaks. The challenge will be whether this can be done without unworkable additions to Word's CSS defining page layouts.

@opoudjis
Copy link
Contributor

https://stigmortenmyre.no/mso/html/word/wdconsectionbreaks.htm and other online references notwithstanding, mso-page-orientation: landscape is being ignored by Word; what works is to flip the height and width in the size attribute of @page.

@opoudjis
Copy link
Contributor

opoudjis commented Jan 29, 2020

Needed changes in Word for every single gem are:

  • Next to @page WordSection3, add @page WordSection3L, with the width and height flipped
  • If there are any headers or footers with a right tab at the right edge of the page, or a center tab at the center of the page (e.g. for page number), create in header.html a variant header/footer with the tab in the center/right of the landscape page

In isodoc:

  • Whenever a section orientation page break is found, add a section break and a new section to the CSS, with page: WordSection3 or page: WordSection3L respectively set.
  • That section needs to force closing and reopening of all open tags at that point (which, given markup, will be limited to divs): get all ancestors at that point in Nokogiri up to the WordSection div, close their tags, and then reopen their tags with the ids stripped, via wrap.
    ** As an alternative to that horror, we might preprocess input, but that would likely be even worse.

This all is tractable, but it's also a big refactor. Again. I would rather this not hold up Friday release of gems.

@opoudjis
Copy link
Contributor

Also need to add WordSection3P (portrait) as well as WordSection3L, and WordSection2P and WordSection2L. All these continuation sections need to resume page numbering from the previous section, so they have different @page attributes from the initial WordSection2 and WordSection3.

opoudjis added a commit to metanorma/metanorma-iso that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-iso that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-gb that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-gb that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-iec that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-iec that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-csa that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-csa that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-ogc that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-ogc that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-un that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-un that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-cc that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-cc that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-itu that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-itu that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-m3aawg that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-m3aawg that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-mpfa that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-mpfa that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-sample that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-sample that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-ribose that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-ribose that referenced this issue Jan 30, 2020
opoudjis added a commit to metanorma/metanorma-generic that referenced this issue Feb 2, 2020
opoudjis added a commit to metanorma/metanorma-generic that referenced this issue Feb 2, 2020
opoudjis added a commit to metanorma/metanorma-vg that referenced this issue Feb 2, 2020
opoudjis added a commit to metanorma/metanorma-vg that referenced this issue Feb 2, 2020
opoudjis added a commit to metanorma/metanorma-model-standoc that referenced this issue Feb 3, 2020
opoudjis added a commit to metanorma/metanorma-ietf that referenced this issue Feb 3, 2020
opoudjis added a commit to metanorma/isodoc that referenced this issue Feb 4, 2020
opoudjis added a commit that referenced this issue Feb 4, 2020
opoudjis added a commit to metanorma/metanorma.org that referenced this issue Feb 4, 2020
@opoudjis opoudjis closed this as completed Feb 4, 2020
ronaldtse pushed a commit to metanorma/metanorma.org that referenced this issue Feb 7, 2020
ronaldtse added a commit that referenced this issue Feb 7, 2020
* master: (66 commits)
  namespace: metanorma/metanorma-iso#307
  root and namespace variables: #155
  refactor section names: closes metanorma/metanorma-iso#313
  landscape/portrait page breaks: #173
  bug
  version bump
  caller location: #197
  version bump
  empty attributes refinement
  smart quotes on boilerplate
  boilerplate refactor
  boilerplate file refactor
  boilerplate functionality: #157
  user supplied labels in autofetch references: #159
  version bump
  plantuml robust under Windows: closes #187
  #154
  concept: #154
  rspec
  grammar
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants