Latex typesetting conditional
How can I type set :
If x est positive write in Latex "H>0" else "H<=0"
add a comment
The following works on my computer:
x = -1
if x > 0:
show(LatexExpr('H>0'))
else:
show(LatexExpr('H\leq 0'))
Alternate solution:
LatexExpr("H>0" if H>0 else "H<=0")
Asked: 2019-09-20 19:26:32 +0100
Seen: 302 times
Last updated: Nov 25 '19
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.