Forum OpenACS Q&A: Response to displaying Word documents directly
As for displaying mathematical functions, I would suggest that you start exploring the wide and wonderful world of LaTeX. There are several LaTeX to html converters that produce passable representation of math content. Search for LaTeX on google for more information. LaTeX is another document markup language based on free tools, I'll warn you though that full mastery can take a lifetime.