Open thecaligarmo opened 5 years ago
Description changed:
---
+++
@@ -1 +1,26 @@
+When using `latex(Tableau([[1]]))` we normally get back:
+```
+{\def\lr#1{\multicolumn{1}{|@{\hspace{.6ex}}c@{\hspace{.6ex}}|}
+{\raisebox{-.3ex}{$#1$}}}
+ \raisebox{-.6ex}{$\begin{array}[b]{*{1}c}\cline{1-1}
+ \lr{1}\\\cline{1-1}
+ \end{array}$}
+}
+```
+
+This is normally except when using sagetex. When sagetex runs, it encodes everything in
+
+```
+\newlabel{@sageinline0}{
+ .... code goes here ...
+}
+```
+
+This is normally ok except that in `\newlabel` we can't have `\def\lr#1` (in particular we need `##1` instead of `#1`)
+
+This ticket proposes adding a new function called `sagetex()` which is like `latex()` in that objects can define a `_sagetex_` method and when `sagetex()` is called, the `_sagetex_` method is called, and if not present, it runs `latex()` instead.
+
+After this implementation, we'd propose a change to sagetex (the latex package) in order to use the `sagetex()` function instead of the `latex()` function.
+
+The reason we have decided this method is to try and allow more flexibility in the future. In particular, (as a use case other than adding proper definition embedding) if we ever want the code in `latex()` versus `sagetex()` to be vastly different, this would allow us to do that. Additionally, we chose not to do a grep replace of `#x` to `##x` (for x increasing) is due to the fact that there is a use case in which the user might actually want to keep `#1` and not have it escaped.
Changed keywords from none to sagetex
Author: aram.dermenjian
Commit: 9c349e3
Description changed:
---
+++
@@ -17,7 +17,7 @@
}
-This is normally ok except that in \newlabel
we can't have \def\lr#1
(in particular we need ##1
instead of #1
)
+This is normally ok except that in \newlabel
we can't have \def\lr#1
(in particular we need ##1
instead of #1
). This means when using the code \sage{Tableau([[1]])}
in latex causes problems and doesn't allow compilation.
This ticket proposes adding a new function called sagetex()
which is like latex()
in that objects can define a _sagetex_
method and when sagetex()
is called, the _sagetex_
method is called, and if not present, it runs latex()
instead.
Branch pushed to git repo; I updated commit sha1. New commits:
390dcf2 | Merge branch 'develop' into t/27543/definitions_and_commands_in_sagetex |
Branch pushed to git repo; I updated commit sha1. New commits:
2b9ca1b | Minor documentation updates |
Branch pushed to git repo; I updated commit sha1. New commits:
4ea49f8 | Doc fixes |
Moving tickets from the Sage 8.8 milestone that have been actively worked on in the last six months to the next release milestone (optimistically).
Branch pushed to git repo; I updated commit sha1. New commits:
dedc356 | Without lazy import, can't build |
Ticket retargeted after milestone closed
Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.
Setting new milestone based on a cursory review of ticket status, priority, and last modification date.
Setting a new milestone for this ticket based on a cursory review.
When using
latex(Tableau([[1]]))
we normally get back:This is normally except when using sagetex. When sagetex runs, it encodes everything in
This is normally ok except that in
\newlabel
we can't have\def\lr#1
(in particular we need##1
instead of#1
). This means when using the code\sage{Tableau([[1]])}
in latex causes problems and doesn't allow compilation.This ticket proposes adding a new function called
sagetex()
which is likelatex()
in that objects can define a_sagetex_
method and whensagetex()
is called, the_sagetex_
method is called, and if not present, it runslatex()
instead.After this implementation, we'd propose a change to sagetex (the latex package) in order to use the
sagetex()
function instead of thelatex()
function.The reason we have decided this method is to try and allow more flexibility in the future. In particular, (as a use case other than adding proper definition embedding) if we ever want the code in
latex()
versussagetex()
to be vastly different, this would allow us to do that. Additionally, we chose not to do a grep replace of#x
to##x
(for x increasing) is due to the fact that there is a use case in which the user might actually want to keep#1
and not have it escaped.Component: packages: standard
Keywords: sagetex
Author: aram.dermenjian
Branch/Commit: u/aram.dermenjian/definitions_and_commands_in_sagetex @
dedc356
Issue created by migration from https://trac.sagemath.org/ticket/27543