使用项目列表定位两列

使用项目列表定位两列

我尝试显示两列,itemize每列包含一个标题。我不喜欢这种输出,因为项目符号上方的标题没有居中。我该如何解决这个问题?

\documentclass{beamer}
\mode<presentation>
{
%  \usetheme{default}      % or try Darmstadt, Madrid, Warsaw, ...
%  \usecolortheme{default} % or try albatross, beaver, crane, ...
%  \usefonttheme{default}  % or try serif, structurebold, ...
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}
\usepackage{tikz}
\usetikzlibrary{arrows, arrows.meta, 
                backgrounds,
                calc,
                decorations.pathmorphing,
                patterns, positioning, 
                quotes,
                shapes,
                tikzmark
                }
\usetikzlibrary{overlay-beamer-styles}
\usepackage{tcolorbox}
\tcbuselibrary{raster}
\tcbuselibrary{theorems}
\usepackage{makecell} %for the thead command to break up header
%\usepackage{fourier,erewhon}
%\usepackage{amssymb, amsbsy}
\usepackage{array, booktabs, longtable}
\usepackage{graphicx}
%\usepackage[x11names, table]{xcolor}
\usepackage{caption}


\definecolor{myorange}{rgb}{.98, .59, .01}
\definecolor{myyellow}{rgb}{1, .78, .33}
\definecolor{myblue}{rgb}{.18, .63, .78}
% modifications of 
% \tikzset{
%     invisible/.style={opacity=0,text opacity=0},
%     visible on/.style={alt=#1{}{invisible}},
% }
% from overlay-beamer-styles

\tikzset{sort of visible/.style={opacity=0.3,text opacity=0.3},
fully visible on/.style={alt=#1{}{sort of visible}},}
\begin{document}

\section{Problem Setup, History, \& Our Result: A Snapshot}

\begin{frame}
\begin{columns}[T]
\begin{column}[T]{.48\textwidth}
First

                \begin{itemize}
                    \item 1
                    \item 2
                    \item 3
                \end{itemize}
\end{column}%
\uncover<2->{
Second

\begin{column}[T]{.48\textwidth}
                \begin{itemize}
                    \item 1
                    \item 2
                    \item 3
                \end{itemize}
\end{column}}
\end{columns}
\end{frame}
\end{document}

答案1

使用\centerline{...}

\documentclass{beamer}
\mode<presentation>
{
  \setbeamertemplate{navigation symbols}{}
  \setbeamertemplate{caption}[numbered]
}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}
\usepackage{tikz}
\usetikzlibrary{arrows, arrows.meta,
                backgrounds,
                calc,
                decorations.pathmorphing,
                patterns, positioning,
                quotes,
                shapes,
                tikzmark
                }
\usetikzlibrary{overlay-beamer-styles}
\usepackage{tcolorbox}
\tcbuselibrary{raster}
\tcbuselibrary{theorems}
\usepackage{makecell} %for the thead command to break up header
\usepackage{array, booktabs, longtable}
\usepackage{graphicx}
\usepackage{caption}


\definecolor{myorange}{rgb}{.98, .59, .01}
\definecolor{myyellow}{rgb}{1, .78, .33}
\definecolor{myblue}{rgb}{.18, .63, .78}

\tikzset{sort of visible/.style={opacity=0.3,text opacity=0.3},
fully visible on/.style={alt=#1{}{sort of visible}},}
\begin{document}

\section{Problem Setup, History, \& Our Result: A Snapshot}

\begin{frame}
\begin{columns}[T]
\begin{column}[T]{.48\textwidth}
\centerline{First} % <---

                \begin{itemize}
                    \item 1
                    \item 2
                    \item 3
                \end{itemize}
\end{column}%
\uncover<2->{
\begin{column}[T]{.48\textwidth}
\centerline{Second} % <---

                \begin{itemize}
                    \item 1
                    \item 2
                    \item 3
                \end{itemize}
\end{column}}
\end{columns}
\end{frame}
\end{document}

在此处输入图片描述

相关内容