Applying Different Paragraph Styles to Table Cells Using EDD

New Here ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

Hi Gang,

I'm relatively new to the world of FrameMaker - so please forgive me if this is a silly question...  but I am trying to figure out a way to insert a table that has a mix of paragraph alignment within the rows and columns.

The paragraph alignment for most of the tables in my document are simple and are handled by one of three attributes: alignTableHeader, alignTableBody and alignTableFooter. The user selects "center", "left" or "right" for each attribute and the EDD applies the proper paragraph format to the text.

However, there is one table (our LEP) that has the paragraph alignments shown below:

Header 1 - align leftHeader 2 - align centerHeader 3 - align center
Cell content - align leftCell content - align rightCell content - align center
Cell content - align leftCell content - align rightCell content - align center

The attribute alignment variables don't work in this case because it applies a single alignment to each section (header, body and footer) - and in this case the header has two alignments and the body has three.

I attempted to get around this by creating a new table style in table designer, formatting paragraph alignment in the cells and then updating the table style. I then wrote a context rule in the EDD that ignores the formatting that is normally applied by the attribute selection (which I have verified is working)...  but it seems that the table designer and paragraph designer are independent and paragraph styles are ignored. All paragraphs align left.

I am trying to design a system where the users don't have to apply styles manually to the structured document...  but I am not sure that it is possible to do that in this instance (unless the team will allow me to change the formatting on this table).

Any suggestions would be appreciated!

Thanks!

John

TOPICS
Structured

Views

208

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 26, 2016 Oct 26, 2016

Copy link to clipboard

Copied

John,

    In general, you can give your writers the ability to change the alignment of individual table cells by defining an alignment attribute on the cell elements instead of or as well as the one on the table element. If such attributes are optional, the alignment defined in the table format or an attribute on the table element, table section (heading, body, or footing), or row becomes a default in case no alignment is specified for an individual cell. A writer can select multiple adjacent cells and set the alignment attribute for all of them at once. He can also use Copy Special to copy attributes from one cell and paste it to others.

   In this case, where you have a type of table in which different columns are aligned differently but the same pattern is used in every instance of the table type, I recommend defining the formatting in the EDD. Define a table element called something like LEPtable that consists of a LEPheading and LEPbody. The LEPbody would consist of LEProws consisting of cells whose element tags can indicate the type of information stored in each column, or since there are three columns, can be LEPleft, LEPcenter, and LEPright. The formatting of each of these cells would indicate its alignment. If the text of the headings are typed for each table, you can reuse the row and cell elements for the table heading. If the heading is the same for all LEP tables, you can insert the heading text as an autonumber.

  By the way, when you create a table format, FM stores the paragraph format used in each cell in the first row of each table section in the format. Thus, if you create the table format from a completed table, the information to left justify the first column, center the middles column, and right justify the right column is stored in the table format. If you were to insert a table using the format in an unstructured document, you would get the desired alignment in all three columns. Unfortunately, in a structured document, the base format for a table cell is the paragraph format stored in the first cell of the first row of the table section so that only the first column would be formatted as desired unless your EDD changes that format.

--Lynne

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines