Chem4Word / Version3-2

Version 2022 (3.2) of Chem4Word - A Chemistry Add-In for Microsoft Word
https://www.chem4word.co.uk
Other
21 stars 2 forks source link

Unable to display minus symbol (−) #29

Closed tomyan112 closed 2 years ago

tomyan112 commented 2 years ago

Describe the bug image

image

CML Data

<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>7e097b01d1704d2095d7ffe82fbd2d70</c4w:customXmlPartGuid>
  <cml:molecule id="m1">
    <cml:formula id="m1.f0" concise="C 2 H 2 R 2 O 1" />
    <cml:formula id="m1.f1" convention="chem4word:ResolvedFormula" inline="Not requested" concise="C 2 H 2 R 2 O 1" />
    <cml:formula id="m1.f2" convention="chem4word:ResolvedSmiles" inline="Not requested" concise="C 2 H 2 R 2 O 1" />
    <cml:name id="m1.n1" dictRef="chem4word:CalculatedInchi">Unable to calculate</cml:name>
    <cml:name id="m1.n2" dictRef="chem4word:CalculatedAuxInfo">Unable to calculate</cml:name>
    <cml:name id="m1.n3" dictRef="chem4word:CalculatedInchikey">Unable to calculate</cml:name>
    <cml:name id="m1.n4" dictRef="chem4word:ResolvedIupacname">Not requested</cml:name>
    <cml:atomArray>
      <cml:atom id="a1" elementType="R2" x2="485.2792" y2="602.5837" />
      <cml:atom id="a2" elementType="C" x2="467.9586" y2="612.5837" />
      <cml:atom id="a3" elementType="C" x2="450.6382" y2="602.5837" />
      <cml:atom id="a4" elementType="R3" x2="433.3177" y2="612.5837" />
      <cml:atom id="a5" elementType="O" x2="450.6382" y2="582.5837" />
    </cml:atomArray>
    <cml:bondArray>
      <cml:bond id="b1" atomRefs2="a2 a1" order="S" />
      <cml:bond id="b2" atomRefs2="a3 a2" order="S" />
      <cml:bond id="b3" atomRefs2="a3 a5" order="D" />
      <cml:bond id="b4" atomRefs2="a4 a3" order="S" />
    </cml:bondArray>
  </cml:molecule>
  <cml:molecule id="m2">
    <cml:formula id="m2.f0" concise="C 3 H 3 R 3 O 2" />
    <cml:formula id="m2.f1" convention="chem4word:ResolvedFormula" inline="Not requested" concise="C 3 H 3 R 3 O 2" />
    <cml:formula id="m2.f2" convention="chem4word:ResolvedSmiles" inline="Not requested" concise="C 3 H 3 R 3 O 2" />
    <cml:name id="m2.n1" dictRef="chem4word:CalculatedInchi">Unable to calculate</cml:name>
    <cml:name id="m2.n2" dictRef="chem4word:CalculatedInchikey">Unable to calculate</cml:name>
    <cml:name id="m2.n3" dictRef="chem4word:ResolvedIupacname">Not requested</cml:name>
    <cml:atomArray>
      <cml:atom id="a6" elementType="R3" x2="566.2955" y2="605.2497" />
      <cml:atom id="a7" elementType="C" x2="583.616" y2="595.2497" />
      <cml:atom id="a8" elementType="C" x2="600.9365" y2="605.2497" />
      <cml:atom id="a9" elementType="R2" x2="600.9365" y2="625.2497" />
      <cml:atom id="a10" elementType="C" x2="618.2569" y2="595.2497" />
      <cml:atom id="a11" elementType="R1" x2="635.5776" y2="605.2497" />
      <cml:atom id="a12" elementType="O" x2="618.2569" y2="575.2497" />
      <cml:atom id="a13" elementType="O" x2="583.616" y2="575.2497" />
    </cml:atomArray>
    <cml:bondArray>
      <cml:bond id="b5" atomRefs2="a6 a7" order="S" />
      <cml:bond id="b6" atomRefs2="a7 a8" order="S" />
      <cml:bond id="b7" atomRefs2="a8 a9" order="S" />
      <cml:bond id="b8" atomRefs2="a8 a10" order="S" />
      <cml:bond id="b9" atomRefs2="a10 a11" order="S" />
      <cml:bond id="b10" atomRefs2="a7 a13" order="D" />
      <cml:bond id="b11" atomRefs2="a10 a12" order="S" />
    </cml:bondArray>
  </cml:molecule>
  <cml:molecule id="m3">
    <cml:formula id="m3.f0" concise="C 3 H 1 R 3 O 1" />
    <cml:formula id="m3.f1" convention="chem4word:ResolvedFormula" inline="Not requested" concise="C 3 H 1 R 3 O 1" />
    <cml:formula id="m3.f2" convention="chem4word:ResolvedSmiles" inline="Not requested" concise="C 3 H 1 R 3 O 1" />
    <cml:name id="m3.n1" dictRef="chem4word:CalculatedInchi">Unable to calculate</cml:name>
    <cml:name id="m3.n2" dictRef="chem4word:CalculatedInchikey">Unable to calculate</cml:name>
    <cml:name id="m3.n3" dictRef="chem4word:ResolvedIupacname">Not requested</cml:name>
    <cml:atomArray>
      <cml:atom id="a14" elementType="R3" x2="697.4004" y2="604.7503" />
      <cml:atom id="a15" elementType="C" x2="714.7208" y2="594.7503" />
      <cml:atom id="a16" elementType="C" x2="732.0414" y2="604.7503" />
      <cml:atom id="a17" elementType="R2" x2="732.0414" y2="624.7503" />
      <cml:atom id="a18" elementType="C" x2="749.3618" y2="594.7503" />
      <cml:atom id="a19" elementType="R1" x2="766.6823" y2="604.7503" />
      <cml:atom id="a20" elementType="O" x2="714.7208" y2="574.7503" />
    </cml:atomArray>
    <cml:bondArray>
      <cml:bond id="b12" atomRefs2="a14 a15" order="S" />
      <cml:bond id="b13" atomRefs2="a15 a16" order="S" />
      <cml:bond id="b14" atomRefs2="a16 a17" order="S" />
      <cml:bond id="b15" atomRefs2="a16 a18" order="D" c4w:placement="Anticlockwise" />
      <cml:bond id="b16" atomRefs2="a18 a19" order="S" />
      <cml:bond id="b17" atomRefs2="a15 a20" order="D" />
    </cml:bondArray>
  </cml:molecule>
  <cml:reactionScheme id="rs1">
    <cml:reaction id="r1" c4w:head="555.7898,603.4157" c4w:tail="495.7899,603.4157">
      <c4w:reagents>
        <FlowDocument mc:Ignorable="c4w" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:c4w="http://www.chem4word.com/cml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
          <Paragraph>
            <Run>[1] LDA</Run>
          </Paragraph>
        </FlowDocument>
      </c4w:reagents>
      <c4w:conditions>
        <FlowDocument mc:Ignorable="c4w" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:c4w="http://www.chem4word.com/cml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
          <Paragraph>
            <Run>[2] RCHO</Run>
            <LineBreak />
            <Run>[3] H</Run>
            <Run FontSize="18" BaselineAlignment="Subscript">2</Run>
            <Run>O    </Run>
          </Paragraph>
        </FlowDocument>
      </c4w:conditions>
    </cml:reaction>
    <cml:reaction id="r2" c4w:head="683.8011,601.5821" c4w:tail="648.6009,601.5821">
      <c4w:reagents>
        <FlowDocument mc:Ignorable="c4w" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:c4w="http://www.chem4word.com/cml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
          <Paragraph>
            <Run>−OH</Run>
          </Paragraph>
        </FlowDocument>
      </c4w:reagents>
      <c4w:conditions>
        <FlowDocument mc:Ignorable="c4w" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:c4w="http://www.chem4word.com/cml" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
          <Paragraph>
            <Run>or</Run>
            <LineBreak />
            <Run>H</Run>
            <Run FontSize="18.000022797386425" BaselineAlignment="Subscript">3</Run>
            <Run>O</Run>
            <Run FontSize="18.000022797386425" BaselineAlignment="Superscript">+</Run>
          </Paragraph>
        </FlowDocument>
      </c4w:conditions>
    </cml:reaction>
  </cml:reactionScheme>
</cml:cml>
MikeWilliams-UK commented 2 years ago

As you will see in the screen shot below you have not typed a minus character, the renderer uses a subset of Arial extracted into curves to allow precise positioning. The standard minus character is included, but the wide character you have used is not.

Please use the standard minus character

image

Please compare below your version (from cml you posted) to one where proper minus sign is used image

tomyan112 commented 2 years ago

As you will see in the screen shot below you have not typed a minus character, the renderer uses a subset of Arial extracted into curves to allow precise positioning. The standard minus character is included, but the wide character you have used is not.

Please use the standard minus character

image

Please compare below your version (from cml you posted) to one where proper minus sign is used image

Lowercase cursive l (ℓ) is not supported as well.

MikeWilliams-UK commented 2 years ago

@tomyan112 correct cursive l (ℓ) is not supported. @deadlyvices

  1. should we support this?
  2. we should add which supported characters are rendered to the user manual - I can do this
MikeWilliams-UK commented 2 years ago

The manual for V3.2.3 will include the following image

tomyan112 commented 2 years ago

The manual for V3.2.3 will include the following image

Please add ± too, it is also used in Chemistry. image

MikeWilliams-UK commented 2 years ago

@tomyan112 charcters ± and ℓ will be available in release V3.2.3