2015-03-03 01:48:52 +01:00
|
|
|
% Inherit from report
|
2017-11-19 02:14:31 +01:00
|
|
|
|
|
|
|
((= IPython input/output style =))
|
|
|
|
|
|
|
|
((*- extends 'base.tplx' -*))
|
|
|
|
|
2015-03-03 01:48:52 +01:00
|
|
|
|
|
|
|
((* block docclass *))
|
|
|
|
\documentclass{book}
|
2015-03-04 03:46:19 +01:00
|
|
|
\setcounter{chapter}{0}
|
2015-11-26 22:08:40 +01:00
|
|
|
\raggedbottom
|
2016-01-23 17:37:59 +01:00
|
|
|
\usepackage{stix}
|
2015-03-03 01:48:52 +01:00
|
|
|
((* endblock docclass *))
|
|
|
|
|
|
|
|
((* block preamble *))
|
2016-01-29 02:48:42 +01:00
|
|
|
|
2015-03-03 01:48:52 +01:00
|
|
|
((* endblock preamble *))
|
|
|
|
|
2014-05-27 04:31:32 +02:00
|
|
|
((* block title *))
|
|
|
|
\title{Kalman and Bayesian Filters in Python}
|
2014-05-27 06:03:56 +02:00
|
|
|
\author{Roger R Labbe Jr}
|
2014-05-27 04:31:32 +02:00
|
|
|
((* endblock title *))
|
2015-11-26 22:08:40 +01:00
|
|
|
|
2015-03-03 01:48:52 +01:00
|
|
|
((* block markdowncell scoped *))
|
2016-01-29 02:48:42 +01:00
|
|
|
\normalem
|
2015-11-26 22:08:40 +01:00
|
|
|
\setlength{\parindent}{0em}
|
|
|
|
\setlength{\parskip}{0.5em}
|
2017-11-19 02:14:31 +01:00
|
|
|
((( cell.source | citation2latex | strip_files_prefix | markdown2latex(extra_args=["--top-level-division=chapter"]) )))
|
|
|
|
((* endblock markdowncell *))
|
|
|
|
|
|
|
|
|
|
|
|
% Custom definitions
|
|
|
|
((* block definitions *))
|
|
|
|
((( super() )))
|
|
|
|
|
|
|
|
% Pygments definitions
|
|
|
|
((( resources.latex.pygments_definitions )))
|
|
|
|
|
|
|
|
% Exact colors from NB
|
|
|
|
\definecolor{incolor}{rgb}{0.0, 0.0, 0.5}
|
|
|
|
\definecolor{outcolor}{rgb}{0.545, 0.0, 0.0}
|
|
|
|
|
|
|
|
((* endblock definitions *))
|
|
|
|
|
|
|
|
%===============================================================================
|
|
|
|
% Input
|
|
|
|
%===============================================================================
|
|
|
|
|
|
|
|
((* block input scoped *))
|
|
|
|
%\noindent\rule[0.5ex]{\linewidth}{1pt}
|
|
|
|
((*- if resources.global_content_filter.include_input_prompt *))
|
|
|
|
((( add_prompt(cell.source | highlight_code(strip_verbatim=True, metadata=cell.metadata), cell, 'in :', 'incolor') )))
|
|
|
|
((* endif *))
|
|
|
|
((* endblock input *))
|
|
|
|
|
|
|
|
|
|
|
|
%===============================================================================
|
|
|
|
% Output
|
|
|
|
%===============================================================================
|
|
|
|
|
|
|
|
((* block execute_result scoped *))
|
|
|
|
%\noindent\rule[1.0ex]{\linewidth}{1pt}
|
|
|
|
% Output:
|
|
|
|
((*- for type in output.data | filter_data_type -*))
|
|
|
|
((*- if resources.global_content_filter.include_output_prompt -*))
|
|
|
|
((*- if type in ['text/plain'] *))
|
|
|
|
((( add_prompt(output.data['text/plain'] | escape_latex, cell, 'out:', 'outcolor') )))
|
|
|
|
((* else -*))
|
|
|
|
\texttt{\color{outcolor}out:[{\color{outcolor}((( cell.execution_count )))}]:}((( super() )))
|
|
|
|
((*- endif -*))
|
|
|
|
((*- endif -*))
|
|
|
|
((*- endfor -*))
|
|
|
|
((* endblock execute_result *))
|
|
|
|
|
|
|
|
|
|
|
|
%==============================================================================
|
|
|
|
% Support Macros
|
|
|
|
%==============================================================================
|
|
|
|
|
|
|
|
% Name: draw_prompt
|
|
|
|
% Purpose: Renders an output/input prompt
|
|
|
|
((* macro add_prompt(text, cell, prompt, prompt_color) -*))
|
|
|
|
((*- if cell.execution_count is defined -*))
|
|
|
|
((*- set execution_count = "" ~ (cell.execution_count | replace(None, " ")) -*))
|
|
|
|
((*- else -*))
|
|
|
|
((*- set execution_count = " " -*))
|
|
|
|
((*- endif -*))
|
|
|
|
((*- set indention = " " -*))
|
|
|
|
\begin{Verbatim}[commandchars=\\\{\}]
|
|
|
|
((( text )))
|
|
|
|
\end{Verbatim}
|
|
|
|
((*- endmacro *))
|