# Small Capitals shortcut or icon [closed]

In Writer there is a character format style called Small Capitals, which some of us employ constantly, for instance, to render a better view of roman numerals like in centuries. So, I wonder if there is a shortcut I can use, or even an icon I can put in the toolbar.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2016-02-25 00:18:55.119061

Sort by » oldest newest most voted

You can do this with a macro. I think you need to do this with a macro, in fact, because I can't see where this feature can be found in the Tools > Customise... options. If you haven't recorded a macro with LibO before, you might need some help to find out how, and that link should point in the right direction.

Meanwhile, I tried this myself, and here's what I came up with: first, recorded the macro; then, assigned it to the toolbar. If you want to see if my macro does the job for you, try this (it should only take about five minutes):

1. Set up macro

1. Click on Tools > Macros > Organise macros > LibreOffice Basic... (a new window opens).
2. In the left-hand box, you should see "[+] My Macros". Open that up by clicking on the "plus" sign to get "[+] Standard", open it and see "Module 1", now click on it. You should now see "Main" listed in the right-hand box, "Existing macros in: Module 1".
3. Click on "Main" in the right-hand box, and now the "Edit" button to the right of it. A new window opens, and in the main text area, you should see "Sub Main" followed a blank line later by "End Sub". Good.
4. Now we need to get the LO Basic code -- the macro itself -- to paste in below that "End Sub" line. I have saved this as a "gist" on Gitub, but go to the raw version, hit CTRL-A to select all, then CTRL-C to copy to clipboard.
5. Return to the LibreOffice Macro editor, position your cursor under the "End Sub" line, then hit CTRL-V to paste it in. Press CTRL-S to save it.
6. Close the Macro editor.

Now when you go to Tools > Macros > Organise macros > LibreOffice Basic... (and My Macros > Standard > Module 1) again, you will see SmallCapsStart and SmallCapsStop listed below Main (along with any other macros you might already have made). Good. It worked!

2. Assign to Toolbar

1. Go to Tools > Customise..., then choose the "Toolbars" tab in the new dialog that opens.
2. Choose which toolbar you want these to appear in: to me, it makes most sense to include it with the "Formatting" options, so find that one on the Toolbar drop-down.
3. Click the "Add..." button on the right, go to the bottom of the list on the left, "LibreOffice Macros", and click it so that ...
more

1

Great guide. You should also be able to create a new character style (e.g., "Small capitals") that either has the required Font effect enabled or uses the graphite feature (e.g., Linux Libertine G:c2sc or Linux Libertine G:smcp for upper-case or lower-case respectively). This style will then show up under Tools > Customize > Keyboard > Category of "Styles|Character" for assigning to a key combination.

( 2013-08-26 03:03:33 +0100 )edit

This macro works as intended. I didn't know the font you mentioned, but it looks great: already installed it (from Ubuntu repos) and trying for my documents. Thanks for your time.

( 2013-08-26 03:08:00 +0100 )edit

@oweng = I considered the character style approach, but wasn't sure if it specified too much (e.g., font-family, size, etc.) and thought the macro was more "agnostic". But if the use case meant those factors were defined and stable, then the style approach would certainly be faster/easier to implement.

( 2013-08-26 08:38:04 +0100 )edit

It's a pity this isn't implemented in the software itself (so you can have one single key combination that toggles this, like for italics or bold), but barring that this is a great solution. Thanks for taking the trouble.

( 2014-08-22 21:52:21 +0100 )edit

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Apart from the great answer @David gave, there is a nice quick and dirty how-to from Brian

Short description:

• format a word as small caps
• mark it and define a new character style
• use "Fill Format Mode" button and simply click on every word or sentence

In my eyes very nice for just a few words to be renamed.

more