Ask Your Question
1

Latex typesetting conditional

asked 2019-09-20 12:26:32 -0600

Cyrille gravatar image

updated 2019-11-25 07:14:18 -0600

How can I type set :

If x est positive write in Latex "H>0" else "H<=0"

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2019-09-20 13:55:43 -0600

tmonteil gravatar image

updated 2019-09-20 13:55:54 -0600

The following works on my computer:

x = -1
if x > 0:
    show(LatexExpr('H>0'))
else:
    show(LatexExpr('H\leq 0'))
edit flag offensive delete link more
1

answered 2019-09-20 17:17:34 -0600

Emmanuel Charpentier gravatar image

Alternate solution:

LatexExpr("H>0" if H>0 else "H<=0")
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-09-20 12:26:32 -0600

Seen: 56 times

Last updated: Nov 25