-
Notifications
You must be signed in to change notification settings - Fork 0
/
slidenotes.dtx
114 lines (113 loc) · 3.08 KB
/
slidenotes.dtx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
% \iffalse meta-comment
%
% Copyright (C) 2014 by Carsten Burgard
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
% version 1.2 of this license or (at your option) any later
% version. The latest version of this license is in:
%
% http://www.latex-project.org/lppl.txt
%
% and version 1.2 or later is part of all distributions of
% LaTeX version 1999/12/01 or later.
%
% \fi
%
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{slidenotes}
%<package> [2012/05/23 v1.0 A minimalist package for easy, automatic data tables and lists]
%<*driver>
\documentclass{ltxdoc}
\setlength{\parskip}{3pt}
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{4}
\setcounter{dbltopnumber}{2}
\renewcommand{\topfraction}{0.9}
\renewcommand{\bottomfraction}{0.8}
\renewcommand{\textfraction}{0.07}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
\begin{document}
\DocInput{datablist.dtx}
\end{document}
%</driver>
% \fi
% \CheckSum{0}
% \changes{v1.0}{2012/05/23}{Original Version}
% \GetFileInfo {datablist.sty}
% \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\,,\=,\>}
% \DoNotIndex{\@ne}
% \DoNotIndex{\advance,\begingroup,\catcode,\closein}
% \DoNotIndex{\closeout,\day,\def,\edef,\else,\empty,\endgroup}
%
\RequirePackage{verbatim}
%
% \title{The \textsf{ slidenotes } package
% \thanks{This document corresponds to \textsf{datablist} ~\fileversion, dated~\filedate.}}
%
% \author{ Carsten Burgard \\ \texttt{ carsten.burgard@gmail.com }}
%
% \maketitle
%
% \begin{abstract}
% It is often convenient to typeset slides and corresponding notes in
% separate documents, while still having them clustered in a single
% source file. This package provides the capability to do so by
% allowing automatic export of slide notes, complete with heading and
% numbers.
% \end {abstract}
%
% \section{Introduction}
% Put something here.
% \section{Slides}
% \begin{verbatim}
% \begin{slidenotes}
% It's obvious.
% \end{slidenotes}
%
% \begin{slidenotes}
% It's also obvious $x^2$.
% \end{slidenotes}
% \end{verbatim}
%
%\section{Notes}
%\begin{verbatim}
%\newenvironment{slidenotes}[1]{
% \section{Slide #1}
%}{
%}
%\end{verbatim}
%
%
%
% \section{Implementation}
% \begin{macro}{slidenotes}
% \begin{macrocode}
\def\setslidenotesfilename#1{\def\slidenotes@filename{#1}}
\def\slidenotes@filename{slidenotes.tmp.tex}
\newwrite\slidenotes@out
\immediate\openout\slidenotes@out\slidenotes@filename%
\begingroup\lccode`!=`\\\lowercase{\endgroup\def\bs{!}}
\def\slidenotes@arg#1{%
\begingroup
\@bsphack%
\let\do\@makeother\dospecials%
\catcode`\^^M\active%
\def\verbatim@processline{%
\immediate\write\slidenotes@out{\the\verbatim@line}}%
\immediate\write\slidenotes@out{\bs begin{slidenotes}{\theframenumber}}%
\verbatim@start
}
\def\slidenotes{\obeylines\expandafter\slidenotes@arg\noexpand}
\def\endslidenotes{%
\endgroup
\immediate\write\slidenotes@out{\bs end{slidenotes}}%
}
\AtEndDocument{\immediate\closeout\slidenotes@out\@esphack}
% \end{macrocode}
% \end{macro}
% \end{document}