• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

DITA: How to add “run into paragraph” attribute value to the image element?

Explorer ,
Dec 01, 2015 Dec 01, 2015

Copy link to clipboard

Copied

I use framemaker 10 dita 1.2.

My customer asked me to set some images to "run into paragraph".

I know there are only two choices in the "placement" attribute drop box: inline and break.

So i added "value "runin" is fm property value run into paragraph" to the rule txt file as below:

attribute "placement" {

    is fm attribute "placement";

    is fm property position;

    value "inline" is fm property value inline;

    value "-dita-use-conref-target" is fm property value inline;

    value "break" is fm property value bottom;

    value "runin" is fm property value run into paragraph;

    }

And then i added a "runin" option to both EDD and DTD.

But when i select "runin" in framemaker, nothing happens.

The DEVELOPING STRUCTURED APPLICATIONS WITH ADOBE® FRAMEMAKER 9 tells me that the position property has the following value:

But the ADOBE® FRAMEMAKER® 9 STRUCTURED APPLICATION DEVELOPER REFERENCE tells me this.

I've tried both runin and run into paragraph.

"runin" will generate an error log saying that there is a syntax error near identifier runin.

"run into paragraph" seems to be accepted but does not work.

TOPICS
Structured

Views

1.4K

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
Advisor ,
Dec 01, 2015 Dec 01, 2015

Copy link to clipboard

Copied

Toxomo,

    I don't see a problem with the read/write rule. However, the read/write rule simply tells FrameMaker how to interpret the value "runin" when it appears in XML (or to set the attribute when saving as XML). Since this value is not one of those defined in commonElements.mod, you'll have to customize the DTD to allow it.

        --Lynne

Votes

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
Explorer ,
Dec 01, 2015 Dec 01, 2015

Copy link to clipboard

Copied

yes, i have added the "runin" option to commonElements.mod like this

If i do not add that, there will be an error log saying that the value does not match the enumeration or notation list.

The problem seems to lie in the fm property value.

I'm not sure now if it is runin or run into paragraph, or something else.

Votes

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
Explorer ,
Dec 01, 2015 Dec 01, 2015

Copy link to clipboard

Copied

And I did some search on the Internet about DITA image placement. It seems that only "inline" and "break" are accepted.

I also have Arbortext and Xmetal installed. There is no other option but inline and break for image placement.

I'm wondering if it is why FM has a value for run into paragraph though it does not work.

Votes

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
Advisor ,
Dec 02, 2015 Dec 02, 2015

Copy link to clipboard

Copied

Toxomo,

    It seems you have two questions:

  1. The original one, about the relationship between read/write rules, FrameMaker formatting, and XML.
  2. The later one, about the difference in the number of possible values of the DITA placement attribute and the possible FrameMaker anchored frame positions.

On the first point, independently of the use of DITA, when FrameMaker imports an XML document as a structured document or saves a structured document as XML, most XML attributes correspond to attributes of the same name and same values in FrameMaker. There are exceptions. A user may choose to change the names in the two representations of the content. Furthermore, for some special formatting objects such as tables, cross-references, and graphics, some internal FrameMaker properties which are inherent in an object are represented in XML as attributes. For example, many XML representations of tables use attributes for the number of columns in the table and the width of each column. Since the FrameMaker WYSIWYG view displays a table as a table, there is no need for attributes for this information. A formatted table has some number of columns and each column has a width. As long as the DTD defines the appropriate attributes and they either use FrameMaker's default names or there are read/write rules identifying them, when FrameMaker saves a structured document as XML, it will set the attributes and when FrameMaker opens an XML document it will interpret the attributes to determine the properties of the object.

It is also possible to bring the XML attributes into FrameMaker. However, changing the attribute value does not change the object's properties. Use the appropriate FrameMaker commands and dialog boxes to change the object. For example, to add a column to a table, do not change an attribute value. Instead, use the Table > Add Rows or Columns command. When you save the modified document as XML, FrameMaker will set the attribute correctly.

In your case, the placement attribute is treated analogously. There is no need to define the attribute in your EDD. You can remove the 'is fm attribute "placement";' subrule. FrameMaker will look at the anchored frame and set the attribute to the matching value when it saves the document as XML.If you do use the attribute in FrameMaker, though, changing the attribute will not affect the appearance of the graphic. Use the Special > Anchored Frame or Graphics > Object Properties command for that.

On the second point, FrameMaker anchored frames can be positioned below the current line, at the top or bottom of the column containing the anchor point, containing the anchor, at the top or bottom of the column containing the anchor, at the point where the anchor was inserted, outside the column containing the anchor, outside the text frame (which may have more than one column), or run into the paragraph containing the anchor. Some of these possibilities have additional options; for example, if a graphic is positioned outside the text frame, it can be placed on the left side, the right side, the side closer to the page edge, or the side closer to the binding. The distance from the text frame and the distance above (or below) the baseline can also be set. Any XML application can choose to support all these options or only some of them. As you point out, unless it is extended, DITA does not support them all. No XML application, including DITA, can restrict FrameMaker's underlying formatting capability; an XML application can only restrict how much of the underlying capability is made available to its users.

Hope this helps,

       --Lynne

Votes

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
Explorer ,
Dec 03, 2015 Dec 03, 2015

Copy link to clipboard

Copied

Hi Lynne,

Thank you for you reply.

1. You say that "changing the attribute value does not change the object's properties.", but when I change the attribute value between inline and break, the anchoring position will change immediately, only the "runin" value does nothing.

If you set the anchored frame to run into paragraph, it goes back to break when saved.

2. I agree with you that FM may be restricted by DITA rules to provide users with only two options. Because the generated xml file may also be opened by other xml editors.

And some editors like Arbortext will generate an error log when reading a "runin" value from the placement attribute saying that "runin" is an invalid value.

Votes

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
Advisor ,
Dec 03, 2015 Dec 03, 2015

Copy link to clipboard

Copied

Toxomo,

   My claim that changing an attribute that corresponds to an object property not reformatting the object is correct for out-of-the-box FrameMaker behavior. You are also correct that changing the placement attribute for an image does change the formatting. That behavior is implemented in the ditafm.dll plugin; when I disabled the plugin changing the attribute did not change the property. The plugin could be changed to look for additional values, but the source code is not provided.

  You could probably add another attribute and map it instead of placement to the position property. I don't have time to look further into this possibility.

  You are also correct that interchangeablity is maximized by not customizing the DTD. Utility however is often maximized by making changes, which is why DITA is des igned to allow such changes. Your customer is going to have to choose between keeping the current behavior and added the desired formatting.

     --Lynne

Votes

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
Community Beginner ,
Apr 06, 2017 Apr 06, 2017

Copy link to clipboard

Copied

LATEST

I just found a pretty easy solution for the poblem described here.

Uing the following additional read/write rule for the image element

element "image"

{

  is fm graphic element;

  ...

  attribute "outputclass"

  {

    is fm property position;

    is fm attribute;

  }

}

And changing the settings of the outputclass attribute for the image element in the EDD I now have the Choices: "inline | top | below | ... | runin" (using the attribute values of the lists in a previous posting) for placing my images whereever FrameMaker can place them. 🙂

Unfortunately I can't use the Anchored Frame dialog but must edit the attribute manually via the dropdown list and the positioning also doesn't change immediately together with the attribute change, but gets applied the next time the EDD is loaded (e.g. when re-opening the file).

May this trick also help others solve their formatting issues with Frame and DITA.

Votes

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