为什么在 LaTeX beamer 中使用 \printglossary 时没有导航点?

为什么在 LaTeX beamer 中使用 \printglossary 时没有导航点?

我想将其包含acronyms在我的 中。它工作得很好,只是不像其他的beamer下面没有导航点。ACRONYMS

MWE下面,我已注释掉\section{ACRONYMS}以防止它在导航窗格中出现两次,因为当 时它会自动出现\printglossary[type=\acronymtype,nonumberlist,title=ACRONYMS]。但是,它下面没有出现任何导航点。

\documentclass[aspectratio=169]{beamer}
\usetheme[compress]{Singapore}
\usepackage{graphicx}
\graphicspath{ {figures/} }
\usefonttheme{serif}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage[acronym]{glossaries}
\newacronym{eth}{ETH}{Eidgenössische Technische Hochschule Zürich}
\makeglossaries
\setbeamertemplate{caption}[numbered]
\setbeamersize{text margin left=14mm,text margin right=14mm} 
\setbeamertemplate{navigation symbols}{}

\title{ON GENERAL RELATIVITY}

\author{John Doe\inst{1}}

\institute[\acrfull{eth}]
{
  \inst{1}%
  {PhD Candidate at the Department of Physics\\
  \acrfull{eth}}}

\date{\today}

\subject{General relativity}

\newcommand{\nologo}{\setbeamertemplate{logo}{}}

\logo{%
    \makebox[\paperwidth]{%
    \includegraphics[height=1cm]{example-image}%
    \hfill%
    \includegraphics[height=1cm]{example-image}%
    }\hskip-.1cm%
}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\section*{OUTLINE}

\begin{frame}{OUTLINE}

\tableofcontents

\end{frame}

\section{INTRODUCTION}

\begin{frame}{INTRODUCTION}

INSERT INTRODUCTION.

\end{frame}

\section{THEORY}

\begin{frame}{THEORY}

INSERT THEORY.

\end{frame}

\section{RESULTS}

\begin{frame}{RESULTS}

INSERT RESULTS.

\end{frame}

\section{DISCUSSION}

\begin{frame}{DISCUSSION)}

INSERT DISCUSSION.

\end{frame}

\section{CONCLUSION}

\begin{frame}{CONCLUSION}

INSERT CONCLUSION.

\end{frame}

\appendix

\section{BIBLIOGRAPHY}

\nologo{
\begin{frame}{BIBLIOGRAPHY}

INSERT BIBLIOGRAPHY

\end{frame}

% \section{ACRONYMS}

\begin{frame}{ACRONYMS}

\printglossary[type=\acronymtype,nonumberlist,title=ACRONYMS]

\end{frame}

\section{ACKNOWLEDGEMENTS}

\begin{frame}{ACKNOWLEDGEMENTS}

\centering{
\includegraphics[height=3cm,keepaspectratio]{example-image}%
\hspace{30pt}
\includegraphics[height=3cm,keepaspectratio]{example-image}%
}

\end{frame}
}

\end{document}
  • 我怎样才能使导航点出现在 下ACRONYMS

答案1

保留\section{ACRONYMS}创建导航点但添加\renewcommand{\glossarysection}[2][]{}(不执行任何操作)以防止将词汇表标题注入为另一部分。

makeglossaries正常情况下,运行++后pdflatex,词汇表标题将出现在导航栏中pdflatex

A

% !TeX TS-program = pdflatex

\documentclass[aspectratio=169]{beamer}
\usetheme[compress]{Singapore}
\usepackage{graphicx}
\graphicspath{ {figures/} }
\usefonttheme{serif}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage[acronym]{glossaries}
\newacronym{eth}{ETH}{Eidgenössische Technische Hochschule Zürich}

\renewcommand{\glossarysection}[2][]{} % added <<<<<<<<<<<<<<

\makeglossaries
\setbeamertemplate{caption}[numbered]
\setbeamersize{text margin left=14mm,text margin right=14mm} 
\setbeamertemplate{navigation symbols}{}

\title{ON GENERAL RELATIVITY}

\author{John Doe\inst{1}}

\institute[\acrfull{eth}]
{
    \inst{1}%
    {PhD Candidate at the Department of Physics\\
        \acrfull{eth}}}

\date{\today}

\subject{General relativity}

\newcommand{\nologo}{\setbeamertemplate{logo}{}}

\logo{%
    \makebox[\paperwidth]{%
        \includegraphics[height=1cm]{example-image}%
        \hfill%
        \includegraphics[height=1cm]{example-image}%
    }\hskip-.1cm%
}

\begin{document}
    
    \begin{frame}
        \titlepage
    \end{frame}
    
    \section*{OUTLINE}
    
    \begin{frame}{OUTLINE}
        
        \tableofcontents
        
    \end{frame}
    
    \section{INTRODUCTION}
    
    \begin{frame}{INTRODUCTION}
        
        INSERT INTRODUCTION.
        
    \end{frame}
    
    \section{THEORY}
    
    \begin{frame}{THEORY}
        
        INSERT THEORY.
        
    \end{frame}
    
    \section{RESULTS}
    
    \begin{frame}{RESULTS}
        
        INSERT RESULTS.
        
    \end{frame}
    
    \section{DISCUSSION}
    
    \begin{frame}{DISCUSSION}
        
        INSERT DISCUSSION.
        
    \end{frame}
    
    \section{CONCLUSION}
    
    \begin{frame}{CONCLUSION}
        
        INSERT CONCLUSION.
        
    \end{frame}
    
    \appendix
    
    \section{BIBLIOGRAPHY}
    
    \nologo{
        \begin{frame}{BIBLIOGRAPHY}
            
            INSERT BIBLIOGRAPHY
            
        \end{frame}
        
        \section{ACRONYMS}  % create a navigation point <<<<<
            
        \begin{frame}{ACRONYMS} 
                    
            \printglossary[type=\acronymtype,nonumberlist]  
                    
        \end{frame}
        
        \section{ACKNOWLEDGEMENTS}
        
        \begin{frame}{ACKNOWLEDGEMENTS}
            
            \centering{
                \includegraphics[height=3cm,keepaspectratio]{example-image}%
                \hspace{30pt}
                \includegraphics[height=3cm,keepaspectratio]{example-image}%
            }
            
        \end{frame}
    }
    
\end{document}

相关内容