rbeezer avatar rbeezer committed 6ad265b

README, template.tex updated

Comments (0)

Files changed (3)

    document to a Sage worksheet.
 
 Secondarily, the LaTeX source should create a reasonable PDF
-facsimile of the resultant worksheet when processed by pdflatex.
+facsimile of the resultant worksheet when processed by pdflatex,
+and the XHTML produced by tex4ht might also be usable.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 1.  A working installation of Sage.  This also needs to be in
     your path, or you might be able to edit the shebang in the
-    script to point to it.
+    script to point to it.  This can be avoided with experimental
+    code to create worksheets using just Python (and not the
+    sagenb library code).
 
 2.  A working installation of tex4ht to prepare input to this
     converter.  This may be part of your TeX installation,
     or put a correct path in command below.  (The configuration file is
     part of this distribution).  Run:
 
-        htlatex foo.tex "tex4ht-sage.cfg" " -cmozhtf"
+        htlatex foo.tex "/path/to/tex4ht-sage.cfg" " -cunihtf -utf8"
 
     A succesful run of tex4ht via its htlatex script should at a
     minimum produce:

example/example.tex

 \documentclass{article}
 %
+%%%%% 2010/02/20  THIS IS OUTDATED AND SHOULD BE REPLACED
+%
 % Set worksheet boolean to false for "regular" pdflatex
 % The ifpdflatex switch might control this semi-automatically
 %
 \documentclass{article}
 %
-% Set worksheet boolean to false for "regular" pdflatex
-% The ifpdflatex switch might control this semi-automatically
-%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%              tex2sws                    %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Defines the environments for sage code
+\usepackage{sagetex}
+%% Use the  worksheet  boolean to control
+%% items like vertical spacing and margins
+%% that vary between the printed page and
+%% a web page
 \usepackage{ifthen}
 \newboolean{worksheet}
-\setboolean{worksheet}{true}
-%
-\ifthenelse{\boolean{worksheet}}{\newenvironment{sageverbatim}{}{}}{\usepackage{sagetex}}
+\ifx \HCode\UnDef \setboolean{worksheet}{false}
+\else             \setboolean{worksheet}{true} \fi
+%% Use this before any pgf/tikz packages are included
+\ifthenelse{\boolean{worksheet}}
+{\def\pgfsysdriver{pgfsys-tex4ht.def}}{\relax}
+%% Use this if you have hyperlinks
+\ifthenelse{\boolean{worksheet}}
+{\usepackage[tex4ht]{hyperref}}{\usepackage[pdftex]{hyperref}}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
 %%  syntax package will display SAGE code inline (code not executed)
 %%  Needs \% to effect a percent symbol
 %%  sagetex package offers a \percent, which we might use if supported by tex4ht
 \newcommand{\sageinline}[1]{\lit*{#1}}
 \newcommand{\caret}{\^{}}
 
-
-% This will cause tex4ht and PGF (the tikz backend)
-% to cooperate in the production of SVG graphics
-% and associated wrappers in the output
-%
-\ifthenelse{\boolean{worksheet}}
-{\def\pgfsysdriver{pgfsys-tex4ht.def}}
-{\relax}
-
 % For tikz graphics, with pdflatex or tex2sws
 \usepackage{tikz}
 
 % So choose one or the other
 % \usepackage{tkz-graph, tkz-berge}
 
-
-% Hyper-links via the hyperref package
-% can employ different options for processing
-% with pdflatex vs tex4ht
-% This generally works best as last included package
-%
-\ifthenelse{\boolean{worksheet}}
-{\usepackage[tex4ht]{hyperref}}
-{\usepackage[pdftex]{hyperref}}
 %
 \begin{document}
 %
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.