tex2sws / template.tex

\documentclass{article}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%              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}
\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
%%  Needs \caret command (defined below) to effect SAGE exponentiation output
%%  It would be nice to accomplish all this with the sagetex package - just 
%%  inline pretty-printing of very small hunks of SAGE, with no evaluation
\usepackage{syntax}
\newcommand{\sageinline}[1]{\lit*{#1}}
\newcommand{\caret}{\^{}}

% For tikz graphics, with pdflatex or tex2sws
\usepackage{tikz}

% For combinatorial graphs
% Seems to have some conflict with the syntax package
% So choose one or the other
% \usepackage{tkz-graph, tkz-berge}

%
\begin{document}
%
%
Sage can compute some large numbers quickly, especially with the \sageinline{factorial()} function.
%
\begin{sageverbatim}
factorial(2010)
\end{sageverbatim}
%
\end{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.