Custom Numbered List PDF Output

This forum is for all Flare issues related to PDF, eBook, Microsoft Word, Adobe FrameMaker, XPS, and XHTML book targets.
Post Reply
wl606
Propeller Head
Posts: 14
Joined: Thu Feb 20, 2014 6:25 am

Custom Numbered List PDF Output

Post by wl606 »

Hi. I was wondering if Flare gives you any way to create a numbered list where the numbers are white and have circle behind them, like the attached.
numbered_list.png
I've tried all of the CSS tricks I've found on the internet, but they don't seem to play well with Flare. I can get the numbers white with a gray background color for instance, but not a circle shape even though I'm specifying the border radius as 50%.
You do not have the required permissions to view the files attached to this post.
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Custom Numbered List PDF Output

Post by robdocsmith »

Not as far as I know (would love to learn a new trick if it's possible!). Flare doesn't recognise a negative number for a background position so you can't use a background image and move it to the left of each <li> element as you would with a web page. The times I've had to do this, I've fudged it with images for each number.

Rob
Isleofgough
Propeller Head
Posts: 91
Joined: Sat Dec 08, 2012 9:05 am
Location: Seattle WA

Re: Custom Numbered List PDF Output

Post by Isleofgough »

Maybe use a circle frame font like this https://catalog.monotype.com/font/monot ... 20negative
robdocsmith
Sr. Propeller Head
Posts: 247
Joined: Thu May 24, 2018 3:11 pm
Location: Queensland, Australia

Re: Custom Numbered List PDF Output

Post by robdocsmith »

That's true, I hadn't thought of changing the font for the numbers. It's a little trickier because you have to remember to make sure your <li> elements have <p>'s inside them. And you would have an issue with numbers above 9 as the number 10 would be displayed as two separate circles.

The following would apply a numbered font style to only the list numbers:

Code: Select all

ol { font-family: '<number frame font>'; }
li p { font-family: '<usual font>'; }
The paragraph elements are needed because if you apply your usual font just to the <li> element, it will override the font set in the <ol> element.

Rob
wl606
Propeller Head
Posts: 14
Joined: Thu Feb 20, 2014 6:25 am

Re: Custom Numbered List PDF Output

Post by wl606 »

Thanks, everyone! I only just got back to this document this week.
Post Reply