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

Help Formatting Autonumbers with Attributes

Explorer ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Hi, 

I'm setting up my first EDD. I'm trying to create a list element that allows the user to select attributes for bulleted or numbered formatting. I thought I had copied the Delveoper Guide pretty closely, but it's not working.

 

Can someon explain what I'm doing wrong?

 

Here's what I have in the EDD:

Element (Container): List
   General rule: List-item+
   Attribute list
      Name: List-type    Choice    Required
      Choices: Bulleted, Numbered
   Automatic insertions
      Automatically insert child: List-item
   Text format rules
      In all contexts.
         Basic properties
            Indents
               First indent: 0.1in
               Left indent: 0.25in
            Paragraph spacing
               Space above: 4pt
            Tab Stops
               Tab stop position: 0.25in
   If context is: List-item [List-type = ”Bulleted”]
      Numbering properties
         Autonumber format: \b\t
   Else, if context is: List-item [List-type = ”Numbered”]
      Numbering properties
         Autonumber format: <n>.\t

 

This is what it looks like whether I select the Bulleted or Numbered attribute:

Paragraph paragraph paragraph

   list

   list

   list

 

Views

166

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 1 Correct answer

Advisor , Oct 08, 2024 Oct 08, 2024

Hanna,

   Your element definition is almost right. The problem is that you are specifying all formatting on the List element, which is OK in a simple structure, but you are testing whether that List is in a ListItem.

   The simplest fix would be to change the context specification from:

      List-item [List-type = ”Bulleted”]

to simply

     [List-type = "Bulleted"].

Another approach would be to move the context rule into the definition of List-item and change the context rule to 

      List[List-type

...

Votes

Translate

Translate
Advisor ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Hanna,

   Your element definition is almost right. The problem is that you are specifying all formatting on the List element, which is OK in a simple structure, but you are testing whether that List is in a ListItem.

   The simplest fix would be to change the context specification from:

      List-item [List-type = ”Bulleted”]

to simply

     [List-type = "Bulleted"].

Another approach would be to move the context rule into the definition of List-item and change the context rule to 

      List[List-type = ”Bulleted”]

Something else you'll need to account for is resetting the counter if there is more than one list in the document and you don't already reset it.

         --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 ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

Thank 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
Community Expert ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

This is what I've used--this is from my Para tag which has a lot of context uses.

(Sorry--was too lazy to indent...)

Else, if context is: Item
If context is: Item < List[Type="Bullet"]
Count ancestors named: List
If level is: 1
Use paragraph format: Body_BulletList1
Else, if level is: 2
Use paragraph format: Body_BulletList2
Else, if level is: 3
Use paragraph format: Body_BulletList3
Else, if context is: Item < List[Type="Numbered"]
Count ancestors named: List
If level is: 1
If context is: Item{first} < List
Use paragraph format: Body_NumberList_L1reset
Else
Use paragraph format: Body_NumberList_L1
Else, if level is: 2
Use paragraph format: Body_NumberList_L2
Else, if level is: 3
Use paragraph format: Body_NumberList_L3
Else, if context is: Item < List[Type="QandA"]
Count ancestors named: List
If level is: 1
Use paragraph format: Q_Question
Else
Use paragraph format: Q_Answers

 

Link to file:

EDD_Master.fm

 

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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 ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

That's very helpful, 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
Community Expert ,
Oct 08, 2024 Oct 08, 2024

Copy link to clipboard

Copied

LATEST

I should note that I am using paragraph tags rather than listing all the type specs. 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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