\documentclass[12pt,reqno]{amsart}
\usepackage{graphicx}
\usepackage[textwidth=6.5in,textheight=9in,headsep=0.15in,centering]{geometry}

\def\nbpdfInput#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfEcho#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfPrint#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfText#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfMessage#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfOutput#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfSubsection#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfgraphInput#1{\vskip 1mm\par\noindent\includegraphics{#1}}
\def\nbpdfgraphOutput#1{\vskip 1mm\par\noindent\includegraphics[width=1.5in]{#1}}

\begin{document}

\noindent\nbpdfSubsection{Snips/1.pdf}


The nb2tex project aims to write a converter that takes Mathematica notebooks and converts them into latex files.

Text cells with tag ``tex'' becaome verbatim tex output. They may include anything texish --- like formulas $1+1=2$, or anything else.

Untagged cells are ignored; for example, the following one should not appear in the latex result:

Cells with tag ``pdf'' are converted into numbered pdf files in a pdf-subfolder (default name: same as the notebook's name; in this case, ``Sample''). The latex produced is \verb$\nbpdfType{Sample/nnn.pdf}$, where \verb$Type$ is the type of the current cell (\verb$Text$, \verb$Input$, \verb$Output$, \verb$Echo$, etc.), and \verb$nnn$ is the number of the current pdf file.

For example:

\noindent\nbpdfInput{Snips/2.pdf}

\noindent\nbpdfEcho{Snips/3.pdf}

\noindent\nbpdfOutput{Snips/4.pdf}


If a tag is of the form ``pdfXXX'', the string XXX gets added to the \verb$\nbpdf$ command, so it becomes \verb$\nbpdfXXXType$. This is useful for graphics inclusions, for example, where a useful tag would be ``pdfgraph'':

\noindent\nbpdfgraphInput{Snips/5.pdf}

\noindent\nbpdfgraphOutput{Snips/6.pdf}

Invoking nb2tex (suffixes are automatically added and should not be included):

\noindent\nbpdfInput{Snips/7.pdf}

Valid options include:
\begin{itemize}
\item \verb$"PDFFolder" -> foldername$ (a string).
\item \verb$"PDFWidth" -> width$ (in inches).
\end{itemize}


Text cells with tag ``exec'' get executed using \verb$ToExpression$ at the time of their processing, with no output produced. This is useful for setting / re-setting options within the notebook itself. For example, a text cell with tag exec and content \verb"nb2tex$PDFWidth=10" will allow very wide outputs:

\noindent\nbpdfInput{Snips/8.pdf}

\noindent\nbpdfOutput{Snips/9.pdf}

\noindent\nbpdfSubsection{Snips/10.pdf}

\noindent\nbpdfInput{Snips/11.pdf}

\noindent\nbpdfInput{Snips/12.pdf}

\noindent\nbpdfSubsection{Snips/13.pdf}

\noindent\nbpdfInput{Snips/14.pdf}

\noindent\nbpdfOutput{Snips/15.pdf}

\end{document}