Skip to main content
New Participant
December 11, 2018
Question

How can you change default indent in RH2019?

  • December 11, 2018
  • 3 replies
  • 1545 views

I am starting a new project in RH2019 (after several years away from RH) and am curious if there is a way to change the default indent on the paragraph indent?

When I click "increase indent" from the General properties panel, it inserts the following in-line style:

style="margin-left: 40px"

Is there a way to define the default margin to be less/more than 40px?

I am asking because, I created my CSS and wanted bulleted/numbered lists to be left aligned with the paragraph text. To create lists that have an indented paragraph in them, instead of creating separate styles for indent levels within multi-level lists, I want to make it easier, and use the built-in indent button. However, to do that, I need to define the in-line indent the indent button creates. (Otherwise, I'll need to use the default list indents to use the indent button).

For example...

This is a paragraph about the list that follows. The following list uses the default list indents, but imagine if the bullets were flush left instead of indented. In that case the paragraph indent would be too much:

  • List item one (created with default bullet style)
  • List item two

Paragraph after list item two (created by removing bullet and using indent)

  • List item three
  • List item four
This topic has been closed for replies.

3 replies

Community Manager
December 15, 2018

Like Peter Grainge wrote, it is about the left padding of the list. You can change that by going into your CSS and then adjust the values with the visual CSS editor:

or by tweaking the CSS in the source code editor:

ul {

  margin-top: 0px;

  margin-bottom: 0px;

  padding: 0px 0px 0px 15px;

}

ol {

  margin-top: 0px;

  margin-bottom: 0px;

  padding: 0px 0px 0px 15px;

}

In my CSS, 15px for padding-left aligns it perfectly with the paragraphs before/after the list.

Regarding the construction of multiple paragraphs as child elements of one list item element: Yes, the approach Ioana_St suggested is the way to go. From an information architecture point of view, this is the cleanest approach, as it clearly separates PCDATA (text + inline elements (like strong or em) from and block-level elements (like <li> and <p>):

<ol>

  <li>

    <p>List item one (created with default bullet style)

  </li>

  <li>

    <p>List item two</p>

    <p>Paragraph after list item two (created by removing bullet and using indent)</p>

  </li>

  <li>

    <p>List item three</p>

  </li>

  <li>

    <p>List item four</p>

  </li>

</ol>

Also, in this construction, you do not need to think about the left indent of the paragraphs within one list item at all, as all paragraphs will have the correct indent automatically. It will then look like this:

  1. List item one (created with default bullet style)

  2. List item two

    Paragraph after list item two (created by removing the bullet and using indent)

  3. List item three

  4. List item four

This is also nicer when it comes to nested lists and makes them better readable and more "stable":

<ol>

  <li>

    <p>List Item 1 (Level 1)</p>

    <ol>

      <li>

        <p>List Item 1 (Level 2)</p>

      </li>

      <li>

        <p>List Item 2 (Level 2)</p>

      </li>

    </ol>

  </li>

  <li>

    <p>List Item 2 (Level 1)</p>

  </li>

</ol>

Let us know if it works for you.

djuliebAuthor
New Participant
December 18, 2018

Hi Stefan, It does work. One question though, in order to get the <p> tags after each <li> tag, do I have to manually edit the HTML (in Source mode)? I am not able to insert the <p> tags to lists in Author mode, but maybe I am missing something.

Ioana_St
Inspiring
December 18, 2018

The <p> tags are added if you apply the style Normal on the list.

(That is, assuming a <p> style is defined in your CSS, but I am going to assume you have one. Basically, the <p> style in the CSS is displayed in RoboHelp under the name Normal.)

Peter Grainge
Community Expert
Community Expert
December 12, 2018

Open the CSS in a text editor and find the OL and UL styles.

Add a margin left definition where nn is the number you want.

ol,{

    margin-left: nnpx;  

}

The adding a paragraph style as Ioana has suggested, also the method I have used in the past, will also work and has the advantage it also ensures the font is whatever you want. Without that the user will get the default font defined for their browser which might not be what you want them to see. The correct method would be to add the font definition to the OL and UL definitions as well.

This can also be done using RoboHelp's inbullt CSS editor.


See www.grainge.org for free RoboHelp and Authoring information.

@petergrainge

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.
Ioana_St
Inspiring
December 12, 2018

As far as I know, you can't change the behavior of the button.

We edit the HTML manually to get the structure you describe - basically, we make "List item two" and "Paragraph after list item two" part of the same list item.

Initially, we add numbering to the paragraph as well, so the list looks like this (the paragraph is step 3):

<ol>

<li><p>List item one</p></li>

<li><p>List item two</p></li>

<li><p>Paragraph after list item two</p></li>

</ol>

Then we merge the last two lines, by deleting the tags in red, so you get this HTML - two paragraphs inside the same list item:

<ol>

<li><p>List item one</p></li>

<li><p>List item two</p>

<p>Paragraph after list item two</p></li>

</ol>

For this to work, you need those <p> tags on each row. This means that, after you insert a list, you need to add the Normal style to all the items (from the Author view).

But of course, this means that you need to mess with the HTML, which may not be something you want to do. Maybe someone knows of a solution for the visual editor as well.

djuliebAuthor
New Participant
December 12, 2018

Thanks. I'll probably go with this approach. I was hoping to take advantage of the UI to make is simpler on those learning/using the tool and on me for CSS maintenance.