Skip to main content
added 885 characters in body
Source Link

I have the following org file:

#+TITLE: Some title
#+OPTIONS: H:2
#+latex_class: beamer


* Section 1
** Frame 1

* Section 2
** Frame 2

After org-exporting I obtain the .tex, which includes

% beginning of the document
\begin{document}

\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
% rest of the document  ...

However, I want to apply some user-defined latex commands before and after outline frame to get something like:

% beginning of the document
\begin{document}

\maketitle
\doSomethingBeforeOutline\AddBackButton
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\doSomethingAfterOutline\AddTableOfContentsButton
% rest of the document  ...

Keep in mind that user-defined commands should be applied only for an outline frame and not for others. How should I modify beamer exporting process to get above content in tex file?

PS. FYI, I want to add a button for each presentation frame that links to an outline frame (this is the job of \AddTableOfContentsButton command), and a button on an outline that allows user go back to the last frame he visited (this part is handled by \AddBackButton):

\newcommand\AddTableOfContentsButton{%
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=west] at ([yshift=5pt,xshift=\paperwidth/2-\shift]current page.south west)
  {\hyperlink{toc}{
  \setbeamercolor{button}{fg=white,bg=lightgray}%
  \beamerbutton{T} %\beamergotobutton{T}
  }};
\end{tikzpicture}%
  }%
}


\newcommand\AddBackButton{%
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=west] at ([yshift=5pt,xshift=\paperwidth/2-\shift]current page.south west)
  {
  \setbeamercolor{button}{fg=white,bg=lightgray}
  \beamerbutton{\Acrobatmenu{GoBack}{B}}
  };
\end{tikzpicture}%
  }%

I have the following org file:

#+TITLE: Some title
#+OPTIONS: H:2
#+latex_class: beamer


* Section 1
** Frame 1

* Section 2
** Frame 2

After org-exporting I obtain the .tex, which includes

% beginning of the document
\begin{document}

\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
% rest of the document  ...

However, I want to apply some user-defined latex commands before and after outline frame to get something like:

% beginning of the document
\begin{document}

\maketitle
\doSomethingBeforeOutline
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\doSomethingAfterOutline
% rest of the document  ...

Keep in mind that user-defined commands should be applied only for an outline frame and not for others. How should I modify beamer exporting process to get above content in tex file?

I have the following org file:

#+TITLE: Some title
#+OPTIONS: H:2
#+latex_class: beamer


* Section 1
** Frame 1

* Section 2
** Frame 2

After org-exporting I obtain the .tex, which includes

% beginning of the document
\begin{document}

\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
% rest of the document  ...

However, I want to apply some user-defined latex commands before and after outline frame to get something like:

% beginning of the document
\begin{document}

\maketitle
\AddBackButton
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\AddTableOfContentsButton
% rest of the document  ...

Keep in mind that user-defined commands should be applied only for an outline frame and not for others. How should I modify beamer exporting process to get above content in tex file?

PS. FYI, I want to add a button for each presentation frame that links to an outline frame (this is the job of \AddTableOfContentsButton command), and a button on an outline that allows user go back to the last frame he visited (this part is handled by \AddBackButton):

\newcommand\AddTableOfContentsButton{%
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=west] at ([yshift=5pt,xshift=\paperwidth/2-\shift]current page.south west)
  {\hyperlink{toc}{
  \setbeamercolor{button}{fg=white,bg=lightgray}%
  \beamerbutton{T} %\beamergotobutton{T}
  }};
\end{tikzpicture}%
  }%
}


\newcommand\AddBackButton{%
\setbeamertemplate{background canvas}{%
\begin{tikzpicture}[remember picture,overlay]
\node[anchor=west] at ([yshift=5pt,xshift=\paperwidth/2-\shift]current page.south west)
  {
  \setbeamercolor{button}{fg=white,bg=lightgray}
  \beamerbutton{\Acrobatmenu{GoBack}{B}}
  };
\end{tikzpicture}%
  }%
Source Link

Interfering with org beamer outline export

I have the following org file:

#+TITLE: Some title
#+OPTIONS: H:2
#+latex_class: beamer


* Section 1
** Frame 1

* Section 2
** Frame 2

After org-exporting I obtain the .tex, which includes

% beginning of the document
\begin{document}

\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
% rest of the document  ...

However, I want to apply some user-defined latex commands before and after outline frame to get something like:

% beginning of the document
\begin{document}

\maketitle
\doSomethingBeforeOutline
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\doSomethingAfterOutline
% rest of the document  ...

Keep in mind that user-defined commands should be applied only for an outline frame and not for others. How should I modify beamer exporting process to get above content in tex file?