![为什么在 LaTeX beamer 中使用 \printglossary 时没有导航点?](https://linux22.com/image/445647/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%9C%A8%20LaTeX%20beamer%20%E4%B8%AD%E4%BD%BF%E7%94%A8%20%5Cprintglossary%20%E6%97%B6%E6%B2%A1%E6%9C%89%E5%AF%BC%E8%88%AA%E7%82%B9%EF%BC%9F.png)
我想将其包含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
% !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}