@@ -38,7 +38,7 @@ std::string mathS::Function::GetLaTeXString() const
38
38
static std::unordered_map<std::string, std::string> str2LaTeXstr = {
39
39
{" Exp" , " \\ exp" }, {" Sin" , " \\ sin" }, {" Cos" , " \\ cos" }, {" Tan" , " \\ tan" },
40
40
{" Log" , " \\ log" }, {" Ln" , " \\ ln" }, {" Lg" , " \\ lg" }, {" Cot" , " \\ cot" }, {" Csc" , " \\ csc" },
41
- {" Sec" , " \\ sec" }, {" ASin" , " \a rcsin" }, {" ACos" , " \a rccos" }, {" ATan" , " \\ arctan" },
41
+ {" Sec" , " \\ sec" }, {" ASin" , " \\ arcsin" }, {" ACos" , " \ \ arccos" }, {" ATan" , " \\ arctan" },
42
42
{" Sgn" , " \\ sgn" }, {" Det" , " \\ det" }, {" Sqrt" , " \\ sqrt" }
43
43
};
44
44
std::string funName = function->GetLaTeXString ();
@@ -99,7 +99,7 @@ std::string mathS::Power::GetString() const
99
99
std::string mathS::Power::GetLaTeXString () const
100
100
{
101
101
return
102
- (base->Level () < LEVEL_POWER ? base->GetLaTeXString () : " \\ left(" + base->GetString () + " \\ right)" ) + " ^" +
102
+ (base->Level () < LEVEL_FUNCTION ? base->GetLaTeXString () : " \\ left(" + base->GetLaTeXString () + " \\ right)" ) + " ^" +
103
103
(" {" + exponent->GetLaTeXString () + " }" );
104
104
}
105
105
@@ -200,13 +200,17 @@ std::string mathS::Item::GetLaTeXString() const
200
200
else {
201
201
if (braceflag)
202
202
temp += factors[i]->GetLaTeXString ();
203
- else
204
- temp += " \\ ," + factors[i]->GetLaTeXString ();
203
+ else {
204
+ if (factors[i]->GetType ()==Type::ATOM && Dynamic_cast<Atom>(factors[i])->AtomType ()==Type::NUMBER)
205
+ temp += " \\ times " + factors[i]->GetLaTeXString ();
206
+ else
207
+ temp += " \\ , " + factors[i]->GetLaTeXString ();
208
+ }
205
209
braceflag = 0 ;
206
210
}
207
211
}
208
212
else {
209
- ret += temp + " \\ cdot " ;
213
+ ret += temp + " \\ times " ;
210
214
temp = " " ;
211
215
invflag = 0 ;
212
216
if (factors[i]->Level () < LEVEL_ITEM) {
@@ -394,7 +398,7 @@ std::string mathS::Atom::GetString() const
394
398
std::string mathS::Atom::GetLaTeXString () const
395
399
{
396
400
std::string LaTeXstr;
397
- if (str == " PI " )
401
+ if (str == " Pi " )
398
402
return " {\\ pi}" ;
399
403
if (str == " E" )
400
404
return " \\ mathrm{e}" ;
0 commit comments