Skip to main content
Inspiring
May 3, 2021
Question

The Enter key in a structured document

  • May 3, 2021
  • 1 reply
  • 475 views

In Restrict element levels - Adobe Support Community - 12004296, QuintinSeegers wrote, "In our EDD, we have an element called Headings, which manages all our headings, up to 6 child-levels, with General Rule: <TEXT>, Content*, Headings* (Content being an element for inserting paragraph text). When inserting the element, it works correctly, inserting the element as a child of the previous element. But, when hitting Enter, instead of prompting for the next allowed element (Content or child-Heading), it repeats the Heading as if another heading on the same level is added. Is there a way to prevent this from happening using EDD rules?"

 

The behavior of the Enter key in a structured document depends on the context and what is allowed at the current location. For example, if the cursor is at the end of an element that is formatted as a separate paragraph and can be followed by another paragraph of that type. FrameMaker inserts such a following element. Such behavior is often exactly what the user desires. Suppose, for example, that your Content element consists of a sequence of Paragraph and List elements and that each List consists of a sequence of Items. It is quite likely that after finishing one Paragraph, you will want to start another and that's exactly what Enter does at the end of a Paragraph; at the end of an Item, Enter inserts a new Item after the original one.

 

Your definition of Headings is parallel to these Paragraph and List cases. A Headings can contain text and be followed by another, so when you press Enter, FrameMaker ends the current Headings and starts a new one. This may be surprising, but this situation is also parallel to an Item that may consist simply of text, or of text followed by a sublist. Even though a sublist is an option, it is still very likely that an Item simply contains text and that the user therefore may want Enter to create a new Item.

 

If instead of <TEXT>, you use a new element called something like Title that can contain only text, then pressing Enter at the end of Title will also move the cursor out of the current element, but since a second Title is not permitted, FrameMaker will then prompt for you to select either Content or Headings.

 

There are other possibilities. If only one element is permitted in the current context, FrameMaker inserts that element. For example, if the cursor is at the end of a To in a Heading in a Memo, Enter might insert From after the To.

 

Hope this made sense.

--Lynne

    This topic has been closed for replies.

    1 reply

    QuintinSeegers
    Legend
    May 3, 2021

    Thanks Lynne.

     

    I understand a Paragraph element following a previous Paragraph element and an Item element following a previous Item element (though you would use a List element to insert the Item list).

     

    If going with your example of having a Section containing only one Heading and multiple Content elements, that means that the Content element is a child of the Section element and not the Heading element. (Unless I completely misunderstand the hierarchy in the General Rule of an element.)