<?xml version="1.0" encoding="utf-8"?><t:transform version="1.0" xmlns:t="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:e="urn:extension" exclude-result-prefixes="ms e"><ms:script language="JScript" implements-prefix="e"><![CDATA[

  var isAngleRE = /({(?:\s|%[^\r\n]*\r?\n)*\\[lr]angle(?:\s|%[^\r\n]*\r?\n)*}|\\[lr]angle(?![a-zA-Z]))/g;

  var FSO = new ActiveXObject('Scripting.FileSystemObject');

  function output(s) {
    FSO.GetStandardStream(1).WriteLine(s);
  }

  function reform(s) {
    if (/\\sqrt(?:\s|%[^\r\n]*[\r\n])*\[/.test(s)) { output("[Warning] Use \\root{...}\of{...} instead of \\sqrt[...]{...}\r\n") }
    // All occurrences of \langle not surrounded by {...} are replaced by \langle{} (and similarly for \rangle).
    return s.replace(isAngleRE, function(match) {
      if (match.charAt(0) === "{") { return match }
      if (match === "\\langle") { return "\\langle{}" }
      if (match === "\\rangle") { return "\\rangle{}" }
      return match;
    });
  }

]]></ms:script></t:transform>