Numbering list incorrect

  • When I create a document in the version 7 demo, save an an RTF, the numbering is incorrect in MSWord. In WPTools, the numbering restarts correctly in each section. When I open the RTF in MSWord, the numbering continues instead of restarting in each section. I have this issue in version 6 of WPTools and I just tried it in the Demo of Version 7 to see if it is fixed , so we could upgrade to this version.

    Here is the sample RTF:
    {\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Times New Roman;}{\f1\fnil\fcharset2 Wingdings;}{\f2\fnil\fcharset2 Symbol;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;}\wpprheadfoot1\paperw12240\paperh15840\margl1880\margr1880\margt1440\margb1440\headery720\footery720\ftnbj\sftnbj\sftnrstcont\nocolbal\sftnnar\saftnnar\fet0\endnhere\sectdefaultcl{\*\generator WPTools_7.000-PRM;}{\*\listtable{\list\listtemplateid1
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc1{\leveltext\'02\'00.;}{\levelnumbers\'01;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc3{\leveltext\'02\'01.;}{\levelnumbers\'01;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'02\'02.;}{\levelnumbers\'01;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc4{\leveltext\'02\'03);}{\levelnumbers\'01;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc2{\leveltext\'03(\'04);}{\levelnumbers\'02;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc4{\leveltext\'03(\'05);}{\levelnumbers\'02;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'03(\'06);}{\levelnumbers\'02;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'03(\'07);}{\levelnumbers\'02;}}
    {\listlevel\leveljc0\levelfollow0\levelstartat1\levelspace0\levelindent360\levelnfc0{\leveltext\'03(\'08);}{\levelnumbers\'02;}}
    \listid1}}{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}{\plain\f0\fs24 break\par
    \ls1\ilvl2{\listtext\fs24 1.\tab}\pnstart1\li360\fi-360\plain\f0\fs24 one\par
    {\listtext\fs24 2.\tab}\plain\f0\fs24 two\par
    {\listtext\fs24 3.\tab}\plain\f0\fs24 three\par
    \pard\plain\plain\f0\fs24\par
    \plain\f0\fs24 break two\par
    \ls1\ilvl2{\listtext\fs24 1.\tab}\pnstart1\li360\fi-360\plain\f0\fs24 one\par
    {\listtext\fs24 2.\tab}\plain\f0\fs24 two\par
    {\listtext\fs24 3.\tab}\plain\f0\fs24 three\par
    \pard\plain\plain\f0\fs24\par
    \plain\f0\fs24 break 4\par
    \ls1\ilvl2{\listtext\fs24 1.\tab}\pnstart1\li360\fi-360\plain\f0\fs24 one\par
    {\listtext\fs24 2.\tab}\plain\f0\fs24 two\par
    {\listtext\fs24 3.\tab}\plain\f0\fs24 three\par
    {\listtext\fs24 4.\tab}\plain\f0\fs24 four\par
    \pard\plain\plain\f0\fs24\par
    \plain\f0\fs24 end\par
    \pard\plain\plain\f0\fs24\par
    }}

    • Offizieller Beitrag

    To implement such devided list Word seems to create a new list style for the new list, this would be possible with WPTools, too.

    Word also resets the numbering of a lower outline level if the outline was interrupted by a higher level.

    WPTools has the option to automatically restart numbering if the list was interrupted by regular text. That is controlled by the flag wpfAutoRestartSimpleNumbering in FormatOptionsEx and, in WPTools 7, wpfRestartOutlineNumbersAfterRegularText in FormatOptionsEx2.

    Your file explicitly uses the WPAT_NumberStart attribute which is defined by the RTF specs (pnstart) but ignored by Word in Outlines. Therefor WPTools has the possibility to also ignore that property: wpfIgnorePropertyNumberStart

    If you build your lists using the "simple" (not outline) numbering it should be ok.

  • We currently are using Simple numbering to solve this issue. This is the only way other RTF editors/viewers can see the numbering correctly. If I save the RTF from WPtools with another RTF Editor, The numbering is not visible in the WPTools editor. Below is the RTF that was read into another RTF editor (originally saved by WPTools). Nothing was changed, just saved. If you now view it in WPTools, the second set of number is not visible. If I save this in WPTools editor, the second set of number is completely removed. You can easily verify this by opening it up in WORD or WordPad. Open the same document in WPTools, and the second set of numbering is missing.

    we enabled simple: - {$DEFINE SIMPLE_AS_OLDPN} // enabled

    Sample RTF:

    {\rtf1\deff0{\fonttbl{\f0 Calibri;}{\f1 Times New Roman;}}{\colortbl ;\red0\green0\blue255 ;}{\*\defchp \f1}{\stylesheet {\ql\f1 Normal;}{\*\cs1\f1 Default Paragraph Font;}{\*\cs2\sbasedon1\f1 Line Number;}{\*\cs3\ul\f1\cf1 Hyperlink;}{\*\ts4\tsrowd\f1\ql\tscellpaddfl3\tscellpaddl108\tscellpaddfb3\tscellpaddfr3\tscellpaddr108\tscellpaddft3\tsvertalt\cltxlrtb Normal Table;}{\*\ts5\tsrowd\sbasedon4\f1\ql\trbrdrt\brdrs\brdrw10\trbrdrl\brdrs\brdrw10\trbrdrb\brdrs\brdrw10\trbrdrr\brdrs\brdrw10\trbrdrh\brdrs\brdrw10\trbrdrv\brdrs\brdrw10\tscellpaddfl3\tscellpaddl108\tscellpaddfr3\tscellpaddr108\tsvertalt\cltxlrtb Table Simple 1;}}{\*\listtable {\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1936362742 \'01\'00;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li360\lin360}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid738540399 \'01\'01;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li510\lin510}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1091491432 \'01\'02;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li660\lin660}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1427047170 \'01\'03;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li810\lin810}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1100983495 \'01\'04;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li960\lin960}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1800995725 \'01\'05;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1110\lin1110}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1066291194 \'01\'06;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1260\lin1260}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1196591386 \'01\'07;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1410\lin1410}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1727569951 \'01\'08;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1560\lin1560}{\listname ;}\listid131487577}{\list\listtemplateid-1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid617859513 \'01\'00;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li360\lin360}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1939412703 \'01\'01;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li510\lin510}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid676649950 \'01\'02;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li660\lin660}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid2030018233 \'01\'03;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li810\lin810}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1063832698 \'01\'04;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li960\lin960}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid215782197 \'01\'05;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1110\lin1110}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid280404778 \'01\'06;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1260\lin1260}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid800533229 \'01\'07;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1410\lin1410}{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelold\levelspace0\levelindent0{\leveltext\leveltemplateid1248773309 \'01\'08;}{\levelnumbers\'01;}\levellegal0\levelnorestart0\li1560\lin1560}{\listname ;}\listid1387907794}}{\*\listoverridetable {\listoverride\listid131487577\listoverridecount0\ls2}{\listoverride\listid1387907794\listoverridecount0\ls3}}\nouicompat\splytwnine\htmautsp\deftab360\sectd\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\headery720\footery720\pard\plain\ql{\f1\fs20\cf0 Head}\f1\fs20\par{\listtext\pard 1\tab }\pard\plain\ilvl0\ls2\ql\fi-360\li360\lin360{\f1\fs20\cf0 One}\f1\fs20\par{\listtext\pard 2\tab }\pard\plain\ilvl0\ls2\ql\fi-360\li360\lin360{\f1\fs20\cf0 Two}\f1\fs20\par{\listtext\pard 3\tab }\pard\plain\ilvl0\ls2\ql\fi-360\li360\lin360{\f1\fs20\cf0 Three}\f1\fs20\par\pard\plain\ql\f1\fs20\par\pard\plain\ql{\f1\fs20\cf0 Bottom}\f1\fs20\par{\listtext\pard 1\tab }\pard\plain\ilvl0\ls3\ql\fi-360\li360\lin360{\f1\fs20\cf0 One}\f1\fs20\par{\listtext\pard 2\tab }\pard\plain\ilvl0\ls3\ql\fi-360\li360\lin360{\f1\fs20\cf0 Two}\f1\fs20\par{\listtext\pard 3\tab }\pard\plain\ilvl0\ls3\ql\fi-360\li360\lin360{\f1\fs20\cf0 Three}\f1\fs20\par\pard\plain\ql\f1\fs20\par\pard\plain\ql{\f1\fs20\cf0 End of report}\f1\fs20\par}