Changing the formatting and layout of an autonumbered paragraph

New Here ,
Jan 24, 2020

Copy link to clipboard

Copied

I am wanting to create four paragraph styles in my RH2019 (Version 10) project. Each style is to be autonumbered with text:

 

WARNING

CAUTION

TIP 

NOTE

 

I create a new paragraph style and in the Autonumber pane for the properties, I set the style to None, and the format to the text, for example, WARNING:.

 

When I apply this style to text in a topic, I do indeed get the expected autonumber, and then I can add the appropriate text after the autonumber. However, I want the autonumber to be in bold, and I want to decrease the space between the autonumber and the following text. Where can I adjust these properties for an autonumbered style? Because it is not a List style, but a Paragraph style that I am creating, I do not see these options. I don't want to have to create a List style to be able to accomplish this task, but. . . .

TIA,

 

TVB

TOPICS
New UI

Views

137

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 24, 2020

Copy link to clipboard

Copied

If you look at the p.Note style in your styesheet you should see it has an arrow. Click the arrow and you should see ::before. Click that and make your changes.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 25, 2020

Copy link to clipboard

Copied

I am not sure where Amber is seeing the arrow as I believe we are on different updates. However, open the CSS in RoboHelp and then click the Source view icon you will find your style looks something like this without the font-weight. Add that line.

 

p.warning {}
p.warning::before {
counter-increment: p\.warning;
content: "WARNING";
font-weight: bold;
padding-right: 0.5rem;
}

 

You should then see this.

 

image.png

 

I haven't been able to adjust the gap yet.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 25, 2020

Copy link to clipboard

Copied

Got it. Add the two lines shown below as well. I have set an extreme gap to show it works. Change 24pt to whatever measurement you want.

 

p.warning::before {
--prefix-gap: 24pt;
margin-right: var(--prefix-gap);
counter-increment: p\.warning;
content: "WARNING";
font-weight: bold;
padding-right: 0.5rem;
}

 

image.png


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 25, 2020

Copy link to clipboard

Copied

I see where Amber was and she was referring to the single chevron. You should be able to apply Bold there but I think you will need to go into Source view to make the other changes. If you do find a way of doing it without, please let us know.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jan 27, 2020

Copy link to clipboard

Copied

Peter and Amber,

 

Thank you so very much. This forum saves my sanity with this tool. I hunted around this weekend, but will give it a more in depth look to see if I can figure out how to make these adjustments w/out having to go to the source and instead, use the GUI.

 

Thank you again,

 

TVB

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 27, 2020

Copy link to clipboard

Copied

Doing it in the source will take seconds and one done, that's it. Avoid alcohol while looking for it in the UI. 🙂


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jan 27, 2020

Copy link to clipboard

Copied

Sorry, but alcohol is a necessity for survival on this project. Ok, sorry for being dense, but your comment: Doing it in the source will take seconds and one done, that's it. 

 

When you say "source," I have my css open in the Source view, and I am editing the prefix gap value:

 

p.NOTE::before {
--prefix-gap: 2pt;
margin-right: var(--prefix-gap);
counter-increment: p\.warning;

 

I edit the value, save the css, save all the files in my project, save the project, close and re-open the project to offset any non-WYSIWYG issues and nada, zip, zilch. . . I cannot for the life of me get that gap to adjust.


I give - any thoughts?

 

 

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 27, 2020

Copy link to clipboard

Copied

Create a new project with a topic using your CSS. Set up some content using that style.

 

See the Contact page on my site and send the project as instructed there. Do make sure you include a link to this thread and please do not email the project direct.

 

I will take a look to see why it is not working.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 27, 2020

Copy link to clipboard

Copied

All I have done is increase the measurement from 2pt to 24pt and this is what I see using your CSS and your topic.

 

image.png


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jan 27, 2020

Copy link to clipboard

Copied

What version of RH2019 are you using?

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 28, 2020

Copy link to clipboard

Copied

2019 New UI, same as you. I am on Update 10. What are you on?


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Jan 29, 2020

Copy link to clipboard

Copied

2019 New UI, same as you. I am on Update 10 also. So, this is what I am running into: yep, I can make the gap super wide, but then after a certain value, I can't make the gap any smaller. I see absolutely NO difference in the gap size when w/ anything under 7 pt. After that, the gap stays at the default size that the application set it to BEFORE I added the code that you provided. I mucked around and yep, at 24 pt, I see an enormous gap (as expected), but then I get it any smaller than 7 pt - it looks just like it did BEFORE I added the code - it's like adding the code won't make any difference and I am stuck w/ the default gap width. Any thoughts?

 

Thank you so much!

 

TVB

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 29, 2020

Copy link to clipboard

Copied

I thought about an image but I doubt that would be any closer. The gap is pretty tight so I am not too surprised. Beyond that, I think you are stuck with it. I thought the gap seemed reasonable to make the words stand out.

 

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Feb 07, 2020

Copy link to clipboard

Copied

Thanks for the reply and letting me know that it was readable at the default gap. On to other battles.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 09, 2020

Copy link to clipboard

Copied

To remove the extra space, go in to the p.warning::before style and remove the padding-right value. That's why you can't make it any smaller than a certain value.

image.png

 

image.png

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 10, 2020

Copy link to clipboard

Copied

Thanks Amber, I missed that. Apologies.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 10, 2020

Copy link to clipboard

Copied

It took me a couple of days of thinking about it to make the connection I admit 🙂

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Feb 10, 2020

Copy link to clipboard

Copied

Thank you Amber, but I will be the first to admit - I am still a relative CSS newbie. What does the right padding setting have to do w/ the gap between the auto-number portion of the tag and the text of the tag?

 

Thank you again,

 

TVB

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 10, 2020

Copy link to clipboard

Copied

Amber is probably in bed by now. She's in Oz.

 

Change it and you will see. 🙂

 

If you go to the page below you will see an explanation of margins. There is also a test it for yourself button.

https://www.w3schools.com/css/css_margin.asp

 

Immediately below is the same thing for padding. With content within a border, it's easy to see how the two work.

 

In your case, you are working with an Autonumber setting that is valid CSS but it introduces another complication. Both margin and padding impact the gap here so earlier it was in fact the total of the two. When margin was set to zero, the total was just the padding setting.

 

You can comment out any line in CSS by adding /* before it and */ after it. Do that with the padding setting and you will see there is no space at all between the two.

 

That's about as clear as I can make it. 🙂


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 10, 2020

Copy link to clipboard

Copied

It might help to think of the auto-number setting as splitting the paragraph into two chunks: one chunk for the number and one chunk for the rest of the text. Normally the number chunk is just big enough to fit the number. The padding-right says "actually, I want my number chunk to be bigger, and I want to stick the extra space on the right-hand side".

 

 

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 11, 2020

Copy link to clipboard

Copied

Except both margin-right and padding-right are doing the same thing in this case. On the w3xchools site it is easy to see the difference when content is in a table, following the links above. With autonumber, it's not so easy.

 

Maybe some experimentation with other margin and padding settings would reveal the difference, if there is one with autonumber.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 11, 2020

Copy link to clipboard

Copied

Yes, my explanation was simplified, and margin-right will do the same thing in this case.

 

The box model shows where margin and padding are applied:
https://www.w3schools.com/css/css_boxmodel.asp

 

In many situations the difference doesn't matter, but comes in to play when you set top and bottom margins, which can overlap, causing a narrower gap than intended.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Feb 12, 2020

Copy link to clipboard

Copied

Thank you Amber! That helped a ton and thank you Peter as well for getting me started on this. I don't know what I would do w/out the support of folks like you in this forum.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Feb 13, 2020

Copy link to clipboard

Copied

Just paying back the support I got when I started.


www.grainge.org

Please use the blue Reply button at the top to help me help you. The black Reply link nests replies and they sort out of order.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more