Items tagged with latex latex Tagged Items Feed

Output to Latex...

July 24 2014 ber9erud 15

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

 

 

   

Hello!

If I wirite in an algorithm in MapleTA 9.5 the number 0, and later use it (for export to latex), it becomes negative, but not if I pass through Maple:

 

$null=0;
$zero=maple("0");
$nullstring="$null";
$zerostring="$zero";

results in:

null 0
zero 0
nullstring -0
zerostring 0

 

Why, and what can be done without passing through Maple?

 

Best,

Jan

I was trying to create a array or table with the following columns

1. angle in radians,

2. angle in grades

3. sinus (x)

4. cosinus (x)

5. tangent(x)

 

for x= 0, pi/12, 2pi/12.. 2pi.

I was trying to use seq()

 

seq([(1*Pi/12*j),sin(1*Pi/12*j)], j=0..24);

 

but I cannot get something nicely "arranged" (like in a table or matrix) to export to latex.

 

could somebody give me a help..please?

 

thanks in advance,

 

Jean

 

Hi,

Is there a chance to produce right looking pdf via LateX export using table inside a Maple worsheet?

Could you tip somone?

 

I encolose:

zip: 

(tex file with two eps + pdf file without reqiured table structure)

Tex_export.zip

source workseet done with Maple 17

Hi,

I tried to export my maple document to latex using file->export function, but it won't export file correctly. For example

in maple
> a := 5431; b := 15971; c := 20551;
> f := -a-b-c;
                             -41953

in latex

\documentclass{article}
\usepackage{maplestd2e}
\def\emptyline{\vspace{12pt}}

How do I copy Maple input without any modifications?

Here is my problem:Consider the MAPLE input below (Copy Example). Copy and paste results in:

restart; with(VectorCalculus); SpaceCurve(`<,>`(VectorCalculus:-`*`(2, cos(t)), VectorCalculus:-`*`(2, sin(t)), t), t = 0 .. VectorCalculus:-`*`(2, Pi), axes = boxed, thickness = 2, color = black)

which is not the same as the input. I need the unmodified Maple input for a documentation, which is published...

I'm using Latex to write sketching questions. Although it works well for me, and it is quite easy, there are a couple of things I want to do and couldn't:

1 - having the axes with different lenghts: the sketch area is always shown as a square, even when the axes have different lengths. I want to have a longer x axis, keeping the units proportional in both axes.

2 - having an image in the background of the skecth area.

 

I usually write my question banks with LaTeX.

 

The manual says:

The LaTeX package epsfig is loaded by default. The ed package is required. Other standard LaTeX packages, for example, amsmath, can be included using the \usepackage macro.

 

But if I start my document with

\documentclass[12pt]{article}
\usepackage{amsfonts}
\usepackage{ed}

and use for example \mathfrak{P} I only get a blank box instead of this symbol in my question bank.

My code contains a long "module" so i can't really "split execution group".

but it seems that the exported LaTex file is determined to fit "one segament of code" on one page when I compile...

Hi, does anyone know how I go about getting the y''(x) derivative notation to render properly in Maple TA without the primes being unreadably small? Ideally I'd like to author the question in LaTeX.

 

Many thanks in advance.

How to edit the tex generated by the maple:Put the one equation into several rows

For example

This code p57.txt  can get the below picture

[IMG]http://i730.photobucket.com/albums/ww309/ytyyutianyun/1-13.png[/IMG]

But what I want is

[IMG]http://i730.photobucket.com/albums/ww309/ytyyutianyun/2-7.png[/IMG]

 

Thanks

1 2 3 Page 1 of 3