cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Indent Definition List and Repeat Heading Across Column Break

cleccese
6-Contributor

Indent Definition List and Repeat Heading Across Column Break

Hi again, sorry in advance for being a pain in the neck.


I have a Definition List in Styler on a 2 col page (so 4 cols per page.) It needs to be indented left and right, and the Definition is supposed to left-indent if it wraps to a second or more lines. The Styler Indent Tab seems to be ignored. It was suggested I scrap this and use <algroup>. Also, how to get the heading to repeat across the column breaks?


<acronymlist>
<term></term>
<def></def>
<term></term>
<def></def>
<term></term>
<def></def>
<term></term>
<def></def>
</acronymlist>


It should look like this:


Term


Any advice is appreciated!


Regards, Caroline

6 REPLIES 6

If you have <acronymlist> styled as a "Definition List" in Styler,
then the FOSI that Styler produces will use <algroup>. The problem
you're running into is that the <algroup> requires appropriate indents
to be specified for each column. Styler uses the values you specify
in the "Definition List Details" dialog to set these in the FOSI, thus
ignoring specific indents you specify for <term> and <def>.

The solution for overall left and right indents is to specify them on
<acronymlist>, thereby indenting the whole list. The solution for
indenting subsequent lines in the <def> is a little more complicated.
I got the desired result by setting "Hidden" on the Font tab for <def>
to "yes" and adding Gentext with the element content wrapped in a UFE
, to which I applied the necessary indents. In order to avoid
confusion for authors, you may want to set these effects up only for
Print/PDF or override them in the Editor-specific settings, setting
"Hidden" to "no" and suppressing the Gentext (maybe just set it to a
single space).

The repeating headers proves to be the most complicated, as repeats
are only supported by Styler for elements styled as a "Title" and it
only works if the "Title" is an immediate child of the element in
question (<acronymlist>, in your case). Since Styler wraps Gentext in
a <_sfe:BeforeOrAfterText> element, you can't just generate the title
element normally, so a FOSI source edit is required. Fortunately,
it's a pretty simple one. I created a Property Set for this purpose
and applied it to <acronymlist>. The source edit for the Property Set
looks like this:

<charsubset charsubsetid="acronymlist-title">
<usetext source="!&lt;_ufe:acronymlist-title">!,\Term\,@5pc,\Definition\,!!"
placemnt="before"></usetext>
</charsubset>

This generates a UFE, wrapped around the two headers, with the second
header set to appear 5pc in (having defined my definition list to have
a 4pc-wide column for the term and a 1pc-wide gutter; adjust
accordingly for your settings). The UFE (<_ufe:acronymlist-title>, in
my example) needs to be styled as a "Title" with a context where it
has an <acronymlist> parent. This context should set "Underline" to
"yes" and "At top after break" (on the "Gentext" tab) to "yes". Click
the "Edit" button next to the latter setting and modify the markup to
have just the element content, wrapped in another UFE, which should be
styled as a block with the same indents as your <acronymlist>, so the
repeating headers will line up correctly.

Hope this helps you get what you're after.

-Brandon 🙂


On Fri, Oct 14, 2011 at 9:38 PM, Caroline Leccese
<caroline@thecodesource.net> wrote:
> I have a Definition List in Styler on a 2 col page (so 4 cols per page.) It
> needs to be indented left and right, and the Definition is supposed to
> left-indent if it wraps to a second or more lines. The Styler Indent Tab
> seems to be ignored. It was suggested I scrap this and use <algroup>. Also,
> how to get the heading to repeat across the column breaks?
>
> <acronymlist>
> <term></term>
> <def></def>
> <term></term>
> <def></def>
> <term></term>
> <def></def>
> <term></term>
> <def></def>
> </acronymlist>
>
> It should look like this:
>
> Term Definition <-- with this heading
> repeating across col breaks
> term text text text text text text text
> text (indented here also)
> text text text text

I can't help but wonder if custom tables would work here? They seem to be
getting reasonably useful in 6.0 now.

Of course the stylesheet would need to generate the appropriate UFEs to
represent the table structure but I think you could make it work with all
the repeating and stuff.

-Gareth

Yes, it crossed my mind that custom tables might be a good way to go.
Unfortunately, Caroline is using 5.3, in which the custom table
support is limited, without direct support for generated headers, so
it would likely be no easier.

-Brandon 🙂


Good point!

On 17/10/2011, at 15:54, Brandon Ibach <brandon.ibach@single-sourcing.com> wrote:

> Yes, it crossed my mind that custom tables might be a good way to go.
> Unfortunately, Caroline is using 5.3, in which the custom table
> support is limited, without direct support for generated headers, so
> it would likely be no easier.
>
> -Brandon 🙂
>
>
>
cleccese
6-Contributor
(To:cleccese)

Hi Brandon,


Thank you so much! Unfortunately, after I created the Property Set the "Term Definition" headers are appearing before the generated text for my graphic in figure context. Then when I add the <_ufe:acronymlist-title> it is interfering with my figure xrefs and I am getting an error: "[A12525] WARNING: ID "xxxxxxx#Label_Number.xref" saved to more than once" for all my figure xrefs.


cleccese
6-Contributor
(To:cleccese)

Thanks again Brandon! He discovered that I had accidentally put the acronymlist property set under the wrong ufe.It was bound to happen.

Announcements

Top Tags