ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 11 Sep 2020 20:22:56 -0500Cocalc: change texmf.cnf filehttps://ask.sagemath.org/question/53411/cocalc-change-texmfcnf-file/ I'm trying to use `sagetex` to plot 3d graphics in LaTeX. I can get the basic plot to work but there isn't enough detail. When I try to create more points in my plot I get the message: "! Unable to read an entire line---bufsize=200000.
Please increase buf_size in texmf.cnf.". I found a texmf.cnf file on my system, made a copy of it with a modification of the bufsize to read "buf_size = 1000000" and uploaded it to my Cocalc project. Following [this](https://doc.cocalc.com/latex-faq.html?highlight=texmf#setup-texmf-in-a-project) FAQ page I created `~/texmf/tex/latex/local` and moved my `texmf.cnf` file there, When that didn't work, I tried `texhash ~/texmf` as suggested. However, I still get the message "! Unable to read an entire line---bufsize=200000. Please increase buf_size in texmf.cnf."
How do I change the bufsize on Cocalc? Are there any guidelines on a reasonable `buf_size` value to increase to?dazedANDconfusedFri, 11 Sep 2020 20:22:56 -0500https://ask.sagemath.org/question/53411/How can I change the location of DOT_SAGE?https://ask.sagemath.org/question/50640/how-can-i-change-the-location-of-dot_sage/The documentation for [environment variables used by sage](https://doc.sagemath.org/html/en/reference/repl/environ.html) it is mentioned that the default location of `DOT_SAGE` is `$HOME/.sage/` but that this location can be changed.
How can this location be changed?done_with_fishWed, 08 Apr 2020 23:35:27 -0500https://ask.sagemath.org/question/50640/Sage could be even more clever - How to force the use of 'sympy' backend for simplifying symbolic integrals?https://ask.sagemath.org/question/43392/sage-could-be-even-more-clever-how-to-force-the-use-of-sympy-backend-for-simplifying-symbolic-integrals/Hi there,
I have noticed the following problem:
sage: f = function('f')(x)
sage: var('h')
sage: integrate(exp(h)*exp(x)*f(x),x)
integrate(e^(h + x)*f(x), x)
The workaround seems to be using the `sympy` backend for symbolic integration
sage: integrate(exp(h)*exp(x)*f(x),x,algorithm='sympy')
e^h*integrate(e^x*f(x), x)
which always seems to be a good idea as I learned from @Emmanuel Charpentier over
[here](https://ask.sagemath.org/question/43287/solved-why-does-integratepsiyfyy-return-an-error-but-integratepsityftyy-works/?answer=43297#post-id-43297).
Now I would like to force the use of `algorith='sympy'` for simplifying these `integrate(...)` expressions globally.
Unfortunately, the `simplify()` command does not allow to set this option.
sage: integrate(exp(h)*exp(x)*f(x),x)
integrate(e^(h + x)*f(x), x)
sage: _.simplify()
integrate(e^(h + x)*f(x), x)
**TL;DR** How can I force sage to pull out these type of exponential constants from the integral with the `simplify()` command?
hausdorffThu, 16 Aug 2018 11:54:20 -0500https://ask.sagemath.org/question/43392/Error when starting sagehttps://ask.sagemath.org/question/39840/error-when-starting-sage/I installed sage to:
/home/groups/sc/modules/packages/sage/8.0/ (there are the subfolders bin/lib) on CentOS 7
Per module file, I set:
set root /home/groups/sc/modules/packages/sage/8.0
prepend-path PYTHONPATH $root/bin
prepend-path LD_LIBRARY_PATH $root/lib
prepend-path LIBRARY_PATH $root/lib
prepend-path PATH $root/bin
prepend-path CPATH $root/include
prepend-path SAGE_ROOT /home/groups/sc/modules/packages/sage/8.0/
However, when I try to start sage via "sage", I receive:
Error: SAGE_ROOT is set to a bad value:
SAGE_ROOT=/home/groups/sc/modules/packages/sage/8.0/
You must correct it or erase it and run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory.
Error setting environment variables by sourcing '/home/groups/sc/modules/packages/sage/8.0/bin/sage-env';
possibly contact sage-devel (see google/group/sage-devel).
I also tried to go to "cd /home/groups/sc/modules/packages/sage/8.0/bin" and "./sage", but this returns the same error message. If I do not set "SAGE_ROOT", I get the error, that SAGE_ROOT must be set.
What am I doing wrong? Thanks in advance.MartinaZ3Wed, 29 Nov 2017 06:18:26 -0600https://ask.sagemath.org/question/39840/How can I configure the Sage VirtualBox Appliance?https://ask.sagemath.org/question/39520/how-can-i-configure-the-sage-virtualbox-appliance/ I am working the with most recent Sage virtual box (ova) appliance, and I am trying to install LaTeX and all available kernels. I have been writing down exactly what I have done, which I plan to provide the community as a tutorial when everything is working. The problem is that I don't have a lot of experience with Linux, and so I'm basically hacking and slashing, as I can't find any documentation for how the appliance was configured or how to add LaTeX to the already-configured TeX install.
My question is, what's the best way to add functionality? Where should I install new things?
As an example:
I wanted to start with LaTeX. Sage seems to have it's own environment with a working TeX, but it can't find pdfLaTeX for printing a notebook. I tried installing with yum, but CentOS installs an incomplete version that doesn't have a TeX package manager, so I can't add the missing LaTeX packages. I built LaTeX from source and it worked, but when I tried to install Ruby, yum installed the default LaTeX anyway, which then broke printing from jupyter using pdfLaTeX because it now found the one yum installed without the needed packages and ignores mine. I want to add pdfLaTeX to the preconfigured TeX environment in Sage so that Ruby and other languages can find it.
I'd build a box from scratch, but I cannot duplicate the functionality of jupyter notebook (where it comes up as a server for my host box) installing things from source, so I am trying to configure the pre-packaged ova, and since Sage is set up to be self-contained there, I cannot get things installed through yum to find the things installed in Sage. What am I doing wrong? Or was this not really something the ova was designed for?jordana309Mon, 13 Nov 2017 15:13:16 -0600https://ask.sagemath.org/question/39520/How can I most easily configure the SageVM?https://ask.sagemath.org/question/39519/how-can-i-most-easily-configure-the-sagevm/I am working the with most recent Sage virtual box (ova) appliance, and I am trying to install LaTeX and all available kernels. I have been writing down exactly what I have done, which I plan to provide the community as a tutorial when everything is working. The problem is that I don't have a lot of experience with Linux, and so I'm basically hacking and slashing, as I can't find any documentation for how the appliance was configured or how to add LaTeX to the already-configured TeX install.
My question is, what's the best way to add functionality? Where should I install new things?
As an example:
I wanted to start with LaTeX. Sage seems to have it's own environment with a working TeX, but it can't find pdfLaTeX for printing a notebook. I tried installing with yum, but CentOS installs an incomplete version that doesn't have a TeX package manager, so I can't add the missing LaTeX packages. I built LaTeX from source and it worked, but when I tried to install Ruby, yum installed the default LaTeX anyway, which then broke printing from jupyter using pdfLaTeX because it now found the one yum installed without the needed packages and ignores mine. I want to add pdfLaTeX to the preconfigured TeX environment in Sage so that Ruby and other languages can find it.
I'd build a box from scratch, but I cannot duplicate the functionality of jupyter notebook (where it comes up as a server for my host box) installing things from source, so I am trying to configure the pre-packaged ova, and since Sage is set up to be self-contained there, I cannot get things installed through yum to find the things installed in Sage. What am I doing wrong? Or was this not really something the ova was designed for?jordana309Mon, 13 Nov 2017 15:12:11 -0600https://ask.sagemath.org/question/39519/How can I alter default local sage configuration?https://ask.sagemath.org/question/33393/how-can-i-alter-default-local-sage-configuration/
I have installed sagemath on my computer. Now I would like to change some default configuration options. For example my default browser is `Firefox` but I would like sage to use `Chrome`. If possible I would also like to define default home directory on sage. I presume there is a configuration file....where can I find it?
Thanks in advance for your help!
DBSThu, 12 May 2016 20:52:52 -0500https://ask.sagemath.org/question/33393/specifying the R executablehttps://ask.sagemath.org/question/9962/specifying-the-r-executable/I want to have Sage use the executable of R that's already on my machine instead of the one that comes with it (it's newer, already has all my packages installed, etc). How do I configure Sage to run that version of R by default?kjd45Tue, 23 Jul 2013 06:35:11 -0500https://ask.sagemath.org/question/9962/Problem with Sage and system pythonhttps://ask.sagemath.org/question/8900/problem-with-sage-and-system-python/I have a question regarding sage on macosx. My problem is that the precompiled binary package of sage doesn't see my python modules installed through macports. I mean sage is working without porblem, but when I try to attach a script which use a module (e.g. scitools) I got :
Applications/Sage-4.7.2-OSX-64bit-10.6.app/Contents/Resources/sage/local/lib/python2.6/site-packages/sage/misc/preparser.pyc in load(filename, globals, attach)
1629
1630 if fpath.endswith('.py'):
-> 1631 execfile(fpath, globals)
1632 elif fpath.endswith('.sage'):
1633 exec(preparse_file(open(fpath).read()) + "\n", globals)
Volumes/Henry/Script_py/plot/example.py in <module>()
2 import time, glob, os
3
4 # clean up old frames:
5 for name in glob.glob('tmp_*.eps'):
6 os.remove(name)
ImportError: No module named scitools.all
But if I try to execute without Sage, I have no problem with loading the modules.
mikrosvinjoWed, 18 Apr 2012 03:45:58 -0500https://ask.sagemath.org/question/8900/