Hans Petter Langtangen 13 년 전
부모
커밋
0642187ff9
3개의 변경된 파일1350개의 추가작업 그리고 0개의 파일을 삭제
  1. 656 0
      doc/src/sketcher/.ptex2tex.cfg-minted
  2. 656 0
      doc/src/sketcher/.ptex2tex.cfg-primer
  3. 38 0
      doc/src/sketcher/exercises.do.txt

+ 656 - 0
doc/src/sketcher/.ptex2tex.cfg-minted

@@ -0,0 +1,656 @@
+
+# plain Verbatim environment:
+[Verb]
+breplace = \begin{Verbatim}
+ereplace = \end{Verbatim}
+
+# white background, rules above and below, with a title box "Code"
+[CodeRule]
+breplace = \vspace{4pt}
+	   \begin{Verbatim}[numbers=none,frame=lines,label=\fbox{{\tiny %(boxtext)s}},fontsize=\%(fontsize)s,
+	   labelposition=topline,framesep=2.5mm,framerule=1pt]
+ereplace = \end{Verbatim}
+boxtext = Code
+fontsize = fontsize{9pt}{9pt}
+
+# white background, rules above and below, with a title box "Terminal"
+[CodeTerminal]
+breplace = \vspace{4pt}
+	   \begin{Verbatim}[numbers=none,frame=lines,label=\fbox{{\tiny %(boxtext)s}},fontsize=\%(fontsize)s,
+	   labelposition=topline,framesep=2.5mm,framerule=0.7pt]
+ereplace = \end{Verbatim}
+fontsize = fontsize{9pt}{9pt}
+boxtext = Terminal
+
+# more plain Verbatim environment
+[Code]
+breplace = \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+# as Code, but with line numbers
+[CodeLineNo]
+breplace = \begin{Verbatim}[numbers=left,fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s]
+ereplace = \end{Verbatim}
+           \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+# as Code, but indented:
+[CodeIndented]
+breplace = \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s,
+	   fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+
+# as CodeIndented, but larger font (10pt9:
+[CodeIndented10]
+breplace = \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s,
+	   fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{10pt}{10pt}
+
+
+# Verbatim environments arising from the package pythonhighlight.sty,
+# now extended to anslistings.sty. Python_ANSt is with a title ("Python"),
+# while Python_ANS is without the title. Similar for other languages.
+[Python_ANSt]
+breplace = \begin{python}
+ereplace = \end{python}
+
+[Python_ANS]
+breplace = \begin{python:nt}
+ereplace = \end{python:nt}
+
+[Cpp_ANSt]
+breplace = \begin{c++}
+ereplace = \end{c++}
+
+[Cpp_ANS]
+breplace = \begin{c++:nt}
+ereplace = \end{c++:nt}
+
+[Matlab_ANS]
+breplace = \begin{matlab}
+ereplace = \end{matlab}
+
+[Bash_ANSt]
+breplace = \begin{bash}
+ereplace = \end{bash}
+
+[Bash_ANS]
+breplace = \begin{bash:nt}
+ereplace = \end{bash:nt}
+
+[Swig_ANSt]
+breplace = \begin{swigcode}
+ereplace = \end{swigcode}
+
+[Swig_ANS]
+breplace = \begin{swigcode:nt}
+ereplace = \end{swigcode:nt}
+
+[gencode_ANSt]
+breplace = \begin{gencode}
+ereplace = \end{gencode}
+
+[gencode_ANS]
+breplace = \begin{gencode:nt}
+ereplace = \end{gencode:nt}
+
+[UFL_ANSt]
+breplace = \begin{uflcode}
+ereplace = \end{uflcode}
+
+[UFL_ANS]
+breplace = \begin{uflcode:nt}
+ereplace = \end{uflcode:nt}
+
+[Output_ANSt]
+breplace = \begin{progoutput}
+ereplace = \end{progoutput}
+
+[Output_ANS]
+breplace = \begin{progoutput:nt}
+ereplace = \end{progoutput:nt}
+
+
+# Several minted styles (requires minted LaTeX package and Pygments)
+[Minted_Python]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{python}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Cython]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{cython}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Cpp]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{c++}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_C]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{c}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Fortran]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{fortran}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Matlab]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{matlab}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+
+[Minted_Bash]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{bash}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Perl]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{perl}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+
+
+# warning box, pink background, warning sign
+[Warnings]
+breplace = \definecolor{warnback}{rgb}{1.0, 0.8235294, 0.8235294}
+	   \setlength{\fboxrule}{2pt}
+	   \begin{center}
+	   \fcolorbox{black}{warnback}{
+	   \begin{minipage}{0.8\textwidth}
+	   \includegraphics[height=0.3in]{warning.eps}
+	   \vskip-0.3in\hskip1.5in{\large\bf WARNING} \\[0.2cm]
+ereplace = \end{minipage}}
+	   \end{center}
+	   \setlength{\fboxrule}{0.4pt} %% Back to default
+
+# tip box, light blue background, "i" (info) sign
+[Tip]
+breplace = \definecolor{tipback}{rgb}{0.87843, 0.95686, 1.0}
+	   \setlength{\fboxrule}{2pt}
+	   \begin{center}
+	   \fcolorbox{black}{tipback}{
+	   \begin{minipage}{0.8\textwidth}
+	   \includegraphics[height=0.3in]{tip.eps}
+	   \vskip-0.3in\hskip1.5in{\large\bf TIP} \\[0.2cm]
+ereplace = \end{minipage}}
+	   \end{center}
+	   \setlength{\fboxrule}{0.4pt} %% Back to default
+
+# note box, "i" (info) sign
+[Note]
+breplace = \definecolor{noteback}{rgb}{0.988235, 0.964706, 0.862745}
+	   \setlength{\fboxrule}{2pt}
+	   \begin{center}
+	   \fcolorbox{black}{noteback}{
+	   \begin{minipage}{0.8\textwidth}
+	   \includegraphics[height=0.3in]{tip.eps}
+	   \vskip-0.3in\hskip1.5in{\large\bf NOTE} \\[0.2cm]
+ereplace = \end{minipage}}
+	   \end{center}
+	   \setlength{\fboxrule}{0.4pt} %% Back to default
+
+
+# colored box, can handle multiple pages
+[Blue]
+shadecolor = 0.87843, 0.95686, 1.0
+envname    = Blue
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+# colored box, can handle multiple pages
+# \fcolorbox{black}{yellow}
+[BlueFrame]
+shadecolor = 0.87843, 0.95686, 1.0
+envname    = BlueFrame
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\fcolorbox{black}{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box with left vertical bar, can handle multiple pages
+[BlueBar]
+shadecolor = 0.87843, 0.95686, 1.0
+barcolor   = 0.7,     0.95686, 1
+envname    = BlueBar
+define   = True
+newenv   = \providecommand{\shadedwbar}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedwbar}{
+           \def\FrameCommand{\color[rgb]{%(barcolor)s}\vrule width 1mm\normalcolor\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\advance\hsize-2mm\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedwbar}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedwbar}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box, can handle multiple pages
+[Red]
+shadecolor = 1, 0.97, 0.85
+envname    = Red
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+# colored box, can handle multiple pages
+[RedFrame]
+shadecolor = 1, 0.97, 0.85
+envname    = RedFrame
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\fcolorbox{black}{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box with left vertical bar, can handle multiple pages
+[RedBar]
+shadecolor = 1, 0.97, 0.85
+barcolor   = 1, 0.85, 0.85
+envname    = RedBar
+define   = True
+newenv   = \providecommand{\shadedwbar}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedwbar}{
+           \def\FrameCommand{\color[rgb]{%(barcolor)s}\vrule width 1mm\normalcolor\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\advance\hsize-2mm\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedwbar}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedwbar}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+# colored box, can handle multiple pages
+[Yellow]
+shadecolor = 1.0, 1.0, 0.7
+envname    = Yellow
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box, can handle multiple pages
+[Gray]
+envname  = Gray
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{gray}{0.93}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+
+# light blue shaded box, can handle multiple pages, "snippet" to the right
+[Blue_snippet]
+define   = True
+newenv   = \providecommand{\shadedquoteBluesnippet}{}
+           \renewenvironment{shadedquoteBluesnippet}[1][]{
+           \definecolor{shadecolor}{rgb}{0.87843, 0.95686, 1.0}
+           \definecolor{shadetitle}{rgb}{0.5, 0.95686, 1}
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shaded}
+           {{\hfill\tiny\textsf{\textcolor{shadetitle}{Snippet\ \ }}}}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist{\textcolor{shadecolor}{\ }}\end{shaded}\egroup}
+breplace = \begin{shadedquoteBluesnippet}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquoteBluesnippet}
+           \noindent
+
+# light blue, shaded box, can not handle multiple pages (sp = single page)
+[Blue_singlepage]
+breplace = \begin{SaveVerbatim}{Snippet}
+ereplace = \end{SaveVerbatim}
+           \setlength{\fboxrule}{0pt}
+           \begin{center}
+           \definecolor{shadecolor}{rgb}{0.87843, 0.95686, 1.0}
+           \fcolorbox{black}{shadecolor}{
+           \begin{minipage}{0.97\textwidth}
+#           \centering{\large\bf Program snippet} \\[0.2cm]
+           \raggedright
+           \fontsize{9pt}{9pt}\selectfont{\BUseVerbatim{Snippet}}
+           \end{minipage}}
+           \end{center}
+           \setlength{\fboxrule}{0.4pt} %% Back to default
+           \noindent
+
+# light gray, shaded box, can not handle multiple pages (sp = single page)
+[Gray_singlepage]
+breplace = \begin{SaveVerbatim}{Programsingle}
+ereplace = \end{SaveVerbatim}
+           \setlength{\fboxrule}{0pt}
+           \begin{center}
+           \definecolor{shadecolor}{gray}{0.93}
+           \fcolorbox{black}{shadecolor}{
+           \begin{minipage}{0.97\textwidth}
+#           \centering{\large\bf Program line} \\[0.2cm]
+           \raggedright
+           \fontsize{9pt}{9pt}\selectfont{\BUseVerbatim{Programsingle}}
+           \end{minipage}}
+           \end{center}
+           \setlength{\fboxrule}{0.4pt} %% Back to default
+           \noindent
+
+
+# Tiago Quintino's code environment
+[PythonTiago]
+breplace = \lstset{language=Python}
+           \lstset{frame=single,numbers=left,numberstyle=\tiny,numbersep=6pt,
+                   stepnumber=2}
+           \lstset{framexleftmargin=0mm,
+                   framexrightmargin=0mm,
+                   frame=shadowbox,
+                   rulesepcolor=\color{dgray}}
+           {\fontsize{9pt}{9pt}
+           \begin{lstlisting}
+ereplace = \end{lstlisting}}\vspace{3mm}
+
+# Tiago Quintino's code environment
+[CppTiago]
+breplace = \lstset{language=[ISO]{C++}}
+           \lstset{frame=single,numbers=left,numberstyle=\tiny,numbersep=6pt,
+                   stepnumber=2}
+           \lstset{framexleftmargin=0mm,
+                   framexrightmargin=0mm,
+                   frame=shadowbox,
+                   rulesepcolor=\color{dgray}}
+           {\fontsize{9pt}{9pt}
+           \begin{lstlisting}
+ereplace = \end{lstlisting}}\vspace{3mm}
+
+# old FEniCS style code environment
+[oldFEniCS]
+define   = True
+newenv   = \providecommand{\fenicscode}{}
+           \renewenvironment{fenicscode}[1]{
+           \center\tabular{c}\hline\\ \footnotesize
+           \minipage{#1\textwidth}\verbatim}
+           {\endverbatim\endminipage\\ \\ \hline\endtabular\endcenter}
+breplace = \begin{fenicscode}{0.9}
+ereplace = \end{fenicscode}
+
+# old FEniCS style code environment
+[oldFEniCSsmall]
+define   = True
+newenv   = \providecommand{\fenicscodesmall}{}
+           \renewenvironment{fenicscodesmall}[1]{
+           \center\footnotesize\minipage{#1\textwidth}\verbatim}
+           {\endverbatim\endminipage\endcenter}
+breplace = \begin{fenicscodesmall}{0.9}
+ereplace = \end{fenicscodesmall}
+
+
+# NOTE: The CodeGrayWhite1/2 redefine \FancyVerbFormatLine and this
+# will affect all forthcoming styles that use fancyvrb (quite many!).
+# Be careful with this environment
+
+# Code with gray background and white split between lines:
+[CodeGrayWhite1]
+breplace = \definecolor{Light}{gray}{.80}
+            \renewcommand{\FancyVerbFormatLine}[1]{\colorbox{Light}{\makebox[\linewidth][l]{#1}}}
+           \begin{Verbatim}[fontsize=\%(fontsize)s,numbers=left,tabsize=8,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+# as CodeGrayWhite1, but no line numbers:
+[CodeGrayWhite2]
+breplace = \definecolor{Light}{gray}{.80}
+            \renewcommand{\FancyVerbFormatLine}[1]{\colorbox{Light}{\makebox[\linewidth][l]{#1}}}
+           \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+
+[inline_code]
+font = 10
+
+[preprocess]
+#defines = T2
+#undefines = T2
+#includes = /home/some/body/myfile
+
+[names]
+# the names below are just examples - new names can be
+# defined instead or in addition to those listed here
+
+
+# computer code in quote environment (gives a left margin):
+ccq  = CodeIndented
+# computer code with no left margin:
+cc   = Code
+# computer code with line numbering:
+ccl  = CodeLineNo
+# program box:
+pro  = BlueBar
+pypro  = Minted_Python
+cypro  = Minted_Cython
+cpppro = Minted_Cpp
+cpro   = Minted_C
+fpro   = Minted_Fortran
+plpro  = Minted_Perl
+shpro  = Minted_Bash
+mpro   = Minted_Matlab
+# computer code box (snippet, not complete program):
+cod  = Blue
+pycod  = Minted_Python
+cycod  = Minted_Cython
+cppcod = Minted_Cpp
+ccod   = Minted_C
+fcod   = Minted_Fortran
+plcod  = Minted_Perl
+shcod  = Minted_Bash
+mcod   = Minted_Matlab
+# computer code box (snippet, not complete program):
+#ccod   = Cpp_ANS
+#cppcod = Cpp_ANS
+#pycod  = Python_ANS
+#cycod  = Cython_ANS
+#cans   = Cpp_ANS
+cppans = Cpp_ANS
+pyans  = Python_ANS
+bashans= Bash_ANS
+swigans= Swig_ANS
+uflans = UFL_ANS
+# computer code box (snippet, not complete program):
+#sni  = Blue_snippet
+sni  = Blue
+# data file:
+dat  = CodeIndented
+# data file snippet:
+dsni = CodeIndented
+# system commands (in terminal window):
+sys  = CodeTerminal
+# one-line system command (in terminal window):
+slin = Code
+# IPython interactive session:
+ipy  = Code
+# standard interactive python session:
+py   = Code
+# execution of a Python program ("run python"):
+rpy  = CodeTerminal
+# one-line program code:
+plin = Code
+# verbatim environment:
+ver  = Verb
+# warning box:
+warn = Warnings
+# tip box:
+rule = Tip
+# note box:
+summ = Note

+ 656 - 0
doc/src/sketcher/.ptex2tex.cfg-primer

@@ -0,0 +1,656 @@
+
+# plain Verbatim environment:
+[Verb]
+breplace = \begin{Verbatim}
+ereplace = \end{Verbatim}
+
+# white background, rules above and below, with a title box "Code"
+[CodeRule]
+breplace = \vspace{4pt}
+	   \begin{Verbatim}[numbers=none,frame=lines,label=\fbox{{\tiny %(boxtext)s}},fontsize=\%(fontsize)s,
+	   labelposition=topline,framesep=2.5mm,framerule=1pt]
+ereplace = \end{Verbatim}
+boxtext = Code
+fontsize = fontsize{9pt}{9pt}
+
+# white background, rules above and below, with a title box "Terminal"
+[CodeTerminal]
+breplace = \vspace{4pt}
+	   \begin{Verbatim}[numbers=none,frame=lines,label=\fbox{{\tiny %(boxtext)s}},fontsize=\%(fontsize)s,
+	   labelposition=topline,framesep=2.5mm,framerule=0.7pt]
+ereplace = \end{Verbatim}
+fontsize = fontsize{9pt}{9pt}
+boxtext = Terminal
+
+# more plain Verbatim environment
+[Code]
+breplace = \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+# as Code, but with line numbers
+[CodeLineNo]
+breplace = \begin{Verbatim}[numbers=left,fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s]
+ereplace = \end{Verbatim}
+           \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+# as Code, but indented:
+[CodeIndented]
+breplace = \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s,
+	   fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+
+# as CodeIndented, but larger font (10pt9:
+[CodeIndented10]
+breplace = \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s,
+	   fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{10pt}{10pt}
+
+
+# Verbatim environments arising from the package pythonhighlight.sty,
+# now extended to anslistings.sty. Python_ANSt is with a title ("Python"),
+# while Python_ANS is without the title. Similar for other languages.
+[Python_ANSt]
+breplace = \begin{python}
+ereplace = \end{python}
+
+[Python_ANS]
+breplace = \begin{python:nt}
+ereplace = \end{python:nt}
+
+[Cpp_ANSt]
+breplace = \begin{c++}
+ereplace = \end{c++}
+
+[Cpp_ANS]
+breplace = \begin{c++:nt}
+ereplace = \end{c++:nt}
+
+[Matlab_ANS]
+breplace = \begin{matlab}
+ereplace = \end{matlab}
+
+[Bash_ANSt]
+breplace = \begin{bash}
+ereplace = \end{bash}
+
+[Bash_ANS]
+breplace = \begin{bash:nt}
+ereplace = \end{bash:nt}
+
+[Swig_ANSt]
+breplace = \begin{swigcode}
+ereplace = \end{swigcode}
+
+[Swig_ANS]
+breplace = \begin{swigcode:nt}
+ereplace = \end{swigcode:nt}
+
+[gencode_ANSt]
+breplace = \begin{gencode}
+ereplace = \end{gencode}
+
+[gencode_ANS]
+breplace = \begin{gencode:nt}
+ereplace = \end{gencode:nt}
+
+[UFL_ANSt]
+breplace = \begin{uflcode}
+ereplace = \end{uflcode}
+
+[UFL_ANS]
+breplace = \begin{uflcode:nt}
+ereplace = \end{uflcode:nt}
+
+[Output_ANSt]
+breplace = \begin{progoutput}
+ereplace = \end{progoutput}
+
+[Output_ANS]
+breplace = \begin{progoutput:nt}
+ereplace = \end{progoutput:nt}
+
+
+# Several minted styles (requires minted LaTeX package and Pygments)
+[Minted_Python]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{python}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Cython]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{cython}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Cpp]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{c++}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_C]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{c}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Fortran]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{fortran}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Matlab]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{matlab}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+
+[Minted_Bash]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{bash}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+[Minted_Perl]
+breplace = \begin{minted}[fontsize=\%(fontsize)s,linenos=false,mathescape,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]{perl}
+ereplace = \end{minted}
+	   \noindent
+bstretch = 1.0
+fontsize = fontsize{9pt}{9pt}
+
+
+
+# warning box, pink background, warning sign
+[Warnings]
+breplace = \definecolor{warnback}{rgb}{1.0, 0.8235294, 0.8235294}
+	   \setlength{\fboxrule}{2pt}
+	   \begin{center}
+	   \fcolorbox{black}{warnback}{
+	   \begin{minipage}{0.8\textwidth}
+	   \includegraphics[height=0.3in]{warning.eps}
+	   \vskip-0.3in\hskip1.5in{\large\bf WARNING} \\[0.2cm]
+ereplace = \end{minipage}}
+	   \end{center}
+	   \setlength{\fboxrule}{0.4pt} %% Back to default
+
+# tip box, light blue background, "i" (info) sign
+[Tip]
+breplace = \definecolor{tipback}{rgb}{0.87843, 0.95686, 1.0}
+	   \setlength{\fboxrule}{2pt}
+	   \begin{center}
+	   \fcolorbox{black}{tipback}{
+	   \begin{minipage}{0.8\textwidth}
+	   \includegraphics[height=0.3in]{tip.eps}
+	   \vskip-0.3in\hskip1.5in{\large\bf TIP} \\[0.2cm]
+ereplace = \end{minipage}}
+	   \end{center}
+	   \setlength{\fboxrule}{0.4pt} %% Back to default
+
+# note box, "i" (info) sign
+[Note]
+breplace = \definecolor{noteback}{rgb}{0.988235, 0.964706, 0.862745}
+	   \setlength{\fboxrule}{2pt}
+	   \begin{center}
+	   \fcolorbox{black}{noteback}{
+	   \begin{minipage}{0.8\textwidth}
+	   \includegraphics[height=0.3in]{tip.eps}
+	   \vskip-0.3in\hskip1.5in{\large\bf NOTE} \\[0.2cm]
+ereplace = \end{minipage}}
+	   \end{center}
+	   \setlength{\fboxrule}{0.4pt} %% Back to default
+
+
+# colored box, can handle multiple pages
+[Blue]
+shadecolor = 0.87843, 0.95686, 1.0
+envname    = Blue
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+# colored box, can handle multiple pages
+# \fcolorbox{black}{yellow}
+[BlueFrame]
+shadecolor = 0.87843, 0.95686, 1.0
+envname    = BlueFrame
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\fcolorbox{black}{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box with left vertical bar, can handle multiple pages
+[BlueBar]
+shadecolor = 0.87843, 0.95686, 1.0
+barcolor   = 0.7,     0.95686, 1
+envname    = BlueBar
+define   = True
+newenv   = \providecommand{\shadedwbar}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedwbar}{
+           \def\FrameCommand{\color[rgb]{%(barcolor)s}\vrule width 1mm\normalcolor\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\advance\hsize-2mm\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedwbar}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedwbar}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box, can handle multiple pages
+[Red]
+shadecolor = 1, 0.97, 0.85
+envname    = Red
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+# colored box, can handle multiple pages
+[RedFrame]
+shadecolor = 1, 0.97, 0.85
+envname    = RedFrame
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\fcolorbox{black}{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box with left vertical bar, can handle multiple pages
+[RedBar]
+shadecolor = 1, 0.97, 0.85
+barcolor   = 1, 0.85, 0.85
+envname    = RedBar
+define   = True
+newenv   = \providecommand{\shadedwbar}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedwbar}{
+           \def\FrameCommand{\color[rgb]{%(barcolor)s}\vrule width 1mm\normalcolor\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\advance\hsize-2mm\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedwbar}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedwbar}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+# colored box, can handle multiple pages
+[Yellow]
+shadecolor = 1.0, 1.0, 0.7
+envname    = Yellow
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{rgb}{%(shadecolor)s}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+# colored box, can handle multiple pages
+[Gray]
+envname  = Gray
+define   = True
+newenv   = \providecommand{\shadedskip}{}
+           \definecolor{shadecolor}{gray}{0.93}
+           \renewenvironment{shadedskip}{
+           \def\FrameCommand{\colorbox{shadecolor}}\FrameRule0.6pt
+           \MakeFramed {\FrameRestore}\vskip3mm}{\vskip0mm\endMakeFramed}
+           \providecommand{\shadedquote%(envname)s}{}
+           \renewenvironment{shadedquote%(envname)s}[1][]{
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shadedskip}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist\end{shadedskip}\egroup}
+breplace = \begin{shadedquote%(envname)s}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquote%(envname)s}
+           \noindent
+
+
+
+# light blue shaded box, can handle multiple pages, "snippet" to the right
+[Blue_snippet]
+define   = True
+newenv   = \providecommand{\shadedquoteBluesnippet}{}
+           \renewenvironment{shadedquoteBluesnippet}[1][]{
+           \definecolor{shadecolor}{rgb}{0.87843, 0.95686, 1.0}
+           \definecolor{shadetitle}{rgb}{0.5, 0.95686, 1}
+           \bgroup\rmfamily
+           \fboxsep=0mm\relax
+           \begin{shaded}
+           {{\hfill\tiny\textsf{\textcolor{shadetitle}{Snippet\ \ }}}}
+           \list{}{\parsep=-2mm\parskip=0mm\topsep=0pt\leftmargin=2mm
+	   \rightmargin=2\leftmargin\leftmargin=4pt\relax}
+           \item\relax}
+           {\endlist{\textcolor{shadecolor}{\ }}\end{shaded}\egroup}
+breplace = \begin{shadedquoteBluesnippet}
+#           \centering{\large\bf Program} \\[0.2cm]
+           \fontsize{9pt}{9pt}
+           \begin{Verbatim}
+ereplace = \end{Verbatim}
+           \end{shadedquoteBluesnippet}
+           \noindent
+
+# light blue, shaded box, can not handle multiple pages (sp = single page)
+[Blue_singlepage]
+breplace = \begin{SaveVerbatim}{Snippet}
+ereplace = \end{SaveVerbatim}
+           \setlength{\fboxrule}{0pt}
+           \begin{center}
+           \definecolor{shadecolor}{rgb}{0.87843, 0.95686, 1.0}
+           \fcolorbox{black}{shadecolor}{
+           \begin{minipage}{0.97\textwidth}
+#           \centering{\large\bf Program snippet} \\[0.2cm]
+           \raggedright
+           \fontsize{9pt}{9pt}\selectfont{\BUseVerbatim{Snippet}}
+           \end{minipage}}
+           \end{center}
+           \setlength{\fboxrule}{0.4pt} %% Back to default
+           \noindent
+
+# light gray, shaded box, can not handle multiple pages (sp = single page)
+[Gray_singlepage]
+breplace = \begin{SaveVerbatim}{Programsingle}
+ereplace = \end{SaveVerbatim}
+           \setlength{\fboxrule}{0pt}
+           \begin{center}
+           \definecolor{shadecolor}{gray}{0.93}
+           \fcolorbox{black}{shadecolor}{
+           \begin{minipage}{0.97\textwidth}
+#           \centering{\large\bf Program line} \\[0.2cm]
+           \raggedright
+           \fontsize{9pt}{9pt}\selectfont{\BUseVerbatim{Programsingle}}
+           \end{minipage}}
+           \end{center}
+           \setlength{\fboxrule}{0.4pt} %% Back to default
+           \noindent
+
+
+# Tiago Quintino's code environment
+[PythonTiago]
+breplace = \lstset{language=Python}
+           \lstset{frame=single,numbers=left,numberstyle=\tiny,numbersep=6pt,
+                   stepnumber=2}
+           \lstset{framexleftmargin=0mm,
+                   framexrightmargin=0mm,
+                   frame=shadowbox,
+                   rulesepcolor=\color{dgray}}
+           {\fontsize{9pt}{9pt}
+           \begin{lstlisting}
+ereplace = \end{lstlisting}}\vspace{3mm}
+
+# Tiago Quintino's code environment
+[CppTiago]
+breplace = \lstset{language=[ISO]{C++}}
+           \lstset{frame=single,numbers=left,numberstyle=\tiny,numbersep=6pt,
+                   stepnumber=2}
+           \lstset{framexleftmargin=0mm,
+                   framexrightmargin=0mm,
+                   frame=shadowbox,
+                   rulesepcolor=\color{dgray}}
+           {\fontsize{9pt}{9pt}
+           \begin{lstlisting}
+ereplace = \end{lstlisting}}\vspace{3mm}
+
+# old FEniCS style code environment
+[oldFEniCS]
+define   = True
+newenv   = \providecommand{\fenicscode}{}
+           \renewenvironment{fenicscode}[1]{
+           \center\tabular{c}\hline\\ \footnotesize
+           \minipage{#1\textwidth}\verbatim}
+           {\endverbatim\endminipage\\ \\ \hline\endtabular\endcenter}
+breplace = \begin{fenicscode}{0.9}
+ereplace = \end{fenicscode}
+
+# old FEniCS style code environment
+[oldFEniCSsmall]
+define   = True
+newenv   = \providecommand{\fenicscodesmall}{}
+           \renewenvironment{fenicscodesmall}[1]{
+           \center\footnotesize\minipage{#1\textwidth}\verbatim}
+           {\endverbatim\endminipage\endcenter}
+breplace = \begin{fenicscodesmall}{0.9}
+ereplace = \end{fenicscodesmall}
+
+
+# NOTE: The CodeGrayWhite1/2 redefine \FancyVerbFormatLine and this
+# will affect all forthcoming styles that use fancyvrb (quite many!).
+# Be careful with this environment
+
+# Code with gray background and white split between lines:
+[CodeGrayWhite1]
+breplace = \definecolor{Light}{gray}{.80}
+            \renewcommand{\FancyVerbFormatLine}[1]{\colorbox{Light}{\makebox[\linewidth][l]{#1}}}
+           \begin{Verbatim}[fontsize=\%(fontsize)s,numbers=left,tabsize=8,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+# as CodeGrayWhite1, but no line numbers:
+[CodeGrayWhite2]
+breplace = \definecolor{Light}{gray}{.80}
+            \renewcommand{\FancyVerbFormatLine}[1]{\colorbox{Light}{\makebox[\linewidth][l]{#1}}}
+           \begin{Verbatim}[fontsize=\%(fontsize)s,tabsize=8,baselinestretch=%(bstretch)s,fontfamily=tt,xleftmargin=7mm]
+ereplace = \end{Verbatim}
+	   \noindent
+bstretch = 0.85
+fontsize = fontsize{9pt}{9pt}
+
+
+[inline_code]
+font = 10
+
+[preprocess]
+#defines = T2
+#undefines = T2
+#includes = /home/some/body/myfile
+
+[names]
+# the names below are just examples - new names can be
+# defined instead or in addition to those listed here
+
+
+# computer code in quote environment (gives a left margin):
+ccq  = CodeIndented
+# computer code with no left margin:
+cc   = Code
+# computer code with line numbering:
+ccl  = CodeLineNo
+# program box:
+pro  = BlueBar
+pypro  = BlueBar
+cypro  = BlueBar
+cpppro = BlueBar
+cpro   = BlueBar
+fpro   = BlueBar
+plpro  = BlueBar
+shpro  = BlueBar
+mpro   = BlueBar
+# computer code box (snippet, not complete program):
+cod  = Blue
+pycod  = Blue
+cycod  = Blue
+cppcod = Blue
+ccod   = Blue
+fcod   = Blue
+plcod  = Blue
+shcod  = Blue
+mcod   = Blue
+# computer code box (snippet, not complete program):
+#ccod   = Cpp_ANS
+#cppcod = Cpp_ANS
+#pycod  = Python_ANS
+#cycod  = Cython_ANS
+#cans   = Cpp_ANS
+cppans = Cpp_ANS
+pyans  = Python_ANS
+bashans= Bash_ANS
+swigans= Swig_ANS
+uflans = UFL_ANS
+# computer code box (snippet, not complete program):
+#sni  = Blue_snippet
+sni  = Blue
+# data file:
+dat  = CodeIndented
+# data file snippet:
+dsni = CodeIndented
+# system commands (in terminal window):
+sys  = CodeTerminal
+# one-line system command (in terminal window):
+slin = Code
+# IPython interactive session:
+ipy  = Code
+# standard interactive python session:
+py   = Code
+# execution of a Python program ("run python"):
+rpy  = CodeTerminal
+# one-line program code:
+plin = Code
+# verbatim environment:
+ver  = Verb
+# warning box:
+warn = Warnings
+# tip box:
+rule = Tip
+# note box:
+summ = Note

+ 38 - 0
doc/src/sketcher/exercises.do.txt

@@ -0,0 +1,38 @@
+# #ifndef PRIMER_BOOK
+======= Exercises =======
+# #endif
+
+===== Exercise: Make line drawing of a person; program =====
+label{pysketcher:exer:person:prog}
+file=draw_person.py
+
+A very simple sketch of a human being can be made of a circle for the
+head, two lines for the arms, one vertical line, a triangle, or a rectangle
+for the torso, and
+two lines for the legs.
+Make such a drawing in a program, utilizing appropriate classes
+in the `Shape` hierarchy.
+
+===== Exercise: Make line drawing of a person; class =====
+label{pysketcher:exer:person:class}
+file=Person.py
+
+Use the code from Exercise ref{pysketcher:exer:person:prog} to make
+a subclass of `Shape` that draws a person.
+Supply the following
+arguments to the constructor: the center point of the head and
+the radius $R$ of the head. Let the arms and the torso
+be of length $4R$, and the legs of length $6R$.
+The angle between the legs can be fixed (say 30 degrees),
+while the angle of the
+arms relative to the torso can be an argument to the constructor
+with a suitable default value.
+
+===== Exercise: Animate a person with waving hands =====
+label{pysketcher:exer:person:anim}
+file=waving_person.py
+
+Make a subclass of the class from Exercise ref{pysketcher:exer:person:class}
+where the constructor can
+take an argument describing the angle between the arms and the torso.
+Use this new class to animate a person who waves her/his hands.