This is a follow-up of: https://emacs.stackexchange.com/a/73564/2247.
In Org-Mode, I use the following code in Beamer export to create 1) a table of content, and 2) intermediate tables of contents between each section highlighting the current section:
#+LaTeX_HEADER: \hypersetup{pdfauthor={}}
#+TITLE: My awesome title
#+date: February 27^{th}, 2023
#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [bigger]
#+OPTIONS: H:2 num:t toc:t author:nil
#+LATEX_COMPILER: lualatex
#+LATEX_HEADER: \usetheme[progressbar=foot, sectionpage=none, numbering=fraction]{metropolis}
#+BEAMER_HEADER: \setbeamercovered{transparent=10}
# Show section number in the table of contents
#+BEAMER_HEADER: \setbeamertemplate{section in toc}[sections numbered]
# Show table of content between each section, do not increment the frame numbering and do not show the footer
#+BEAMER_HEADER: \AtBeginSection[]{\begin{frame}[plain, noframenumbering]{Outline}\setbeamertemplate{section in toc}[sections numbered]\setbeamertemplate{subsection in toc}[subsections numbered]\tableofcontents[currentsection, currentsubsection]\end{frame}}
#+BEAMER_HEADER: \AtBeginSubsection[]{\begin{frame}[plain, noframenumbering]{Outline}\setbeamertemplate{section in toc}[sections numbered]\setbeamertemplate{subsection in toc}[subsections numbered]\tableofcontents[currentsection,currentsubsection]\end{frame}}
# Table of content without slide numbering
# https://emacs.stackexchange.com/q/73562/2247
#+LaTeX_HEADER: \pretocmd{\tableofcontents}{\thispagestyle{empty}}{}{}
#+LaTeX_HEADER: \addtocounter{framenumber}{-1}
#+BEGIN_SRC emacs-lisp :results output :exports results :eval yes
(customize-set-value 'org-latex-with-hyperref nil)
#+END_SRC
* Section 1
** Subsection 1.1
** Subsection 1.2
* Section 2
** Subsection 2.1
** Subsection 2.2
This works great, but the issue is that the second table of content is shifted with respect to the first one, as shown on the screenshot below:
Any idea how I could put both tables of contents at the same level?
Here's the TeX file produced by Org-Mode if that helps:
% Created 2023-02-27 Mon 16:21
% Intended LaTeX compiler: lualatex
\documentclass[bigger]{beamer}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\hypersetup{pdfauthor={}}
\usetheme[progressbar=foot, sectionpage=none, numbering=fraction]{metropolis}
\pretocmd{\tableofcontents}{\thispagestyle{empty}}{}{}
\addtocounter{framenumber}{-1}
\usetheme{default}
\date{February 27\textsuperscript{th}, 2023}
\title{My awesome title}
\setbeamercovered{transparent=10}
\setbeamertemplate{section in toc}[sections numbered]
\AtBeginSection[]{\begin{frame}[plain, noframenumbering]{Outline}\setbeamertemplate{section in toc}[sections numbered]\setbeamertemplate{subsection in toc}[subsections numbered]\tableofcontents[currentsection, currentsubsection]\end{frame}}
\AtBeginSubsection[]{\begin{frame}[plain, noframenumbering]{Outline}\setbeamertemplate{section in toc}[sections numbered]\setbeamertemplate{subsection in toc}[subsections numbered]\tableofcontents[currentsection,currentsubsection]\end{frame}}
\begin{document}
\maketitle
\begin{frame}{Outline}
\tableofcontents
\end{frame}
\section{Section 1}
\label{sec:org99eee65}
\begin{frame}[label={sec:org2ea7719}]{Subsection 1.1}
\end{frame}
\begin{frame}[label={sec:orgdb266d7}]{Subsection 1.2}
\end{frame}
\section{Section 2}
\label{sec:orgd93f92b}
\begin{frame}[label={sec:org05cbbd6}]{Subsection 2.1}
\end{frame}
\begin{frame}[label={sec:orgb32272e}]{Subsection 2.2}
\end{frame}
\end{document}
\begin{frame}[plain]{Outline} \tableofcontents \end{frame}
plain
from your section tocs and also use\thispagestyle{empty}
there...