Code Snippets/sed

From Yossi Farjoun's Homepage
Revision as of 13:41, 11 June 2010 by Yossi (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

To change a latex file from having (\ref{eq:blah}) to \eqref{eq:blah} (note the use of eq: in the label!)

   sed -e  "s/(\\\\ref{\(eq:[^}]*\)})/\\\\eqref{\1}/g" < FarjounShaeffer.tex > text.tex

Personal tools