Spell check marks LO filenames but not others

Every time I refer to an LO filename (ODT, ODS, ODG, etc.) in a Writer document, the spell-check always marks the name with a red squiggly line. But it accepts all filenames that end with other suffixes, like TXT or DOCX. This is annoying to me because I frequently have references to other document files in my documents and the spurious spelling error marks are distracting. Disabling spell-check is not an acceptable answer. Try out the following test line.

Files: trees.txt, trees.odt, trees.docx

Now isn’t that interesting. Even here in the post editor, the system flags trees.odt but not the other two filenames. It seems to me that LO should always be aware of its own filename suffixes and apply spell-check rules only to the base filename.

I can fix it by adding each filename to the dictionary, but that is tedious and silly. Anyone know of a more permanent solution?

I’m using LO version 7.5.5.2 on MacOS 11.7.10.

You could create a character style based on No Character style. Name it FileName or something relevant. After it has been created, right click on the FileName character style, select Edit style, and in the tab Font > Western set the language to [None].

For each filename select the text and double-click the FileName character style to apply it. The selected text will not be spell checked.

To make it easier to apply, consider making a keyboard shortcut in Tools > Customise > Keyboard. Under Categories select Styles > Character, choose FileName, select a free shortcut, e.g. Ctrl+F, then press the Assign button

1 Like

I don’t experience this in 24.8.6.1 under Fedora 41 (you didn’t mention your version nor PS): all filenames are flagged. I think it comes from the lack of space after the dot. This is correct syntax for a filename+extension but not for a sentence where a space is expected after a punctuation. The lack of space makes “trees” invalid though it is in the spelling dictionary.

I remind you that Writer targets “literary” text, not technical papers. This explains the behaviour when a space is missing.

The strange thing in your question is the acceptance of .txt or .docx. What is the exact context?

I’m running LO version 7.5.5.2, MacOS 11.7.10. The context is a Writer document that contains the test line I noted originally. If you were expecting more contextual information, please let me know what I left out.

Here’s a link to an ODT file that shows the issue. The file includes an image of how the line appears on my computer.

Unfortunately a screenshot does not show all information (notably formatting), all the more since you didn’t enable View>Formatting Marks. Please attach the corresponding file (the one with “trees.odt” singled out with the red wavy line). Note that the full filename is underline, not only “odt”.

What I find strange is singling out “.odt”. This makes me suspect that you have a non-trivial formatting. I’d like to analyse it.

@ajlittoz it’s not a screenshot, it’s a downloadable ODT with a text plus screenshot embedded.

@Bigleaf which spell checker do you use? Is this LanguageTool maybe? Or something else? Because with the default built-in en-US spell checker, it underlines all three filenames on my system (I also added a deliberately misspelled word, just in case):

image

If you make a screenshot with the context menu on the underlined word shown, it could help.

Same for me: all three are flagged as already mentioned. Provide the original test file (the one with a single flagged occurrence).

I removed parts of the original file that I am unwilling to share publicly. The edited file shows exactly the same behavior for me as the original does.

Just to clarify, spell-check never underlined only the suffixes. It always underlines the full filename. The pattern I noticed is that it does not flag filenames with .txt or .docx suffixes. My testing was not exhaustive. There might be other file types that spell-check does or does not underline.

I am fairly certain I am using the built-in spell-checker. I don’t know what LanguageTool is.

Constant behaviour here: all three filenames with .txt, .odt and .docx are flagged. Your file is typical of a DOCX origin: everything except headings is Default Paragraph Style (which should not be used in an .odt document). Your list is direct formatting and you vertically space with empty paragraphs.

Since the document shows as expected here, I suspect you have some custom configuration issue on your side. Not flagging ffff.txt not ffff.docx is not normal. You have no language-related direct formatting on the filenames (no direct formatting at all in fact).

Have you perhaps a Tools>AutoCorrect>AutoCorrect Options special replacement table targetting .txt and .docx? Check also Tools>Options (it is the Preferences menu under MacOS), LO Writer>Compatibilyt though I didn’t see any relevant item.

autocorr-replace

I looked at Tools>AutoCorrect>AutoCorrect Options and found only one replacement table that I can see on the Autocorrect dialog. But I wouldn’t know where to look for a custom table. It had a few entries starting with dot, but none were file suffix patterns.

I do add words to the dictionary. When I create odd names in a story, spell-check always flags them and I add those names. But I don’t see those in the AutoCorrect replace table. Again, don’t know where to look, and I’ve tried searching. Both Google and LO sites give me articles on creating dictionaries in other languages, but never say outright where I can find and edit whatever dictionary gets updated when I select “Add word to dictionary”.

Under LO Writer Compatibility options, the only odd item was “Add paragraph and table spacing at bottom of table cells.” It has a dash instead of a checkmark, which isn’t relevant to spelling.

I’m also a bit flustered by your comments on DOCX and Default Paragraph Style. For the most part, I’ve used LO out-of-the-box. I don’t create new documents in DOCX format. I always start with ODT, and the default paragraph style has always been Default Paragraph Style. If I should never use it, then why does it even exist, and what is the preferred style?

The most customization I’ve done is to make two doc templates, and that took me years to learn. I’ve also added a few styles (paragraph and bullets).

Thanks for your help. Sorry if I sound ungrateful. I’m just frustrated.

Paragraph and character styles in Writer are organised in a tree-like structure. Default Paragraph Style (DFS) is the ultimate ancestor of all other paragraph styles. What you configure in DFS is also shared by the other styles (unless the attribute is explicitly overridden). This makes it very handy to give a personal look to your document. There are additional “intermediate ancestors” in the tree for groups of style, like Heading for all Heading n.

This allows for a very versatile, easy, powerfule and “comfortable” way of tuning your formatting and layout when you’re accustomed to it.

Since modifying DFS impact all other styles, another “default” style is needed for your main discourse. This is the role of Body Text which is itself another “intermediate ancestor” for a bunch of styles including List xxx, Numbering yyy and a lot of others.

This is fundamentally different from M$ Word where Default is the style for your main topic. But Word is much less sophisticated (and less versatile) when it comes to formatting.

These additions are not listed in AutoCorrect replacement table. It is then possible you have trees.txt and tress.docx in your spelling exceptions and this would explain the behaviour.