I have a long math file where $$ $$ was used for display math. I want to change these to \[ \] to make it look neater. I don't know whether I can use the find/replace function in TeXworks to alternate between replacing by \[ and \], and I'm not enough of a programmer to solve this with a batch program.
Is there an easy fix?
sedorperl. I am sure, there are scripts for this on the net, which can be called from TeXWorks. Welcome to TeX.SX by the way;-) – Jun 05 '15 at 18:18regular expressions. Are you on a windows system? – Bernard Jun 05 '15 at 18:36$$unchanged -- and let a Lua function replace the$$symbols intelligently, "on the fly", with either\[or\]. – Mico Jun 05 '15 at 18:39oneandtwo, so thatonechanges the next$$to\[and callstwoand thentwochanges the next$$to\]and callsone. You can also use multi-line regular expressions but they are more prone to fail on corner cases. – Jun 05 '15 at 19:02