Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit9749322

Browse files
author
Release Manager
committed
Trac #34904: tikz output should be 1 paragraph, to keep sagetex happy
This is tofixsagemath/sagetex#64where it was reported that the following does not work{{{#!tex\documentclass{article}\usepackage{sagetex}\usepackage{tikz}\begin{document}\sagestr{(polytopes.great_rhombicuboctahedron()).tikz([4,5,6],45,scale=0.75)}\end{document}}}}This is due to tikzpicture being put in an argument to \newlabel, whichdoes not accept multiple paragraphs.URL:https://trac.sagemath.org/34904Reported by: dimpaseTicket author(s): Dima PasechnikReviewer(s): Sébastien Labbé
2 parents556e1f3 +32e0248 commit9749322

File tree

3 files changed

+19
-25
lines changed

3 files changed

+19
-25
lines changed

‎src/doc/en/tutorial/sagetex.rst‎

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -137,26 +137,22 @@ ways to accomplish this.
137137
that if you upgrade Sage and get a new version of SageTeX, the Python
138138
code and LaTeX code for SageTeX may no longer match, causing errors.
139139

140-
- The second way is to use the ``TEXINPUTS`` environment variable. If
140+
- The second way is to use the ``TEXMFLOCAL`` environment variable. If
141141
you are using the bash shell, you can do
142142

143143
..CODE-BLOCK::shell-session
144144
145-
$ export TEXINPUTS="SAGE_ROOT/venv/share/texmf//:"
145+
$ export TEXMFLOCAL=SAGE_ROOT/venv/share/texmf
146+
$ mktexlsr # update kpathsea ls-R databases
146147
147-
where ``SAGE_ROOT`` is the location of your Sage installation. Note
148-
that the double slashandcolon attheend of that line are important.
149-
Thereafter, TeX and friends will find the SageTeX style file. If you
150-
want to make this change permanent, you can add theaboveline to your
151-
``.bashrc`` file.If you are using a different shell, you may have to
148+
where ``SAGE_ROOT`` is the location of your Sage installation.
149+
Thereafter, TeXandfriends will findtheSageTeX style file.
150+
If you want to make this change persistent, you can add the 1st of the
151+
abovelines to your ``.bashrc`` file.
152+
If you are using a different shell, you may have to
152153
modify the above command to make the environment variable known; see
153154
your shell's documentation for how to do that.
154155

155-
One flaw with this method is that if you use applications like
156-
TeXShop, Kile, or Emacs/AucTeX, they will not necessarily pick up the
157-
environment variable, since when they run LaTeX, they may do so
158-
outside your usual shell environment.
159-
160156
If you ever move your Sage installation, or install a new version into
161157
a new directory, you'll need to update the above command to reflect
162158
the new value of ``SAGE_ROOT``.
@@ -238,16 +234,14 @@ SageTeX and TeXLive
238234
-------------------
239235

240236
One potentially confusing issue is that the popular TeX distribution
241-
`TeXLive2009<http://www.tug.org/texlive/>`_ includes SageTeX. This may
237+
`TeXLive<http://www.tug.org/texlive/>`_ includes SageTeX. This may
242238
seem nice, but with SageTeX, it's important that the Sage bits and LaTeX
243-
bits be synchronized -- which is a problem in this case, since both Sage
244-
and SageTeX are updated frequently, and TeXLive is not.
245-
While at the time of this writing (March 2013), many Linux distributions
246-
have moved on to more recent releases of TeXLive, the 2009 release
247-
lingers and is, in fact, the source of most bug reports about SageTeX!
239+
bits be synchronized -- which is a problem in this case, since
240+
TeXLive, as shipped by your OS distro, or package manager, might be out of sync with
241+
TeXLive distribution, and the latter might also be out of sync with
242+
the current SageTeX.
248243

249244
Because of this, it is *strongly recommended* that you always install
250245
the LaTeX part of SageTeX from Sage, as described above. The
251246
instructions above will insure that both halves of SageTeX are
252-
compatible and will work properly. Using TeXLive to provide the LaTeX
253-
side of SageTeX is not supported.
247+
compatible and will work properly.

‎src/sage/geometry/polyhedron/base6.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class Polyhedron_base6(Polyhedron_base5):
7272
%% opacity = 0.8
7373
%% vertex_color = green
7474
%% axis = False
75-
<BLANKLINE>
75+
%%
7676
%% Coordinate of the vertices:
7777
%%
7878
\coordinate (1.00000, -1.00000, -1.00000) at (1.00000, -1.00000, -1.00000);

‎src/sage/geometry/polyhedron/plot.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,7 @@ def _tikz_2d(self, scale, edge_color, facet_color, opacity, vertex_color, axis):
15321532
tikz_pic+="%% facet_color = {}\n".format(facet_color)
15331533
tikz_pic+="%% opacity = {}\n".format(opacity)
15341534
tikz_pic+="%% vertex_color = {}\n".format(vertex_color)
1535-
tikz_pic+="%% axis = {}\n\n".format(axis)
1535+
tikz_pic+="%% axis = {}\n%%\n".format(axis)
15361536

15371537
# Draws the axes if True
15381538
ifaxis:
@@ -1681,7 +1681,7 @@ def _tikz_2d_in_3d(self, view, angle, scale, edge_color, facet_color,
16811681
tikz_pic+="%% facet_color = {}\n".format(facet_color)
16821682
tikz_pic+="%% opacity = {}\n".format(opacity)
16831683
tikz_pic+="%% vertex_color = {}\n".format(vertex_color)
1684-
tikz_pic+="%% axis = {}\n\n".format(axis)
1684+
tikz_pic+="%% axis = {}\n%%\n".format(axis)
16851685

16861686
# Draws the axes if True
16871687
ifaxis:
@@ -1773,7 +1773,7 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color,
17731773
%% opacity = 0.8
17741774
%% vertex_color = green
17751775
%% axis = False
1776-
<BLANKLINE>
1776+
%%
17771777
%% Coordinate of the vertices:
17781778
%%
17791779
\coordinate (0.00000, 1.00000, -1.00000) at (0.00000, 1.00000, -1.00000);
@@ -1881,7 +1881,7 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color,
18811881
tikz_pic+="%% facet_color = {}\n".format(facet_color)
18821882
tikz_pic+="%% opacity = {}\n".format(opacity)
18831883
tikz_pic+="%% vertex_color = {}\n".format(vertex_color)
1884-
tikz_pic+="%% axis = {}\n\n".format(axis)
1884+
tikz_pic+="%% axis = {}\n%%\n".format(axis)
18851885

18861886
# Draws the axes if True
18871887
ifaxis:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp