我正在尝试为phyiscs项目创建GUI,并且需要这些内容的下标。
H_0
,
Omega_b
,
Omega_dm
,
Omega_\Lambda
Omega_r
乳胶
我的代码是这样的
import PySimpleGUI as sg
sg.change_look_and_feel('Topanga')
layout = [
[sg.Text('Enter the Parameters')],
[sg.Text("H\N{SUBSCRIPT ZERO}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{LATIN SUBSCRIPT SMALL LETTER B}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{LATIN SUBSCRIPT SMALL LETTER R}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{GREEK SUBSCRIPT SMALL LETTER LAMDA}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{LATIN SUBSCRIPT SMALL LETTER DM}", size=(15, 1)), sg.InputText()],
[sg.Text("z", size=(15, 1)), sg.InputText()],
[sg.Submit(), sg.Cancel()]
]
window = sg.Window('Simple data entry window', layout)
event, values = window.read()
window.close()
print(event, values[0], values[1], values[2], values[3], values[4], values[5])
最有趣的是它可以打印诸如M
或R
之类的字母,但不能打印B
?或者它可以打印phi
,但不能打印lambda
?
您可以尝试此操作,以确保此组合有效。
import PySimpleGUI as sg
sg.change_look_and_feel('Topanga')
layout = [
[sg.Text('Enter the Parameters')],
[sg.Text("H\N{SUBSCRIPT ZERO}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{LATIN SUBSCRIPT SMALL LETTER M}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{LATIN SUBSCRIPT SMALL LETTER R}", size=(15, 1)), sg.InputText()],
[sg.Text("\N{GREEK CAPITAL LETTER OMEGA}\N{GREEK SUBSCRIPT SMALL LETTER PHI}", size=(15, 1)), sg.InputText()],
[sg.Text("z", size=(15, 1)), sg.InputText()],
[sg.Submit(), sg.Cancel()]
]
window = sg.Window('Simple data entry window', layout)
event, values = window.read()
window.close()
print(event, values[0], values[1], values[2], values[3], values[4], values[5])
请帮助, 谢谢