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

Multiple Conditional Text Tags on One section

New Here ,
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

I'm composing a document with 3 conditional text tags. There are instances where I need to conditionalize something as Tag 1 and Tag 2 but doesn't apply for Tag 3. Robohelp seems to allow me to apply 2 tags to one section of text, but when I generate my .chm it doesn't include anything that has been given two tags. Is there a way for robohelp to support this?
Is there something I should be doing differently?
I'm using Robohelp 5X.

Thanks,

Views

1.2K

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
Engaged ,
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

<snip> Never mind. See Ben's post instead.
G

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
New Here ,
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

True, the boolean isn't efficient. I've tried using a "not tag A and not tag B or tag C", and that seems to be working. It seems weird that it's working like that... But it's displaying my sections that are double tagged.

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
Engaged ,
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

kmitts, have you tried "not tag A and not tag B AND tag C"?

G

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
Participant ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

quote:

Originally posted by: Gravenstein
kmitts, have you tried "not tag A and not tag B AND tag C"?

G


This expression will return untagged text and C-only text. Everything else will be excluded.

kmitts, what sort of output do you want to create? You wrote: "There are instances where I need to conditionalize something as Tag 1 and Tag 2 but doesn't apply for Tag 3." If you want to create output that applies to Tag 1, use the build expression "1"; your 1-and-2 text will appear in the output, but Tag 3-only text will not. Similarly, if you want to create output for Tag 2, use the build expression "2"; your 1-and-2 text will appear in the output, but Tag 3-only text will not.

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
Guest
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

G,

In some outputs at least in RH6, there are Advanced options. In the output generation dialog, there's a Define button next to the Conditional Build Expression dropdown. In the Define dialog, there's an Advanced button in the lower right corner that pops out some additional options. This gives the ability to do a conditional build based on including a tag, and it allows AND statements, as well as ORs and NOTs. I don't generate to CHM, and RH tells me I need to download the MS Help Workshop before doing so, so I don't know if these options are available for CHM.

--Ben

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
Engaged ,
Oct 10, 2007 Oct 10, 2007

Copy link to clipboard

Copied

Thanks, Ben, that was very helpful. I see that this is true in X5 as well as RH6. I think the aspect where untagged topics are always included may cause me an issue, but nevertheless I have somehow missed taking advantage of a feature that I could have used.

Gracias!
G

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
Participant ,
Oct 11, 2007 Oct 11, 2007

Copy link to clipboard

Copied

kmitts,

Inclusionary build expressions are quite simple. Follow these directions, and you'll be able to include your double-tagged text (e.g., A and B) in a single-tag expression (e.g., "A").

1. Open your project in RoboHelp.
2. Double-click your chosen single-source layout.
3. Expand the Single-Source Layouts folder.
4. Double-click Microsoft HTML Help. The HTML Help Options - Microsoft HTML Help dialog will appear.
5. Click the Define button. The Define Conditional Build Tag Expression dialog will appear.
6. Click the Advanced button to expand the Define Conditional Build Tag Expression dialog.
7. Open the Available Conditional Build Tags drop-down menu.
8. Click the desired tag.
9. Click the Add Tag button. The selected tag will be added to the Conditional Build Tag Expression display.
10. Click the OK button to close the Define Conditional Build Tag Expression dialog.
11. Generate your output.

I tested this with 3 tags (A, B, and C) and 6 lines of text:

Tag A
Tag B
Tag C
Tags A and B
Tags A and C
Tags B and C

I applied the tags as indicated. When I my CHM file, I saw only these lines:

Tag A
Tags A and B
Tags A and C

So there's your solution.

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
Participant ,
Oct 11, 2007 Oct 11, 2007

Copy link to clipboard

Copied

Addendum:

When you use an exclusionary build tag, the following rules apply:

1. Any text tagged with an excluded tag will be excluded from the output, even if other tags are applied to the same text.
2. All untagged text will be included in the output.
3. All text tagged only with non-excluded tags will also be included in the output.

When you use an inclusionary build tag, the following rules apply:

1. Any text tagged with an included tag will be included in the output, even if other tags are applied to the same text.
2. All untagged text will be included in the output.
3. All text tagged only with non-included tags will be excluded from the output.

The differences are subtle, but very important. You can certainly mix and match in a boolean expression, but I wouldn't recommend it; in most cases, it isn't necessary. A thorough understanding of these rules will allow you to design your build tags and your expressions along the best possible lines for your project.

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
Enthusiast ,
Oct 11, 2007 Oct 11, 2007

Copy link to clipboard

Copied

Chet,

Very interesting that if the same text is tagged A and B, and the build expression excludes A but includes B, the text will appear in output. In other words, include trumps exclude, if I understand you correctly.

Have you determined whether the include/exclude expression works correctly for .chm, WebHelp and printed documentation?

Thanks.

Harvey

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
Participant ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Harvey,

I think you may have misunderstood me. If you apply tags A and B to some text, and you build an exclusionary expression like "NOT A," the text will not appear in the output. (See rule #1 in my exclusionary list: any text tagged with an excluded tag will be excluded, even if other tags are applied.) If you build an inclusionary expression like "B," the text will appear. (See rule #1 in my inclusionary list: any text tagged with an included tag will be included, even if other tags are applied.)

So I don't think "include trumps exclude" in this sense. But consider the following expressions in a 3-tag environment:

* A OR B
* NOT C

Logically, these might seem equivalent. But they aren't, and RoboHelp doesn't treat them as equivalent. Let's assume that you've created every possible set of tag combinations for this project: A, B, C, A and B, A and C, B and C, all 3 tags (A, B, and C), and untagged. Here's a look at what would be included in the output for each build expression:

A OR B:

A
B
A and B
A and C
B and C
A, B, and C
Untagged text

NOT C:

A
B
A and B
Untagged text

When people say that RoboHelp's boolean operators "don't work right," I think they mean that expressions that seem logically equivalent (such as these two) produce different output. Without an understanding of how the rules are applied, a user can easily build expressions that seem right but produce the "wrong" output. In fact, the output is correct according to the rules.

Again, I wouldn't say that "include trumps exclude," although I think I understand what you're getting at. The difference lies in the application of rule #1.

I tested a simple 3-tag environment yesterday with printed documentation and CHM files, and the expressions worked as indicated. I didn't try WebHelp, but I've used similar expressions before, and I feel comfortable saying that WebHelp will also work as I've described it. Also, note that we're dealing with very simple expressions here; complicated expressions require more care. But most RH users can generate the desired output with a few simple expressions. Especially inclusionary expressions.

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
Enthusiast ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Chet,

What I'm getting at is that WebHelp output and print doc don't obey inclusionary expressions with more than one tag. Include-and-exclude expressions don't work, either..

Say I have paragraphs marked a, b, c, d, e, and some untagged paragraphs. There are no nested tags. In other words, text a has no other tags in the middle.

Exclusionary expressions work fine. For example,

NOT b AND NOT d produces what you'd expect.

This inclusionary expression works by the rule:

a

correctly produces output showing paragraph a and unmarked paragraphs, automatically excluding b,c,d and e.

Also,

c AND NOT a

produces output with text c and unmarked text. The second part of the expression is superfluous.

But this doesn't work:

a and b

This produces output with unmarked paragraphs only, excluding all tagged text.

Similarly,

a AND c AND NOT e

also produces output with unmarked paragraphs only, excluding all tagged text.

I added a new tag, x, and tagged some text inside the paragraph alread tagged a. So the html code shows tags a and x applying to that span.

The expression

x

produced output with unmarked text only.

This expression

a AND NOT x

correctly produced paragraph a, excluding text x, and untagged text.


This expression

a AND d AND NOT x

produced output with untagged text only.

This works fine by the rule:

NOT x AND NOT c AND d

produces output with text d and untagged text. The "NOT" parts are superflous.


I think I can safely say that complex build tags do not work in WebHelp. I'd guess the same for printed output, but I'll let someone else try that.

I'm running WinXP and RH 6. It was the same in X5. It has been this way since eHelp added inclusionary expressions.

Harvey


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
Participant ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Harvey,

That's a lot of info! Two bits stand out for me, however.

1. a and b

You said that this produces untagged text only, and that is, in fact, exactly what I'd expect. The expression "A" produces untagged and A-tagged text; the expression "B" produces untagged and B-tagged text. The intersection of these expressions (i.e., the expression "A AND B") produces the shared values: untagged text only. If you want untagged, A, and B text, you should use one of these expressions:

NOT C AND NOT D AND NOT E
A OR B

The "or" will appear if you use the advanced define options, select a tag, and then select a new tag and click the "Add Tag" button.

2. The expression "x" won't pick up x-and-a double-tagged text.

This is weird behavior. I say it's unexpected only because I tested this myself yesterday and got results different than you did. But I ran my test a little differently. You nested the X text inside text already marked A. But I did this:

* Selected a paragraph that read "Tags A and B."
* Applied tag A to the paragraph.
* Applied tag B to the paragraph.

When I use the expression "B" to generate output of any kind--WebHelp, printed documentation, or CHM--the paragraph "Tags A and B" appears in the output, exactly as I expect it to. But if I nest the tag as you did--for example, if I apply tag A to the paragraph but tag B only to the word "and"--I can't get the output to generate as I expect. The order of the nesting doesn't matter. My only conclusion is that this is a bug.

Oh, I guess I'll add a third here:

3. a AND d AND NOT x produced output with untagged text only.

Similar to #1, this is exactly what I'd expect. The only shared element among the three expressions A, D, and NOT X is untagged text.

Edited to replace "union" (which applies to OR) with "intersection" (which applies to AND) in my explanation of #1.

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
Participant ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Harvey, do you know the link to the bug reporter? RH output will obey inclusionary expressions properly for nested text if the tags are applied at the paragraph level, but not at the non-paragraph level. I'd like to report this as a bug.

Thanks.

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
LEGEND ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Hi Chet

In case Harvey is out to lunch, it is at This link

Cheers... Rick

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
Participant ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Thanks, Rick.

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
Engaged ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Wait a minute...let's go back to the issue of "A AND B." I just ran a test and saw "A AND B" work correctly, generating only the topic that was tagged with both A and B. Topics tagged with just A, just B, or any other tag were correctly excluded. In a followup test, "A AND B AND NOT C" produced the same result, with "NOT C" being superfluous (as expected).

That said, be aware of the following additional factors in this test: webhelp output, topic-level tagging only, and NO untagged topics.

G

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
Engaged ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

OK, I also took a quick look at what happens with content-level tags. Again, I can get "A AND B" to correctly generate only the paragraph that is marked with both tags. (Again, webhelp output, no untagged topics.) HOWEVER, if the topic with the tagged content isn't also tagged in a compatible way, it is not included at all.

So it would seem that topic-level tags trump content-level tags, which makes sense when you think about it. However, this adds another level of complexity to the mix. You need to consider what's going on at both levels.

As suggested above, it's risky to get too complex with your build expression.

G

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
Enthusiast ,
Oct 12, 2007 Oct 12, 2007

Copy link to clipboard

Copied

Chet,

Now I think I get it. If you want to include just a and just b (and untagged text) you have to exclude everything else. (It will also pick up text with both tags.)

The expression A and B says an object must have both tags to be selected.

Nested text worked for me in this situation:

Para c contains some interior text tagged x (i.e., c and x for the snippet).

The expression

c AND NOT x

produced para c minus the x text, plus untagged text, and of course no text tagged a, b, d, e, or f.


c AND x produced the snippet, stripped of the c text surrounding it, plus untagged.

So I must dine on hat stuffed with crow tonight and revise my observation:

Include-and-exclude expressions work in WebHelp, but not the way you might expect if you're not careful. So it's best to stick with exclusionary expressions to make the output include everything you didn't exclude.

This makes the task quite challenging, to tag stuff in a way that lets you build expressions without running into the 200 character limit..


Harvey

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 ,
Oct 15, 2007 Oct 15, 2007

Copy link to clipboard

Copied

LATEST
If conditional build tags keep increasing to the point of chaos, perhaps it's time to break out into multiple SSL's, each of which would only deal with a few build tags?

This might be one of those cases in which multiple solutions can be combined, instead of trying to force-fit a single solution.


Good luck,
Leon

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
Resources
RoboHelp Documentation
Download Adobe RoboHelp