ActiveMath is an open web-based learning environment for mathematics. It dynamically generates interactive mathematical courses adapted to the student's goals, preferences, capabilities, and knowledge. Its content is represented in an extended OMDoc which in turn is an extension of the OpenMath XML-language. ActiveMath is the first system that uses OMDoc. It makes use of this knowledge representation in several knowledge management tasks, among them the Web-presentation of mathematical text including formulae, the communication with the integrated mathematical systems, the user-adaptive composition of a course, the dynamic generation of learning suggestions, and the dictionary browsing. The bias of the knowledge representation and management towards mathematics is obvious in ActiveMath because it meets the challenge of the presentation of mathematical formulae on the Web together with definitions, proofs, and exercises using mathematical systems.