Install on mac Pdflatex

1,201 views
Skip to first unread message

philippe...@gmail.com

unread,
Jan 11, 2017, 5:57:33 AM1/11/17
to sage-support
I have just installed Sage (SageMath-7.4) on a mac under sierra, where tex is correctly installed (Texshop).
I have an error message 
 pdflatex doesn't seem to be installed

What can I do ? When I write $sage on the terminal, is says that this command is not found

Dima Pasechnik

unread,
Jan 11, 2017, 7:45:06 AM1/11/17
to sage-support
Do you type 

$sage

, or just 

sage 

(should be the latter). Can you run Sage at all?
The other question is whether you can run pdflatex in the terminal. If this works 
(just type 

pdflatex -v 

in the terminal. You should see something like
pdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014)
kpathsea version 6.2.0
...

and not "command not found")

then it should work with Sage too. Otherwise you need to adjust your PATH, as described in many places on the net.

Hope this helps --- if not, please post more details.

 

richard...@gmail.com

unread,
Feb 23, 2017, 10:50:53 AM2/23/17
to sage-support
I have the same problem running OS 10.12.3, TexLive 2016, and SageMath 7.5.1 app.  The later two appear to be correctly installed.  I have followed all the steps for the paths.  I have added symbolic links inside of the app with no success.  I can only speculate that it may be a problem related to security options since PDFLATEX starts in a terminal with restricted \write18 enabled or that SageMath doesn't recognize that PDFLATEX is actually a component of PDFTEX since when you create an alias to PDFLATEX it actually creates an alias to PDFTEX.  I ended up copying the PDFLATEX symbolic link to Applications/SageMath-7.5.1.app/contents/Resources/sage but that didn't correct the error.  So I'm stuck at this point.  I can write sage in my terminal and it works; likewise, latex and pdflatex work.

Dima Pasechnik

unread,
Feb 23, 2017, 11:17:52 AM2/23/17
to sage-support
Please describe the problem you have.
Are you trying to use sagetex?

sagetex is a latex package, that generates runnable sage code from your latex document, and then is able to plug back in the results of the sage being run on that runnable code piece. sagetex has to be installed in the way latex packages are installed.


AFAIK there is no further integration provided between (pdf)latex and sage. that is, you run them separately, in terminal, at least by default.

richard...@gmail.com

unread,
Feb 23, 2017, 11:40:27 PM2/23/17
to sage-support
In SageNotebook I am trying to use %latex to format my data and a formula and when I select evaluate I get the pdflatex error.  sagetex is installed.

Dima Pasechnik

unread,
Feb 24, 2017, 3:42:35 AM2/24/17
to sage-support


On Friday, February 24, 2017 at 4:40:27 AM UTC, richard...@gmail.com wrote:
In SageNotebook I am trying to use %latex to format my data and a formula and when I select evaluate I get the pdflatex error.  sagetex is installed.

sagetex is not even relevant in this sense (unless your latex uses macros from sagetex---something that you probably do not need).
The problem you have is that Sage (and/or SageNotebook) does not find the pdflatex executable. 
Can you run pdflatex in terminal?

If not, please make sure that you can do it (by adding the relevant values in your PATH, I suppose),
and restart sage.

And then, I suspect, the error you will see will be

Error: convert (from the ImageMagick suite) does not
appear to be installed. Displaying PDFLaTeX output
requires this program, so please install and try again.

Go to http://www.imagemagick.org to download it.
None


richard...@gmail.com

unread,
Feb 24, 2017, 9:46:01 AM2/24/17
to sage-support
This didn't fix the problem.  I wonder if I have to perform a Macport install of Texlive, since Macports seems to duplicate most things installed already..  I' didn't see an option to perform a binary install for Imagemagick

Dima Pasechnik

unread,
Feb 24, 2017, 11:15:32 AM2/24/17
to sage-support
What exactly is the task you have? Do you generate your TeX formulae, or write them by hand?
Do you know that SageNotebook's richtext cells support TeX formulae?

Perhaps it would be better to use jupyter notebook rather than SageNotebook
(the latter is old and going away sooner or later).
In jupyter notebook you can have markdown cells, and they support formulae written in (La)TeX.

richard...@gmail.com

unread,
Feb 24, 2017, 12:30:09 PM2/24/17
to sage-support
I'm using a text() entry annotating a plot.  I'll give jupyter a try.  I just validated ImageMagick was properly installed . . . don't follow their instructions, download the source and build it.

richard...@gmail.com

unread,
Feb 24, 2017, 11:26:47 PM2/24/17
to sage-support
I've reinstalled Sage using the app version 3 times.  The config.status indicates no latex is installed.  I just verified, it also indicates the same in the preinstallation package contents.  I've been working UNIX systems  since the early 90's, if the pointers aren't there, the feature doesn't work.  My speculation is that this package was configured on a system that didn't have LaTex so some functionalities are not possible

Dima Pasechnik

unread,
Feb 25, 2017, 7:03:01 AM2/25/17
to sage-support


On Friday, February 24, 2017 at 5:30:09 PM UTC, richard...@gmail.com wrote:
I'm using a text() entry annotating a plot.

for this you do not need TeX installed on your machine. The rendering of graphics in text("$x^$",...) is done by MathJax.
(as you never provided a concrete example of something not working, it's hard to say what's exactly you do wrongly)

E.g. the attached example works just fine for me on in SageNotebook running on an OSX laptop in Chrome; I tried
a binary install of Sage 7.5.1.
(the last line has an example of TeX in text())
 
Just paste it in SageNotebook cell and evaluate.
chalses.sage

Richard W Bump

unread,
Feb 25, 2017, 7:52:44 AM2/25/17
to sage-s...@googlegroups.com
Sir,

    Your worksheet does not import as it is an old unsupported format,  Attached is an incomplete Calculus BC demo I am preparing for my wife. The last few evaluations are text I pasted directly from the website to test latex.  There were some MathJax tests in earlier versions and MathJax does work but is limited in ints output.  Mainthing I’m trying to do is display the Limit information in the proper format.  and You probably can see where I am stumbling in the tests I am running below the front-end problem.

 I was able to extract the text of your worksheet using TextWrangler, but a quick look shows no %Latex being used.

Richard Bump
L'Hopital's Application.sws

Dima Pasechnik

unread,
Feb 25, 2017, 4:10:34 PM2/25/17
to sage-support, kcrisman


On Saturday, February 25, 2017 at 12:52:44 PM UTC, Richard W Bump wrote:

    Your worksheet does not import as it is an old unsupported format,

it is not a worksheet, it is a plain text file (you can just paste its contents into a SageNotebook cell)
(Alternatively, rename it so that it has .py suffix and import it as a python module)
 
 Attached is an incomplete Calculus BC demo I am preparing for my wife. The last few evaluations are text I pasted directly from the website to test latex.  There were some MathJax tests in earlier versions and MathJax does work but is limited in ints output.  Mainthing I’m trying to do is display the Limit information in the proper format.  and You probably can see where I am stumbling in the tests I am running below the front-end problem.

in case you merely want to display limit in the interact (x->0, say)  then change
lt1 to 
lt1=text("$\lim_{x\mapsto 0}f(x)/g(x)="+latex(lf1)+"/"+latex(lg1)+"$", (c[1],d[0]+3),fontsize=14,rgbcolor='green')
then I get a nice x->0 underneath lim.




 I was able to extract the text of your worksheet using TextWrangler, but a quick look shows no %Latex being used.
there is text("$P_9$",....) there

But indeed, cells starting with "%latex" don't work for me either (on Linux).
This seems to be a bug standing for the past couple of years.
(but unreported in a proper way)

As sagenotebook is not really maintained anymore, your best bet might be switching to jupyter notebook;
at the moment, however, sagenotebook interacts are not really working with jupyter
 (see https://trac.sagemath.org/ticket/21267 -it's being worked on as I write this :-))
Jupyter has its own interacts, so if you can use them instead it would be fine.

Sorry that I can't be more helpful here.

Dima
 


Richard Bump

Richard W Bump

unread,
Feb 25, 2017, 4:48:17 PM2/25/17
to sage-s...@googlegroups.com
Sir,

    Thanks for the effort.  I can make X->0, but 0 is actually a variable “e” and can just as well be any value from -infinity to +infinity.    All said,  I can do this demo in Geogebra in less than half the time, but I like to use Sage to compare answers since will more likely give me the numerator and denominator style answer and in raw values, and not a decimal value which can be misleading.

I’ve played around with Jupyter, I’ve must get into the mind set to switch over.  Sage notebook seems more straight forward.

Again, Thank you.

Richard Bump
--
You received this message because you are subscribed to a topic in the Google Groups "sage-support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-support/KzOriCBPB-0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-support...@googlegroups.com.
To post to this group, send email to sage-s...@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Dima Pasechnik

unread,
Feb 25, 2017, 4:59:33 PM2/25/17
to sage-support


On Saturday, February 25, 2017 at 9:48:17 PM UTC, Richard W Bump wrote:
Sir,

    Thanks for the effort.  I can make X->0, but 0 is actually a variable “e” and can just as well be any value from -infinity to +infinity.

OK, then you probably can replace {x\mapsto 0} with {x\mapsto "+latex(e)+"} and carry on.
(I must say I didn't touch interacts for 5+ years, and I might be taking nonsense here)

Richard W Bump

unread,
Feb 25, 2017, 5:09:47 PM2/25/17
to sage-s...@googlegroups.com
That worked, thanks, I didn’t have that maps to command in my pocket.

On Feb 25, 2017, at 3:59 PM, Dima Pasechnik <dim...@gmail.com> wrote:

 {x\mapsto "+latex(e)+"} 

Reply all
Reply to author
Forward
0 new messages