如何将 beamerbutton 放在两个项目符号之间?

如何将 beamerbutton 放在两个项目符号之间?

我有以下 MWE:

\documentclass[xcolor=dvipsnames, 9pt]{beamer}

%%% Loading packages %%%
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{natbib}
\usepackage{color}
%\usepackage{pdfsync}
\usepackage{chancery}
\usepackage{pgfpages}
\usepackage{fancyvrb}
\usepackage{colortbl}
\usepackage{tikz}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
\usepackage{epstopdf}
\usepackage[utf8]{inputenc}
%\usepackage[natbibapa]{apacite}
\usepackage{booktabs}
\usepackage{multirow}


\usepackage{beamerthemesplit}
\usetheme{Frankfurt}


\setbeamertemplate{itemize items}[ball] % if you want a ball
\setbeamertemplate{itemize subitem}[triangle] % if you wnat a triangle
\setbeamertemplate{itemize subsubitem}[circle] % if you want a circle
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true] % remove shadow from title page
%\useoutertheme{infolines}
\setbeamertemplate{footline}[frame number]
%\setbeamertemplate{footline}[slide number]

%gets rid of bottom navigation bars
%\setbeamertemplate{footline}[page number]{}

%gets rid of navigation symbols
\setbeamertemplate{navigation symbols}{}

%%% To type code %%%
\newenvironment{code}{\begin{semiverbatim} \begin{footnotesize}}
{\end{footnotesize}\end{semiverbatim}}





\begin{document}

\begin{frame}
\frametitle{Additional results}


\begin{itemize}
    \item Alternative variables: 
    
    \begin{itemize}
        \item Test 1. \label{sharediv}\hyperlink{sharedivresult}{\beamerbutton{here}}
        \item Test 2a. \label{numshare}\hyperlink{numshareresult}{\beamerbutton{here}}
        \item Test 2b. 
    \end{itemize}
    \item here's a point.

\end{itemize}

\end{frame}

\end{document}

其结果如下:

在此处输入图片描述

但是,我希望将第二个“此处”投影仪按钮放置在项目符号测试 2a 和测试 2b 之间,如下所示:

在此处输入图片描述

我怎样才能做到这一点?

答案1

您可以使用一种快速技巧\raisebox将按钮稍微放低一些。

其他一些评论:

  • 而不是\usepackage{colortbl},最好使用xcolor=table类选项

  • 您不需要graphicx,,,,,,—— beamer会为您加载所有这些。amssymbamsfontsamsmathhyperrefcolor

  • 如果你的 tex 发行版是合理的,那么你不需要\usepackage{epstopdf}\usepackage[utf8]{inputenc}


\documentclass[xcolor={table,dvipsnames}, 9pt]{beamer}

%%% Loading packages %%%
%\usepackage{graphicx}
%\usepackage{amssymb}
%\usepackage{amsfonts}
%\usepackage{amsmath}
%\usepackage{hyperref}
\usepackage{natbib}
%\usepackage{color}
%\usepackage{pdfsync}
\usepackage{chancery}
\usepackage{pgfpages}
\usepackage{fancyvrb}
%\usepackage{colortbl}
\usepackage{tikz}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{tabularx}
%\usepackage{epstopdf}
%\usepackage[utf8]{inputenc}
%\usepackage[natbibapa]{apacite}
\usepackage{booktabs}
\usepackage{multirow}


\usepackage{beamerthemesplit}
\usetheme{Frankfurt}


\setbeamertemplate{itemize items}[ball] % if you want a ball
\setbeamertemplate{itemize subitem}[triangle] % if you wnat a triangle
\setbeamertemplate{itemize subsubitem}[circle] % if you want a circle
\setbeamertemplate{enumerate items}[default]
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true] % remove shadow from title page
%\useoutertheme{infolines}
\setbeamertemplate{footline}[frame number]
%\setbeamertemplate{footline}[slide number]

%gets rid of bottom navigation bars
%\setbeamertemplate{footline}[page number]{}

%gets rid of navigation symbols
\setbeamertemplate{navigation symbols}{}

%%% To type code %%%
\newenvironment{code}{\begin{semiverbatim} \begin{footnotesize}}
{\end{footnotesize}\end{semiverbatim}}





\begin{document}

\begin{frame}
\frametitle{Additional results}


\begin{itemize}
    \item Alternative variables: 
    
    \begin{itemize}
        \item Test 1. \label{sharediv}\hyperlink{sharedivresult}{\beamerbutton{here}}
        \item Test 2a. \label{numshare}\smash{\raisebox{-.5\baselineskip}{\hyperlink{numshareresult}{\beamerbutton{here}}}}
        \item Test 2b. 
    \end{itemize}
    \item here's a point.

\end{itemize}

\end{frame}

\end{document}

在此处输入图片描述

相关内容