Bopytex/opytex/filter.py
Benjamin Bertrand 68cdb62f4c Start removing texenv and use pytex
Work with feed and compile for time being.
Nothing for correction or pdfjam
2017-04-16 18:46:14 +03:00

32 lines
606 B
Python

#!/usr/bin/env python
# encoding: utf-8
"""
Custom filter for Bopytex
"""
def do_calculus(steps, name="A", sep="=", end="", joining=" \\\\ \n"):
"""Display properly the calculus
Generate this form string:
"name & sep & a_step end joining"
:param steps: list of steps
:returns: latex string ready to be endbeded
"""
ans = joining.join([
name + " & "
+ sep + " & "
+ str(s) + end for s in steps
])
return ans
# -----------------------------
# Reglages pour 'vim'
# vim:set autoindent expandtab tabstop=4 shiftwidth=4:
# cursor: 16 del