As seen in this answer about hyperref redefining macros, one ought not use \v when using hyperref. I defined \v to invoke \boldsymbol in a paper and use it 279 times, only later realizing it was pre-defined (I use LyX, which codes all macros via \def). If I load hyperref before this definition, it's fine, but if it loads after, compilation breaks. I don't quite trust my regex skills to do a find-and-replace on \v. So, there appear two alternatives:
- (Favorite) Can anyone tell me what
hyperrefdoes with\vand what problems to look out for? Maybe I can just ignore it. I searched thehyperrefdoc and didn't find it. - (Hope to avoid) Can you recommend a LyX tool (ideally) or a script to rename a command and all its invocations in the source?
\vis not defined by hyperref, it is a standard latex accent command, it is strongly advised not to redefine these. – David Carlisle Feb 07 '22 at 17:55\vyou redefine even if the character is entered as ř , so you need to be careful about foreign names in bibliographies etc. – David Carlisle Feb 07 '22 at 18:13\defwhen somebody asks for a new command, then it is a really bad choice. Try defining\box… – egreg Feb 07 '22 at 18:36\deffor math macros, so the damage is semi-contained. If curious, you can see their official (?) stance here. – James Hunt Feb 09 '22 at 10:57\newcommandx? Oh, dear! I found two other reasons for avoiding LyX, thanks. ;-) – egreg Feb 09 '22 at 11:31