Keep with next...please

This forum is for all Flare issues not related to any of the other categories.

Keep with next...please

Postby Maya_t on Mon Jan 11, 2021 6:13 am

Hello people,

Im looking for a 'keep with next' option in Flare, where I can be sure the sentence sticks to the image after it...is there a way to do this in Flare?
TIA
Maya_t
Propeller Head
 
Posts: 11
Joined: Mon Apr 22, 2019 2:37 am

Re: Keep with next...please

Postby Nita Beck on Mon Jan 11, 2021 9:27 am

CSS doesn't have the concept of "keep with next." Rather, it has the concept of breaks before, inside, or after different HTML tags. You can design styles that always break or that avoid breaking. (There's no such concept as never breaking.)

To achieve the specific behavior you're after, you have a couple of options.

One way is to put the paragraph that holds the lead-in sentence and the paragraph that holds the image inside a div and assign the div class that includes the page-break-inside attribute set to "avoid". I use this exact div structure, with a class of div.Figure.
Code: Select all
div.Figure
{
   page-break-inside: avoid;
}

BTW, if you wanted to use a similar div structure for other kinds of content besides paragraphs with images, you could name the div more generally.
Code: Select all
div.NoBreakInside
{
   page-break-inside: avoid;
}

Another way is to have one CSS class for the lead-in paragraph that instructs Flare to avoid a page break after and another CSS class for the paragraph that holds the image that instructs Flare to avoid a page-break-before.
Code: Select all
p.FigureLeadin
{
   page-break-after: avoid;
}

p.Figure
{
   page-break-before: avoid;
}

In my own practice, the lead-in to a figure is always the figure title, so my code is:
Code: Select all
p.FigureTitle
{
   page-break-after: avoid;
}

p.Figure
{
   page-break-before: avoid;
}

In the p.FigureTitle CSS, I also set up an auto-number for the figure title, but that's a whole other discussion.

HTH
Nita
Image
Content Strategist / Information Architect / Flare Consultant: http://beck-communications.com
Manager, Rochester Flare User Group: http://www.facebook.com/RochesterFlareUserGroup
Nita Beck
Senior Propellus Maximus
 
Posts: 3405
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Keep with next...please

Postby Maya_t on Tue Apr 06, 2021 6:59 am

Thank you ! I created the new Div and it works great !!!
Maya_t
Propeller Head
 
Posts: 11
Joined: Mon Apr 22, 2019 2:37 am

Re: Keep with next...please

Postby ChoccieMuffin on Wed Apr 07, 2021 9:52 am

I have p.KeepWithNext (which avoids break after) and p.Graphic (which avoids a break before).

One really consistent problem I can't get past is when I have these two paragraphs nested in the first <li> in a list, in which case they don't both jump onto the next page if there isn't enough space, the introductory paragraph stays on the first page and the graphic goes to the next. It's ONLY the first list item that misbehaves, any subsequent list items behave as expected. I've had this for years and it's annoying, and I don't know how to fix it, or even where to look to identify the cause. Any suggestions?
Started as a newbie with Flare 6.1, now using Flare 2019r1 and 2020.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2466
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK


Return to Flare's General Discussion

Who is online

Users browsing this forum: Jrdpa and 20 guests