Alexandru Cabuz wrote:

>> then when you use prettyref, you have to type \prettyref{eq|Max4} instead
> 
> Is there no way to get lyx to put in the "|" instead of the ":" directly
> or to figure something out so I don't have to actually type the stuff?
> That's kinda the benefit of using Lyx over direct Tex. You don't have to
> type as much weird code up.
> Besides for a document that's already written there's not much I can do
> but go back and change every one of the hundreds of references... right?
> 
> Alex.

This should automate the process:

$ cat conv.sed
s/^\(\\begin_inset LatexCommand \\ref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\eqref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\pageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vpageref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\vref{[a-zA-z]\{2,3\}\):/\1|/
s/^\(\\begin_inset LatexCommand \\prettyref{[a-zA-z]\{2,3\}\):/\1|/

$ sed -f conv.sed yourfile.lyx > modified.lyx

-- 
Angus

Reply via email to