Skip to main content
Known Participant
May 31, 2011
Answered

Text background shading in FM 10

  • May 31, 2011
  • 3 replies
  • 2059 views

I'm working on a textbook and we have a long example within a chapter that is about 2 pages long, however, the example flows over 3 pages (half on page 1,

full page 2 and the remainder on the top of page 3). I would like to set the example apart from the actual chapter text by shading the background. Is there a way to do this where the shading stays with the example text so that if I make other changes in the chapter the shading moves with the example?

    This topic has been closed for replies.
    Correct answer

    I think the only sure way to do this (at present) is to place the text in a single table cell, and format the cell appropriately.

    Andy

    3 replies

    June 6, 2011

    Nola, although the table route could be do-able, there are major issues with using tables. Maintaining the text so that it flows as needed becomes a challenge if the chapter goes through much revision, even just through a single editing cycle, i.e. cells can't break across pages, so if even one line or a few words changes around the table, or inside the table, extra re-work is needed to keep the pagination correct.

    Another possible issue is that content in tables is not included in generated files in the same order as content that's outside the table, so for example if you have headings that need to be included in TOCs, the heading as shown in the TOC will be out of order with respect to any other headings in the chapter.  The workaround for this would be to use Markers with an Automated List of Markers instead of a TOC, which is often my preferred usage anyhow, but it might not suit your situation.

    One more possibility for you to consider would be to use a Framescript (or possibly FM10's ExtendScript) to apply the shading. For example, you could insert a "beginShading" marker and an "endShading" marker in the text, as needed. Then a Framescript could look for those markers and create a background filled graphic frame under the specified text. The script could also have a "removeShading" feature, so that the shading frames could be removed, the text edited, then re-run the "applyShading" again. This could work either on the chapter level or on a book level, or both.

    Sheila

    Known Participant
    June 7, 2011

    Sounds like a great idea but am concerned this is beyond my expertise. How do I learn more about FrameScripts? Thanks for

    the help.

    June 7, 2011

    The Framescript website is here:  http://framescript.com/

    There is a good user group here:     http://groups.yahoo.com/group/framescript-users/

    ABsolutely understood about the expertise level, it can definitely be daunting if you're new to FM and without any programming resources to call on. The other issue, equally important, is to feel confident that the script writer understands your publishing workflow, and, <ahem> ... FM's "little idiosyncracies", so that they can create a script that will be easy for you to adopt into your FM usage.

    I would highly recommend contacting some of the Framescript consultants listed on the Framescript website, and/or posting your requirements on the Yahoo group, as a start. I can highly recommend Rick Quatro at Carmen Publishing who has written many scripts written for me over the years; Rick has a "Crash Course / Started" book available online, and his website has many downloadable example scripts.

    If this is a requirement that applies to many of your documents then  having a script be as customizable as possible would be key.

    One very good starting point would be to have a few mockup pages created in FM to show the kind of formatting and layouts that you deal with, and how the background shading might typically be wanted. And of course if you have multiple different documents needing variations of the shading then you'd want to show a range of examples.

    Sheila

    Arnis Gubins
    Inspiring
    May 31, 2011

    If you set the background text shading for a specific paratag used in your example, then only that paratag's contents will have a background shading applied regardless of where it falls on a page or how many pages it covers. It's a pretty nice new feature in FM10.

    However, if you set the line spacing too loose or make too large of gap between paragraphs, then the shading will look more like highlighting. The shading is tied in to the bounding box size of the font glyphs used, not the spatial coverage of the paragraph as shown in the following sample:

    Bob_Niland
    Community Expert
    Community Expert
    May 31, 2011

    ... if you set the line spacing too loose or make too large of gap between  paragraphs, then the shading will look more like highlighting.

    Does setting the pfg fmt justification to both left and right help with the lateral problem? (I don't have FM10 and can't test it.)

    It seems like a single-cell borderless table is still the way to go, as long as you don't mind handling end-of-page/column flow by breaking the shaded text across borderless rows.

    Arnis Gubins
    Inspiring
    May 31, 2011

    Trade off: smooth edges vs ugly typography

    Correct answer
    May 31, 2011

    I think the only sure way to do this (at present) is to place the text in a single table cell, and format the cell appropriately.

    Andy

    Michael_Müller-Hillebrand
    Legend
    May 31, 2011

    I think the only sure way to do this (at present) is to place the text in a single table cell, and format the cell appropriately.

    Well, not a single table cell, since cells don't break at page breaks, but better enough table cells with grey shading, so the example flows nicely from page to page, if needed. You can use the cells in a way that certain information is always kept together on a page without thinking of Keep With Next/Previous settings of the paragraphs.

    - Michael

    Known Participant
    May 31, 2011

    Thanks so much for all of the great advice. I tried it with the background text shading and the table cells but ended up using the tables cell shading with multiple rows for the best look. Thanks again.