Added math

This commit is contained in:
Philipp Homan yoga ubuntu 17.10 2018-04-02 18:45:58 -04:00
parent fd78dc7eda
commit 0a4af13260
4 changed files with 134 additions and 41 deletions

View File

@ -36,6 +36,10 @@
#+LATEX_HEADER: \usepackage{listings}
#+LATEX_HEADER: \usepackage{textcomp}
#+LATEX_HEADER: \usepackage{bibentry}
#+LATEX_HEADER: \newcommand\sumin{\sum_{i=1}^{n}}
#+LATEX_HEADER: \newcommand{\Xoi}[1]{#1(i)}
#+LATEX_HEADER: \newcommand{\frakPQ}[2]{\frac{\Xoi{#1}}{\Xoi{#2}}}
#+LATEX_HEADER: \newcommand{\DKLPQ}[3]{D_{\mathrm{KL}}(#1 #3 #2)}
#+LATEX_HEADER: \date{}
# ----------------------------------------------------------------------
** Authors and affiliations :ignore:
@ -133,7 +137,6 @@
:BEGIN:
:BEAMER_env: fullframe
:END:
** Code :ignore:
# Babel code can go here to populate the poster with dynamic output from
# statistical calculations
@ -178,7 +181,7 @@ hist(x, col="gray")
#+CAPTION: This is the output.
[[file:3.png]]
*** Methods: Inline code and tables :B_block:
*** Inline code and tables :B_block:
:PROPERTIES:
:BEAMER_env: block
:END:
@ -213,14 +216,12 @@ data.frame(Mean=m, SD=s)
| -0.07 | 0.97 |
|-------+------|
** Right column :BMCOL:
:PROPERTIES:
:BEAMER_col: 0.45
:BEAMER_opt: [t]
:END:
*** Results: graphics :B_block:
*** Graphics :B_block:
:PROPERTIES:
:BEAMER_env: block
:END:
@ -250,7 +251,40 @@ curl -0 https://www.gnu.org/software/emacs/images/emacs.png
#+RESULTS: code3
[[file:emacs.png]]
*** Results: columns :B_block:
*** Math :B_block:
:PROPERTIES:
:BEAMER_env: block
:END:
- We can easily include math:
**** Block
:PROPERTIES:
:BEAMER_col: 0.78
:BEAMER_opt: [T]
:END:
The Kullback-Leibler (KL) divergence measures the difference between two
probability distributions (i.e., the loss of information when one
distribution is used to approximate another). The KL divergence is thus
defined as
\begin{align}
\label{eq:KL}
\DKLPQ{P}{Q}{\|} = \sumin \Xoi{P} \log \frakPQ{P}{Q}
\end{align}
with $P$ and $Q$ being two probability distribution functions and $n$
the number of sample points. Since $\DKLPQ{P}{Q}{\|}$ is not equal to
$\DKLPQ{Q}{P}{\|}$, a symmetric variation of the KL divergence can be
derived as follows:
\begin{align}
\label{eq:KL2}
\DKLPQ{P}{Q}{,} = \sumin \Big(\Xoi{P} \log \frakPQ{P}{Q} + \Xoi{Q} \log \frakPQ{Q}{P} \Big).
\end{align}
*** Columns :B_block:
:PROPERTIES:
:BEAMER_env: block
:END:

Binary file not shown.

View File

@ -1,4 +1,4 @@
% Created 2018-04-02 Mon 15:25
% Created 2018-04-02 Mon 18:38
% Intended LaTeX compiler: pdflatex
\documentclass[final]{beamer}
\usetheme{ph}
@ -19,6 +19,10 @@
\usepackage{listings}
\usepackage{textcomp}
\usepackage{bibentry}
\newcommand\sumin{\sum_{i=1}^{n}}
\newcommand{\Xoi}[1]{#1(i)}
\newcommand{\frakPQ}[2]{\frac{\Xoi{#1}}{\Xoi{#2}}}
\newcommand{\DKLPQ}[3]{D_{\mathrm{KL}}(#1 #3 #2)}
\date{}
\author{
Philipp Homan$^{1}$,
@ -29,11 +33,11 @@ Philipp Homan$^{1}$,
\normalsize{Hempstead, NY}
}
\usetheme{default}
\date{2018-04-02 15:25}
\date{2018-04-02 18:38}
\title{A scientific poster entirely written in org-mode using GNU emacs and the beamer library}
\begin{document}
\begin{frame}[fragile,label={sec:orga07b5dd}]{}
\begin{frame}[fragile,label={sec:org727f6f5}]{}
\begin{columns}
\begin{column}[t]{0.45\columnwidth}
\begin{block}{Background}
@ -47,7 +51,7 @@ org-mode syntax
code, graphs and numbers from inline code in languages such as R,
python, Matlab and even shell scripting
\item Inline code would look like this, which will produce a graph
(Fig. \ref{fig:orgfe25245}):
(Fig. \ref{fig:orgaca79ae}):
\end{itemize}
\begin{columns}
@ -61,21 +65,21 @@ hist(x, col="gray")
\begin{figure}[htbp]
\centering
\includegraphics[width=.9\linewidth]{3.png}
\caption{\label{fig:orgfe25245}
\caption{\label{fig:orgaca79ae}
This is the output.}
\end{figure}
\end{column}
\end{columns}
\end{block}
\begin{block}{Methods: Inline code and tables}
\begin{block}{Inline code and tables}
\begin{itemize}
\item In addition to inline code, we can also produce tables
\item Tables are very powerful in org-mode, they even include spreadsheet
capabilities
\item Some code to process the vector from above to make a table out of its
summary could look like this, which would result in a little table
(Table \ref{tab:org6afde98}) :
(Table \ref{tab:org6921627}) :
\end{itemize}
\begin{columns}
@ -93,9 +97,9 @@ data.frame(Mean=m, SD=s)
\begin{tabular}{rr}
Mean & SD\\
\hline
-0.14 & 0.97\\
0.07 & 0.98\\
\end{tabular}
\caption{\label{tab:org6afde98}
\caption{\label{tab:org6921627}
A table.}
\end{table}
@ -104,14 +108,12 @@ A table.}
\end{block}
\end{column}
\begin{column}[t]{0.45\columnwidth}
\begin{block}{Results: graphics}
\begin{block}{Graphics}
\begin{itemize}
\item Of course we can also include graphics
\item Here, we use shell scripting to grab an image with curl from the
internet (Fig. \ref{fig:org1ba5872}):
internet (Fig. \ref{fig:orgf35b3ea}):
\end{itemize}
\begin{columns}
@ -127,21 +129,51 @@ curl -0 https://www.gnu.org/software/emacs/images/emacs.png
\begin{figure}[htbp]
\centering
\includegraphics[page=9,width=0.2\textwidth]{emacs.png}
\caption{\label{fig:org1ba5872}
\caption{\label{fig:orgf35b3ea}
This is the downloaded image.}
\end{figure}
\end{column}
\end{columns}
\end{block}
\begin{block}{Results: columns}
\begin{block}{Math}
\begin{itemize}
\item We can easily include math:
\end{itemize}
\begin{columns}
\begin{column}[T]{0.78\columnwidth}
The Kullback-Leibler (KL) divergence measures the difference between two
probability distributions (i.e., the loss of information when one
distribution is used to approximate another). The KL divergence is thus
defined as
\begin{align}
\label{eq:KL}
\DKLPQ{P}{Q}{\|} = \sumin \Xoi{P} \log \frakPQ{P}{Q}
\end{align}
with \(P\) and \(Q\) being two probability distribution functions and \(n\)
the number of sample points. Since \(\DKLPQ{P}{Q}{\|}\) is not equal to
\(\DKLPQ{Q}{P}{\|}\), a symmetric variation of the KL divergence can be
derived as follows:
\begin{align}
\label{eq:KL2}
\DKLPQ{P}{Q}{,} = \sumin \Big(\Xoi{P} \log \frakPQ{P}{Q} + \Xoi{Q} \log \frakPQ{Q}{P} \Big).
\end{align}
\end{column}
\end{columns}
\end{block}
\begin{block}{Columns}
\begin{columns}
\begin{column}[T]{0.48\columnwidth}
\captionsetup{justification=justified,width=.8\linewidth}
\begin{figure}[htbp]
\centering
\includegraphics[page=3,width=0.9\textwidth]{org-mode-poster-4.png}
\caption{\label{fig:org1748fcb}
\caption{\label{fig:org623938b}
\textbf{This is the left figure of a two-column block}}
\end{figure}
\end{column}
@ -151,7 +183,7 @@ This is the downloaded image.}
\begin{figure}[htbp]
\centering
\includegraphics[page=9,width=0.9\textwidth]{org-mode-poster-4.png}
\caption{\label{fig:org5a59fdf}
\caption{\label{fig:orgb76a1ef}
\textbf{This is the right figure.}}
\end{figure}
\end{column}

View File

@ -1,4 +1,4 @@
% Created 2018-04-02 Mon 15:24
% Created 2018-04-02 Mon 18:37
% Intended LaTeX compiler: pdflatex
\documentclass[final]{beamer}
\usetheme{ph}
@ -19,6 +19,10 @@
\usepackage{listings}
\usepackage{textcomp}
\usepackage{bibentry}
\newcommand\sumin{\sum_{i=1}^{n}}
\newcommand{\Xoi}[1]{#1(i)}
\newcommand{\frakPQ}[2]{\frac{\Xoi{#1}}{\Xoi{#2}}}
\newcommand{\DKLPQ}[3]{D_{\mathrm{KL}}(#1 #3 #2)}
\date{}
\author{
Philipp Homan$^{1}$,
@ -29,11 +33,11 @@ Philipp Homan$^{1}$,
\normalsize{Hempstead, NY}
}
\usetheme{default}
\date{2018-04-02 15:24}
\date{2018-04-02 18:37}
\title{A scientific poster entirely written in org-mode using GNU emacs and the beamer library}
\begin{document}
\begin{frame}[fragile,label={sec:orgbaeb4b8}]{}
\begin{frame}[fragile,label={sec:org4b06f5e}]{}
\begin{columns}
\begin{column}[t]{0.45\columnwidth}
\begin{block}{Background}
@ -47,7 +51,7 @@ org-mode syntax
code, graphs and numbers from inline code in languages such as R,
python, Matlab and even shell scripting
\item Inline code would look like this, which will produce a graph
(Fig. \ref{fig:org8727911}):
(Fig. \ref{fig:org042638b}):
\end{itemize}
\begin{columns}
@ -61,21 +65,21 @@ hist(x, col="gray")
\begin{figure}[htbp]
\centering
\includegraphics[width=.9\linewidth]{3.png}
\caption{\label{fig:org8727911}
\caption{\label{fig:org042638b}
This is the output.}
\end{figure}
\end{column}
\end{columns}
\end{block}
\begin{block}{Methods: Inline code and tables}
\begin{block}{Inline code and tables}
\begin{itemize}
\item In addition to inline code, we can also produce tables
\item Tables are very powerful in org-mode, they even include spreadsheet
capabilities
\item Some code to process the vector from above to make a table out of its
summary could look like this, which would result in a little table
(Table \ref{tab:orga4b22ee}) :
(Table \ref{tab:orge51644d}) :
\end{itemize}
\begin{columns}
@ -93,9 +97,9 @@ data.frame(Mean=m, SD=s)
\begin{tabular}{rr}
Mean & SD\\
\hline
-0.11 & 0.92\\
0.23 & 1.07\\
\end{tabular}
\caption{\label{tab:orga4b22ee}
\caption{\label{tab:orge51644d}
A table.}
\end{table}
@ -104,19 +108,17 @@ A table.}
\end{block}
\end{column}
\begin{column}[t]{0.45\columnwidth}
\begin{block}{Results: graphics}
\begin{block}{Graphics}
\begin{itemize}
\item Of course we can also include graphics
\item Here, we use shell scripting to grab an image with curl from the
internet (Fig. \ref{fig:orgb4430e3}):
internet (Fig. \ref{fig:orga669d9a}):
\end{itemize}
\begin{columns}
\begin{column}[T]{0.78\columnwidth}
\tiny
\footnotesize
\begin{minted}[linenos=true]{bash}
curl -0 https://www.gnu.org/software/emacs/images/emacs.png
\end{minted}
@ -127,21 +129,46 @@ curl -0 https://www.gnu.org/software/emacs/images/emacs.png
\begin{figure}[htbp]
\centering
\includegraphics[page=9,width=0.2\textwidth]{emacs.png}
\caption{\label{fig:orgb4430e3}
\caption{\label{fig:orga669d9a}
This is the downloaded image.}
\end{figure}
\end{column}
\end{columns}
\end{block}
\begin{block}{Results: columns}
\begin{block}{Math}
\begin{itemize}
\item We can easily include math:
\end{itemize}
\begin{columns}
\begin{column}[T]{0.78\columnwidth}
The Kullback-Leibler (KL) divergence measures the difference between two
probability distributions (i.e., the loss of information when one
distribution is used to approximate another). The KL divergence is thus
defined as
\begin{align}
\label{eq:KL}
\DKLPQ{P}{Q}{\|} = \sumin \Xoi{P} \log \frakPQ{P}{Q}
\end{align}
with \(P\) and \(Q\) being two probability distribution functions and \(n\)
the number of sample points. Since \(\DKLPQ{P}{Q}{\|}\) is not equal to
\(\DKLPQ{Q}{P}{\|}\), a symmetric variation of the KL divergence can be
derived as follows:
\end{column}
\end{columns}
\end{block}
\begin{block}{Columns}
\begin{columns}
\begin{column}[T]{0.48\columnwidth}
\captionsetup{justification=justified,width=.8\linewidth}
\begin{figure}[htbp]
\centering
\includegraphics[page=3,width=0.9\textwidth]{org-mode-poster-4.png}
\caption{\label{fig:orgb45d477}
\caption{\label{fig:org88ad0c6}
\textbf{This is the left figure of a two-column block}}
\end{figure}
\end{column}
@ -151,7 +178,7 @@ This is the downloaded image.}
\begin{figure}[htbp]
\centering
\includegraphics[page=9,width=0.9\textwidth]{org-mode-poster-4.png}
\caption{\label{fig:orgdcbb6b3}
\caption{\label{fig:org9e1f136}
\textbf{This is the right figure.}}
\end{figure}
\end{column}