• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

EDD ContextRule for the first Table (or another element) in a Section

Explorer ,
Feb 25, 2023 Feb 25, 2023

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

Views

839

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Feb 25, 2023 Feb 25, 2023

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

...

Votes

Translate

Translate
Community Expert , Feb 27, 2023 Feb 27, 2023

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.

Votes

Translate

Translate
Community Expert ,
Feb 25, 2023 Feb 25, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 25, 2023 Feb 25, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2023 Feb 26, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 26, 2023 Feb 26, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 27, 2023 Feb 27, 2023

Copy link to clipboard

Copied

Hello, frameexpert (unfortunately, I do not know your name)!

Thanks for the offered help! Screenshot of EDD rule for a Section is in the attachment.

 

Thanks in advance, regards,

Igor

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2023 Feb 27, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 27, 2023 Feb 27, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2023 Feb 27, 2023

Copy link to clipboard

Copied

Yes. I didn't read Winfried's suggestion very carefully :-).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Feb 27, 2023 Feb 27, 2023

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 27, 2023 Feb 27, 2023

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines