Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\defbeamertemplatealias does not work with parent templates #796

Open
SFr682k opened this issue Sep 2, 2022 · 2 comments
Open

\defbeamertemplatealias does not work with parent templates #796

SFr682k opened this issue Sep 2, 2022 · 2 comments

Comments

@SFr682k
Copy link
Contributor

SFr682k commented Sep 2, 2022

MWE

\documentclass{beamer}

% should behave the same as \setbeamertemplate{items}[square]
\defbeamertemplatealias{items}{custom}{square}
\setbeamertemplate{items}[custom]

\begin{document}
    \begin{frame}
        \begin{itemize}
            \item Hello World!
        \end{itemize}
    \end{frame}
\end{document}

Expected Result

Itemize items are rendered as small squares

Observed Result

Itemize items are rendered as triangles (the default)

Environment

TeXLive 2022 with beamer v3.67

@samcarter
Copy link
Collaborator

It seems to work with the actual beamer template instead of the template parent:

\documentclass{beamer}

\defbeamertemplatealias{itemize item}{custom}{square}
\setbeamertemplate{itemize item}[custom]

\begin{document}
    \begin{frame}
        \begin{itemize}
            \item Hello World!
        \end{itemize}
    \end{frame}
\end{document}

@SFr682k
Copy link
Contributor Author

SFr682k commented Sep 2, 2022

It seems to work with the actual beamer template instead of the template parent

You're right: it does work when used with actual beamer templates instead of parent templates. I'm going to update the issue title accordingly.

One possible workaround would be defining aliases for every child template which is not a parent template itself. The following code does work:

\documentclass{beamer}

% \defbeamertemplatealias{itemize items}{custom}{square}  % don't uncomment -- or it will break
\defbeamertemplatealias{itemize item}{custom}{square}
\defbeamertemplatealias{itemize subitem}{custom}{square}
\defbeamertemplatealias{itemize subsubitem}{custom}{square}

% ... also define aliases for enumerate [sub[sub]]item ...

\setbeamertemplate{items}[custom]

\begin{document}
    \begin{frame}
        \begin{itemize}
            \item Hello World!
            \begin{itemize}
                \item Hello World!
                \begin{itemize}
                    \item Hello World!
                \end{itemize}
            \end{itemize}
        \end{itemize}
    \end{frame}
\end{document}

@SFr682k SFr682k changed the title \defbeamertemplatealias does not work \defbeamertemplatealias does not work with parent templates Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants