[Solved] Custom captions with mixed text formatting

Discuss the word processor
Post Reply
mmendez534
Posts: 12
Joined: Mon Jan 21, 2008 7:46 am

[Solved] Custom captions with mixed text formatting

Post by mmendez534 »

Hi,
Here is what I need to do.
When I insert a picture I would like to insert a caption for it but so far it seems it has to be a special kind. It needs to have mixed formatting, it should read like this:

Figure 1.Description of Figure 1.

I need the "Figure 1." to be bold and the "Description of Figure 1." to be regular, and I also need a box around everything.

If a caption does not work thats fine as long as I can draw a box around the picture and the text I will write as the caption.

Thanks a lot,
Manuel Mendez
Last edited by mmendez534 on Tue Feb 05, 2008 1:40 am, edited 1 time in total.
pitonyak
Volunteer
Posts: 186
Joined: Sun Oct 07, 2007 9:13 pm
Location: Columbus, Ohio, USA

Re: custom captions with mixed text formatting

Post by pitonyak »

When the figure is inserted, especially when inserted automatically, it will not have special formatting. When I desire special formatting such as this, I manually inset the formatting after I insert the caption. If absolutely needed, you could do something annoying like write a macro to set the formatting you desire. Even though I am very good at writing macros, I usually format things manually using Character Styles if I desire this in my captions.
Andrew Pitonyak
http://www.pitonyak.org/oo.php
LO and AOO on Fedora
mmendez534
Posts: 12
Joined: Mon Jan 21, 2008 7:46 am

Re: custom captions with mixed text formatting

Post by mmendez534 »

could you give me any pointers on how to go about doing my own formatting, so far I could not figure out how to make a box around the picture and the text that I would use as the "caption"
User avatar
Hagar Delest
Moderator
Posts: 33633
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: custom captions with mixed text formatting

Post by Hagar Delest »

There is also the AutoText feature: insert a table for example (to have the borders you need), with one column and 2 rows. In one of the rows, insert the caption and format it the way you want. For the number, use a Number range field (CTRL+F2, Variables tab). Type a fake description after the bold part. Select the table and Insert>AutoText, give a name, a shortcut and button AutoText>New (or something like that).

Then, when you need such caption, just type the shortcut as text and hit F3, if you've used the field for the number, it will update automatically.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Bill
Volunteer
Posts: 8952
Joined: Sat Nov 24, 2007 6:48 am

Re: custom captions with mixed text formatting

Post by Bill »

mmendez534 wrote:Hi,
Here is what I need to do.
When I insert a picture I would like to insert a caption for it but so far it seems it has to be a special kind. It needs to have mixed formatting, it should read like this:

Figure 1.Description of Figure 1.

I need the "Figure 1." to be bold and the "Description of Figure 1." to be regular, ...
This can be done by modifying Autocaptioning options and the Caption paragraph style. Select Tools > Options > OpenOffice.org Writer > Autocaption. Check the box to turn on autocaptioning for OpenOffice.org Picture. In the Category box, change "Illustration" to "Figure" (changes the caption label). In the Character style box, change "None" to "Strong emphasis" (makes the label bold). Check the option to Apply border and shadow (applies the border specified in the Graphics frame style to the combined picture and caption) then click OK to close the dialog.

If you want regular typeface instead of italic in the caption, you need to modify the Caption paragraph style. Press F11 to open the Styles and Formatting window. Click the first icon at the top of the window to select Paragraph styles. Select "All Styles" from the drop-down list at the bottom of the window. Right-click on the Caption paragraph style in the list of styles and select Modify. On the Font tab of the Paragraph Style dialog, change the typeface from Italic to Regular then click OK to close the dialog.
mmendez534 wrote:...and I also need a box around everything.
This can be done by modifying the Graphics frame style which is used for pictures. In the Styles and Formatting window (F11), click the third icon at the top to select Frame styles. Right click the Graphics style and select Modify. On the Borders tab of the Frame Style dialog, click the second default line arrangement which will place lines on all sides of the picture. You can also change the line style and the spacing between the lines and the picture.
mmendez534
Posts: 12
Joined: Mon Jan 21, 2008 7:46 am

Re: [SOLVED] custom captions with mixed text formatting

Post by mmendez534 »

Thanks everyone for helping me out.
Bill your method worked great, thanks. I would like to invite you to help me out with related question in the hope that you will be able to solve that one as well.

Manny
Post Reply