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

inline character formatting

Advisor ,
Jan 09, 2014 Jan 09, 2014

Copy link to clipboard

Copied

Battling on happily after that Aha!-moment before Christmas, and testing myself by retrofitting structure to existing documents – still having far more fun than I feel I should do at the office :-}

Today's question, which may well reveal an embarrassing lack of basic understanding. In my unstructured documents, I've always used specific character styles for options like !cite and !xph (book-titles and in-line code snippets respectively). Now I'm exploring structure, I haven't yet managed to work out how to handle these in-line changes. "Format change list" looked promising, but how do I define an element that's going to trigger the change? (if "element" is the right word at this low a level)

My battered copy of the FM 7.0 User Guide briefly but tantalisingly mentions "… wrapping items that are inside paragraphs" without farther explanation. What other (online) references would you recommend?

TOPICS
Structured

Views

885
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 ,
Jan 09, 2014 Jan 09, 2014

Copy link to clipboard

Copied

Cracked it! TextRangeFormatting …

My thanks, en passant and in case she ever gets to see them, to the instructor who gave the course I followed in Newbury in October 2005. Her notes have been a real help.

Votes

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 ,
Jan 13, 2014 Jan 13, 2014

Copy link to clipboard

Copied

Right, solving one question reveals another :-}

I've successfully defined a container element for <cite> with "In all contexts: text range", and it appears to do what I wanted … in the one element where I've explicitly included <cite> in the general rule. Do I now have to go back and update the general rule for each element where I find myself using a <cite>, or is there some more elegant way of saying "text ranges are allowed everywhere unless explicitly forbidden"?

Votes

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 ,
Jan 13, 2014 Jan 13, 2014

Copy link to clipboard

Copied

Hello Niels,

I am a tad confused on what you doing. <cite> is an inline element in DITA. Are you building an EDD based on a pre-defined valid XML, such as DITA, or are you building and new EDD/DTD?

As for the EDD, you have options as to how to apply inline (as well as block) formatting. For inline elements, you can reference a character tag, define all the required character formatting in the EDD, or point to a format change list. Which one to use depends on the application. The majority of the time, I reference a character tag. Sometimes, if the formatting is based on an attribute value, and/or requires minor a change, such as increasing relative font size, by a specific amount (+2pt), I will define that in the EDD. That can also be done using a format change list (if there a lot instances). For example, I use format change lists to turn on and off change bars, based on an attribute value. For example, most DITA elements have a @status attribute. I use that to apply formatting to block or inline text.

I tend to point to paragraph and character tags 90% of the time. However, you can build an EDD that has all formatting defined in the EDD and basically creates a boat-load of overrides to the Body tag. I am not a fan of this. It will keep people from changing tags. However, if you want a single EDD for multiple page sizes, pointing to tags is the way to go. Then you only do formatting within the EDD for formatting such as adding relative space or increasing relative font size.

Hope this helps.

Regards,

Stan

Votes

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 ,
Jan 13, 2014 Jan 13, 2014

Copy link to clipboard

Copied

Hi Niels...

For the general rule, you do need to go to each element's general rule and explicitly list the elements to allow. One thing you could do if you're creating this from scratch, is to create a variable named "TextRange Elements" and insert that in each GR that allows your inline elements. Then when you want to add/remove the actual elements in this list you can just do it in one place (in the variable definition).

Note that this will "work" from a functionality perspective, you may run afoul of the DITA model by just assuming that all "text range" elements are valid in the same location. If you're creating a scaled down subset of the DITA model, it'll probably be fine, but you might want to chec with the DITA reference to be sure.

Cheers,

...scott

Votes

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 ,
Jan 13, 2014 Jan 13, 2014

Copy link to clipboard

Copied

Hi Niels,

As for the doc, have you tried the FM 7.1 Structure Application Developer's Guide.

I may be missing something here. Are you using FM 7.0? The earliest version I have is 7.2. Can't you open the DTD in FM 7.0

In 7.2 you:

  1. Select File > Structure Tools > Open DTD.
  2. Navigate to the location of your DITA DTD and select ditabase.dtd
  3. Click Open.

This will give you a 137 page EDD, will all your DTD rules and minus all formatting rules.

If you are using DITA 1.1. I can send you the out-of-the-box EDD that comes with FM9 and save it down to 7.0

Not sure how you are going to build a book in DITA with FM 7.0. That's Scott's area lf expertise,

If your company is having you do all this in FM 7.0, they would be money ahead to buy FM 11 and DITA-FMx.

Stan

Votes

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 ,
Jan 13, 2014 Jan 13, 2014

Copy link to clipboard

Copied

Thanks to both of you for casting a lot of extra light!

@Scott – OK, I can accept (just as well, really …) that I'll need to include valid text ranges in each general rule. I do like your suggestion of using a variable: very elegant.

@Stan – I frequently mention my copy of the 7.0 User Guide because it's the last paper documentation I have; I'm actually using FM10. As for formatting, I'm getting extra mileage out of my well-honed styleset rather than including formatting info in the EDD. So far.

I'll happily continue exploring and discovering, including taking a cautious look at the "real" DITA EDD when I'm rather more confident about reading/understanding my own hand-rolled EDD.

Votes

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 ,
Jan 14, 2014 Jan 14, 2014

Copy link to clipboard

Copied

Votes

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 ,
Jan 15, 2014 Jan 15, 2014

Copy link to clipboard

Copied

LATEST

After the initial "road to Damascus" moment, now I'm back on the horse <vbg> I've downloaded the two structure documents to have around as a reference, and – more importantly – tracked down FM's own EDDs. Boy, you have to admire the people who managed to describe all possible combinations down in that format!

Thanks again for the input: I feel I've caught up after years of plodding along behind.

Votes

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