To draw reader’s attention to important paragraph, it is usual to display an icon in the left or right margin. I know of 3 ways of doing that:
1. Table
You create a 2-column table.
The icon is inserted in the first cell and text is written in the right cell.
Each cell can have its own formatting and the icon can be vertically centered against its companion text.
The table border can be used to advertise the extent of the decorated text.
2. Picture anchored at paragraph
A picture is inserted from a file and its position is set from Format->Picture.
For example, anchored “To paragraph”, -1cm “From left paragraph border”, vertically centered.in the paragraph text area
The picture itself may be copied into the document as Graphic999 or linked to the external file.
3. List style
A new list style is created and customised in the Options tab: “Numbering” = Graphics, “Graphics” point to the file. but “Alignment” is limited to positions on the first line (said otherwise, it cannot be vertically centered on the paragraph – it is equivalent to a number or a bullet).
What I need
I want to design a paragraph style which associates some text with a margin icon and be able to change the icon in a single place for all occurrences of this style.
Solutions 1 and 2 above duplicate the picture as many times as there are occurrences, which means the necessity to change the pictures one by one. With solution 3, the icon is considered a character in the first line which changes the vertical height of this first line and causes ugly wrapping around the icon if text is long (unless the icon is flushed in the left margin, but it does not change the first line height issue).
Unsatisfactory solution
Solution 2 above may be mitigated using an indirect link: the file name in the “Picture” tab of the Format->Picture dialog is a “link” file, e.g. pict.lnk.
The real picture is defined from this link with shell command
ln -s the/real/picture.png pict.lnk
When I want to change the icon, I only change the symbolic link.
However, this is not satisfactory:
- The link is external to the LO document and there is the risk to forget to transmit it with the document, or even to forget what it’s used for.
- Two files must always be kept with the document: the link and the picture files; their number grow with the number of “styles”.
- The icon is inserted just like any other character, it is not inherent to the paragraph style.
Is there a solution where a single instance of the picture is kept in the LO document with an easy-to-change field definition?