Showing highlighted conditional-tagged text in output

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
rbtroj
Jr. Propeller Head
Posts: 6
Joined: Wed Mar 12, 2014 8:00 am

Showing highlighted conditional-tagged text in output

Post by rbtroj »

Still a Flare newbie here, so pardons if this is a foolish question. Maybe there's a better way to go about this, for which I would be grateful.

I have a project which is due to be output in two forms: one for internal users, the other for external users. The internal/external bits are all properly tagged with their conditional styles and the internal bits correctly do not display in the external output, and likewise the external bits are hidden from the internal output as they should be.

My question is: Is there a way that I can create a "review" output that displays all content but highlights them so the reader can differentiate which is an "internal" section vs. "external"?

I know that I have to include all in the review output, but I'm wondering if there's a way to show the highlights the same way they appear in the editor?

Thanks!
atomdocs
Sr. Propeller Head
Posts: 308
Joined: Tue Jun 18, 2013 3:00 am
Location: Eastern Seaboard, Thailand
Contact:

Re: Showing highlighted conditional-tagged text in output

Post by atomdocs »

I wonder if you could do this with redaction...

Decide whether you want the internal bits or the external bits highlighted in the review PDF. For example, let's say you will highlight the external bits. You tag all the external stuff with the redaction tool. Then, you need 3 targets:

Internal target: internal condition set = normal internal output

External target: external condition set + redaction setting "None" = normal external output

Review target: no conditions set (all content) + redaction setting "Highlight" = full internal and external output with external bits highlighted.

I have never tried this, I don't know if it would work. The :flare: pros will be along soon :)
Tom
Flare 2022, Capture 7
Image
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Showing highlighted conditional-tagged text in output

Post by ChoccieMuffin »

Just thinking - could you do this by putting in an extra medium or editing the current medium in your stylesheet that, for example, puts a coloured background on the condition? You would then need another target that includes both of the conditions.
That might be completely silly and I have no idea whether it would work or not, but might be worth five minutes playing.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Showing highlighted conditional-tagged text in output

Post by NorthEast »

I don't think either approach would work.
* Redaction isn't appropriate - it is based on styles (not conditions), and would only black out the text rather than highlight it. The redaction feature is also only for certain outputs like PDF, but isn't supported for help.
* Styling the conditions wouldn't work, as conditions don't support styles.

I don't think there's any shortcut to this, you'd need to manually apply a style (using a class or ID) that highlights the content.
atomdocs
Sr. Propeller Head
Posts: 308
Joined: Tue Jun 18, 2013 3:00 am
Location: Eastern Seaboard, Thailand
Contact:

Re: Showing highlighted conditional-tagged text in output

Post by atomdocs »

Dave Lee wrote:The redaction feature is also only for certain outputs like PDF, but isn't supported for help.
Ah yes, Dave, thanks, that scuppers it.
Dave Lee wrote: and would only black out the text rather than highlight it.
You can also set the redaction switch to "highlight" in the target properties. I never used it in v9, I don't know if it is a v10 thing. I think it's a nice extension of the feature.
Tom
Flare 2022, Capture 7
Image
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Showing highlighted conditional-tagged text in output

Post by NorthEast »

atomdocs wrote:
Dave Lee wrote:The redaction feature is also only for certain outputs like PDF, but isn't supported for help.
Ah yes, Dave, thanks, that scuppers it.
Dave Lee wrote: and would only black out the text rather than highlight it.
You can also set the redaction switch to "highlight" in the target properties. I never used it in v9, I don't know if it is a v10 thing. I think it's a nice extension of the feature.
It was more that it doesn't save you effort, as you'd still have to manually go through the project and apply a style - whether that style does the highlighting via a background colour or by using the redaction property.

Formatting conditional text seems to crop up quite frequently, but I can't remember seeing any solution other than to manually apply a style.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Showing highlighted conditional-tagged text in output

Post by ChoccieMuffin »

So in that case, I suggest the OP raises a feature request!
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
rbtroj
Jr. Propeller Head
Posts: 6
Joined: Wed Mar 12, 2014 8:00 am

Re: Showing highlighted conditional-tagged text in output

Post by rbtroj »

Thank you all for your replies. I may give the redaction tool a try as the review copy can be output in PDF (at least this time to test in the overall process).

I will submit a feature request as ChoccieMuffin suggested.

Thanks again!
Dmuir
Propeller Head
Posts: 10
Joined: Fri Sep 04, 2015 9:01 am

Re: Showing highlighted conditional-tagged text in output

Post by Dmuir »

I have this same requirement. Is there a way to "vote" on existing requirements? I can't find a way to actually see existing requirements. In any case, I submitted my version of this feature request.
David Muir | Technical Writer | Microdea Inc. | Markham ON | Canada
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: Showing highlighted conditional-tagged text in output

Post by devjoe »

Conditional text which is included in the output gets an attribute on whatever element is tagged: data-mc-conditions="conditionset.condition".
So you could create a CSS rule in your style sheet like

Code: Select all

[data-mc-conditions]
{
	background: yellow;
}
if you want all conditionally tagged text to have a yellow background, or

Code: Select all

[data-mc-conditions="Primary.internal"]
{
	background: yellow;
}
Note that the square brackets around the CSS selector make the rule apply to elements having a specific attribute.
if your conditions are in the condition set named Primary, to make just things tagged internal have a yellow background.
This might not be visible in some cases, if elements have hard-coded backgrounds set, or for images if they don't have padding or transparent bits. But now that you know how to do it, you should be able to set some other formatting for those cases.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Showing highlighted conditional-tagged text in output

Post by NorthEast »

Yep, there's a post here about how to style conditions in the output (for HTML5 only):
viewtopic.php?f=12&t=19801

Using *= is a good tip, as it works when there are multiple conditions on a tag.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Showing highlighted conditional-tagged text in output

Post by ChoccieMuffin »

Note that the solution that Dave Lee links to only works for HTML5, not for other outputs or PDFs.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
Tobias
Propeller Head
Posts: 27
Joined: Mon Sep 19, 2022 8:07 am
Location: Southern Bavaria, five lake district

Re: Showing highlighted conditional-tagged text in output

Post by Tobias »

Hi,
has anyone used the proposed way to highlight conditioned text in pdf output?
I tried it, but it just doesn`t work. It doesn`t even create an error message.
Regards
Tobias
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Showing highlighted conditional-tagged text in output

Post by ChoccieMuffin »

This is a really old thread and since it was written, MadCap has introduced a way to include a condition in a style. For example, add a condition to your condition set called INTERNAL, then add the following to your stylesheet:

.INTERNAL
{
mc-conditions: '[[[ConditionSetName]]].INTERNAL';
color: #ff1234;
background-color: #54BE68;
font-weight: bold;
}

Apply the style (not the condition) to the text or paragraph or heading or whatever. When it's used, the conditioned stuff appears in a beautiful pinky colour on a bile-green background (delicious!)

If you don't exclude the .INTERNAL condition in the output, you'll be able to see the content with this style applied in your output.

If you want ONLY the PDFs that you produce for reviewing to have that gorgeous effect, add a new medium to your stylesheet, e.g. @REVIEW, which you'd use when producing review-only PDFs.

In your DEFAULT medium, include this:

.INTERNAL
{
mc-conditions: '[[[ConditionSetName]]].INTERNAL';
}

and in your @REVIEW medium include this:

.INTERNAL
{
mc-conditions: '[[[ConditionSetName]]].INTERNAL';
color: #ff1234;
background-color: #54BE68;
font-weight: bold;
}

When producing a review PDF, change the medium used to generate the output to REVIEW rather than (default). (Open your target, then on the Advanced tab in the Stylesheet Medium list select REVIEW.)

This assumes that you want internal stuff to appear just like regular stuff in the final output, but you want to be able to clearly see what's labelled as INTERNAL in your review PDF.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Showing highlighted conditional-tagged text in output

Post by NorthEast »

Just one note about that - if you use a style to apply the condition, make sure you remove any existing conditions that you applied to that text / element. If the text has any conditions, the condition from the style will not be applied, and the existing conditions will be preserved.
Post Reply