Re: Global find and replace of straight quotes with proper curly quotes?
On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] , or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Richard
Re: Citation style 'Text after' separator
2012/4/13 Anne: I'm a bit of a lyx newb and I had the problem Sam Aaron had. So I pasted your TeX command (\def\@cite#1#2{[{#1\if at tempswa : #2\fi}]}) into the TeX box at the beginning of my lyx document. But I still get the comma instead of the colon though and I don't quite know why. The solution really depends what bibliography style (i.e., standard, natbib, jurabib or biblatex) you are using. You should give us some more information about that. BTW the above (which probably only works for standard) is mangled by the @-mapping of the mailing list. It really should read \def\@cite#1#2{[{#1\if@tempswa : #2\fi}]} Jürgen Many thanks! Anne
Re: Global find and replace of straight quotes with proper curly quotes?
On Sun, Apr 15, 2012 at 7:46 AM, Richard Heck rgh...@comcast.net wrote: On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] , or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Hi Richard, sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas AM University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Getting rid of You cannot type two spaces this way message?
On Wed, Apr 11, 2012 at 8:46 PM, Liviu Andronic landronim...@gmail.comwrote: On Wed, Apr 11, 2012 at 7:50 PM, Bill Foote bi...@jovial.com wrote: Is there an easy way for me to get rid of the You cannot ... Please read the tutorial message? I know that typing two spaces that way doesn't change the layout, and I'm more-or-less fine with LyX auto-deleting the space. I'm completely fine with TeX not changing the formatting based on extra spaces. With all that said, I'd prefer that LyX stop nagging. I know already! Start ignoring it. :) If you're an iPad or iPhone user like me it's hard to ignore such a message because in the iOS environment hitting double space is a natural and useful thing ... it inserts a fullstop and inter-sentence spacing so one's eye gaze is on the screen checking that the correct thing has happened or because one is a touch typist and that's where you look too. This is what I did. Besides, it's a good idea to always show it, so as to quickly and clearly explain new users what happens and why. LyX cannot know whether the user typing _knows_ it already or not. Except that I for one and I guess Bill for his need to comment are not new users of LyX. We don't need that sort of nanny state warning. Indeed if the key sequence has no meaning in LyX then I'd argue that there is absolutely no need for a message at all. Just have it drop the second space quietly and move on. Regards, Trevor. Re: deemed!
Re: Global find and replace of straight quotes with proper curly quotes?
On Sat, 14 Apr 2012 18:39:15 -0500 stefano franchi stefano.fran...@gmail.com wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. When you say source view, do you mean viewed in a text editor? My LyX 2.0.0 April 29, 2011 on Ubuntu 11.04 errored out when I put an ERT symbol of \texquotedbl into a document. In my LyX, when I put in a straight quote (Ctrl+Shift+), in Vim it's just an ascii doublequote. In my LyX, viewed in Vim, my curly quotes look like this: \begin_inset Quotes eld \end_inset phrase to be quoted \begin_inset Quotes erd \end_inset Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? Personally, I think this is a job for Vim. Or maybe a short program in awk, Perl, Python, Ruby or Lua. I just experimented with it, and assuming you can get your LyX to treat a straight quote as the ascii character (maybe by changing your fontenc), then I think the following two commands, within Vim, should do what you want: :%s/\(\s\)\(\S\)/\1\r\\begin_inset Quotes eld\r\\end_inset\r\r\2/gc :%s/\(\S\)\(\s\)/\1\r\\begin_inset Quotes erd\r\\end_inset\r\r\2/gc Note that the c on the end of each of those commands causes it to ask, on each one, whether it's OK to make the change. If you don't want to be asked, eliminate the trailing c on each command and they'll do the job in a matter of seconds for a 100K word book. Obviously, you'll need to back up the original in case my commands do more harm than good. Anyway, if you can get your LyX to treat straightdoublequotes like ascii characters, I'd anticipate this solution will take you a few minutes. As far as single quotes, I'd do those manually. If your writing is anything like mine, the VAST majority of single quotes are apostrophes, and as far as I know those SHOULD be straightquotes. From what I understand, you use straight double quotes only in a quotation within a quotation, which are rare. I'd seek out such instances, delete the straight single quote, and type in Ctrl+' to insert the proper curly quote. LyX knows by context whether to make it a beginning or ending singlequote. HTH SteveT
Re: numbering multi-line formulas
Hello again, I believe I didn't clear it out well. I meant a shortcut for the eqnarray not the equation numbering. The default of your stated functions are: math-number-line-toggle: Alt+M Shift+N math-number-toggle: Alt+M N both of which do the same thing; I already use the second one for numbering. Note: LyX 2.0.3 on Ubuntu 10.04 Thanks again On Fri 13 Apr 2012 07:24:59 PM EEST, David L. Johnson wrote: On 04/13/2012 08:32 AM, Merhebi, Bob wrote: Hello David, Thanks for your reply on this topic; I also benefited from this. One question though; isn't there a keyboard shortcut to use it instead of using the menus? You can define keyboard shortcuts to substitute for many, if not all, menu choices. I only use a few such shortcuts, and not for line numbering since I don't do that so often. Look under Tools Preferences Shortcuts Mathematical symbols, for math-number-line-toggle and math-number-toggle and assign them as you prefer. Another question is regarding fullscreen mode; the math toolbar pops out when I use Ctrl(+Shift)+M that's useful, but what about the main toolbar? is there a way to bring it out temporarily in fullscreen mode? I don't know. -- Sincerely Yours, -El Merehbi, Ibrahim (Bob) Thunderbird Signature
Re: Global find and replace of straight quotes with proper curly quotes?
HI Steve, On Sun, Apr 15, 2012 at 4:50 PM, Steve Litt sl...@troubleshooters.com wrote: On Sat, 14 Apr 2012 18:39:15 -0500 stefano franchi stefano.fran...@gmail.com wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. When you say source view, do you mean viewed in a text editor? No, I meant the LateX code you get to see with Lyx's own View Source command. In Lyx (not Latex) source code, they are just straight ascii double quotes My LyX 2.0.0 April 29, 2011 on Ubuntu 11.04 errored out when I put an ERT symbol of \texquotedbl into a document. In my LyX, when I put in a straight quote (Ctrl+Shift+), in Vim it's just an ascii doublequote. In my LyX, viewed in Vim, my curly quotes look like this: \begin_inset Quotes eld \end_inset phrase to be quoted \begin_inset Quotes erd \end_inset Same here Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? Personally, I think this is a job for Vim. Or maybe a short program in awk, Perl, Python, Ruby or Lua. I just experimented with it, and assuming you can get your LyX to treat a straight quote as the ascii character (maybe by changing your fontenc), then I think the following two commands, within Vim, should do what you want: :%s/\(\s\)\(\S\)/\1\r\\begin_inset Quotes eld\r\\end_inset\r\r\2/gc :%s/\(\S\)\(\s\)/\1\r\\begin_inset Quotes erd\r\\end_inset\r\r\2/gc That's pretty much what I was trying to do in Kile (even though my RegEx was way simpler than yours...) Unfortunately I cannot find a way to do it automatically, because there are instances where the straight double quotes are actually used by Lyx. So I guess I'll have to confirm every single one. Long night ahead (book is close to 300K words...) Thanks for confirming my hunch and providing the regex. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas AM University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Global find and replace of straight quotes with proper curly quotes?
stefano franchi writes: sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. Try inserting an empty ERT (Ctrl+L) and then a space. -- Enrico
Re: numbering multi-line formulas
On 04/15/2012 06:18 PM, El Merehbi, Ibrahim wrote: Hello again, I believe I didn't clear it out well. I meant a shortcut for the eqnarray not the equation numbering. Sorry, I misunderstood. Add to the shortcuts something like this: command-sequence math-mode on; math-mutate eqnarray; and link it to your favorite hot-key. I use F12. -- David L. Johnson A mathematician is a machine for turning coffee into theorems. -- Paul Erdos
Re: Global find and replace of straight quotes with proper curly quotes?
On 04/15/2012 12:13 PM, stefano franchi wrote: On Sun, Apr 15, 2012 at 7:46 AM, Richard Heckrgh...@comcast.net wrote: On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] , or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Hi Richard, sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. If you do the first thing I suggested, with the pointless regex, will that work? Richard
Re: Global find and replace of straight quotes with proper curly quotes?
On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] , or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Richard
Re: Citation style 'Text after' separator
2012/4/13 Anne: I'm a bit of a lyx newb and I had the problem Sam Aaron had. So I pasted your TeX command (\def\@cite#1#2{[{#1\if at tempswa : #2\fi}]}) into the TeX box at the beginning of my lyx document. But I still get the comma instead of the colon though and I don't quite know why. The solution really depends what bibliography style (i.e., standard, natbib, jurabib or biblatex) you are using. You should give us some more information about that. BTW the above (which probably only works for standard) is mangled by the @-mapping of the mailing list. It really should read \def\@cite#1#2{[{#1\if@tempswa : #2\fi}]} Jürgen Many thanks! Anne
Re: Global find and replace of straight quotes with proper curly quotes?
On Sun, Apr 15, 2012 at 7:46 AM, Richard Heck rgh...@comcast.net wrote: On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] , or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Hi Richard, sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas AM University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Getting rid of You cannot type two spaces this way message?
On Wed, Apr 11, 2012 at 8:46 PM, Liviu Andronic landronim...@gmail.comwrote: On Wed, Apr 11, 2012 at 7:50 PM, Bill Foote bi...@jovial.com wrote: Is there an easy way for me to get rid of the You cannot ... Please read the tutorial message? I know that typing two spaces that way doesn't change the layout, and I'm more-or-less fine with LyX auto-deleting the space. I'm completely fine with TeX not changing the formatting based on extra spaces. With all that said, I'd prefer that LyX stop nagging. I know already! Start ignoring it. :) If you're an iPad or iPhone user like me it's hard to ignore such a message because in the iOS environment hitting double space is a natural and useful thing ... it inserts a fullstop and inter-sentence spacing so one's eye gaze is on the screen checking that the correct thing has happened or because one is a touch typist and that's where you look too. This is what I did. Besides, it's a good idea to always show it, so as to quickly and clearly explain new users what happens and why. LyX cannot know whether the user typing _knows_ it already or not. Except that I for one and I guess Bill for his need to comment are not new users of LyX. We don't need that sort of nanny state warning. Indeed if the key sequence has no meaning in LyX then I'd argue that there is absolutely no need for a message at all. Just have it drop the second space quietly and move on. Regards, Trevor. Re: deemed!
Re: Global find and replace of straight quotes with proper curly quotes?
On Sat, 14 Apr 2012 18:39:15 -0500 stefano franchi stefano.fran...@gmail.com wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. When you say source view, do you mean viewed in a text editor? My LyX 2.0.0 April 29, 2011 on Ubuntu 11.04 errored out when I put an ERT symbol of \texquotedbl into a document. In my LyX, when I put in a straight quote (Ctrl+Shift+), in Vim it's just an ascii doublequote. In my LyX, viewed in Vim, my curly quotes look like this: \begin_inset Quotes eld \end_inset phrase to be quoted \begin_inset Quotes erd \end_inset Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? Personally, I think this is a job for Vim. Or maybe a short program in awk, Perl, Python, Ruby or Lua. I just experimented with it, and assuming you can get your LyX to treat a straight quote as the ascii character (maybe by changing your fontenc), then I think the following two commands, within Vim, should do what you want: :%s/\(\s\)\(\S\)/\1\r\\begin_inset Quotes eld\r\\end_inset\r\r\2/gc :%s/\(\S\)\(\s\)/\1\r\\begin_inset Quotes erd\r\\end_inset\r\r\2/gc Note that the c on the end of each of those commands causes it to ask, on each one, whether it's OK to make the change. If you don't want to be asked, eliminate the trailing c on each command and they'll do the job in a matter of seconds for a 100K word book. Obviously, you'll need to back up the original in case my commands do more harm than good. Anyway, if you can get your LyX to treat straightdoublequotes like ascii characters, I'd anticipate this solution will take you a few minutes. As far as single quotes, I'd do those manually. If your writing is anything like mine, the VAST majority of single quotes are apostrophes, and as far as I know those SHOULD be straightquotes. From what I understand, you use straight double quotes only in a quotation within a quotation, which are rare. I'd seek out such instances, delete the straight single quote, and type in Ctrl+' to insert the proper curly quote. LyX knows by context whether to make it a beginning or ending singlequote. HTH SteveT
Re: numbering multi-line formulas
Hello again, I believe I didn't clear it out well. I meant a shortcut for the eqnarray not the equation numbering. The default of your stated functions are: math-number-line-toggle: Alt+M Shift+N math-number-toggle: Alt+M N both of which do the same thing; I already use the second one for numbering. Note: LyX 2.0.3 on Ubuntu 10.04 Thanks again On Fri 13 Apr 2012 07:24:59 PM EEST, David L. Johnson wrote: On 04/13/2012 08:32 AM, Merhebi, Bob wrote: Hello David, Thanks for your reply on this topic; I also benefited from this. One question though; isn't there a keyboard shortcut to use it instead of using the menus? You can define keyboard shortcuts to substitute for many, if not all, menu choices. I only use a few such shortcuts, and not for line numbering since I don't do that so often. Look under Tools Preferences Shortcuts Mathematical symbols, for math-number-line-toggle and math-number-toggle and assign them as you prefer. Another question is regarding fullscreen mode; the math toolbar pops out when I use Ctrl(+Shift)+M that's useful, but what about the main toolbar? is there a way to bring it out temporarily in fullscreen mode? I don't know. -- Sincerely Yours, -El Merehbi, Ibrahim (Bob) Thunderbird Signature
Re: Global find and replace of straight quotes with proper curly quotes?
HI Steve, On Sun, Apr 15, 2012 at 4:50 PM, Steve Litt sl...@troubleshooters.com wrote: On Sat, 14 Apr 2012 18:39:15 -0500 stefano franchi stefano.fran...@gmail.com wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. When you say source view, do you mean viewed in a text editor? No, I meant the LateX code you get to see with Lyx's own View Source command. In Lyx (not Latex) source code, they are just straight ascii double quotes My LyX 2.0.0 April 29, 2011 on Ubuntu 11.04 errored out when I put an ERT symbol of \texquotedbl into a document. In my LyX, when I put in a straight quote (Ctrl+Shift+), in Vim it's just an ascii doublequote. In my LyX, viewed in Vim, my curly quotes look like this: \begin_inset Quotes eld \end_inset phrase to be quoted \begin_inset Quotes erd \end_inset Same here Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? Personally, I think this is a job for Vim. Or maybe a short program in awk, Perl, Python, Ruby or Lua. I just experimented with it, and assuming you can get your LyX to treat a straight quote as the ascii character (maybe by changing your fontenc), then I think the following two commands, within Vim, should do what you want: :%s/\(\s\)\(\S\)/\1\r\\begin_inset Quotes eld\r\\end_inset\r\r\2/gc :%s/\(\S\)\(\s\)/\1\r\\begin_inset Quotes erd\r\\end_inset\r\r\2/gc That's pretty much what I was trying to do in Kile (even though my RegEx was way simpler than yours...) Unfortunately I cannot find a way to do it automatically, because there are instances where the straight double quotes are actually used by Lyx. So I guess I'll have to confirm every single one. Long night ahead (book is close to 300K words...) Thanks for confirming my hunch and providing the regex. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas AM University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Global find and replace of straight quotes with proper curly quotes?
stefano franchi writes: sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. Try inserting an empty ERT (Ctrl+L) and then a space. -- Enrico
Re: numbering multi-line formulas
On 04/15/2012 06:18 PM, El Merehbi, Ibrahim wrote: Hello again, I believe I didn't clear it out well. I meant a shortcut for the eqnarray not the equation numbering. Sorry, I misunderstood. Add to the shortcuts something like this: command-sequence math-mode on; math-mutate eqnarray; and link it to your favorite hot-key. I use F12. -- David L. Johnson A mathematician is a machine for turning coffee into theorems. -- Paul Erdos
Re: Global find and replace of straight quotes with proper curly quotes?
On 04/15/2012 12:13 PM, stefano franchi wrote: On Sun, Apr 15, 2012 at 7:46 AM, Richard Heckrgh...@comcast.net wrote: On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] , or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Hi Richard, sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. If you do the first thing I suggested, with the pointless regex, will that work? Richard
Re: Global find and replace of straight quotes with proper curly quotes?
On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s" thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] ", or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Richard
Re: Citation style 'Text after' separator
2012/4/13 Anne: > I'm a bit of a lyx newb and I had the problem Sam Aaron had. So I pasted your > TeX command (\def\@cite#1#2{[{#1\if tempswa : #2\fi}]}) into the TeX box > at > the beginning of my lyx document. But I still get the comma instead of the > colon > though and I don't quite know why. The solution really depends what bibliography style (i.e., standard, natbib, jurabib or biblatex) you are using. You should give us some more information about that. BTW the above (which probably only works for standard) is mangled by the @-mapping of the mailing list. It really should read \def\@cite#1#2{[{#1\if@tempswa : #2\fi}]} Jürgen > Many thanks! > Anne
Re: Global find and replace of straight quotes with proper curly quotes?
On Sun, Apr 15, 2012 at 7:46 AM, Richard Heckwrote: > On 04/14/2012 07:39 PM, stefano franchi wrote: >> >> I have a (long) manuscript imported from Framemaker via Latex where >> all the quotation marks (both single and double) appear in Lyx as >> straight quotes instead of the properly curly ones. The source view, >> in fact, shows me countless \texquotedbl commands instead of regular >> quotes. >> >> Is there any way to do a global find and replace that would properly >> substitute opening straight quotes with open single|double quotes and >> viceversa for closing quotes? I could search and replace for >> space+quote(s) and, respectively for quote+space. That would work in >> most cases and I could fix the remaining issues by hand. I thought the >> new find and replace could manage, but: >> >> 1. I cannot do a simple find and replace for [space][quote] because I >> am not allowed to enter a space in the find area >> 2. I can search for reg expression \s" thereby finding most of the >> instances I'm looking for. But I cannot enter a space in the replace >> area, nor can I enter a regular expression in it (as the manual >> explains, reg expressions are not allowed in the replace area yet). >> 3. Using regular expressions as sketched above in an external editor >> breaks the lyx file, because straight quotes are needed for citation >> commands (and probably in other places as well. >> >> Any idea? >> > Try inserting into the Advanced Find field: [REGEX .*] ", or something like > that. The regex matches anything, or nothing, so is pointless, but it allows > you to enter the space. You could presumably also enter a user-defined regex > for a space: \s. Hi Richard, sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Getting rid of "You cannot type two spaces this way" message?
On Wed, Apr 11, 2012 at 8:46 PM, Liviu Andronicwrote: > On Wed, Apr 11, 2012 at 7:50 PM, Bill Foote wrote: > > Is there an easy way for me to get rid of the "You cannot ... Please > read the > > tutorial" message? I know that typing two spaces that way doesn't > change the > > layout, and I'm more-or-less fine with LyX auto-deleting the space. I'm > > completely fine with TeX not changing the formatting based on "extra" > spaces. > > With all that said, I'd prefer that LyX stop nagging. I know already! > > > Start ignoring it. :) If you're an iPad or iPhone user like me it's hard to ignore such a message because in the iOS environment hitting double space is a natural and useful thing ... it inserts a fullstop and inter-sentence spacing so one's eye gaze is on the screen checking that the correct thing has happened or because one is a touch typist and that's where you look too. > This is what I did. Besides, it's a good idea to > always show it, so as to quickly and clearly explain new users what > happens and why. LyX cannot know whether the user typing _knows_ it > already or not. > Except that I for one and I guess Bill for his need to comment are not new users of LyX. We don't need that sort of "nanny state" warning. Indeed if the key sequence has no meaning in LyX then I'd argue that there is absolutely no need for a message at all. Just have it drop the second space quietly and move on. Regards, Trevor. <>< Re: deemed!
Re: Global find and replace of straight quotes with proper curly quotes?
On Sat, 14 Apr 2012 18:39:15 -0500 stefano franchiwrote: > I have a (long) manuscript imported from Framemaker via Latex where > all the quotation marks (both single and double) appear in Lyx as > straight quotes instead of the properly curly ones. The source view, > in fact, shows me countless \texquotedbl commands instead of regular > quotes. When you say "source view", do you mean viewed in a text editor? My LyX 2.0.0 April 29, 2011 on Ubuntu 11.04 errored out when I put an ERT symbol of \texquotedbl into a document. In my LyX, when I put in a straight quote (Ctrl+Shift+"), in Vim it's just an ascii doublequote. In my LyX, viewed in Vim, my curly quotes look like this: \begin_inset Quotes eld \end_inset phrase to be quoted \begin_inset Quotes erd \end_inset > > Is there any way to do a global find and replace that would properly > substitute opening straight quotes with open single|double quotes and > viceversa for closing quotes? Personally, I think this is a job for Vim. Or maybe a short program in awk, Perl, Python, Ruby or Lua. I just experimented with it, and assuming you can get your LyX to treat a straight quote as the ascii character (maybe by changing your fontenc), then I think the following two commands, within Vim, should do what you want: :%s/\(\s\)"\(\S\)/\1\r\\begin_inset Quotes eld\r\\end_inset\r\r\2/gc :%s/\(\S\)"\(\s\)/\1\r\\begin_inset Quotes erd\r\\end_inset\r\r\2/gc Note that the c on the end of each of those commands causes it to ask, on each one, whether it's OK to make the change. If you don't want to be asked, eliminate the trailing c on each command and they'll do the job in a matter of seconds for a 100K word book. Obviously, you'll need to back up the original in case my commands do more harm than good. Anyway, if you can get your LyX to treat straightdoublequotes like ascii characters, I'd anticipate this solution will take you a few minutes. As far as single quotes, I'd do those manually. If your writing is anything like mine, the VAST majority of single quotes are apostrophes, and as far as I know those SHOULD be straightquotes. From what I understand, you use straight double quotes only in a quotation within a quotation, which are rare. I'd seek out such instances, delete the straight single quote, and type in Ctrl+' to insert the proper curly quote. LyX knows by context whether to make it a beginning or ending singlequote. HTH SteveT
Re: numbering multi-line formulas
Hello again, I believe I didn't clear it out well. I meant a shortcut for the "eqnarray" not the equation numbering. The default of your stated functions are: math-number-line-toggle: Alt+M Shift+N math-number-toggle: Alt+M N both of which do the same thing; I already use the second one for numbering. Note: LyX 2.0.3 on Ubuntu 10.04 Thanks again On Fri 13 Apr 2012 07:24:59 PM EEST, David L. Johnson wrote: > On 04/13/2012 08:32 AM, Merhebi, Bob wrote: >> Hello David, >> >> Thanks for your reply on this topic; I also benefited from this. One >> question though; isn't there a keyboard shortcut to use it instead of >> using the menus? > You can define keyboard shortcuts to substitute for many, if not all, > menu choices. I only use a few such shortcuts, and not for line > numbering since I don't do that so often. Look under Tools > > Preferences > Shortcuts > Mathematical symbols, for > math-number-line-toggle and math-number-toggle and assign them as you > prefer. >> >> Another question is regarding fullscreen mode; the math toolbar pops out >> when I use Ctrl(+Shift)+M& that's useful, but what about the main >> toolbar? is there a way to bring it out "temporarily" in fullscreen >> mode? > > I don't know. > -- Sincerely Yours, -El Merehbi, Ibrahim (Bob) Thunderbird Signature
Re: Global find and replace of straight quotes with proper curly quotes?
HI Steve, On Sun, Apr 15, 2012 at 4:50 PM, Steve Littwrote: > On Sat, 14 Apr 2012 18:39:15 -0500 > stefano franchi wrote: > >> I have a (long) manuscript imported from Framemaker via Latex where >> all the quotation marks (both single and double) appear in Lyx as >> straight quotes instead of the properly curly ones. The source view, >> in fact, shows me countless \texquotedbl commands instead of regular >> quotes. > > When you say "source view", do you mean viewed in a text editor? No, I meant the LateX code you get to see with Lyx's own "View Source" command. In Lyx (not Latex) source code, they are just straight ascii double quotes > > My LyX 2.0.0 April 29, 2011 on Ubuntu 11.04 errored out when I put an > ERT symbol of \texquotedbl into a document. In my LyX, when I put in a > straight quote (Ctrl+Shift+"), in Vim it's just an ascii doublequote. > In my LyX, viewed in Vim, my curly quotes look like this: > > \begin_inset Quotes eld > \end_inset > > phrase to be quoted > \begin_inset Quotes erd > \end_inset Same here > > >> >> Is there any way to do a global find and replace that would properly >> substitute opening straight quotes with open single|double quotes and >> viceversa for closing quotes? > > Personally, I think this is a job for Vim. Or maybe a short program in > awk, Perl, Python, Ruby or Lua. > > I just experimented with it, and assuming you can get your LyX to treat > a straight quote as the ascii character (maybe by changing your > fontenc), then I think the following two commands, within Vim, should > do what you want: > > :%s/\(\s\)"\(\S\)/\1\r\\begin_inset Quotes eld\r\\end_inset\r\r\2/gc > > :%s/\(\S\)"\(\s\)/\1\r\\begin_inset Quotes erd\r\\end_inset\r\r\2/gc > That's pretty much what I was trying to do in Kile (even though my RegEx was way simpler than yours...) Unfortunately I cannot find a way to do it automatically, because there are instances where the straight double quotes are actually used by Lyx. So I guess I'll have to confirm every single one. Long night ahead (book is close to 300K words...) Thanks for confirming my hunch and providing the regex. Cheers, Stefano -- __ Stefano Franchi Associate Research Professor Department of Hispanic Studies Ph: +1 (979) 845-2125 Texas A University Fax: +1 (979) 845-6421 College Station, Texas, USA stef...@tamu.edu http://stefano.cleinias.org
Re: Global find and replace of straight quotes with proper curly quotes?
stefano franchi writes: > sorry for not being clear. I can match a space with a regex in the > find field (I did it with /s), but how do I put the space back in? The > replace field does not allow regexes nor spaces. Try inserting an empty ERT (Ctrl+L) and then a space. -- Enrico
Re: numbering multi-line formulas
On 04/15/2012 06:18 PM, El Merehbi, Ibrahim wrote: Hello again, I believe I didn't clear it out well. I meant a shortcut for the "eqnarray" not the equation numbering. Sorry, I misunderstood. Add to the shortcuts something like this: command-sequence math-mode on; math-mutate eqnarray; and link it to your favorite hot-key. I use F12. -- David L. Johnson A mathematician is a machine for turning coffee into theorems. -- Paul Erdos
Re: Global find and replace of straight quotes with proper curly quotes?
On 04/15/2012 12:13 PM, stefano franchi wrote: On Sun, Apr 15, 2012 at 7:46 AM, Richard Heckwrote: On 04/14/2012 07:39 PM, stefano franchi wrote: I have a (long) manuscript imported from Framemaker via Latex where all the quotation marks (both single and double) appear in Lyx as straight quotes instead of the properly curly ones. The source view, in fact, shows me countless \texquotedbl commands instead of regular quotes. Is there any way to do a global find and replace that would properly substitute opening straight quotes with open single|double quotes and viceversa for closing quotes? I could search and replace for space+quote(s) and, respectively for quote+space. That would work in most cases and I could fix the remaining issues by hand. I thought the new find and replace could manage, but: 1. I cannot do a simple find and replace for [space][quote] because I am not allowed to enter a space in the find area 2. I can search for reg expression \s" thereby finding most of the instances I'm looking for. But I cannot enter a space in the replace area, nor can I enter a regular expression in it (as the manual explains, reg expressions are not allowed in the replace area yet). 3. Using regular expressions as sketched above in an external editor breaks the lyx file, because straight quotes are needed for citation commands (and probably in other places as well. Any idea? Try inserting into the Advanced Find field: [REGEX .*] ", or something like that. The regex matches anything, or nothing, so is pointless, but it allows you to enter the space. You could presumably also enter a user-defined regex for a space: \s. Hi Richard, sorry for not being clear. I can match a space with a regex in the find field (I did it with /s), but how do I put the space back in? The replace field does not allow regexes nor spaces. If you do the first thing I suggested, with the pointless regex, will that work? Richard