Commits

Matthew Turk committed e5363ce

Initial import of talk template.

Comments (0)

Files changed (3)

+{
+    "*.tex|fn|jinja|latex" : {
+        "allinputs" : true
+    },
+   "*.sh|fn|bash|pyg|l" : {},
+   "*.sh|fn|bash" : {},
+   "*.sh|fn|pyg|l" : {},
+   "*.py|fn|py|pyg|l" : {},
+   "*.py|fn|pyg|l" : {}
+}
+Hi there.  This is a template for using Dexy to produce talks for the 2012 yt
+workshop.   Email me if you run into any problems (matthewturk@gmail.com).
+
+What Does Dexy Do For Us?
+=========================
+
+Dexy will:
+
+ * Automatically re-run any scripts it has detected have changed
+ * Include the output of those scripts (stdout) in your presentation if
+   requested
+ * Include the syntax-highlighted content of those scripts in your presentation
+   if requested
+ * Allow you to version control your talk
+ * Separate scripts from the talk: people can download and inspect them without
+   having to copy/paste from a PDF
+
+If you don't want to use Dexy, and instead prefer something like Keynote or
+PowerPoint, please feel free to use those.  It would be very helpful if you
+would include annotations on each slide that includes a script that point to a
+paste on paste.yt-project.org, so that we can include them in a repository at a
+later time.
+
+Getting Started
+===============
+
+ * First install Dexy, which can be done with pip:
+
+    $ pip install dexy
+
+   Dexy's homepage is http://dexy.it , but for the most part we might be able to
+   avoid detailed documentation.
+
+ * In this directory, copy the example.tex_ file to a filename of your talk.
+   (It has an extra underscore because I don't want it to get run by dexy.)
+   You can name them however you like, but mine will be lowercase with
+   underscores.  You'll need to 'hg add' this file.
+
+ * Now we have to initialize dexy.  Run this command:
+
+    $ dexy setup
+
+ * I've already provided a config file, .dexy , which you can inspect or
+   modify.  It took me a while to decipher the contents when I started using
+   dexy, but basically it describes associations between files and operations
+   to perform on those files.
+
+How To Add Scripts
+==================
+
+Inside the scripts directory, you can place new scripts which can then be
+included.  While support exists for many different types, I have only ever used
+.py and .sh scripts.  For examples on these, see the princeton tutorial I gave,
+here:
+
+  https://bitbucket.org/MatthewTurk/2011-yt-princeton-tutorial/src
+
+To add a new script to the presentation, it should be under the scripts/
+subdirectory.  You then simply include it in the presentation with this little
+bit of magic:
+
+    <<d['scripts/inspect_grids.py|fn|pyg|l']>>
+
+This tells Dexy to take the file scripts/inspect_grids.py, tell it that it's a
+filename, run it through pygments (a syntax highlighter) and then convert it to
+LaTeX.  Whew!  This won't actually *run* the script, but it will include the
+contents verbatim.  To have Dexy run the script through Python, you have to
+additionally specify a 'py' filter, like so:
+
+    <<d['scripts/inspect_grids.py|fn|py|pyg|l']>>
+
+So, for instance, this is how I set up a slide in my talk, using Beamer (and a
+few macros of my own.)
+
+    \begin{frame}[fragile,t]{}
+    \tiny
+    <<d['scripts/popiii_proj.py|fn|pyg|l']>>
+    \hline
+    <<d['scripts/popiii_proj.py|fn|py|pyg|l']>>
+    \end{frame}
+    \fullimage{DD0087_Projection_x_Density_Density.png}
+
+This uses the "fullimage" command which I made for Beamer, but you should feel
+free to include images however you like.  NOTE: If you want to include images
+*not* created from the output of running scripts, you have to use ../ to point
+back to the top level.
+
+How To Build Your Talk
+======================
+
+Now that you have a .tex file with some scripts and images included, just run:
+
+  $ dexy
+
+This will build any .tex files in your current directory.  The resulting PDF
+will be under output/ .
+\documentclass[14pt]{beamer}
+\newcommand{\bigsimple}[1]{
+  \begin{frame}[c]{}
+  \begin{center}
+    {\huge \textbf{#1} }
+  \end{center}
+  \end{frame}
+}
+\newcommand{\mediumsimple}[1]{
+  \begin{frame}[c]{}
+  \begin{center}
+    \textbf{#1}
+  \end{center}
+  \end{frame}
+}
+\newcommand{\fullimage}[1]{
+  {
+    \usebackgroundtemplate{\includegraphics[width=\paperwidth,height=\paperheight]{#1}}
+    \begin{frame}[plain]{}
+    \end{frame}
+  }
+}
+\setbeamercolor{normal text}{bg=black,fg=white}
+\setbeamertemplate{navigation symbols}{}
+\usecolortheme[named=white]{structure}
+\usetheme{default}
+\usepackage{relsize}
+\newcommand{\yt}{{\larger\texttt{yt}}}
+
+\usepackage[english]{babel}
+% or whatever
+
+\usepackage[latin1]{inputenc}
+% or whatever
+
+%\usepackage{times}
+\usepackage[T1]{fontenc}
+\usepackage{tgadventor}
+
+\usepackage{graphicx}
+\usepackage{color}
+\usepackage{fancyvrb}
+\usepackage{../pastie}
+
+\title{\yt{}: A Deep Dive}
+
+\begin{document}
+
+{
+ \usebackgroundtemplate{
+    \includegraphics[width=\paperwidth]{../title_pic.png}}
+ \begin{frame}
+   \titlepage
+ \end{frame}
+}
+
+\bigsimple{\texttt{yt-project.org}}
+
+\begin{frame}[t]{Quick outline}
+\begin{itemize}
+\item Codes \yt{} can handle
+\item Command-line tools
+\item Basic data-handling
+\item Basic plots
+\item Data objects
+\item Advanced plots
+\item Fun
+\end{itemize}
+\end{frame}
+
+\begin{frame}[fragile]{Supported Codes!}
+\begin{itemize}
+\item Enzo
+\item Nyx / Castro / Orion / Boxlib
+\item FLASH
+\item Athena (sort of!)
+\item RAMSES (partial)
+\item ART (sort of!)
+\end{itemize}
+\end{frame}
+
+\bigsimple{What \textit{can} \yt{} support?}
+
+\begin{frame}[fragile]{Starting Up \yt{}}
+\begin{itemize}
+\item Command-line
+\item Interactive
+\item Scripting
+\end{itemize}
+\end{frame}
+
+\bigsimple{Simple, command-line toos}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_stats.sh|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_stats.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/yt.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_plot.sh|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_plot.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\fullimage{frames/DD0023_Projection_x_Density_Density.png}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_slice.sh|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_slice.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\fullimage{frames/DD0023_Slice_x_Density.png}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_plot_help.sh|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_plot_help.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_render.sh|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_render.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\fullimage{DD0023_Density_rendering.png}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_render_help.sh|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_render_help.sh|fn|bash|pyg|l']>>
+\end{frame}
+
+\bigsimple{Basic data-handling}
+
+\begin{frame}[t]{How to get ``into'' \yt{}}
+\begin{itemize}
+\item Run a script with {\larger\texttt{py-yt}} or {\larger\texttt{python}}
+\item Load a dataset with {\larger\texttt{yt load}}
+\item Run {\larger\texttt{iyt}}
+\end{itemize}
+\end{frame}
+
+\mediumsimple{For these examples, we'll edit a script, then run it with {\larger\texttt{py-yt}}}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/load_data.py|fn|pyg|l']>>
+\tiny
+<<d['scripts/load_data.py|fn|py|pyg|l']>>
+\end{frame}
+
+\bigsimple{Now, let's make some plots.}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/yt_plot_collection.py|fn|pyg|l']>>
+\tiny
+<<d['scripts/yt_plot_collection.py|fn|py|pyg|l']>>
+\end{frame}
+
+\fullimage{DD0023_Slice_z_Density.png}
+
+\bigsimple{But it's cosmology, so can we find halos, too?}
+
+\begin{frame}[fragile,t]{}
+\small
+<<d['scripts/halo_plotting.py|fn|pyg|l']>>
+\tiny
+<<d['scripts/halo_plotting.py|fn|py|pyg|l']>>
+\end{frame}
+
+\fullimage{DD0023_Projection_y_Density_Density.png}
+
+\bigsimple{Let's dig deeper into our data.}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/inspect_grids.py|fn|pyg|l']>>
+\hline
+<<d['scripts/inspect_grids.py|fn|py|pyg|l']>>
+\end{frame}
+
+\bigsimple{Simple Scripting: Data Objects}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/create_sphere.py|fn|pyg|l']>>
+\hline
+<<d['scripts/create_sphere.py|fn|py|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/sphere_mass.py|fn|pyg|l']>>
+\hline
+<<d['scripts/sphere_mass.py|fn|py|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/sphere_quantities.py|fn|pyg|l']>>
+\hline
+<<d['scripts/sphere_quantities.py|fn|py|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/sphere_angular_momentum.py|fn|pyg|l']>>
+\hline
+<<d['scripts/sphere_angular_momentum.py|fn|py|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/derived_fields.py|fn|pyg|l']>>
+\hline
+<<d['scripts/derived_fields.py|fn|py|pyg|l']>>
+\end{frame}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/phase_plot.py|fn|pyg|l']>>
+\hline
+<<d['scripts/phase_plot.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_Profile2D_0_Density_Temperature_MagneticEnergy.png}
+\fullimage{DD0087_Profile2D_1_Density_Temperature_CellMassMsun.png}
+
+\bigsimple{Advanced Plots}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/popiii_proj.py|fn|pyg|l']>>
+\hline
+<<d['scripts/popiii_proj.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_Projection_x_Density_Density.png}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/popiii_offaxis.py|fn|pyg|l']>>
+\hline
+<<d['scripts/popiii_offaxis.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_offaxis.png}
+
+\begin{frame}[fragile,t]{}
+\tiny
+<<d['scripts/volume_rendering_ptf.py|fn|pyg|l']>>
+\hline
+<<d['scripts/volume_rendering_ptf.py|fn|py|pyg|l']>>
+\end{frame}
+\fullimage{DD0087_isocontour.png}
+
+\bigsimple{Fun!}
+
+\mediumsimple{{\larger\texttt{yt mapserver}}}
+
+\mediumsimple{{\larger\texttt{yt serve}}}
+\fullimage{../reason.png}
+
+\begin{frame}[c]{Places to go from here}
+\item Documentation: tutorial, advanced examples, cookbook, etc
+\item Support venues: {\larger \texttt{yt-users}}, {\larger \texttt{yt-dev}}, IRC
+\item \yt{} Hub
+\item \yt{} workshop, Chicago, January 24-26 2012!
+\end{frame}
+
+\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.