Wildcard in autocorrect?

One of the features most obviously missing in LibreOffice Writer (or opaque to this user, at least) is the capacity to use a wildcard in auto-correct entries. For instance, if I attempt to set up an auto-correct entry to take three periods and change to an ellipsis (which is a standard typographical convention), it is not possible to type “[wildcard]…” and have the software do the auto-correct, as there is no wildcard. In auto-correct, there needs to be a space typed before the “…” for things to work, which issues in text that is just not proper typography. This is frustrating for a writer.

There are similar problems with convincing the software to perform an auto-correct on analogous text, e.g., try to set up an auto-correct to change “–” to an em dash at the end of a word, or between two words, and the auto-correct feature just will not work: a space has to be typed before the text, which is actually not the proper typographical convention.

This, it seems to me, would be most easily fixed by the simple expedient of having a wildcard available in the auto-correct feature. As it is, the auto-correct feature in Writer is simply unsatisfactory.

You can use the sequence .* in the input field “Replace” of Autocorrection settings from LibreOffice 4.2.4:

Enter the word or abbreviation that you want to replace while you type. Wildcard character sequence .* in the end of word results the replacement of the word before arbitrary suffixes, too. Wildcard character sequence .* before the word results the replacement after arbitrary prefixes, too. For example, the pattern “i18n.*” with the replacement text “internationalization” will find and replace “i18ns” with “internationalizations”, or the pattern “.*…” with the replacement text “…” will find and replace three dots in “word…” with the typographically correct precomposed Unicode horizontal ellipsis (“word…”).

If you want to forbid the repeating replacements (eg. adding only one non-breaking half-width space before exclamation marks in French), add the same replacement to the list, too ([U+202F] signs this character, the „ ”):

.*! → [U+202F]!

.*[U+202F]! → [U+202F]!

NOTE: before LibreOffice 4.2.4, this wildcard was only an * in LibreOffice 4.2. This character was changed to the sequence .* (dot asterisk, similar to the regular expression pattern) in LibreOffice 4.2.4.

While you may have a valid issue with regards to whether or not a wildcard character should be allowed in the autocorrect list, your use of the terms ‘proper typography’ and ‘proper typographical convention’ are IMO generalisations. Typography is a complex response to a situation at hand that involves the font in use as well as many other typesetting parameters. It depends on how the characters are drawn/designed in the font being used and the writing convention (style guide) employed.

I generally find that some sort of space is required prior to a HORIZONTAL ELLIPSIS (Ux2026) in most instances. For best results it is sometimes necessary to make use of one of the many forms of space in the General Punctuation range (Ux2000-2006f), such as THIN SPACE (Ux2009) or HAIR SPACE (Ux200a) in combination with the WORD JOINER (Ux2060) to prevent undesirable line breaking. Having said that, there are some instances where no spacing gives the desired appearance. The same applies for the EM DASH (Ux2014) and numerous other punctuation characters.

These are really typesetting matters that a publisher, rather than author, would be concerned about. Some examples of typographical opinions by experts on whether to include a space (or not) prior to an ellipsis can be found here and here.

That is helpful, thank you. However, as what I want to be able to do is thus confirmed as one, at least, of the conventions, it would be helpful still to know whether or not there is a work-around in Writer. I do find it odd that the extensive list of “regular expressions” that are so helpful in a complex search and replace cannot be called upon at all in auto-correct. The upshot is that the latter is hobbled.

I am a new user, however, so I may be missing something.

Check this answer ->(LO writer: insert special characters by shortcut keys - #7 by manj_k) and

(Special characters - #3 by manj_k)

May the answers there are adaptable to your situation.

Hi @beachycove,

Sounds like your best bet is to file an enhancement bug and ask for the ability to use regexp in Auto-correct. Don’t forget to mark your bug as an ‘enhancement’. The QA team will be happy to help you triage your feature request in the bugtracker.

Please post a link to any bugs you file in a comment below using the format “fdo#123456”.

Thanks!