Copy link to clipboard
Copied
Hello everybody!
Sorry for the question, because most of you will find it primitive :)!
I started using structure FrameMaker and created my own EDD. My EDD works quite well (at least I think so :)), but I can't solve a simple problem (due to lack of experience).
The basis of the document is the Chapter, which consists of many Sections. Each Section consists of many elements, such as Heading and then following it: Para, List, ListNumbered, Table and so on.
Each Table has a TableTitle with a simple numbering:
Autonumber format: T: Table <n+>.
I need the numbering of tables in each Section to start with the value Table 1.
I used ContextRule «Table {after Heading}», but it only works if the Table is located immediately after Heading.
I tried to use «Table {first} < Section» (and «{first} < Section»), but this ContextRule (to my surprise) doesn't work.
The question is the following:
How to correctly formulate a ContextRule for the first Table (or another element) in a Section, which is not the first element after the Section Heading?
Thanks in advance, regards,
Igor
Hi Igor, your question is valid and of course you can also ask stupid questions! And I think that yours is not stupid.
I would suggest to start the counter of your tables not with a special table format or attribute or element, but integrate the table counter into that of the first heading of your section.
In the table numbering use the same series label as in this heading. In the heading numbering add a counter < =0>.
In the table numbering use the same counters as in the heading and set all to
...I am making the assumption that your Section/Headings are not numbered, but things can be adjusted if necessary. Since Heading is required, make its paragraph's Autonumber format S:< =0>< =0>. This will reset your Table and Figure numbers for each Section. Now, use this for table title paragraphs:
S:<n+>< >
and use this for figure title paragraphs:
S:< ><n+>
See if this works for you.
Copy link to clipboard
Copied
Hi Igor, your question is valid and of course you can also ask stupid questions! And I think that yours is not stupid.
I would suggest to start the counter of your tables not with a special table format or attribute or element, but integrate the table counter into that of the first heading of your section.
In the table numbering use the same series label as in this heading. In the heading numbering add a counter < =0>.
In the table numbering use the same counters as in the heading and set all to < >. For the table counter add <n=0>.
This way the first heading will set the table counter to 0. Each table does not change the numbering of the heading. The table counter is incremented by 1.
Best regards, Winfried
Copy link to clipboard
Copied
Hi Winfried!
This works great! My problem is solved! Thank you!
To my shame, I only now realized what it means «< > and < =0>» in the organization of numbering.
Thank you again!
But still, I am interested in the question asked: is it possible to assign the value <n=1> using EDD ContextRule for the first Table (or another element) in a Section?
Thanks in advance, regards,
Igor
Copy link to clipboard
Copied
The {first} specification only tests if an element is the first child of its parent. There is no way to see if it is the first element of a specific kind of element in its parent.
Copy link to clipboard
Copied
However, there are other ways to do this in an EDD. Do you always want table numbering to restart at 1 in a Section. If so, post the EDD rule for a Section element and I will give you a suggestion or two. Thanks.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I am making the assumption that your Section/Headings are not numbered, but things can be adjusted if necessary. Since Heading is required, make its paragraph's Autonumber format S:< =0>< =0>. This will reset your Table and Figure numbers for each Section. Now, use this for table title paragraphs:
S:<n+>< >
and use this for figure title paragraphs:
S:< ><n+>
See if this works for you.
Copy link to clipboard
Copied
Thank you! This works great!
As far as I understand your method is the same as Winfried suggested to me!
Thank you very much again!
Regards,
Igor
Copy link to clipboard
Copied
Yes. I didn't read Winfried's suggestion very carefully :-).
Copy link to clipboard
Copied
Igor,
As you now know, there is no way to test for the first element of a particular type. This design was motivated by performance. FrameMaker is a WYSIWYG application and users expect continual formatting as they edit. The software need only make one test to determine if an element is the first (or last) in its parent. More complex expressions could require inspection of a large document (or even an entire book) leading to a very noticeable delay as changes are made.
--Lynne
Copy link to clipboard
Copied
Thanks for the clarification, Lynne!
It is very good that there is an opportunity for novice users to get qualified advice from specialists!
Regards,
Igor