Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create shortcut for making LaTeX from command line #10592

Open
kcrisman opened this issue Jan 11, 2011 · 0 comments
Open

Create shortcut for making LaTeX from command line #10592

kcrisman opened this issue Jan 11, 2011 · 0 comments

Comments

@kcrisman
Copy link
Member

At ask.sagemath, we see the question of

In a notebook cell one can write:

%latex

Hello

\ [

x=f(x)

\ ]

and an image appear with perfect math notation. (not jsmath)

What is the sage command that does the same receiving a string ? Something like latexrender(r"Hello \ [x=f(x)\ ]")

The best answer was

Latex().eval(r"""Hello

\[ 
x=f(x)
\]

Goodbye""", globals=globals)

from John Palmieri.

Of course, this requires some import statement and the raw string. We should be able to make a shortcut for this; the original poster's latex_render() seems appropriate, or some variant on this. We'll have to be sure to document the raw string issue.

I'm putting this under user interface because it improves it, but really it's perhaps graphics? Well...

CC: @jhpalmieri @jasongrout

Component: user interface

Keywords: latex command line notebook

Issue created by migration from https://trac.sagemath.org/ticket/10592

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants