wollk,
Вариант...
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$.fn.replaceText=function(e,f,g){return this.each(function(){var a=this.firstChild,c,b,d=[];if(a){do 3===a.nodeType&&(c=a.nodeValue,b=c.replace(e,f),b!==c&&(!g&&/</.test(b)?($(a).before(b),d.push(a)):a.nodeValue=b));while(a=a.nextSibling)}d.length&&$(d).remove()})};
$(window).load(function () {
$("body").replaceText( /\\sqrt\(([^)]+)\)/gi, '√<span style="border-top:1px #000 solid">$1</span>' );
});
</script>
<title></title>
</head>
<body>
Корень из числа 66 = \sqrt(66) = не целое число ;)
</body>
</html>