9

Edit: follow-up question here: How to highlight the current subsection at the beginning of each subsection in ltx-talk?


How do I show the start of a new section, either as itself a "section slide" or even in the "body" slides?

\DocumentMetadata{
  lang        = de,
  pdfstandard = ua-2,
  pdfstandard = a-4f,
  tagging=on,
  tagging-setup={math/setup=mathml-SE} 
}
\documentclass{ltx-talk}
\EditInstance{footer}{std}{
    element-order = {title, subtitle, framenumber}
}

\title{My talk}
\subtitle{I want to show sections}
\institute{University of Stack Exchange}
\date{}

\begin{document}

\begin{frame}
  \maketitle
\end{frame}

\section{Motivation}

\begin{frame}\frametitle{Here is a frame title}
  Some text.
\end{frame}

\section{Real talk}

\begin{frame}\frametitle{Here is a frame title}
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna aliqua.
\end{frame}

\end{document}

Result of MWE.

3
  • 1
    welcome! I'm not really clear exactly what you are looking for. I'm guessing something Beamer-alike, but please explain if not. Commented Apr 14 at 5:37
  • @cfr yes, something Beamer-alike. The motivation behind this question is that I am trying to convert existing Beamer presentations into ltx-talk presentations, but some of the desired Beamer functionality breaks during this conversion. Commented Apr 14 at 20:01
  • 1
    @PollyNomial Instead of altering a question which already has answers, it would be better to ask a follow-up question about subsections. Commented Apr 14 at 20:19

2 Answers 2

7

Are you looking for something like this?

% Source - https://tex.stackexchange.com/q/761867
% Posted by Polly Nomial
% Retrieved 2026-04-14, License - CC BY-SA 4.0

\DocumentMetadata{
  lang        = de,
  pdfstandard = ua-2,
  pdfstandard = a-4f,
  tagging=on,
  tagging-setup={math/setup=mathml-SE} 
}
\documentclass{ltx-talk}
\EditInstance{footer}{std}{
  element-order = {title, subtitle, framenumber}
}

\title{My talk}
\subtitle{I want to show sections}
\institute{University of Stack Exchange}
\date{}
\AddToHook{cmd/section/after}{%
  \begin{frame}
    \tableofcontents
  \end{frame}%
}

\begin{document}

\begin{frame}
  \maketitle
\end{frame}

\section{Motivation}

\begin{frame}\frametitle{Here is a frame title}
  Some text.
\end{frame}

\section{Real talk}

\begin{frame}\frametitle{Here is a frame title}
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna aliqua.
\end{frame}

\end{document}

This makes a slide for each section which lists the contents with other sections transparent, but the current section fully opaque:

with tocs showing sections

Or if you want just the title,

\AddToHook{cmd/section/after}{%
  \begin{frame}
    \centering
    \color{structure}
    \LARGE
    \UseName{l__talk_section_tl}
  \end{frame}%
}

will give

with section title slides

but note that this uses an internal command, so might need updating if something changes1.

1But the class has to track the section name somehow, so it isn't as if this can really disappear. It would be nice if LaTeX made this kind of data easily available via public macros. Then perhaps other classes would follow suit.

5
  • On the section name: I'm wary of adding public stuff, even though we re currently version <1.0, as that's harder to then say 'sorry, I've removed it'. Non-presentation classes don't really need to save this info at all, as they simply typeset the text and have the counter for the number. But I do see that some 'current section name' could be added (we have the tokens nowadays). Commented Apr 14 at 7:20
  • I agree we will want to have the info available, but am not yet decided on an interface: and expl3 var, some form of accessor, a generic 'insert' approach, ... Commented Apr 14 at 7:20
  • @JosephWright I agree it is much less common in other classes, but I think there are cases where it is helpful, if only because getting things into headers and footers is then much easier. (the marks mechanism is much more difficult to work with, so I tend to just use this info directly.) Commented Apr 14 at 15:11
  • what about the color of the sections? For me they look black, but I want a different colour Commented Apr 15 at 13:00
  • @Elena as you can see, they are not black in the slides the code in my answer generates, so I can only assume you have some code which makes them black. if that's not what you want, please create a minimal example and ask a new question. thanks. Commented Apr 15 at 18:06
5

If you are open for a different design, the spectrum talk theme comes with a predefined template for section pages (the image can be replaced with one of your choice or even just a solid colour):

% !TeX TS-program = lualatex -interaction=nonstopmode % | txs:///view-pdf | txs:///view-log

\DocumentMetadata{
  lang        = de,
  pdfstandard = ua-2,
  pdfstandard = a-4f,
  tagging=on,
  tagging-setup={math/setup=mathml-SE} 
}
\documentclass{ltx-talk}

\usepackage{talkthemespectrum}
\AddToHook{section/begin}{
  \UseTemplate{sectionpage}{talk}{}
}

\author{Author}
\title{My talk}
\subtitle{I want to show sections}
\institute{University of Stack Exchange}

\begin{document}

\begin{frame}
  \maketitle
\end{frame}

\section{Motivation}

\begin{frame}
\frametitle{Here is a frame title}
  Some text.
\end{frame}

\section{Real talk}

\begin{frame}
\frametitle{Here is a frame title}
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna aliqua.
\end{frame}

\end{document}

enter image description here

2
  • I like the pop of color! Commented Apr 14 at 20:15
  • @PollyNomial Thanks! Commented Apr 14 at 20:16

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.