Use latex as default output (#402)

* Improve combine_like_terms

* Lint fix

* add some latex to readme

* give compound_interest latex formatting

* fix compound interest readme

* update combine_like_terms readme

* combine_like_terms add delimiters

* Convert some alebra output to latex

* Add missing right] to latex

* Fix makeReadme script

* Correct det 2x2 latex

* use bmatrix for det 2x2

* update readme and bump version

* Make latex matrix one line

* made latex for most of algebra

* more latex migrations

* convert basic_math to latex

* re-generate readme

* fix double exponent

* latex for most of calculus

* Improved stationary points gen

* made cs latex

* Transform geometry to latex

* texify misc outputs

* texify statistics

* regenerate readme

* Add tex markers to linear_equations

* add list_to_tex for mult_int_22

* upgrade readme

* update list_to_tex

* add end to list_to_tex

* tweak list_to_tex, update readme

* Update README.md

* Update README.md

* lint fixes

* lint fix

* Remove tests

* texify system_of_equations

* update system_of_equations tex

* regen readme

* texify complex_quadratic

* update complex_quadratic

* regen readme

* sqrt to complex_quadratic

* complex_quadratic texify

* Update README.md

* Update README.md

* make latexbuilder

* regen readme

* fix bmatrix

* bmatrix conversions

* update readme

* use times symbol

* improve tex of prod_sci_notations

* Add missing delim to prod of sci notations

* Add missing curly brack to prod-sci-not

* lint fixes

* texify differentiation

* texify stationary points

* changed differentation to trig_differentiation

* texify stationary points

* update readme

* Remove left right from stat_points

* texify angle_btw_vectors

* update readme

* add spaces to mod operator

* Swap \\% with \\percent

* update readme

* Replace //percent with non-math %

* fix leftover \\percent

* latexify vector_cross

* change tex multiply to times

* update readme

* lint fixes

* lint fix
This commit is contained in:
Luke Weiler
2022-12-23 00:38:59 -05:00
committed by GitHub
parent c348e176cc
commit 4f21bbd3ab
133 changed files with 727 additions and 1592 deletions

View File

@@ -3,7 +3,7 @@ import random
import math
def gen_func(maxEltAmt=20, format='string'):
def gen_func(maxEltAmt=20):
s = 0
v1 = [
round(random.uniform(0, 1000), 2)
@@ -19,19 +19,14 @@ def gen_func(maxEltAmt=20, format='string'):
ans = 0
try:
ans = round(math.acos(s / mags), 2)
solution = str(ans) + " radians"
solution = f"${ans}$ radians"
except ValueError:
print('angleBtwVectorsFunc has some issues with math module, line 16')
solution = 'NaN'
ans = 'NaN'
# would return the answer in radians
if format == 'string':
problem = f"angle between the vectors {v1} and {v2} is:"
return problem, solution
elif format == 'latex':
return "Latex unavailable"
else:
return v1, v2, ans
problem = f"angle between the vectors ${v1}$ and ${v2}$ is:"
return problem, solution
angle_btw_vectors = Generator("Angle between 2 vectors", 70,