Flare 12 and Word Output - Problems with <Div>

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
hknix
Propeller Head
Posts: 22
Joined: Fri Mar 28, 2014 10:15 am

Flare 12 and Word Output - Problems with <Div>

Post by hknix »

Going through my tests to upgrade to Flare 12 (from Flare 11). HTML5 help content looks good, PDFs look good. However, I have a set of documents that need to go to MS Word... those don't look so good.

Running:
Flare 12
Word 2013
Windows 8.1

I have the following set of <div> tags. These are in the default Medium in my CSS.

div.wrapper /*??*/
{
clear: none;
}

div.maincontent /*The <div> that starts before H1 in a topic and houses all the topic content.*/
{
padding-right: 235px;
}

div.sidebar /*The <div> that contains the entire side bar, and aligns it to the left.*/
{
width: 190px;
float: right;
vertical-align: top;
display: block;
text-align: left;
margin-left: 5px;
margin-right: 2px;
margin-top: 5px;
padding-left: 10px;
padding-right: 10px;
position: relative;
margin-bottom: 100%;
}

div.sidebar_grouping /*The <div> that contains each small outlined sidebar section (System Roles, Assignment Types, etc).*/
{
width: 190px;
float: right;
position: relative;
border-left-style: solid;
border-left-width: 1px;
border-left-color: #dcdcdc;
border-right-style: solid;
border-right-width: 1px;
border-right-color: #dcdcdc;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #dcdcdc;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #dcdcdc;
margin-top: 15px;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
}

div.sidebar_header /*??*/
{
margin-top: 0;
margin-left: 0;
border-bottom-style: solid;
border-bottom-width: 1px;
border-bottom-color: #000000;
}

They result in a side bar in the online help content that contains one or more blocks of information.
HelpOutput.png
Here's how that looks in the topic code:
DivInHelpCode.png
Those two outputs share a Medium in the CSS. The <div> tags are currently not defined any differently in that medium (they pull from the default). However, the paragraphs that contain the sidebar text are conditionalized to not be included in Print. The <div.maincontent> is not conditionalized, and appears to be the culprit. In Flare 12, when I output to Word, any topic that contains the <div> tags looks like this. I've checked the properties of the paragraph in Word to ensure it has a negative hanging indent, and it does. The headings get cut off at the margin.
OutputToWord.png
In Flare 11 my PDFs look amazing, and I can output to Word successfully with no problems. The headings hang into the margin, which is what they are supposed to do (ignore the blue aspect of the example below).
OutputToWordFlare11.png
Any ideas? Driving me nuts and currently the only thing stopping me from upgrading to Flare 12. Can I add something for the <div.maincontent> tag in the Medium used for PDF and Word to fix this?

Thank you!!
You do not have the required permissions to view the files attached to this post.
hknix
Propeller Head
Posts: 22
Joined: Fri Mar 28, 2014 10:15 am

Re: Flare 12 and Word Output - Problems with <Div>

Post by hknix »

I stumbled on this in the Flare 12 Help (which I don't see in the Flare 11 help).

"When you generate Word output, divs appear as single-cell tables. This allows you to move the div in your output, resize it, or even add additional rows or columns."

Anyway to make them NOT do that? They didn't do that in Flare 11!!
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Flare 12 and Word Output - Problems with <Div>

Post by Nita Beck »

To the best of my knowledge, Word output has never supported divs.

Prior to Flare 12, (I'm pretty sure that) Flare was programmed to *unbind* divs when generating Word output. I suspect that even though your Flare 11-generated Word output looked good, it wasn't because of any div styles you have in your stylesheet. It was probably because the styles of the stuff within the divs made that stuff look good.

Flare 12 presents a radical change in how divs are handled for Word output: It turns every div into a single-cell table.

This is discussed in the Flare 12 documentation in the What's New topic, here: http://help.madcapsoftware.com/flare12/ ... provements. Notice that MadCap describes this change as "Div improvements".

Personally, I think this change in what happens to divs for Word output is unfortunate and is keeping me from moving full steam ahead with Flare 12 for those projects where Word output matters. I wish that MadCap would give us an option for how to treat divs, and in fact I plan to submit a feature request.

HTH, but I suspect it won't.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
hknix
Propeller Head
Posts: 22
Joined: Fri Mar 28, 2014 10:15 am

Re: Flare 12 and Word Output - Problems with <Div>

Post by hknix »

Thank you Nita. I find it unfortunate as well that the option to unbind vs. export to a single cell is not available. I won't be able to upgrade to Flare 12 until I can find a decent work around. I will be submitting a feature request as well.
hknix
Propeller Head
Posts: 22
Joined: Fri Mar 28, 2014 10:15 am

Re: Flare 12 and Word Output - Problems with <Div>

Post by hknix »

Wanted to provide the info below in case it helps anyone.

Madcap Support provided a possible workaround for the problem I was seeing here. Set a condition on the div tag in the CSS and set it to unbind. Default.Div is the condition tag.

div.wrapper
{
clear: none;
mc-conditions: 'Default.Div';
mc-exclude-action: 'unbind';
}

div.maincontent
{
padding-right: 235px;
mc-conditions: 'Default.Div';
mc-exclude-action: 'unbind';
}

That solution did indeed resolve the problem I was seeing with the headings in Word output. :) However, when implemented, all of the procedures in an <ol> list now start at 1. :( Interestingly enough, the other styles (and attributes of that style) have been preserved.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Flare 12 and Word Output - Problems with <Div>

Post by Nita Beck »

Interesting workaround. I'll take a look at that. I just put in my feature request today to give us the option to select how divs are treated for Word output, either unbind or put in a table. I think there will be use cases for both options.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
hknix
Propeller Head
Posts: 22
Joined: Fri Mar 28, 2014 10:15 am

Re: Flare 12 and Word Output - Problems with <Div>

Post by hknix »

I put in a feature request as well. I'm curious what happens in your setup with the provided workaround. Wondering if there is something I can do to my lists to make them work as well. I've sent the feedback to the support person who has been helping me. I'll post back if I receive anything additional
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Flare 12 and Word Output - Problems with <Div>

Post by Nita Beck »

MadCap reached out to me with the same proposed solution. I've tried it but am getting really mixed results. Among the several anomalies are:

(1) the introduction of multiple empty paragraphs above/below where divs used to be,
(2) left-alignment issues between unbound divs that originated in snippets compared to those that originated as live text, and
(3) some content being processed still as tables rather than unbound divs, despite my examination of the content finding no discernable difference from those divs that do get unbound.

In short, unacceptable results.

I continue to conclude that I can't use Word output from Flare 12. :(
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Paul Griffiths
Sr. Propeller Head
Posts: 262
Joined: Wed Apr 18, 2007 2:25 am
Location: Nottingham, UK

Re: Flare 12 and Word Output - Problems with <Div>

Post by Paul Griffiths »

One thing that I have been trying is to replace <div>s that might affect Word output with other structural tags that, AFAIK, Word will still ignore, i.e. <header>, <footer>, <nav>, <article>, <section> and <aside>.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Flare 12 and Word Output - Problems with <Div>

Post by Nita Beck »

Paul Griffiths wrote:One thing that I have been trying is to replace <div>s that might affect Word output with other structural tags that, AFAIK, Word will still ignore, i.e. <header>, <footer>, <nav>, <article>, <section> and <aside>.
Interesting idea, but one - alas - that won't work for me. I need the divs for HTML5 ouptut, as the divs are manipulated by scripts to turn into nifty things online.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
Post Reply