On 21.05.16 18:15, Guenter Milde wrote: > On 2016-05-21, mn wrote: >> Currently it seems quite difficult to get the search function to really >> find everything that might be in a lyx-document. > >> One example: >> Open a new document, language is set to English. >> Enter a word enclosed in smart quotes. >> Change document language to German with the corresponding smart quotes. > > (it actually suffices to change the smart quotes) > >> Enter a word enclosed with smart quotes. >> Enter a third word, this time enclosing it with direct quotes (Opt-^ / >> Opt-2) > > This is a locale/system specific input. I assume you mean insert the Unicode > characters „ and “ (here on Linux with locale de-UTF8 it is AltGr-V AltGr-B). > Yes. In any case: this is the direct-input I meant.
>> This results in the following source: >> ``word'' ,,word`` \quotedblbase word\textquotedblleft{} > > This is not the LyX source, it is the LaTeX source which also depends on > document settings: > With Document>Settings>Language>LaTeX encoding Unicode (utf8), this becomes > > ``word'' ,,word`` „word“ > > In the source view pane, you can also set the "format" to LyX to see the LyX > source (or open the file in a text editor). > > Then you realize that this is still inconsistent: > > * smart quotes are converted to LyX insets, e.g. «Wort becomes > > \begin_inset Quotes fld > \end_inset > > Wort > > (a relict from pre-Unicode times) while > > * Unicode quotes are stored as Unicode (fine). > > Also the different export via pseudo-ligatures (`` '') or LICR macros is > inconsistent. > These inconsistencies are there, working as designed, I assumed, for reasons I missed. (Historical) For new documents I strive to have a completely streamlined unicode toolchain. [Whistling while waiting for full biblatex-support… ;) ] > This might be worth a bug report. > Thanks, I was looking for exactly this kind of feedback, also to clarify thoughts and words for such a report. Will this be classified as a bug or an enhancement request? >> When you open the search panel and enter the key-combo used for >> smart-quotes you will get the "ascii-quote" sign and will not find anything. >> When entering the direct German closing quote, you will only find >> \textquotedblleft{}, but not ``. > > Because you find the Unicode character but not the "pseudo-ligature" > (conversion to typographical quotes is done at the font level). > Precisely. >> The ‘smart’-quotes are invisible to search? > > I don't know whether they are found via some "inset name". > > I'd like to see a regexp search, then I could search for > "some .+word.+ and follwing text". > Given the *nix-background of most of the devs I am puzzled why it wasn’t included already. > But this special case would be solved as a nice side effect when the > "smart quote" feature inserts appropriate Unicode characters instead of > the legacy insets from pre-Unicode times. +1 > >> But wouldn’t it be a treat to start it by enhancing the source view with >> a find-in-source facility? > > Which source LyX/LaTeX/HTML/...? All of them? I imagined find-in-source as the least intrusive approach and I am still unsure where this would make the most sense. It does’t matter to me where this is implemented. Ultimately, I like to be able to find everything by using a search and not by close-reading the whole document and the different source-views when revising a document. ERT, formatting-instructions, you name it. Also, basically most of the stuff Insert-menu offers: All hard to find by themselves. Now, where is that next margin-note again? greetings Mike