nm

11413 Reputation

20 Badges

13 years, 72 days

MaplePrimes Activity


These are replies submitted by nm

@ecterrab 

I am glad you found the combination you like.

I was using advice I read from a known Latex expert here and in other places where I saw it used:

"Another possibility is \boldmath, though I would prefer \boldsymbol of amsmath as well."

https://tex.stackexchange.com/questions/595/how-can-i-get-bold-math-symbols/38631

Yes,  \boldsymbol needs a package, but it is amsmath. Which is needed to compile almost anything in Latex and comes with all Latex distrubutions.

But whatever solution works, it is good you will be using \mathit now as this should make the latex a little better.

 

 

 

 

@ecterrab 

"If you get italicized and bold,"

Please see below if this is what you wanted

\documentclass[12pt]{article}

\usepackage{amsmath}
\usepackage{maplestd2e}

\begin{document}

\begin{equation}
\boldsymbol{\mathit{This\,is\,text}}
\end{equation}

\end{document}

\usepackage{amsmath}
\usepackage{maplestd2e}

\begin{document}

\begin{equation}
\boldsymbol{\mathit{K}}\left(z \right)
\end{equation}

\end{document}

@ecterrab 

Hello;

"Any combination of bf or textbf with mathit does not render bold and italicized"

For math mode, mathbf  should be used and not textbf. 

I am not an expert in Latex, but if you could post an example code which is causing the issue you mention, I will try to find more.

ps. Physics:-Latex is working very well. Thank you for that. Finally Maple is generating good looking Latex after so many years :)

 

@itsme 

May be in the future Maple can add a Latex only option setting call. 

But setting imaginary unit in interface is not causing me any problem at all now, since I do this only inside the worksheet which runs a long script that I run which generates the Latex. This is not for interactive use.

Once the script is finished, I close the worksheet or click the restart bottom and Maple is back to normal setting for interactive use, where UpperCase I is better.

 

@Joe Riel 

You said "Note that the cancellation option is normally false; it is used to actively cancel pole/zero pairs that are within a given distance, set by the relativeerror option.  So that won't help you."

But that is not what the help page gives the impression. It says 

https://fr.maplesoft.com/support/help/Maple/view.aspx?path=DynamicSystems/SystemOptions

"The default value for the option cancellation, which determines whether pole-zero cancellation is applied to the transfer function of a system during creation. The default is false."

When reading the above, it seems to mean there is no pole/zero cancelation in the transfer function. There is no mention of relativeerror or such. 

I took the above to mean, if I enter tf 

tf:=(s - 1)/(s^2 - 3*s + 2)

which does have one pole/zero cancelation in it, since denomator factors to (s-1)*(s-2), then Maple DynamicSystem will not do the cancelation since the option is set to false.  But now it does. 

So may be help should make things more clear.  I also think DynamicSystem should not do pole/zero cancelation in this case, but it does now. 

tf:=(s - 1)/(s^2 - 3*s + 2);
DynamicSystems:-PrintSystem(DynamicSystems:-TransferFunction(tf))

@Joe Riel 

thanks for the workaround. But it is much more convenient to use transfer function (since this is how the textbook shows it) than having to manually convert to zpk form each time.

 

@Carl Love 

I am sorry, I am not following you when you say  "you'll still need to expand the denominator."

restart;
alias(DS=DynamicSystems):
DS:-SystemOptions(cancellation=false,complexfreqvar=s):
tf:=DS:-TransferFunction(-(s - 1)/expand(((-2 + s)*(s - 1)))):
DS:-PrintSystem(tf)

This simplification cause big problems in control system, since it gives different state space model.

I basically want to type the transfer function (as it shows in textbook) without it being simplified., i.e. pole/zero cancelation done. If you know how to do that, may be you could show me what exactly I needed to type?

Thanks

@Carl Love 

Actually it was expanded originally, and it still did the cancelation. I wrote it above in this form later on to make it clear the reader there is pole/zero cancelation.

alias(DS=DynamicSystems):
DS:-SystemOptions(cancellation=false,complexfreqvar=s):
tf:=DS:-TransferFunction(-(s - 1)/(s^2 - 3*s + 2)):
DS:-PrintSystem(tf)

Compare to 

Clear["Global`*"];
sys = TransferFunctionModel[-(s - 1)/(s^2 - 3*s + 2), s]

@itsme 

May be Physics:-Latex  should have its own options setting, done once at global level.

Having to add  imaginaryunit="i" at each call to Physics:-Latex() is a little too much work, but setting it at global level, where it only affects Latex generation, leaving normal Maple code as is, is a good idea.

This is how DynamicSystem does it also. It has it own option setting call. 

 

   https://fr.maplesoft.com/support/help/Maple/view.aspx?path=DynamicSystems%2fSystemOptions

 

@ecterrab 

As a temporary solution, one can also modify this in their latex as follows. By changing the definition in the peramble

\renewcommand{\textit}{\mathit}

And now 

y \left(x \right) = \textit{\_C1} {\rm e}^{\arctan \left(x \right)}

Will give same output as  when using \mathit

I think this should work but I need to try it on my main large file as well.

 

@ecterrab 

thanks. I did not know about interface(imaginaryunit) command. This solves the issue. I will add this at start of my script now.

 

@ecterrab 

Hello,

There is still a problem in V 788. Latex still generates \textit{Physics}:-* in some places. Please see below. it seems to happen when expression in denominator.  If I find anything more, will update.
 

restart;

interface(version)

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version()

`The "Physics Updates" version in the MapleCloud is 788 and is the same as the version installed in this computer, created 2020, September 1, 11:0 hours Pacific Time.`

Physics:-Latex(1/(a*y^2))

\frac{1}{\textit{Physics}:-*\left({a , y^{2}}\right)}

latex(1/(a*y^2))

{\frac {1}{a{y}^{2}}}

 


 

Download latex_issue_7.mw

@ecterrab 

Thank you!  

I will try 788 as soon my current script is finished. If there is any issue I will make new post. I will be able to test 788 later today.

my latex_issue_4.mw was posted in one of my replies to earlier post:

https://www.mapleprimes.com/questions/230429-New-Issue-Using-PhysicsLatex--Changes 

But it is OK now. I had to change my code as I show in the above, to workaround it, and now it works. 

thanks

@ecterrab 

Thanks. When I tried it, it generates `\textit{Physics}`. What are these?  Please see below


 

interface(version)

`Standard Worksheet Interface, Maple 2020.1, Windows 10, July 30 2020 Build ID 1482634`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 786 and is the same as the version installed in this computer, created 2020, September 1, 1:8 hours Pacific Time.`

restart;        
expr:=1/2*int(exp(-t)*f(t),t)*exp(t)-1/2*exp(-t)*int(exp(t)*f(t),t)
 

(1/2)*(int(exp(-t)*f(t), t))*exp(t)-(1/2)*exp(-t)*(int(exp(t)*f(t), t))

Physics:-Latex:-UseColor := false:        
Physics:-Latex(expr)
 

\frac{\textit{Physics}:-*\left({\int \textit{Physics}:-*\left({{\rm e}^{-t}, f \left(t \right)}\right)d t , {\rm e}^{t}}\right)}{2}-\frac{\textit{Physics}:-*\left({{\rm e}^{-t}, \int \textit{Physics}:-*\left({{\rm e}^{t}, f \left(t \right)}\right)d t}\right)}{2}

 


Here is the result of compiling it

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{maplestd2e}

\begin{document}

\[
\frac{\textit{Physics}:-*\left({\int \textit{Physics}:-*\left({{\rm e}^{-t}, f \left(t \right)}\right)d t , {\rm e}^{t}}\right)}{2}-\frac{\textit{Physics}:-*\left({{\rm e}^{-t}, \int \textit{Physics}:-*\left({{\rm e}^{t}, f \left(t \right)}\right)d t}\right)}{2}
\]

\end{document}

I noticed this happens where is a multiplication in the expression

Physics:-Latex(exp(x)*f(x))

                    \textit{Physics}:-*\left({{\rm e}^{x}, f \left(x \right)}\right)

And

Physics:-Latex(a*b)

            \textit{Physics}:-*\left({a , b}\right)

This was not there in the earlier version of Physics. 

Download latex_issue_6.mw

@nguyenhuyenag 

I also tried “open with” but not work.

You need to right-click the mws file, then say open-with->Select another application->Select Maple 2020->Check the box that says always use this app to open mws

This should work. This is all standard windows operation and not related to Maple. Did you try the above?

First 50 51 52 53 54 55 56 Last Page 52 of 91