2019r2 Word import - continuation paragraphs in lists

This forum is for all Flare issues not related to any of the other categories.
Post Reply
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

2019r2 Word import - continuation paragraphs in lists

Post by ChoccieMuffin »

Afternoon all, I'm in need of the power of the Flare hive mind, because my head is going round and round trying to play with the new Word imports and I've just managed to leave myself in a confused mess.

<Rant mode on>In Flare, nested lists just WORK, and you can use continuation paragraphs rather than just line breaks, and you can have a table in a continuation paragraph in a list and it WORKS. I like Flare. Word, on the other hand, is [[insert expletive of your choice]] when dealing with lists, particularly nested lists, and I currently want to just cry.<Rant mode off>

Given the new, improved Word import in Flare, I thought I'd take the opportunity to revamp my processes.

Here's a bit of background:
* In a lot of my projects, content is created and managed in Word.
* I don't EVER manually edit files imported from Word for these projects. Not. Ever.
* These projects use A LOT of lists, a fair few of which are nested lists.
* In these projects, the build machine builds a "starter" target to get content in from Word (the output is discarded), then runs a series of search-and-replace scripts that tidy up the HTML, and finally builds a PDF target (with auto-sync of all import files turned off) to produce my final output.

Currently, using Flare 2019, I am a bit limited in how things are imported so I thought I'd try to make my imported lists a bit neater.

So far, I have been imposing a very rigid Word template on my SMEs with only certain styles allowed, so I have ListNumber, ListNumber2, ListBullet, ListBullet2 etc for numbered lists and bulleted lists, ListContinue ListNote, ListTip, ListImage etc for things that would normally be continuation paragraphs inside a list item. The ListNumber and ListBullet paragraphs are converted by Flare 2019 into lists that have an ol or ul with a li item inside and the li items are given classes to determine how indented they are, so they are only pseudo nested lists, in that they kinda look nested but they're not actually. Continuation paragraphs of any kind aren't actually included in the ul or ol, and I can't get tables to look like they're indented at all.

Do any of you have any tips on how to achieve the following:

Get a table to look as if it's part of a nested list.
Get a list with continuation paragraphs in Word to import properly so the continuation paragraph is part of the list item.

I suspect I'm just beating my head against a brick wall because of Word being completely "!&$*£)$ at dealing with lists, but thought I'd ask to see what you lovely people have found.

With Flare 2019 I hadn't worked out how I could have a table indented to be included in a list item, which is a pain as I use this quite a bit in my regular Flare projects.
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
devjoe
Sr. Propeller Head
Posts: 337
Joined: Thu Jan 23, 2014 1:43 pm

Re: 2019r2 Word import - continuation paragraphs in lists

Post by devjoe »

ChoccieMuffin wrote: * In a lot of my projects, content is created and managed in Word.
This is the problem, and you are always going to have difficulties when this is the case.
Here, we dealt with this with a bunch of Python scripts I wrote to convert the stuff that came out of Word imports into what it should have been, including issues specifically like this bringing tables and continuation paragraphs inside of lists.
You could do that, but you'd have to run the Word cleanup-script after every re-import of Word content.

And as for making the tables look like they are part of a list, no. The real issue is that the two models are fundamentally incompatible with one another. You can mark a table in Word with styles that say "I am part of a list" but you cannot write CSS which takes that formatting and uses it to actually indent the table because CSS doesn't allow elements to inherit from their children. You can write a complex selector which says to modify element A when it is inside or after element B, but you cannot write a CSS selector which modifies element A when it has element B inside it, which is what you are looking to do.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2632
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: 2019r2 Word import - continuation paragraphs in lists

Post by ChoccieMuffin »

devjoe wrote:
ChoccieMuffin wrote: * In a lot of my projects, content is created and managed in Word.
This is the problem, and you are always going to have difficulties when this is the case.
Here, we dealt with this with a bunch of Python scripts I wrote to convert the stuff that came out of Word imports into what it should have been, including issues specifically like this bringing tables and continuation paragraphs inside of lists.
You could do that, but you'd have to run the Word cleanup-script after every re-import of Word content.

And as for making the tables look like they are part of a list, no. The real issue is that the two models are fundamentally incompatible with one another. You can mark a table in Word with styles that say "I am part of a list" but you cannot write CSS which takes that formatting and uses it to actually indent the table because CSS doesn't allow elements to inherit from their children. You can write a complex selector which says to modify element A when it is inside or after element B, but you cannot write a CSS selector which modifies element A when it has element B inside it, which is what you are looking to do.
Thanks, devjoe. I already HAVE a bunch of scripts (in my case, FAR scripts because that's what I inherited and I'm not a programmer) which run every time an import happens. This isn't a problem because as I said I don't EVER edit the files that are imported, and these scripts run automatically, very happily, on my build machine and have done for years. I have a couple of other thoughts that I might be able to play with to do with tables and getting them to indent (involving extra styles in Word, which is fine if rather a lot of slog on my part), but I've discovered my problems are deeper than that.

Since my original post I realise that Flare 2019r2 has COMPLETELY BROKEN my current process because of how it processes lists, so I'm just going to raise a Tech Support ticket because I think it's a bit more than I'll be able to fix on the forums.

In brief, where before it used to convert every bullet point to a separate ul or ol with a li inside it of the right class (and my tidying up scripts would sort things), now it puts a <p></p> around the content of every list item, and shoves subsequent list items into a single <ol> or <ul>, regardless of whether it's a bullet or a number. So if I have a ListNumber paragraph (for my first-level numbered list) followed by a ListBullet2 paragraph (for my second-level bulleted list) they both just get shoved into the same <ol>, so my nested list is broken and even though the <li> still has the "ListBullet2" class, it's stuck inside an <ol>. Aargh, my head has burst.
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
Post Reply