MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / _htmlLine

Method _htmlLine

SLiCAP/SLiCAPdesignData.py:94–116  ·  view source on GitHub ↗

Creates an html output line for this spec item. :return: html code of this specitem :rtype: str

(self)

Source from the content-addressed store, hash-verified

92 return csv
93
94 def _htmlLine(self):
95 """
96 Creates an html output line for this spec item.
97
98 :return: html code of this specitem
99 :rtype: str
100 """
101 if self.value != '':
102 value = _latex_ENG(roundN(self.value))
103 else:
104 self.value = ''
105 # symbol
106 html = '<td class="left">$' + sp.latex(self.symbol) + '$</td>'
107 # description
108 html += '<td class="left">' + self.description + '</td>'
109 # value
110 html += '<td class="left">$' + value + '$</td>' # value
111 # units
112 if self.units == '':
113 html += '<td></td></tr>\n'
114 else:
115 html += '<td class="left">$\\mathrm{' + units2TeX(self.units) + '}$</td></tr>\n'
116 return html
117
118 def _specLine(self):
119 """

Callers 1

specs2htmlFunction · 0.80

Calls 3

_latex_ENGFunction · 0.90
roundNFunction · 0.90
units2TeXFunction · 0.85

Tested by

no test coverage detected