Skip to main content
Participating Frequently
January 22, 2011
Answered

A way to label graphics?

  • January 22, 2011
  • 3 replies
  • 5431 views

Ok, lets say i import 10 graphics into a document.  Now i want to have a label for each--how do i do that?  Is there a way FM can automatically number each graphic so that if i insert a new graphic after graohic 4 all the following graphic numbers will be incremented by 1?  Thanks.

    This topic has been closed for replies.
    Correct answer Mike Wickham

    It depends on what you mean by "label." If you are talking about figure

    numbering, it's easy. Create a paragraph format called "Label" or

    "Figure" or "Caption"-- or whatever you want. Set its autonumbering to

    include "<n+>". This makes the number "1" appear the first time you use

    the paragraph format, and increments the number each additional time the

    paragraph format is used.

    Then, when you want to insert a graphic, first insert a single-celled

    table in the document with titles turned on. The cell will hold your

    graphic. The title will hold the paragraph with the autonumbering. You

    can set the title for above or below the graphic. The result is a

    graphic with a numbered caption.

    For example, I assign this autonumbering style to my Caption paragraph

    format:

    F:Fig. <n+>.\sn

    The "F:" assigns a "series" that keeps the autonumbering for figures

    separate from any other numbering sequences in the document. (It does

    not print.) "<n+>" sets the autonumber and "\sn" adds a normal space.

    (You could type a space instead, but it's invisible at the end of a

    line, so you can't tell if it's there as part of the autonumber format.)

    The result is "Fig. 1. " (or other autoincremented number) showing

    automatically at the beginning of the caption paragraph. I then add in

    my caption for the particular graphic.

    If you create a standard table format to hold graphics, it can

    automatically assign your "Label" format to the table title, rather than

    you having to assign it each time you create the table.

    3 replies

    Bob_Niland
    Community Expert
    Community Expert
    March 6, 2011

    I might add that what most people need to do is in-column anchored frames, with captions.

    The "obvious" trivial way to do this would be to use a centered paragraph format named "Caption", and an anchored frame "Above Current Line".

    Frame, of course, has never had an "Above Current Line" option. Feel free to file an enhancement request. People have probably been asking only since 1994 or so.

    One simple work-around is to have two para formats, say "Anchor" and "Caption":

    "Anchor" is a tiny point size, say 4. I'd use an auto-number format of pure text "Anchor:\ " and a color that goes invisible at pub (so the line is visible even when greeked). Set the Next Pgf Tag: to "Caption". Set Pagination > Keep With:

  • Next Pgf.

    Anchor your frames to Anchor, Below Current Line.

    "Caption" is your visible caption, and is a centered format, Keep With:

  • Previous Pgf.

    The Keeps [usually] keep the caption under the frame.

    Plan B: Yes, there's that 4pt thing when the anchored frame is top of column.

    Alternative: turn off the Auto Number in "Anchor", and make it a normal 10 pt size. Anchor your frames "At Insertion Point", with "Distance Above Baseline" of the frame height plus 10 pts.

    ______

    If the anchored frame is the full width of the text column, the pgf symbol of pgf "Anchor" is usually invisible in Plan B.

  • Participating Frequently
    March 6, 2011

    Error7103 wrote:

    I might add that what most people need to do is in-column anchored frames, with captions.

    The "obvious" trivial way to do this would be to use a centered paragraph format named "Caption", and an anchored frame "Above Current Line".

    Frame, of course, has never had an "Above Current Line" option. Feel free to file an enhancement request. People have probably been asking only since 1994 or so.

    One simple work-around is to have two para formats, say "Anchor" and "Caption":

    "Anchor" is a tiny point size, say 4. I'd use an auto-number format of pure text "Anchor:\ " and a color that goes invisible at pub (so the line is visible even when greeked). Set the Next Pgf Tag: to "Caption". Set Pagination > Keep With:

  • Next Pgf.

    Anchor your frames to Anchor, Below Current Line.

    "Caption" is your visible caption, and is a centered format, Keep With:

  • Previous Pgf.

    The Keeps [usually] keep the caption under the frame.

    Plan B: Yes, there's that 4pt thing when the anchored frame is top of column.

    Alternative: turn off the Auto Number in "Anchor", and make it a normal 10 pt size. Anchor your frames "At Insertion Point", with "Distance Above Baseline" of the frame height plus 10 pts.

    ______

    If the anchored frame is the full width of the text column, the pgf symbol of pgf "Anchor" is usually invisible in Plan B.

  • Earlier you mentioned that the captions in connected text frames within anchored frames both appear under the first graphic; the start in new frame property handles this, though it's an additional paragraph format that needs to be applied to these rare special cases.

    Here are a couple of experiments with a two-column text frame that may be helpful, or may just retravel your old roads. The body paragraph format is in-column. Across-column behavior comes from anchored frames or tables in either left or right columns. The autonumbering is maintained from within connected text frames in an anchored frame, through main text, and into table cells.

    HTH
    Regards,
    Peter
    _______________________
    Peter Gold
    KnowHow ProServices
    Bob_Niland
    Community Expert
    Community Expert
    March 6, 2011

    Earlier you mentioned that the captions in connected text frames within  anchored frames both appear under the first graphic; the start in new  frame property handles this, though it's an additional paragraph format  that needs to be applied to these rare special cases.

    What version, dialog and tab is that in?

    I see it nowhere in the FM7.0p578 I run at home.

    And I ran the connect-the-frames test. It does indeed fix the auto-number problem.

    Bob_Niland
    Community Expert
    Community Expert
    February 26, 2011

    ... i import 10 graphics into a document.  Now i want to have a label for each--how do i do that?

    In our nominally 2-column format, our convention is to place the images in the right column, with a Figure caption.

    We do this with an anchored frame (from the left column text, which must have an Across-All-Columns format). The anchored frame is Right-Run-In, set to the width of the right column and gutter.

    The anchored frame contains the graphic (inside another graphic frame if clipping is needed), plus a text frame.

    The text frame contains a one-row borderless table with columns for figure caption, graphic reference number and some stewardship info (as conditional text, switched off for pub).

    The Figure paragraph format has an auto-number, as suggested in the previous reply.

    Some observations about this technique (and this is Unix Frame 7.1):

    • If you put two text frames in the same anchored frame, the figure auto-number won't increment (they are both the same #).
    • Save before you ever re-size the bottom (and sometimes the top) of the anchored frame, unless you are fond of Error 7103.
    Participating Frequently
    February 26, 2011

    Error7103 wrote:

    ... i import 10 graphics into a document.  Now i want to have a label for each--how do i do that?

    In our nominally 2-column format, our convention is to place the images in the right column, with a Figure caption.

    We do this with an anchored frame (from the left column text, which must have an Across-All-Columns format). The anchored frame is Right-Run-In, set to the width of the right column and gutter.

    The anchored frame contains the graphic (inside another graphic frame if clipping is needed), plus a text frame.

    The text frame contains a one-row borderless table with columns for figure caption, graphic reference number and some stewardship info (as conditional text, switched off for pub).

    The Figure paragraph format has an auto-number, as suggested in the previous reply.

    Some observations about this technique (and this is Unix Frame 7.1):

    • If you put two text frames in the same anchored frame, the figure auto-number won't increment (they are both the same #).
    • Save before you ever re-size the bottom (and sometimes the top) of the anchored frame, unless you are fond of Error 7103.

    I don't think I'm following your description well, so my suggestions may not be appropriate. An annotated screenshot would help.

    * Have you tried using a single table, with the graphic in an anchored frame in one cell, with the text information in cells/columns on the same row? If so, what were the results and why did you reject using the results? Was it the fiddling around needed to fit an anchored frame into the cell and then fit the graphic into a text frame in the anchored frame? Yes, it's a bunch of stuff, but once done, you can copy the whole table for reuse, or just copy the cell's paragraph that contains the whole structure for reuse.

    * I don't understand "two text frames in the same anchored frame." Is there an auto-numbered caption associated with the graphic, and another instance of the auto-numbered paragraph that needs to be incremented greater than the caption?

    * If you plan on including table titles or headings in the main TOC, be aware that FM TOCs display non-table-heading paragraphs for a given page first, then they display table-heading/title paragraphs, then the TOC moves on to display the following page's entries. One solution is to create a separate list of table titles.

    HTH

    Regards,

    Peter Gold

    KnowHow ProServices   

    Bob_Niland
    Community Expert
    Community Expert
    February 26, 2011

    Have you tried using a single table, with the graphic in an anchored  frame in one cell, with the text information in cells/columns on the  same row?

    This is nominally a 2-column page layout. In practice, we only use both columns for text if the entire page contains only text. This is a policy I inherited.

    If there are graphics, we use only the left column, and the graphics appear at right. Previous writers had resorted to using ransom-note pages with floating disconnected frames for everything. You can imagine ...

    Anyway, tables don't work (anchored to the left column text, anyway), because the left column text refuses to flow beside the table (only above it or below its vertical space, as if the table occupied space in the left column) .

    A table that spans both columns works, but the narrative text flow has to be broken, so that the beside-figure text appears to be in the left column.

    With a right-run-in anchored frame, and AAC pfg fmt, the narrative text stays in the left column, and runs down alongside the frame, then around the frame as needed. The frame occupies the right column (and any text that flows across into right, or as a new column into right, knows it's there, unlike outside-of-column anchored frames - where right column text can run under the anchored frame).

    We end up with a monolithic single text flow (none of the narrative ends up in a table that was only needed to present a figure).

    I don't understand "two text frames in the same anchored frame."

    One anchored frame containing two different figures, each figure consisting of a separate graphical object, associated floating text frame, and table within the floating text frame. Sometimes the text in the page left column is a text table, providing no place to anchor a frame at right, so the temptation is to extend any other right-run-in frame anchored above and put a second figure in it. Doesn't work due to some oddity of auto-number incrementing. So we work around it. Not a big deal.

    If you plan on including table titles or headings in the main TOC ...

    The borderless figure caption tables have no Table Titles, and we don't presently TOC figure captions. If we ever do TOC figures, they'll probably go in their own list, so TOC priority won't be a concern.

    Mike WickhamCorrect answer
    Inspiring
    January 24, 2011

    It depends on what you mean by "label." If you are talking about figure

    numbering, it's easy. Create a paragraph format called "Label" or

    "Figure" or "Caption"-- or whatever you want. Set its autonumbering to

    include "<n+>". This makes the number "1" appear the first time you use

    the paragraph format, and increments the number each additional time the

    paragraph format is used.

    Then, when you want to insert a graphic, first insert a single-celled

    table in the document with titles turned on. The cell will hold your

    graphic. The title will hold the paragraph with the autonumbering. You

    can set the title for above or below the graphic. The result is a

    graphic with a numbered caption.

    For example, I assign this autonumbering style to my Caption paragraph

    format:

    F:Fig. <n+>.\sn

    The "F:" assigns a "series" that keeps the autonumbering for figures

    separate from any other numbering sequences in the document. (It does

    not print.) "<n+>" sets the autonumber and "\sn" adds a normal space.

    (You could type a space instead, but it's invisible at the end of a

    line, so you can't tell if it's there as part of the autonumber format.)

    The result is "Fig. 1. " (or other autoincremented number) showing

    automatically at the beginning of the caption paragraph. I then add in

    my caption for the particular graphic.

    If you create a standard table format to hold graphics, it can

    automatically assign your "Label" format to the table title, rather than

    you having to assign it each time you create the table.