jellespijker / pymech

Continuation for this project is stopped. Focus is now on the MechEng modules ( https://github.com/mecheng ) A Python module for mechanical engineers. Project which is mostly based on the books of Roloff / Matek (Machineonderdelen), Hibbeler (Statics, Mechanics and Dynamics), Kals (Industriele productie) and R. Mott (Applied Fluid Mechanics). Al calculations are unit/dimension save. Using IPython / Jupyter a report can be generated in LaTeX, html or PDF Currently implemented: * Force method calculation for a simple beam * Unit based calculations * Axle calculation * Material properties
https://github.com/mecheng
MIT License
9 stars 3 forks source link

Make pretty printing generic #5

Closed jellespijker closed 7 years ago

jellespijker commented 7 years ago
def frac(self, top, bottom):
     retval = '\\frac{'
     if type(top) is str:
       retval += top
       retval += '}{ '
    if