将枚举中的项目在右侧对齐

将枚举中的项目在右侧对齐
\documentclass{beamer}

\usetheme{Warsaw}
\usepackage{minibox}

\usepackage{amssymb}
\usepackage{multicol}
\usepackage{nicematrix}
\usepackage{forest}
\usepackage{tasks}
\usepackage{cellspace}
\usepackage{gensymb}
\usepackage{color, colortbl}
\usepackage{nccmath}
\usepackage{xcolor}
\usepackage{cellspace, hhline}
    \setlength\cellspacetoplimit{5pt}
    \setlength\cellspacebottomlimit{5pt}

\usepackage{array}
\usepackage{tabularx}
\usepackage{empheq}
\usepackage[usestackEOL]{stackengine}
\usepackage[most]{tcolorbox}
\usepackage{float}


\beamertemplatenavigationsymbolsempty
\usepackage{beamerthemesplit}
\usepackage[orientation=landscape,size=custom,width=16,height=9,scale=0.5,debug]{beamerposter}
\usepackage{dirtytalk}

\setbeamertemplate{frametitle continuation}{}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{tgadventor}
\usepackage{lmodern}
\usepackage{tikz}
\newcommand\setItemnumber[1]{\setcounter{enumi}{\numexpr#1-1\relax}}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{anyfontsize}
\usepackage{bm}
\usepackage{soul}
\usepackage[dash,dot]{dashundergaps}
\setbeamercolor{palette primary}{bg=white, fg=black}
\setbeamercolor{palette secondary}{bg=white, fg=black}
\setbeamercolor{palette tertiary}{bg=white, fg=black}

\usecolortheme[named=black]{structure}
\author[Question Paper]{\\[-1ex] \includegraphics[scale=0.60]{green-slate_1205-377.jpg}}
\title[First Exam]{\textbf{SET THEORY}}




\date{}

\begin{document}


\setbeamercolor{background canvas}{bg=black}




\begin{frame}[t]{\textbf{Question 1}}  \vspace{3pt}

\color{white}

\begin{flushright}
 

 \minibox[frame,rule=1pt,pad=5pt]{ Highest populated country in the world is  }  
 
 \bigskip
 \begin{enumerate}[A] \color{white}
    \raggedleft 
    \item China
     
    \item Russia 
    
    \item India
    
    \item U.S.A. 

 \end{enumerate}
\end{flushright}
\end{frame}


\end{document}

它给出类似的输出

在此处输入图片描述

但我希望选项显示如下

在此处输入图片描述

我怎样才能实现这个目标?

答案1

我根据eqparbox 软件包提出了此解决方案。我借此机会评论了不必要的软件包(出于各种原因)。我还建议,对于带圆圈的枚举标签,使用circledsteps基于 TiKZ 的软件包,这样可以得到更好看的圆圈。

\documentclass[table]{beamer}

\usetheme{Warsaw}
\usepackage{minibox}
\usepackage{eqparbox, circledsteps}
\usepackage{amssymb}
\usepackage{multicol}
\usepackage{nicematrix}
\usepackage{forest}
\usepackage{tasks}
\usepackage{gensymb}
%%\usepackage{color, colortbl} %Not needed if xcolor is loaded with option [table] (through beamer))
\usepackage{nccmath}
\usepackage{cellspace, hhline}
    \setlength\cellspacetoplimit{5pt}
    \setlength\cellspacebottomlimit{5pt}
%%\usepackage{array} unnecessary loading: tabularx loads array
\usepackage{tabularx}
\usepackage{empheq}
\usepackage[usestackEOL]{stackengine}
\usepackage[most]{tcolorbox}
\usepackage{float}

\beamertemplatenavigationsymbolsempty
\usepackage{beamerthemesplit}
\usepackage[orientation=landscape,size=custom,width=16,height=9,scale=0.5,debug]{beamerposter}
\usepackage{dirtytalk}

\setbeamertemplate{frametitle continuation}{}
%%\usepackage[utf8]{inputenc}% Not needed with an up-to-date installation: thatis what latex expects by default
\usepackage{graphicx}
\usepackage{tgadventor}
\usepackage{lmodern}
\usepackage{tikz}
\newcommand\setItemnumber[1]{\setcounter{enumi}{\numexpr#1-1\relax}}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{anyfontsize}
\usepackage{bm}
\usepackage{soul}
\usepackage[dash,dot]{dashundergaps}
\setbeamercolor{palette primary}{bg=white, fg=black}
\setbeamercolor{palette secondary}{bg=white, fg=black}
\setbeamercolor{palette tertiary}{bg=white, fg=black}

\usecolortheme[named=black]{structure}
\author[Question Paper]{\\[-1ex] \includegraphics[scale=0.60]{green-slate_1205-377.jpg}}
\title[First Exam]{\textbf{SET THEORY}}
\date{}

\begin{document}

\setbeamercolor{background canvas}{bg=black}

\begin{frame}[t]{\textbf{Question 1}} \vspace{3pt}

\color{white}

\begin{flushright}

 \minibox[frame,rule=1pt,pad=5pt]{ Highest populated country in the world is }

 \bigskip
 \begin{enumerate}[A] \color{white}
    \raggedleft
    \item \eqparbox{C}{China}

    \item \eqparbox{C}{Russia}

    \item \eqparbox{C}{India}

    \item \eqparbox{C}{U.S.A.}

 \end{enumerate}
\end{flushright}
\end{frame}

\end{document} 

在此处输入图片描述

相关内容