cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

TOC formatting

SindyYoung
2-Guest

TOC formatting

Good Morning Everyone,
I am using Epic Editor 5.3M60 and a fosi.
I have subparas where the title is optional .
The problem is that these subparas report to the toc.
It is driving me nuts. I can't figure out how to tell the fosi, that if title doesn't follow the para tag, do not report to the toc.
Any suggestions.
[cid:image001.png@01CAB540.8D6A0370]

[cid:image002.png@01CAB540.8D6A0370]

Sindy Young
AWACS Tools and Technology Team,
(253) 657-6964
Kent, WA 98032
10 REPLIES 10

We have a similar need. Call this ACL in an <att> rule.

#--------------------------------------------------------------------
# get_next_oid_name
#
# From a FOSI call, return the name of the next element, or nothing
# if no sibling element.
#
# Originally coded for use with graphic e-i-c to test for following
# graphic when deciding whether to start next page after graphic.
#
#--------------------------------------------------------------------

function get_next_oid_name(window, oid)
{
return oid_name(oid_next(oid));
}

Can't do this in FOSI without the ACL.

Steve Thompson
+1(316)977-0515

Sindy,

Here is the actual data from my FOSI that does what you want (I think):

Set up a style set for "toc" and one for "no.toc"

<charsubset charsubsetid="subpara.title.toc">

<hyphen inherit="0" hyph="1">
<quadding inherit="0" quad="left">
<highlt scoring="1" scorewt="1pt" scorechr="_" scorespc="1">
<presp minimum="5pt" nominal="6pt" maximum="7pt" condit="discard" priority="med">
<keeps keep="1" next="1">
<savetext textid="subparatitle.appear.tdv" conrule="\yes\">
<usetext source="labelstr.tdv," 0.3em&quot;=" placemnt="before">
<subchars>

<textbrk startln="0" endln="0">
</subchars>
</usetext>
<usetext source="\.\," 1em&quot;=" placemnt="after">
<subchars>
<highlt scoring="0">
</subchars>
</usetext>
<savetext textid="pagenum.tdv" conrule="pgprefix.tdv," pagect.tdv[bo]&quot;=">
<savetext textid="voltocmatter.tiv" conrule="&lt;newline">, <toc-entry.fmt>, 1.5em, labelstr.tdv, @6.5em, #CONTENT, sssn.tdv, tocfill, </toc-entry.fmt>, <tocnumx>, pagenum.tdv, </tocnumx>, </newline>" append="1">
<savetext textid="tocmatter.tiv" conrule="&lt;newline">, <toc-entry.fmt>, 1.5em, labelstr.tdv, @6.5em, #CONTENT, sssn.tdv, tocfill, </toc-entry.fmt>, <tocnumx>, pagenum.tdv, </tocnumx>, </newline>" append="1">
</charsubset>

<charsubset charsubsetid="subpara.title.no.toc">

<hyphen inherit="0" hyph="0">
<quadding inherit="0" quad="left">
<highlt scoring="1" scorewt="1pt" scorechr="_" scorespc="1">
<presp minimum="5pt" nominal="6pt" maximum="7pt" condit="discard" priority="med">
<keeps keep="1" next="1">
<savetext textid="pagenum.tdv" conrule="pgprefix.tdv," pagect.tdv[bo]&quot;=">
<savetext textid="subparatitle.appear.tdv" conrule="\yes\">
<usetext source="labelstr.tdv," 0.3em&quot;=" placemnt="before">
<subchars>

<textbrk startln="0" endln="0">
</subchars>
</usetext>
<usetext source="\.\," 1em&quot;=" placemnt="after">
<subchars>
<highlt scoring="0">
</subchars>
</usetext>
</charsubset>

Then, in the e-i-c's for the specific tags (I want a toc entry for subpara2, but not for subpara3) call the approprate style set:

<e-i-c gi="title" context="subpara2">
<charlist envname="titleenv" charsubsetref="subpara.title.toc">
<textbrk startln="1">
<savetext textid="subparatitle.appear.tdv" conrule="\yes\">
<savetext textid="pagenum.tdv" conrule="pgprefix.tdv," pagect.tdv[bo]&quot;=">
</charlist>
</e-i-c>

<e-i-c gi="title" context="subpara3">
<charlist envname="titleenv" charsubsetref="subpara.title.no.toc">
<textbrk startln="1">
<savetext textid="subparatitle.appear.tdv" conrule="\yes\">
<savetext textid="pagenum.tdv" conrule="pgprefix.tdv," pagect.tdv[bo]&quot;=">
</charlist>
</e-i-c>

<e-i-c gi="para" context="subpara2">
<charlist>

<indent inherit="0">
<quadding inherit="0">
<textbrk startln="0" endln="1">
</charlist>
<att>
<specval attname="subparatitle.appear.tdv" attloc="#FOSI" attval="#EQ#\yes\">
<charsubset>
<textbrk startln="0" endln="1">
<usetext source="process.symbol.tdv" placemnt="before">
</usetext>
</charsubset>
</att>
<att>
<specval attname="subparatitle.appear.tdv" attloc="#FOSI" attval="#EQ#\no\">
<charsubset>
<textbrk startln="1" endln="1">
<usetext source="labelstr.tdv," 8pt&quot;=" placemnt="before">
<subchars>

<textbrk startln="0" endln="0">
</subchars>
</usetext>
<usetext source="process.symbol.tdv" placemnt="before">
</usetext>
</charsubset>
</att>
<att>
<fillval attname="applicref" attloc="subpara2" fillcat="usetext" fillchar="source">
<charsubset>
<usetext>
<subchars>
</subchars>
</usetext>
</charsubset>
</att>
&inschg;
&delchg;
</e-i-c>

<e-i-c gi="para" context="subpara3">
<charlist>

<indent inherit="0">
<quadding inherit="0">
</charlist>
<att>
<specval attname="subparatitle.appear.tdv" attloc="#FOSI" attval="#EQ#\yes\">
<charsubset>
<textbrk startln="0" endln="1">
<usetext source="process.symbol.tdv" placemnt="before">
</usetext>
</charsubset>
</att>
<att>
<specval attname="subparatitle.appear.tdv" attloc="#FOSI" attval="#EQ#\no\">
<charsubset>
<textbrk startln="1" endln="1">
<usetext source="labelstr.tdv," 8pt&quot;=" placemnt="before">
<subchars>

<textbrk startln="0" endln="0">
</subchars>
</usetext>
<usetext source="process.symbol.tdv" placemnt="before">
</usetext>
</charsubset>
</att>
<att>
<fillval attname="applicref" attloc="subpara3" fillcat="usetext" fillchar="source">
<charsubset>
<usetext>
<subchars>
</subchars>
</usetext>
</charsubset>
</att>
&inschg;
&delchg;
</e-i-c>


HTH,
-Andy

\ / Andy Esslinger LM Aero Tech Order Data
_____-/\-_____ (817) 279-0442 1 Lockheed Blvd, Mail Zone 4285
\_\/_/ (817) 777-3047 Fort Worth, TX 76108

I think what you need is #FOSI. I just added an example, title-exists-yn.pdf, to my web site at
www.FOSIexpert.com



Can you send the e-i-c for subpara2? If those are showing up in your TOC
even when they do not have a title as a child, that's the e-i-c that is the
most likely suspect. Typically (someone correct me if I'm wrong), that is
not how it's done. Typically, the TOC is updated on the title element in
context of subpara2 (which is shown in the code Andy submitted ... well, his
application's version of subpara2).

On Wed, Feb 24, 2010 at 11:00 AM, Young, Sindy R
<sindy.r.young@boeing.com>wrote:

> Good Morning Everyone,
>
> I am using Epic Editor 5.3M60 and a fosi.
>
> I have subparas where the title is optional .
>
> The problem is that these subparas report to the toc.
>
> It is driving me nuts. I can’t figure out how to tell the fosi, that if
> title doesn’t follow the para tag, do not report to the toc.
>
> Any suggestions.
>
>
>
>
>
> Sindy Young
> AWACS Tools and Technology Team,
> (253) 657-6964
> Kent, WA 98032
>

I'm with Paul, and apologize for earlier post. I read your words without looking at the graphic.

The TITLE does not follow the SUBPARA1, it is its child. My ACL is specifically for checking a following element.

My bad,
Steve Thompson
+1(316)977-0515

Paul,
Here is the e-i-c for the subpara2 and the title.

<e-i-c gi="subpara2" occur="all">
<charlist>

<quadding quad="left" lastquad="lleft">
<presp minimum="6pt" nominal="6pt" maximum="6pt">
<postsp minimum="6pt" nominal="6pt" maximum="6pt">
<textbrk startln="1" endln="1">
<reset resetlist="sp3ct" step1ct&quot;=">
<savetext textid="sp2str" conrule="sp2ct">
<savetext textid="subpara2label" conrule="#CONTENT(label)" append="0">
</charlist>
<att>
<fillval attname="label" attloc="subpara2" fillcat="savetext"&lt;br"/>fillchar="conrule">
<charsubset>
<savetext textid="subpara2label"></charsubset>
</att>
<att>
<specval attname="label" attloc="subpara2" attval="#ANY">
<fillval attname="id" attloc="subpara2" fillcat="savetext"&lt;br"/>fillchar="textid">
<charsubset>
<usetext source="subpara2label,1em" placemnt="before">
<subchars>
<highlt fontclr="blue"></subchars>
</usetext>
<savetext conrule="\Paragraph" \,subpara2label&quot;=">
<savetext textid="toc.app"&lt;br"/>conrule="<subpara2label.fmt>,#CONTENT(label),</subpara2label.fmt>"
placemnt="before" append="1"></charsubset>
</att>
<att>
<specval attname="label" attloc="subpara2" attval="#ANY">
<specval attname="id" attloc="subpara2" attval="#NONE">
<charsubset>
<usetext source="subpara2label,1em" placemnt="before">
<subchars>
<highlt fontclr="blue"></subchars>
</usetext>
<savetext conrule="subpara2label">
<savetext textid="toc.app"&lt;br"/>conrule="<subpara2label.fmt>,#CONTENT(label),</subpara2label.fmt>"
placemnt="before" append="1"></charsubset>
</att>
<att>
<specval attname="label" attloc="subpara2" attval="#NONE">
<charsubset>
<enumerat increm="1" enumid="sp2ct">
<usetext source="chapstr,\.\,para0str,\.\,sp1str,\.\,sp2str,1em"&lt;br"/>placemnt="before">
<subchars>
<highlt scoring="0" fontclr="blue"></subchars>
</usetext>
<savetext textid="toc.app"&lt;br"/>conrule="<subpara2label.fmt>,chapstr,\.\,para0str,\.\,sp1str,\.\,sp2str,</subpara2label.fmt>"
placemnt="before" append="1"></charsubset>
</att>
<att>
<specval attname="label" attloc="subpara2" attval="#NONE">
<fillval attname="id" attloc="subpara2" fillcat="savetext"&lt;br"/>fillchar="textid">
<charsubset>
<savetext<br/>conrule="\Paragraph \,chapstr,\.\,para0str,\.\,sp1str,\.\,sp2str">
</charsubset>
</att>
</e-i-c>






<e-i-c gi="title" context="subpara2" *=" body&quot;=" occur="all">_id="f241">
<charlist inherit="0">

<highlt scoring="1" scorespc="1">
<usetext source="\.\,1em" placemnt="after">
<subchars>

<highlt scoring="0"></subchars>
</usetext>
</charlist>
<att>
<specval attname="inschlvl" attloc="para0" attval="#ANY">
<charsubset>
<highlt bckclr="yellow"></charsubset>
</att>
<att>
<specval attname="inschlvl" attloc="subpara1" attval="#ANY">
<charsubset>
<highlt bckclr="yellow"></charsubset>
</att>
<att>
<specval attname="inschlvl" attloc="subpara2" attval="#ANY">
<charsubset>
<highlt bckclr="yellow"></charsubset>
</att>
</e-i-c>


You might want to try the following...

On the subpara element, create two savetexts:

<savetext textid="toc-entry" conrule="" placement="before">
<savetext textid="toc-app" conrule="toc-entry" placement="after" append="1">

On the title element, put a savetext to create the TOC entry:

<savetext textid="toc-entry" conrule="&lt;toc-fmt">Title Text</toc-fmt>">

where <toc-fmt> is a pseudo-element that specifies the formatting for the TOC entry.

The save to the TOC will occur at the end of the subpara element processing. If <title> is missing, the second savetext on the subpara will append nothing to the TOC variable toc-app.

HTH,

David


David S. Taylor

Project Manager, Structured Information
Institute for Research in Construction
National Research Council Canada
Bldg. M-23A, Room 239
1200 Montreal Road, Ottawa, ON K1A 0R6

Sindy,

I've had a look at the e-i-cs you provided.

In the e-i-c for <subpara2> it appears you are using an attribute named 'label' to create the TOC entry. Is the content of this attribute the same text as appears in <title> or is it something else?

Unless the text for the TOC differs from the text entered in <title>, an attribute shouldn't be necessary. If they are different, putting this attribute on <title> would be a better idea.

On the <title> element, the savetext would then be either of the following:

<savetext textid="toc-entry" conrule="&lt;toc-fmt">#CONTENT</toc-fmt>"> for the <title> as entered

OR

<savetext textid="toc-entry" conrule="&lt;toc-fmt">#CONTENT(label)</toc-fmt>"> for the attribute text.


Cheers,

David

I am pretty sure this test:

<specval attname="label" attloc="subpara2" attval="#ANY">
will be found TRUE if the label attribute is present whether or not it
contains content. Is this attribute present but set ="? Can you try running
your output having deleted the attribute? Do you get the expected/desired
TOC output if you fill the attribute?

If this is the case, one path to happiness will be figuring out how to
detect whether the label attribute has content vs. is defined.

On Wed, Feb 24, 2010 at 1:25 PM, Taylor, David S. <
david.s.taylor@nrc-cnrc.gc.ca> wrote:

> Sindy,
>
>
>
> I've had a look at the e-i-cs you provided.
>
> In the e-i-c for <subpara2> it appears you are using an attribute named
> 'label' to create the TOC entry. Is the content of this attribute the same
> text as appears in <title> or is it something else?
>
> Unless the text for the TOC differs from the text entered in <title>, an
> attribute shouldn't be necessary. If they are different, putting this
> attribute on <title> would be a better idea.
>
> On the <title> element, the savetext would then be either of the following:
>
>
> <savetext textid=""toc-entry"" conrule=""&lt;toc-fmt">#CONTENT</toc-fmt>"> for
> the <title> as entered
>
>
>
> OR
>
>
>
> <savetext textid=""toc-entry"" conrule=""&lt;toc-fmt">#CONTENT(label)</toc-fmt>">
> for the attribute text.
>
>
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> *From:* Taylor, David S. [
>
> <savetext textid=""toc-app"" conrule=""toc-entry"" placement=""after"&lt;br"/>> append="1">
>
>
>
> On the title element, put a savetext to create the TOC entry:
>
>
>
> <savetext textid=""toc-entry"" conrule=""&lt;toc-fmt">Title Text</toc-fmt>">
>
>
>
> where <toc-fmt> is a pseudo-element that specifies the...





























I believe that using #NE#\\ instead of #ANY will work.
Announcements

Top Tags