Anonymous avatar Anonymous committed 807608a

disable TikZ and tkz-berge stuff for #11583

Comments (0)

Files changed (3)

 \title{Examples of embedding Sage in \LaTeX{} with \textsf{Sage\TeX}}
 \author{Dan Drake and others}
 \usepackage{hyperref}
-\usepackage{tkz-berge}
+% If you want to see the examples in the section "Plotting
+% (combinatorial) graphs with TikZ" remove the \begin{comment}
+% and \end{comment} in that section and uncomment the following line.
+%\usepackage{tkz-berge}
+
 
 \usepackage{sagetex}
 %
 
 \begin{center} \sageplot[scale=.2]{p} \end{center}
 
-On second thought, use the default size of $3/4$ the \verb|\textwidth|
-and don't use axes:
+On second thought, use a size of $3/4$ the \verb|\textwidth| and don't
+use axes:
 
 \sageplot{p, axes=False}
 
 \href{http://www.texample.net/tikz/}{TikZ}. Here, we mean things with
 vertices and edges, not graphs of a function of one or two variables.
 
+The graphics in this section depends on the \texttt{tkz-berge} package,
+which is generally only available in newer \TeX{} distributions (for
+example, \TeX Live 2011 and newer). That package depends in turn on
+TikZ 2.0, which is also only available in newer \TeX{} distributions.
+Installing both of those is in some cases nontrivial, so this section is
+disabled by default.
+
+If you have TikZ and \texttt{tkz-berge} and friends, remove the
+\texttt{comment} environments below.
+
+\begin{comment}
+
 First define our graph:
 
 \begin{sageblock}
 
 \sageplot[scale=.5]{G4plot, axes=False}
 
+\end{comment}
+
 \subsection{3D plotting}
 
 3D plotting right now (Sage version 4.3.4) is problematic because
 
 \section{Plotting functions in Ti\emph{k}Z with Sage\TeX}
 
+(The code in this section should work with any reasonable version of
+Ti\emph{k}Z, which means it should work with all but the most terribly
+out-of-date \TeX{} installations---but to make sure we can accomodate
+everyone, the code here is commented out. You can almost certainly
+uncomment and run them. Make sure you do \verb|\usepackage{tikz}| in the
+preamble.)
+
+\begin{comment}
+
 The wonderful graphics package TikZ has the ability to plot functions by
 reading in a sequence of points from an external file---see chapter 18,
 page 193 of the TikZ manual. This facility is designed around files
 to feed TikZ a bunch of data points, and it automatically make a very
 nice plot for you, including axes, labels, and so on.
 
+\end{comment}
+
 \section{The \texttt{sagecommandline} environment}
 
 When writing a \TeX{} document about Sage, you may want to show some
 % files to look for. Since |ifpdf| doesn't detect running under XeTeX
 % (which defaults to producing PDFs), we need |ifxetex|. Hopefully the
 % |ifpdf| package will get support for this and we can drop |ifxetex|.
+% We also work around ancient \TeX{} distributions that don't have
+% |ifxetex| and assume that they don't have \XeTeX{}.
 %    \begin{macrocode}
 \RequirePackage{makecmds}
 \RequirePackage{ifpdf}
-\RequirePackage{ifxetex}
 \RequirePackage{ifthen}
+\IfFileExists{ifxetex.sty}{
+  \RequirePackage{ifxetex}
+}{
+  \newboolean{xetex}
+  \setboolean{xetex}{false}}
 %    \end{macrocode}
 %
 % Next set up the counters, default indent, and flags.
 %</driver>
 % \fi
 %
-% \CheckSum{565}
+% \CheckSum{564}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.