Skip to main content
Participant
April 7, 2014
Question

Is there a way to create a custom inline tag or label in a FrameMaker document?

  • April 7, 2014
  • 2 replies
  • 578 views

I am trying to draft a requirements document that has an inline tag offset by brackets for every requirement listed. I would then like to generate a table of contents to keep track of the locations of these tags within the document. (I know tag and bookmark are not the correct terms for this, but I can't think of a better one)

The format should be something like this:

The software package shall [SRD_XXXX] be verified by the operator.

Where the "SRD_" is the label and "XXXX" is an auto-incrementing numeric value assigned to this requirement.

This topic has been closed for replies.

2 replies

Bob_Niland
Community Expert
Community Expert
April 7, 2014

Or you can put all the defining instances of SRD_#### in an appendix, non-rendered chapter file or on a Reference page, one SRD per line, auto-numbered. We do this frequently for parts list callout numbers.

Then in the narrative, invoke those SRD's as cross-references to the defining instances, by paratext, or better yet, by paranum, as that way you have have a brief descriptor at the defining instances.

Do you need leading zeros in the ####? That requires a different hack.

Participant
April 8, 2014

Yes, I need the field width of the numbering to be 4 characters with leading zeroes, as it's a standardized format. What hack would I have to use to do that?

This may be the best way to do what I need to do, although it's a little awkward since the SRD items are defined in the text - one reason I wanted to make them auto-incrementing was so I could add some in between existing instances as necessary without having to renumber everything after. So this would kind of work, but unfortunately it is not a perfect solution (I doubt I'll ever find one. After trying and failing with MS Word and VBA, my boss insisted that I try FrameMaker because it is "much better for this sort of thing," but I'm guessing he wasn't paying attention to what my actual complaint was...I am also guessing that I'm spending more time trying to find a way to automate this process than I would have if I just did it by hand.)

Thank you so much for your help.

Bob_Niland
Community Expert
Community Expert
April 8, 2014

> ... numbering to be 4 characters with leading zeroes, as it's

> a standardized format. What hack would I have to use to do that?

Search this forum on "leading zeros", for, example:

Has anyone worked with US MIL-STD doc, and successfully generated page numbers in TOC?

There are two approaches that I know of, both touched on in that old thread:

  1. Zeroes as tab leaders (trickier to set up, easier to maintain)
  2. Literal leading zeroes in a small suite of autonumbers (easier to set up, trickier to maintain)
    You'd have separate formats for SRD-000x, SRD-00xx, SRD-0xxx and SRD-xxxx and would need to
    mind break-points so you avoid things like SRD-00010 (extra digits).

... unless Adobe has added something to AN formatting since FM9 that I don't know about.

> one reason I wanted to make them auto-incrementing was so I could add

> some in between existing instances as necessary without having to renumber everything after.

As isolated paras either in the main narrative or on reference pages, you can get this. Using cross-references is just a variation on the now-documented EndNote hack. As with EndNotes, the main risk is if you move the main narrative Xref, as it will then be out of order.

But you can have in-narrative "isolated" paragraphs that look like words in the middle of a para, by using Run-In paragraph formats. In a para that looks like:

The software package shall [SRD_XXXX] be verified by the operator

would actually be three paragraphs run together.


"The software package shall" is format, say, Body.Lead, Pagination <*> Run-In Head -- Default Punc {space}{left-bracket}

"SRD_XXXX" is format, say, SRD, Pagination <*> Run-In Head -- Default Punc {right-bracket}{space}

"be verified by the operator." is just normal Body

Para format SRD would have whatever auto-number scheme you decide on.

Arnis Gubins
Inspiring
April 7, 2014

FM's auto-incrementing counters only work at the paragraph level and have to be explicitly defined for the paragraph tag. If the "SRD_XXXX" item is to occur anywhere inline in a paragraph, then you can't do this with FM as is (nor will you be able to creat a TOC from these). You might be able to do this with a script using either Extendscript or Framescript.

However, if you can reformat your requirements statements to either put the SRD_XXXX at the very beginning (or end) of the paragraph, then you can use FM's autonumbering to do this. The format would be something like: "S:[SRD_<n+>]", where "S" indicates that it is a special series and counts independently from other counters.

Participant
April 8, 2014

Thank you for your advice - unfortunately, there are often multiple tags within a single paragraph, and I believe according to the standard format every occurrence of the word "shall" within the document must be tagged.