How to center images

Hi there,

How do I center images in RAB?

I am aware that the <P> and <DIV> tag works for the about page, but they don’t work in USFM. How do I do this in books? Specifically, I am trying to center images in the Introduction section, using USFM. FOr example, this is what I have so far. It shows the image on the left:

\ili  2.	Toque el símbolo del menú. Está en la parte superior izquierda. Tiene esta forma:
\ili \fig |Hamburger50x50edited.jpg|span||||\fig*

I tried looking at the RAB PDF and the USFM documentation but couldn’t find anything. Is image alignment a common need for RAB?

Thanks so much!

Your \ili markers all format a paragraph the same way, with the left margin of the paragraph where the numbers are. Check out the definition in the Styles tool:

So your images are all aligning at the left because you are using the \ili paragraph style. Try using the \pc marker (Centered Paragraph) for your images and they will be more centered in the layout. But that probably will be centered left to right, not taking into account the indent of the intro lists. You could also use a new marker (maybe something like \ilic, for Centered Intro List), then define the characteristics for that style when it appears in the Custom Styles tab. For example, you might want the left margin of \ili, but still have it centered between that and the right margin.

Hope that gets you pointed in the right direction…

Thanks so much! That’s a huge help.

I tried creating a custom class using your suggested \ilic. I also tried naming it div.ilic which also comes out as \ilic. However, neither of those options worked.

However, since I was not using \ili3, I modified its styling to be the same as \ili, except centered. Then for lines with graphics, I used the \ili3 marker. Worked like a charm!

Thanks again,


1 Like