如何調整 itemize 和 enumerate 環境以獲得更小的左邊距?

如何調整 itemize 和 enumerate 環境以獲得更小的左邊距?

我使用這個模板,但是項目和逐項的左邊距太大,如果我在幻燈片中插入圖形,看起來像這樣

在此輸入影像描述

    \documentclass[dvipsnames,mathserif]{beamer}
    \setbeamertemplate{footline}[frame number]
    \setbeamercolor{footline}{fg=black}
    \setbeamerfont{footline}{series=\bfseries}
    \usepackage{tikz}
    \usepackage{graphicx}
    %\usetheme{Frankfurt}%1
    \usetheme{Darmstadt}%1
    \usepackage{multicol}
    % for RTL liste
    \makeatletter
    \newcommand{\RTListe}{\raggedleft\rightskip\leftm}
    \newcommand{\leftm}{\@totalleftmargin}
    \makeatother
    
    % RTL frame title
    \setbeamertemplate{frametitle}
    {\vspace*{-1mm}
      \nointerlineskip
        \begin{beamercolorbox}[sep=0.3cm,ht=2.2em,wd=\paperwidth]{frametitle}
            \vbox{}\vskip-2ex%
            \strut\hskip1ex\insertframetitle\strut
            \vskip-0.8ex%
        \end{beamercolorbox}
    }
    % align subsection in toc
    \makeatletter
    \setbeamertemplate{subsection in toc}
    {\leavevmode\rightskip=5ex%
      \llap{\raise0.1ex\beamer@usesphere{subsection number projected}{bigsphere}\kern1ex}%
      \inserttocsubsection\par%
    }
    \makeatother
    
    % RTL triangle for itemize
    \setbeamertemplate{itemize item}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleleft$}} 
    
    %\setbeamertemplate{itemize item}{\rule{4pt}{4pt}}
    
    \defbeamertemplate{enumerate item}{square2}
    {\LR{
        %
        \hbox{%
        \usebeamerfont*{item projected}%
        \usebeamercolor[bg]{item projected}%
        \vrule width2.25ex height1.85ex depth.4ex%
        \hskip-2.25ex%
        \hbox to2.25ex{%
          \hfil%
          {\color{fg}\insertenumlabel}%
          \hfil}%
      }%
    }}
    
    \setbeamertemplate{enumerate item}[square2]
    \setbeamertemplate{navigation symbols}{}
    
    
    \titlegraphic { 
    \begin{tikzpicture}[overlay,remember picture, opacity=0.1,]
    \node[] at (0, 5){
        \includegraphics[width=0.63\textwidth]{Conference Logo.png}
    };\end{tikzpicture}}
    \setbeamertemplate{caption}[numbered]
    \setbeamertemplate{itemize/enumerate body begin}{\vspace{-0.5ex}\leftskip=1ex}

\begin{frame}
\maketitle
\end{frame}

\begin{frame}{Summary} 
\footnotesize \tableofcontents 
\end{frame}

\section{Introduction}

\begin{frame}{Motivation}
\scriptsize
\begin{columns}
\begin{column}{0.5\textwidth}
\begin{itemize} [<+-| alert@+>]

\scriptsize
\item Curved beams are popular structural elements in various engineering fields
\begin{itemize}
\item They offer high stiffness-to-weight ratio, making them an efficient choice for load-bearing structures
\item they provide esthetic appeal and enable the creation of complex, free-form shapes in architectural designs
\item Their ability to distribute loads efficiently and resist bending moments makes them suitable for applications such as bridges, roofs, and aircraft structures
\end{itemize}

\item Curved beams often experience large deformations under various loading conditions, necessitating the use of nonlinear analysis calculation.
\item Developing accurate and efficient nonlinear beam elements for large deformation is challenging
\begin{itemize}
\item Capturing the accurate response of curved beams under large deformations is crucial for ensuring the safety and reliability of structures
\item Developing efficient and accurate nonlinear beam elements poses significant challenges due to the complex nature of the problem
\end{itemize}
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\includegraphics[width=\textwidth]
{curved2.jpg}
\end{column}
\end{columns}
\end{frame}

答案1

  • 環境document缺失

  • mathserif選項已過時,請改用\usefonttheme[onlymath]{serif}。日誌檔案中的警告會告訴您這一點。請不要忽視警告。

  • 您不需要加載graphicx,beamer 會自動執行此操作

  • 載入包沒有太大意義multicol。 Beamer 有自己的立柱機構

  • 如果更改第一層項目的字體大小,您也應該更改第二(和第三)級項目的字體大小

  • 將整個框架設置為兩列會浪費大量空間

  • 請重新考慮是否要向觀眾展示包含如此多文字的幻燈片。

....然後對於您實際詢問的內容:您可以使用等更改項目的左邊距\setlength{\leftmargini}{0cm}


\documentclass[dvipsnames]{beamer}
\usefonttheme[onlymath]{serif}

%\usepackage{graphicx}
\usetheme{Darmstadt}%1
%\usepackage{multicol}

% RTL triangle for itemize
\setbeamertemplate{itemize item}{\scriptsize\raise1.25pt\hbox{\donotcoloroutermaths$\blacktriangleleft$}} 
\setbeamertemplate{navigation symbols}{}

\setlength{\leftmargini}{0cm}
\setlength{\leftmarginii}{0.5cm}

\begin{document}

\begin{frame}
\frametitle{Motivation}
\setbeamerfont{itemize/enumerate body}{size=\scriptsize}
\setbeamerfont{itemize/enumerate subbody}{size=\scriptsize}
\begin{itemize}[<+-| alert@+>]
\item Curved beams are popular structural elements in various engineering fields
\begin{itemize}
\item They offer high stiffness-to-weight ratio, making them an efficient choice for load-bearing structures
\item they provide esthetic appeal and enable the creation of complex, free-form shapes in architectural designs
\item Their ability to distribute loads efficiently and resist bending moments makes them suitable for applications such as bridges, roofs, and aircraft structures
\end{itemize}

\item Curved beams often experience large deformations under various loading conditions, necessitating the use of nonlinear analysis calculation.
\item Developing accurate and efficient nonlinear beam elements for large deformation is challenging
\end{itemize}
\vskip-.5\baselineskip
\begin{columns}[onlytextwidth,T]
\begin{column}{0.5\textwidth}
\begin{itemize}
\item[] 
\begin{itemize}[<+-| alert@+>]
\item Capturing the accurate response of curved beams under large deformations is crucial for ensuring the safety and reliability of structures
\item Developing efficient and accurate nonlinear beam elements poses significant challenges due to the complex nature of the problem
\end{itemize}
\end{itemize}
\end{column}
\begin{column}{0.5\textwidth}
\includegraphics[width=\textwidth]
{example-image-duck}
\end{column}
\end{columns}
\end{frame}
\end{document}

在此輸入影像描述

相關內容