@@ -61,11 +61,11 @@ def _render_equation_def(
6161 aligned : bool ,
6262) -> None :
6363 separator = "&=" if aligned else "="
64- printer (parse_state .equation_left , end = separator )
65- printer (latex_symbol (parse_state .equation_right , parse_state .output_symbol ), end = "=" )
64+ printer (parse_state .equation_latex_name , end = separator )
65+ printer (latex_symbol (parse_state .equation_expression , parse_state .output_symbol ), end = "=" )
6666
6767 if options .insert :
68- printer (latex_value (parse_state .equation_right , parse_state .output_value ), end = "=" )
68+ printer (latex_value (parse_state .equation_expression , parse_state .output_value ), end = "=" )
6969
7070 res_str = (
7171 compute_state .result_mu
@@ -93,7 +93,7 @@ def _render_pdvs(
9393 continue
9494
9595 lhs = (
96- f"\\ frac{{\\ partial { parse_state .equation_left } }}"
96+ f"\\ frac{{\\ partial { parse_state .equation_latex_name } }}"
9797 f"{{\\ partial { parse_state .output_symbol [symbol ]} }}"
9898 )
9999 printer (lhs , end = separator )
@@ -110,7 +110,7 @@ def _sigma_symbolic_terms(parse_state: ParseState) -> list[str]:
110110 for symbol , fullunc in zip (parse_state .symbols , parse_state .input_fullunc ):
111111 if parse_state .uncertainty_values [symbol ]:
112112 terms .append (
113- f"\\ left(\\ frac{{\\ partial { parse_state .equation_left } }}"
113+ f"\\ left(\\ frac{{\\ partial { parse_state .equation_latex_name } }}"
114114 f"{{\\ partial { parse_state .output_symbol [symbol ]} }} { fullunc } \\ right)^2"
115115 )
116116 return terms
@@ -151,15 +151,17 @@ def _render_sigma(
151151 if options .last_unit is None
152152 else f"{ compute_state .result_sigma } \\ { options .last_unit } "
153153 )
154- printer (f"\\ sigma_{{{ parse_state .equation_left } }}&=" , end = "" )
154+ printer (f"\\ sigma_{{{ parse_state .equation_latex_name } }}&=" , end = "" )
155155 if not options .separate :
156156 printer (f"{ res_str } \\ \\ \n \\ \\ " )
157157 else :
158158 printer (res_str )
159159 return
160160
161161 symbolic_terms = _sigma_symbolic_terms (parse_state )
162- printer (f"\\ sigma_{{{ parse_state .equation_left } }}&=\\ sqrt{{{ '+' .join (symbolic_terms )} }}\\ \\ " )
162+ printer (
163+ f"\\ sigma_{{{ parse_state .equation_latex_name } }}&=\\ sqrt{{{ '+' .join (symbolic_terms )} }}\\ \\ "
164+ )
163165
164166 if options .insert :
165167 intermediate_terms = _sigma_intermediate_terms (parse_state , compute_state )
@@ -191,12 +193,12 @@ def _render_result_line(
191193
192194 if options .last_unit is None :
193195 line = (
194- f"{ parse_state .equation_left } { separator } "
196+ f"{ parse_state .equation_latex_name } { separator } "
195197 f"{ compute_state .result_mu } \\ pm { compute_state .result_sigma } "
196198 )
197199 else :
198200 line = (
199- f"{ parse_state .equation_left } { separator } \\ left ({ compute_state .result_mu } "
201+ f"{ parse_state .equation_latex_name } { separator } \\ left ({ compute_state .result_mu } "
200202 f"\\ pm { compute_state .result_sigma } \\ right )\\ { options .last_unit } "
201203 )
202204
0 commit comments