Thanks. That’s “fix up each and every occurrence manually and interactively after the event”. (Workaround. And error-prone if there are many instances, multiple editors, extended time periods, etc.)
From a deeper perspective, I’m also (in parallel, if you like) wondering about LO supporting this via styling, so that the styling works automatically, including when the document is being maintained and edited and changed over an extended period, perhaps by several quite independent people.
Not a perfect workaround, but…
Deleting the first character, and choosing a character numbering, with a character style, does it. First letter styling.odt (12.1 KB)
The immediate issue (in ITIL terms, the “incident”), and workaround for the user (me) to make progress on it. And your idea, @LeroyG, looks like a useful way forward in my particular “alphabetic acrostic” case. (There’s a more obscure sub-issue in my own case. This particular “alphabetic acrostic” has another constraint of requiring the omission of four letters scattered across the text; the source for the translation Hebrew which is only 22 letters rather than 26. So at four points, a letter needs to be omitted. But I like the idea, and the thought leading to it. Thanks. It so happens that I’m choosing to hack it manually).
An underlying weakness that requires deeper examination and work to address (in ITIL terms, the “problem”). Addressing this will assist future users who find they want something similar. I’m intending to propose a feature request. And, if there is agreement in principle, I would consider downloading the code and drafting a pull-request (or gerrit’s equivalent of such a thing… I’m very familiar with git but know nothing yet of gerrit).
Keep explicitly the line(s) for the to-be-skipped-letters. Just enter a verse/item containing a dash or other convenient “flag”.
Select from the position before the paragraph mark of the preceding list item to the position before the current paragraph mark. The selection contains the previous paragraph mark, the numbering letter and your flag.
Format>Paragraph: in Indents & Spacing, make sure spacing above and below are zero
Format>Character
in Font, reduce size to 2pt; don’t touch anything else
in Font>Effects, set Font color to white (or the colour of your final document background)
Since you’ll probably reuse this formatting, it may be convenient to record them in a single paragraph style. In this case, you need not make the convoluted selection above. Just apply your style to the to-be-skipped item and you’re done.
Another workaround: The character font effect of that paragraphs can be set to [x] Hidden, this way there is no need to guess the list number from which to restart.
Take care to define a dedicated paragraph style. I didn’t check if application of a character formatting or style would also affect the “number”. This is why in my hack I told to select from the previous para mark to the next in order to operate on the number.
Hidden has frequently unexpected effects on text flow. A hidden list item is ignored, i.e. it is exactly the same as if it were not present. This means numbering will not be skipped. I had to find a workaround 1 or 2 years ago while helping a user.
Partly. This is the dropcap feature. But it won’t give the result you expect because it can’t be reduced to operate on only one line.
You configure it in the Drop Caps tab of paragraph style configuration. You associate a character style to the drop cap to format it differently than default. This style can be built-in Drop Caps.
In the example above, if your verses are paragraphs, enable drop cap. The selected character style will be automatically applied to the first letter (if so configured). Note you can’t modify font size. So use other attributes to highlight your first letter.
If your paragraph contain multiple verses (separated by line breaks Ctl+Enter, add a tab after it to indent the second line and have a blank space betwee the 2-line drop cap and the verse. Customise Before text indent and First line indent to create a hanging indent.
The screenshot of the example shows a 2-line paragraph with tab and a 1-line verse. Next is a long paragraph without tab in the second line resulting in a weird look.
a) Wrong. Drop Caps by default is not associated to the feature. You must select it yourself. By itself, it does nothing because it is not activated.
b) Drop Caps can be modified any way you like. When used with the dropcap feature, only font size becomes ineffective because glyph resizing is managed dynamically.
Don’t do that. Direct formatting is the root of all evil. Instead, apply character styles.
That’s basically correct, but if the line is the only one of the paragraph, the dropcap will automatically be reduced to one line.
See also the text in the attached example with additional remarks.
(Remins the missing alignment for the second character…) disask_129315_1_line_dropcaps.odt (19.0 KB)
The actual behaviour is too complicated as to be describable by me.
Absolutely! I really want to get this right structurally, so I really want to adopt the “styles” workflow in both creation and subsequent editing and maintenance. My day-job has involved significant software engineering, so working cleanly with programming concepts is dear to my heart.
I new to working at this sort of level with LO, but want to “get it right”. I had mentioned the CSS ::first-letter analogy because that’s working cleanly for me in the original web version of this project. So my starting point is looking for something in LO that feels structurally similar to that CSS, because that’s exactly the concept I’m after: for these sort of poetry-viewpoint verse-lines (probably represented in LO as “paragraphs”), can I apply visual emphasis to the first letter? A sufficient minimum for that “visual emphasis” is simply “bold”.
This is the dropcap feature. It is configured in the Drop Caps tab of any paragraph style. You can assign a character style to the effect to make it different from general paragraph formatting.
Unfortunately, there are two limitations:
the feature takes ownership of the dropcap size, i.e. font size specified in the character style is ignored
if the paragraph has only one line (or more generally fewer lines than what is requested by the settings), the number of lines for the dropcap is reduced to the number of lines in the paragraph
In other words, with a single line verse, your drop cap has the same height as the rest of the line. You can only play with weight, face or colour. See the second paragraph in my sample or screenshot.
Yes, I could look into attempting it. But while all my software work has been on UNIX/Linux, my LibreOffice is WIndows-11, an environment where I have never done any software development at all!
But prior to that we need to clarify:
have I simply overlooked a facility that is already there?
is my request a bug… in which case “fix” is the right way forward
is my request a new feature… in which case does it need a proposal/discussion, and where?
Thanks for the encouragement to take the next steps.
The dropcap feature is implemented according to traditional typography where the first letter (or word) is “inset” inside the paragraph for a given number of lines. Consequently, the height is computed internally by the feature and overrides whatever is specified in the character style.
Your need is a bit different. It is not a “dropcap” because you want the first character to protrude over the first line.
I think a similar technique could be implemented using some parameters from the dropcap such as number of letters or words to consider, application of a character style but without font size override. The “protruding” letter would be aligned on the same base line as the rest.
The requirement here is simple “automatic” application of a character style from configuration in the paragraph style.
There are a few ways of applying a character style: as you type, block select and then apply, Find and Replace the first letter of every line break out paragraph. All described here.
Or you could use drop caps as defined by @ajlittoz
You could add yourself to the CC list for the drop cap for single line bug report, this increases the weight of the report which can make it more likely to attract the attention of a developer
OK. Where, please, should I raise the proposal? Is there a development forum? (I’m new to this level of interaction with LO.)
BTW, I’m not really after protrusion. Merely applying existing styling character-style techniques (bold, italic, colour, etc.) in a “first-letter” or “first-word” paragraph style… the sort of thing that novice users would do as they type with the “bold” and “italic” buttons, but ideally (and especially on a larger, more systematic scale) should be done with styling.
I had come to Drop Caps simply because it was vaguely close and already there. But I’m happy to have this independent of Drop Caps (although I realise there is probably some overlap). So rather than thinking “start from Drop Caps and adapt”, instead think “independent but being aware of potential interaction with existing DC mechanism”.