1
\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}

It gives output like

enter image description here

but I want options to appear as follows

enter image description here

How may I achieve this?

1
  • 2
    \raggedleft operates on each line separately. You need to wrap the items in a miipage just wide enough to accommodate the longest one, and then set that minipage \raggedleft. Aug 31, 2021 at 19:43

1 Answer 1

1

I propose this solution based on the eqparbox package. I took the opportunity to comment unnecessary packages (for various reasons). I also suggest, for the circled enumerate labels, to use the circledsteps package, based on TiKZ, which results in better-looking circles.

\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} 

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .