Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Building text before into a paragraph style--mimic HTML :before pseudo element

Advisor ,
Nov 04, 2021 Nov 04, 2021

Copy link to clipboard

Copied

I just came up with an answer to a question no one has asked. Or maybe they have, but I don't think I've ever seen it answered.

I'm working on a book that has figures. A figure title looks like "Figure 1.1". The table of contents displays figure numbers, but it doesn't display the word "Figure ". So a TOC entry looks like "000 1.1", where "000" is the page number.

So my challenge was to make the TOC collect the figure numbers, put a page number before each one, and omit the word Figure. I got thinking about the HTML pseudo element :before, which basically lets you put anything in front of a piece of text. It's usually used for icons, similar to the way you would set up a bulleted list, but you're not limited to one character. Instead of an icon, you could, for instance, put the word "Figure " before a figure number.

I went back to the figure numbers in each figure, took out the word "Figure " and changed the paragraph style under Bullets and Numbering so that it's a numbered paragraph that displays no number (Format: None) and inserts the word "Figure " after the number.

In the TOC style, I have numbered paragraphs set to leave out numbers (Numbered paragraphs: Exclude numbers).

Now my figures have the word Figure in front of the figure number, but the TOC shows only the figure number with a page number preceding it.

Cool, right?

TOPICS
How to, Type

Views

20

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation