-----Original Message----- From: news [mailto:n...@ger.gmane.org] On Behalf Of Joe Smith Sent: Tuesday, December 09, 2008 3:28 PM To: users@openoffice.org Subject: [users] Re: WRITER: Search for Special Characters, Invisible Characters, Character Styles, Markers of Type X
VLM TechSubs wrote: > We are exploring the search (ctrl-f) function in Writer. We see how to > search for many things, but not yet for special characters (em dash, > ellipsis), invisible characters (end of paragraph and the like), > character styles, or for, say, markers of a given type. You've lumped some concepts together that involve different approaches. * Special characters: You can always enter the literal character you want to search for, although it can be a challenge to enter characters that don't appear on the keyboard. You can open the Insert > Special Character dialog for most text entry fields with a shortcut (Ctrl+Shift+S on Linux & Windows), but not every character can be entered using the Special Character dialog, unfortunately. * Invisible characters: Most of these are literal characters in the document and work as described above. You can search for any actual character that appears in the document by entering it in the Search For field--as long as you can figure out how to type it. Here's a couple of examples: Tab -- Can't be typed in a dialog, although it can entered by its code in Linux, but not Windows. You can copy it from your text and paste it into the search box on any platform. The special characters under Insert > Formatting Mark all work similar to tab. There are two that are 'almost characters': line breaks and paragraph breaks. They behave in some ways like actual characters in the text, even though they aren't literally characters in the text. You have to search for these using OOo's "regular expressions" (wildcard patterns). Set the Option > Regular expressions: ON. You can search for line breaks using the pattern \n, or paragraph breaks with $. Line breaks almost always behave like simple characters; paragraph breaks only behave like simple characters if you search for the pattern $ all by itself. Regular expressions also provide codes for other special characters either by name (tab: \t) or by character code (tab: \x0009) Character Styles: There is no way to search for character styles by name, although you can search for the formatting they specify (Options > Including Styles: YES). You can support adding this feature to OOo by registering and voting for: Allow search and replace of character styles in "Find and Replace" http://qa.openoffice.org/issues/show_bug.cgi?id=2997 You can search for paragraph styles by name. > I do see the checkbox for "Search for Styles", but this seems only to > make available paragraph styles and nothing else. It works for formatting derived from character styles as well. Because the Find and Replace dialog tries to be 'smart' about adjusting itself to the type of search you want, getting the desired combination of options and settings can be a challenge. It seems to depend on the exact order that you select things and what (if anything) is in the Search for box. > I feel certain we are simply missing something. How can we conduct > such searches? One unusual feature of OOo's Find and Replace is that it is "non-modal." I.e. you can switch between the dialog and the document at any time. This leads to some very handy functionality that isn't built in to the F&R dialog itself. E.g. you can search for a pattern of characters, click "Find All", then simply set the formatting for each matching text using the normal Writer interface. You can also do combined searches by using the "Current selection only" option. E.g. you could search for "the first word of all level 2 headings". Here are two good sources of information for Regular Expression use and syntax: Regular Expressions in Writer http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expre ssions_in_Writer Regular expression samples http://www.oooninja.com/2007/12/example-regular-expressions-for-writer.html I'm sure there is an issue for adding "MS compatible" wildcard support, but I can't find it. Many things that you can't directly search for can be located using the Navigator (F5): graphics, tables, frames, links, etc. Some things, e.g. fields, have special navigation buttons in their settings dialogs that allow stepping through each occurrence in the document. I agree: the user interface for all this is rather disorganized and awkward in many places, but there is a lot of good functionality once you know where to look. <Joe --------------------------------------------------------------------- Hi Joe, What an incredible response, thank you so very much!! I will go through these various ideas one by one and try them all, of course. I feel a concern, as you express in your last paragraph: I prefer not to train authors to this degree. Rather, I prefer to provide them with an environment that encourages them to focus upon, well, authoring. :) Best regards, Elchanan --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@openoffice.org For additional commands, e-mail: users-h...@openoffice.org