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

Overlapped text #29

Closed
tomyan112 opened this issue Jan 29, 2020 · 7 comments
Closed

Overlapped text #29

tomyan112 opened this issue Jan 29, 2020 · 7 comments
Labels
Bug Something isn't working Fixed Fixed, but may not be released yet

Comments

@tomyan112
Copy link

Describe the bug

image

Expected behavior
A clear and concise description [in English] of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 7/8.1/10 Home/Professional]
  • Word Version [e.g. 2016/O365/2019 Home/Business/Professional]
  • Please also gather system information from "Help" --> "System Info" in Chem4Word Ribbon

Additional context
Add any other context about the problem here.

@MikeWilliams-UK
Copy link
Contributor

Please can you use the "View CML" button on the ribbon to extract the cml.
Then paste it here as plain text (not an image) so that we can investigate this.

@MikeWilliams-UK MikeWilliams-UK added Bug Something isn't working Waiting for Answer Waiting for an answer from someone outside the project team labels Jan 29, 2020
@MikeWilliams-UK
Copy link
Contributor

Is this in ACME or rendered (in document) or both?

@tomyan112
Copy link
Author

tomyan112 commented Jan 29, 2020

Is this in ACME or rendered (in document) or both?

This occurs in both. Thus, an alignment feature is needed.
Flush Left.Creates left-justified caption text.
Centered.Creates centered caption text.
Flush Right.Creates right-justified caption text.
Justified.Creates right-left justified caption text

<cml:cml xmlns:conventions="http://www.xml-cml.org/convention/" xmlns:cml="http://www.xml-cml.org/schema" xmlns:cmlDict="http://www.xml-cml.org/dictionary/cml/" xmlns:nameDict="http://www.xml-cml.org/dictionary/cml/name/" xmlns:c4w="http://www.chem4word.com/cml" conventions="convention:molecular">
  <c4w:customXmlPartGuid>a8df85b7377145c4b30db5daf4194a49</c4w:customXmlPartGuid>
  <cml:molecule id="m1">
    <cml:atomArray>
      <cml:atom id="a1" elementType="C" x2="396" y2="334.75" />
      <cml:atom id="a2" elementType="C" x2="406" y2="317.4295" />
      <cml:atom id="a3" elementType="C" x2="416" y2="334.75" />
      <cml:atom id="a4" elementType="C" x2="426" y2="317.4295" />
      <cml:atom id="a5" elementType="C" x2="440.1421" y2="331.5716" />
      <cml:atom id="a6" elementType="C" x2="426" y2="297.4295" />
      <cml:atom id="a7" elementType="CH2CH2OH" x2="406" y2="297.4295" />
    </cml:atomArray>
    <cml:bondArray>
      <cml:bond id="b1" atomRefs2="a1 a2" order="S" />
      <cml:bond id="b2" atomRefs2="a2 a3" order="S" />
      <cml:bond id="b3" atomRefs2="a3 a4" order="S" />
      <cml:bond id="b4" atomRefs2="a4 a5" order="S" />
      <cml:bond id="b5" atomRefs2="a4 a6" order="S" />
      <cml:bond id="b6" atomRefs2="a2 a7" order="S" />
    </cml:bondArray>
  </cml:molecule>
</cml:cml>

Edited to remove irrelevant parts of CML and make it a code section

@MikeWilliams-UK
Copy link
Contributor

Thanks for your speedy reply.
We will add this to our backlog.

@MikeWilliams-UK MikeWilliams-UK removed the Waiting for Answer Waiting for an answer from someone outside the project team label Jan 29, 2020
@MikeWilliams-UK
Copy link
Contributor

MikeWilliams-UK commented Jan 29, 2020

Let me explain what happens with a Functional Group.

Each functional group consists of a set of components.
In the case of CH2CH2OH these are

  • CH2 [Primary]
  • CH2
  • O
  • H

When we display a Functional group a decision is made to render it forwards or backwards
The primary term is placed first such that it is centred about the atom's position (shown with red border)
Then the rest of the terms are either placed to the left (backwards) or right (forwards)
Thus you should end up with something like the images below

Forwards Backwards
image image

What has most definitely at fault here is that our automatic system is deciding to render this functional group forwards, when it quite clearly should have been backwards.

Edited to provide better screen shots.

@MikeWilliams-UK
Copy link
Contributor

Just fixed the decision mechanism to work with functional groups attached to vertical bonds as in your example so that they do not overlap.

image

We will add the ability to manually override the left or right placement of functional groups at a later stage.

I am expecting to release the beta 5 this weekend

@MikeWilliams-UK MikeWilliams-UK added the Fixed Fixed, but may not be released yet label Jan 29, 2020
MikeWilliams-UK added a commit that referenced this issue Feb 1, 2020
* Fix Unable to add a bond to R atom #20
* Add ability to rotate bond to specific values #10
* Bond length incorrect for new drawings #27
* Fix placement of Functional Groups #29
* Fix deleting of bonds connected to explicitly hidden C atoms causing invisible C atoms
* Remove c4w:Explicit on lone (Carbon) atoms on import, to prevent them from being invisible
* Performance improvements
* Fix doubling up of 2019 in Office detection

Related work items: #665, #683, #689, #692, #693, #694, #695
@MikeWilliams-UK
Copy link
Contributor

Fixed in Beta 5

@Chem4Word Chem4Word locked as resolved and limited conversation to collaborators Feb 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed Fixed, but may not be released yet
Development

No branches or pull requests

2 participants