使用LaTeX Beamer进行演示,有谁知道如何删除参考幻灯片上框架标题的边框吗?

问题描述 投票:0回答:1

** 更新了 MWE 的问题

我目前正在使用自定义背景模板图像,在演示结束时,我想显示我使用的引文。 但是,我似乎不知道如何消除框架标题“参考文献”顶部、左侧和右侧周围的黑线。

这是用于从 PDF 创建背景模板的文本

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                  XXX PhD Presentation                                  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[xcolor=dvipsnames,aspectratio=1610,handout]{beamer} % handout
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                   Latex Preamble                              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[utf8]{inputenc}
\usetheme[block=fill,progressbar=frametitle]{metropolis}
\setbeamertemplate{frame numbering}[fraction]
\usepackage{appendixnumberbeamer}
\usepackage[sort&compress,numbers]{natbib} % citations
\usepackage{tikz}
\usepackage{tcolorbox} % Use for nice backgrounds around code
\usepackage{enumerate}
\usepackage{amsmath,mathtools,cancel}
\usepackage{media9} %pdflatex, latex+dvips+ps2pdf, xelatex # Allows for the Youtube video

\usepackage{minted}  % Code highlighting
\usemintedstyle[python]{perldoc}
\usemintedstyle[matlab]{colorful}
\tcbuselibrary{breakable,skins,minted}

\usefonttheme[onlymath]{serif}

% Specific Colors
\definecolor{URed}{HTML}{CC0000}
\definecolor{UBlack}{HTML}{000000}
\definecolor{UGray}{HTML}{808080}
\definecolor{paperColor}{HTML}{e2c88e}
\definecolor{pythoncodebg}{rgb}{0.99,1,0.99}
\definecolor{matlabcodebg}{rgb}{0.99,0.99,1}

% Algorithm writing
\usepackage{algpseudocode}
\usepackage{algorithm}

% Colored letters around objects
\newcommand\encircleP[1]{%
    \tikz[baseline=(X.base)] 
    \node (X) [draw, shape=circle, inner sep=0, fill=red, text=black] {\strut #1};%
}
\newcommand\encircleA[1]{%
    \tikz[baseline=(X.base)] 
    \node (X) [draw, shape=circle, inner sep=0, fill=yellow, text=black] {\strut #1};%
}

%%%%%%%%%%%%% Beamer specific attributes %%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{section in toc}[sections numbered]
\setbeamersize{text margin left=20pt,text margin right=20pt}

% Add support for \subsubsectionpage
\def\subsubsectionname{\translate{Subsubsection}}
\def\insertsubsubsectionnumber{\arabic{subsubsection}}
\setbeamertemplate{subsubsection page}
{
    \begin{centering}
        {\usebeamerfont{subsubsection name}\usebeamercolor[fg]{subsubsection name}\subsubsectionname~\insertsubsubsectionnumber}
        \vskip1em\par
        \begin{beamercolorbox}[sep=4pt,center]{part title}
            \usebeamerfont{subsubsection title}\insertsubsubsection\par
        \end{beamercolorbox}
    \end{centering}
}
\def\subsubsectionpage{\usebeamertemplate*{subsubsection page}}

\AtBeginSection{\frame{\sectionpage}}
\AtBeginSubsection{\frame{\subsectionpage}}
\AtBeginSubsubsection{\frame{\subsubsectionpage}}

% Specific beamer colors
%\setbeamercolor{background canvas}{bg=UGray}
\setbeamercolor{progress bar}{fg=URed,bg=UGray}
\setbeamercolor*{sidebar}{fg=URed,bg=UBlack!80!white}
\setbeamercolor{frametitle}{bg=UGray,fg=white}
\setbeamercolor{section title}{fg=UBlack!80!white}
\setbeamercolor{title}{fg=UBlack!80!white}
\setbeamercolor{author}{fg=UBlack!80!white}
\setbeamercolor{institute}{fg=UBlack!80!white}
\setbeamercolor{date}{fg=UBlack!80!white}
\setbeamercolor{section}{fg=UBlack!80!white}
\setbeamercolor{section in toc}{fg=UBlack!80!white,bg=white}

%%%%% Beamer Alerts %%%%%
\setbeamercolor{alerted text}{fg=URed!30!UBlack} % Alerts for emphasizing text in bullets
\setbeamerfont{alerted text}{series=\normalfont} % Adjust the alert for emphasising text
\mode<handout>{
    \setbeamercolor{alerted text}{fg=UBlack!80!white} % Alerts for emphasizing text in bullets
}

% Beamer font size
\setbeamerfont{footnote}{size=\tiny}

% custom heading line in the beamer slide
\newcommand{\heading}[1]{%
    \noindent\textbf{\color{UBlack!80!white}\normalfont\bfseries #1}%
    \vspace{3pt}%
    {\color{URed}\hrule}%
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Adjust beamer length of itemize lists
\makeatletter
\renewcommand{\itemize}[1][]{%
    \beamer@ifempty{#1}{}{\def\beamer@defaultospec{#1}}%
    \ifnum \@itemdepth >2\relax\@toodeep\else
    \advance\@itemdepth\@ne
    \beamer@computepref\@itemdepth% sets \beameritemnestingprefix
    \usebeamerfont{itemize/enumerate \beameritemnestingprefix body}%
    \usebeamercolor[fg]{itemize/enumerate \beameritemnestingprefix body}%
    \usebeamertemplate{itemize/enumerate \beameritemnestingprefix body begin}%
    \list
    {\usebeamertemplate{itemize \beameritemnestingprefix item}}
    {%
        \setlength\topsep{0pt}%NEW
        \setlength\partopsep{0pt}%NEW
        \setlength\itemsep{0pt}%NEW
        \def\makelabel##1{%
            {%
                \hss\llap{{%
                        \usebeamerfont*{itemize \beameritemnestingprefix item}%
                        \usebeamercolor[fg]{itemize \beameritemnestingprefix item}##1}}%
            }%
        }%
    }
    \fi%
    \beamer@cramped%
    \raggedright%
    \beamer@firstlineitemizeunskip%
}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Beamer version of cancel to make the arrow red
\renewcommand{\CancelColor}{\color{red}} %change cancel color to red

\makeatletter
\let\my@cancelto\cancelto %copy over the original cancelto command
\newcommand<>{\cancelto}[2]{\alt#3{\my@cancelto{#1}{#2}}{\mathrlap{#2}\phantom{\my@cancelto{#1}{#2}}}}
% redefine the cancelto command, using \phantom to assure that the
% result doesn't wiggle up and down with and without the arrow
\makeatother

%%%%%%  I couldn't get this to cover the entire slide %%%%%%
%\usebackgroundtemplate{%
%   \tikz\node[opacity=0.2] {\includegraphics[height=\paperheight,width=\paperwidth]{./Figures/old_paper_with_Larger_Eye.png}};} % old_paper_with_Larger_Eye

%%%%%%  Alternative approach to cover the background slide %%%%%%
\pgfdeclareimage[width=\paperwidth,height=\paperheight]{mybackground}{./Figures/old_paper_with_Larger_Eye.pdf}

% Use with PdfLaTeX
\setbeamertemplate{background canvas}{%
    \begin{picture}(160mm,100mm)
        \begin{beamercolorbox}[wd=\paperwidth,ht=\paperheight]{bgcolor}
        \end{beamercolorbox}
        \put(-419,-3.5){%
            \tikz\node[opacity=0.15]{\pgfuseimage{mybackground}};
        }
    \end{picture}
}

% Presentation attributes
\title{Presentation Title}
%\subtitle{\small Subtitle}
\author[XXX]{First Name Last Name} % Author
\institute{\small Institute}
\date{\tiny\today}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                   Latex Preamble                              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

% ---------------------------------------------------------------------------- %
\begin{frame}
  \titlepage
\end{frame}
\note{Disclosure statements ``None exist"}

\begin{frame}{Overview}
    \tableofcontents
\end{frame}
% ---------------------------------------------------------------------------- %

\section{Background}
% ---------------------------------------------------------------------------- %

\begin{frame}[t]
    \frametitle{Motivation}
    \heading{Retinal Diseases}
    \begin{itemize}[<+-| alert@+>] \pause
        \item[] Age-related macular degeneration (AMD)
        \begin{itemize}[<+-| alert@+>]
            \item 8 million Americans and anticipated to increase by 50\% by 2020 \cite{Jager_2008}
        \end{itemize}
        \item[] Posterior vitreous detachment (PVD)
        \begin{itemize}[<+-| alert@+>]
            \item 24\% of the population, 50-59 yrs. 87\% 80-89 yrs. \cite{Bond-Taylor_2017}
        \end{itemize}
        \item[] Traumatic rhegmatogenous retinal detachment (RD)
        \begin{itemize}[<+-| alert@+>]
            \item Approximately 1 in 10,000 individuals suffer from retinal detachment each year \cite{Gariano_2004} about 15\% of these are traumatic \cite{Mitry_2010}
        \end{itemize}

    \end{itemize}
\end{frame}

\appendix
{\tiny
\begin{frame}[t, allowframebreaks]
    \bibliographystyle{ieeetr} % Orders the bibliography to begin with the number 1, 2, 3, .
    \bibliography{Dissertation_Presentation_Bib}    
\end{frame}}
\end{document}

当我在演示文稿末尾显示参考书目时,我在参考框架标题的边缘周围看到三条黑线,我不知道如何消除它们。 我想要那里的红线,而不是三条黑线。 所有其他框架标题的文本周围都没有这些附加行。

我要删除的参考框架标题周围有三条黑线

非常感谢!

latex pdflatex beamer
1个回答
1
投票

Natbib 通常会为参考文献开始一个新部分,但在框架内开始一个新部分并不是一个好主意。您可以通过重新定义

\bibsection
宏来避免该问题:

\documentclass[xcolor=dvipsnames,aspectratio=1610,handout]{beamer} 
\usetheme[block=fill,progressbar=frametitle]{moloch}% modern fork of the metropolis theme
\usepackage[sort&compress,numbers]{natbib} % citations

\renewcommand{\bibsection}{}

\begin{document}

\begin{frame}
  \frametitle{title}
  \cite{test}
\end{frame}

\begin{frame}
    \frametitle{References}
    \bibliographystyle{ieeetr} 
    \bibliography{\jobname}    
\end{frame}

\end{document}

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.