Items tagged with latexlatex Tagged Items Feed

Writing symbols and equations...

August 24 2014
1 1

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.

how to make latex(1/2) produce a \frac{1}{2} in Ma...

August 02 2014
1 4

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?

Output to Latex...

July 24 2014
0 2

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?

Maple error using latex() command. How to resolve...

July 14 2014
1 4

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);

A tiny latex (from Maple) superscripts problem...

April 10 2014
0 11

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

Maple LaTeX font consistency...

April 07 2014
2 4

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

Latex export in Maple 18, make it display 1/y as \...

March 09 2014
0 3

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

Why does the string 0 become -0?...

November 18 2013
2 1

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

create a table/matrix/array ...

November 17 2013
1 5

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

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?

Jean

June 17 2013
0 0

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

Maple code to latex...

May 14 2013
0 1

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 to a text file?...

April 21 2013
1 2

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...

sketching in MapleTA using Latex...

November 20 2012
0 2

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.

mathfrak symbol in LaTeX question bank...

October 30 2012
0 2

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.

Exported LaTex file has a long segment of code, wh...

August 20 2012
1 2

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...

 1 2 3 Page 1 of 3
﻿