Items tagged with latex latex Tagged Items Feed

When I export to latex a matrix  <<a|b>,<c|d>>, the latex uses \begin[ and \end]

\left[ \begin {array}{cc} a&b\\ \noalign{\medskip}c&d\end {array} \right]
Is there a way to make Maple use () parenthesis instead of []? The screen display is not important for me in Maple, but I'd the latex to use () instead.  It will be nice if there is way to configure this. I looked but could not find an option.

 

It seems a frequent issue that exported 3d plots are not shown as wished. I experience the same problem. Although I exported in the .eps format into a .tex latex-file the resulting .pdf-file shows a somewhat pixelated image of my 3d plot as if it was created in "Paint". Is there a solution for this in Maple13?

The following is taken from p 328 of the Maple TA manual.

 

\documentclass[12pt]{article}
\usepackage{ed}
\begin{document}

\begin{question}{Formula}
% This question uses randomized variables.
\qutext{Find the formula for the inverse of the function
$f(x)=\var{a}x+\var{b}$.}
\answer{(x-\var{b})/\var{a}}
\code{
$a=int(rint(9)+2);
$b=int(rint(9)+2);
}
% The above code chooses random integer coefficients a and b between
% 2 and 10.
\end{question}

\end{document}

 

Running it though the online compiler generates the following when Service Pack 1 checkbox is UNCHECKED

Note: Successful conversion from LaTeX to QU does not guarantee that your testbank will load into Maple T.A. correctly. Please examine the contents of the box below for any additional errors that may be generated when your testbank is loaded into Maple T.A.

l2e_pkIwct.qu: Error at line 3.
Line ended while reading variable name (missing "=" at end of name?)

(A response of "[OK]" indicates that there should be no problems uploading your converted testbank file to Maple T.A.)

 

and the following when it is CHECKED

...

[30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44]
[45] [46] [47] [48] [49] [50] [51] [52])
(/usr/local/latex2edu/newt4ht/texmf/tex/generic/tex4ht/html-mml.4ht)
(/usr/local/latex2edu/texmf/tex/local/ed/ed.4ht [53] [54]))
(/usr/local/latex2edu/newt4ht/texmf/tex/generic/tex4ht/html4.4ht)
(/usr/local/latex2edu/newt4ht/texmf/tex/generic/tex4ht/unicode.4ht)
(/usr/local/latex2edu/newt4ht/texmf/tex/generic/tex4ht/html4-uni.4ht)
(/usr/local/latex2edu/newt4ht/texmf/tex/generic/tex4ht/mathml.4ht)
(/usr/local/latex2edu/newt4ht/texmf/tex/generic/tex4ht/html-mml.4ht)
(/usr/local/latex2edu/texmf/tex/local/ed/ed.4ht))
No file l2e_yQsgNQ.aux.
)
*
! Emergency stop.
<*> \def\production{}\input l2e_yQsgNQ.tex

Output written on l2e_yQsgNQ.dvi (54 pages, 25316 bytes).
Transcript written on l2e_yQsgNQ.log.

 

 

What's going on?

How I can get a list of all label refernces of a worksheet. In fact I want to write a small code which would produce the LaTex output (written to a text file) for my indicated labels. thanx

I want to put the solution obtained from ShowSolution() command of Student[Calculus1] into my LaTeX file. How I can achieve that?

I succeeded in getting latex of ExpandSteps because it was a module, but ShowSolution() is not a module.

I have generated an 8x8 Jacobian, containing a few variables and several zeros as elements. I would like to translate this to LaTeX code. How can I first simplify what I have, to make it tractable?

Here is the Maple code:

eq_1 := Lambda-mu*S-(beta*(H+C+C1+C2)*S+tau*(T+C)*S)/(S+T+H+C+C1+C2+C1M+C2M);
eq_2 := (-beta*(H+C+C1+C2)*T+tau*(T+C)*S)/(S+T+H+C+C1+C2+C1M+C2M)-(mu+mu[T])*T;
eq_3 := (beta*(H+C+C1+C2)*S-tau*(T+C)*H)/(S+T+H+C+C1+C2+C1M+C2M)-(mu+mu[A])*H;
eq_4 := (beta*(H+C+C1+C2)*T+tau*(T+C)*H)/(S+T+H+C+C1+C2+C1M+C2M)-(mu+mu[T]+mu[A]+lambda[T])*C;
eq_5 := lambda[T]*C-(mu+mu[A]+rho[1]+eta[1])*C1;
eq_6 := rho[1]*C1-(mu+mu[A]+rho[2]+eta[2])*C2;
eq_7 := eta[1]*C1-(mu+rho[1]+gamma)*C1M;
eq_8 := eta[2]*C2+rho[1]*C1M-(mu+rho[2]+gamma*rho[1]/(rho[1]+rho[2]))*C2M;
J := VectorCalculus:-Jacobian([eq_1, eq_2, eq_3, eq_4, eq_5, eq_6, eq_7, eq_8], [S, T, H, C, C1, C2, C1M, C2M]);

JQDFE := eval(J, [S = Lambda/(beta-mu[A]), T = 0, H = Lambda*(beta/(mu+mu[A])-1)/(beta-mu[A]), C = 0, C1 = 0, C2 = 0, C1M = 0, C2M = 0]);

Thanks.

I would like to implement a rule for typeseting delayDotProduct in latex exports (in which this expressions appears in plain form). It corresponds to dot products of vectors/matrices with the "." operator. I tried to define 

`latex/Typesetting:-delayDotProduct`:=proc(f1,f2,f3)
sprintf("{ {%s}{%s} }",cat(`latex/print`(f1)),cat(`latex/print`(f2)))
end proc:

which does not do the job. 

Edit:

A related question: How can I make

D[1,1](x)(t)

produce x''(t) in latex output?

Hello everyone.

I have lots of lengthy equations in Maple that I don't want to waste time for rewritting them. I am looking for a clean and tidy way to export these equations from Maple and import them into a LaTeX or Word document.

As an example do it with the equation in the following file.

Example.mw

Many many thanks.

I want to write an equation in the text portion of my document.  I do not need it evaluated. I just want to write formulas, like I do in LaTeX. 

For some reason, Maple does not use \frac{}{} for things like 1/2 that can occur in an expression

restart;
expr:=1/2;
latex(expr);

            1/2

This make the generated code not good looking. For example using this in Maple:

latex(diff(y(x), x)+y(x)*cos(x)-(1/2)*sin(2*x) = 0);

produces this latex when proccessed:

When the latex is put inside a display in the document.  This is terrible. Is there a way to tell Latex to use \frac{}{} for fractions?

 

I run the command

> latex( '(3*p^4+3*p^2-2*p+1)/((1-p+p^2)*(1-3*p+3*p^2))' );

and I get

{\frac {3\,{p}^{4}+3\,{p}^{2}-2\,p+1}{ \left( 1-p+{p}^{2} \right)
\left( 1-3\,p+3\,{p}^{2} \right) }}

for some reason before every variable p I get a backslash and comman, \, and the frac{}{} command is always written as \frac {}{}, which isn't valid latex syntax, etc.  What's going on?

restart;
eq:=diff(y(x),x) - y(x)^2 - x*y(x) - x + 1;
r:=dsolve(eq,y(x));
latex(r);

Gives an error "(in fprintf) string expected for string format". The problem seems when the math contains "erf"? Both examples below fail with result that contains this.

Maple 18, on windows 7.

Another example:

restart;
eq:=diff(y(x),x) + a*y(x)*(y(x)-x) - 1;
r:=dsolve(eq,y(x));
latex(r);

Another example, which seems to fail for different reason

restart;
eq:=diff(y(x),x) + a*x*y(x)^3+b*y(x)^2;
r:=dsolve(eq,y(x));
latex(r);

v1:=[seq(tau[lambda,i]^2,i=1..5)];

latex(v1);

 

gives:

[{\tau_{{\lambda,1}}}^{2},{\tau_{{\lambda,2}}}^{2},{\tau_{{\lambda,3}}
}^{2},{\tau_{{\lambda,4}}}^{2},{\tau_{{\lambda,5}}}^{2}]

which produces a non natural output in latex, see below.

I wonder it could be improved in the future release?

'latex' command is really useful when i have large algebric output. But having to change this tiny thing at many places is just very time consuming. I'd really appreciate if this can be fixed in updates or future versions of Maple.

 

Casper

 

Dear Mapleprimes,

I have been struggling with a problem in the last couple of days. I wish to export a Maple plot to LaTeX while ensuring font consistency. While searching for solutions online, I found the psfrag package in LaTeX. So far, however, I have been unsuccesful in making this work. As as test, I attempted to export plot(x^2) to LaTeX. I used the following code to convert to .eps which worked fine:

plotsetup(ps, plotoutput = `plot1.eps`, plotoptions = `portrait, noborder,height=5in,width=5in`);plot(x^2);

Then in LaTeX, I have:

\documentclass{article}

\usepackage{graphicx}

\usepackage{psfrag}

\begin{document}

\begin{figure}[!h]
\centering
\psfrag{x}{$ \alpha $}
\includegraphics[scale=0.5]{plot1.eps}
\end{figure}
\end{document}

However, no replacements are made. After intense Google searching I found the following post http://www.mapleprimes.com/posts/43255-Trouble-Replacing-Maple-Axes-Labels which to sum up argues that this was only possible with earlier versions of Maple.

Does anyone know if the problem has been resolved?

Does anyone know any other ways to ensure font consistency for plots imported from Maple to LaTeX?

Thank you very much in advance!

C

Maple 18, windows 7.

When I export this to Latex

x:=1/y;

The latex comes out as x:=y^-1 instead of using 1/y as it displays. I prefer 1/y and not  y^-1

i.e. instead of generating {y}^{-1} it should use \frac{1}{y}, just as it appears on the screen. Is there a configurration option one can use for this?

I also like to know if one can insert latex markup directly in Maple text paragraphs?

For example, if I add a text paragraph, (Menu->Insert->Paragraph) and would like to type some math in there, I can't just write $\sin(x)$ as this will not render as math when exported to Latex, as it is in a Maple normal group in the Latex file. 

Is there another way to typeset math in text area of a document? I only use worksheet mode. Not interested in using document mode.

thank you

 

 

   

1 2 3 4 Page 1 of 4