"""
ReplaceInlineReduce.py v. 0.2.3
Replace REDICE command \\begin{reduce} \\end{reduce} blocks with LaTeX
"""
import re
from string import join
def replaceInlineReduce(body):
from reduceWrapper import renderReduce
errorMessage = """\n
Some or all expressions may not have rendered properly,
because REDUCE returned the following error:
%s
"""
reConsts = re.MULTILINE+re.DOTALL
reduceInPattern = re.compile(
r'[ \t]*(?(.*?)|' #3
r'\s*((?:.(?!\s*