如何縮排列中的第一行?

如何縮排列中的第一行?

我試圖縮進文本的第一行。它在欄目之外的內容中起作用。有什麼方法可以在列內工作嗎?我透過谷歌找不到答案。誰能幫我?我的程式碼:

\documentclass{beamer}
\usepackage[UTF8, 10pt]{ctex}
\usepackage{subcaption}

\setlength{\parindent}{2em}
\addtobeamertemplate{frametitle}{\setlength{\parindent}{0em}}{}

\begin{document}

\begin{frame}[t]\frametitle{Motivation}

\begin{columns}[T]

    \begin{column}{.5\textwidth}
        the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,
        \begin{itemize}
            \item a
            \item b
            \item c
        \end{itemize}

        稀疏交互的含义是:

        \textcolor{red}{传统的全连接网络}每层的$m$个input和$n$个output之间都有连接,

        \textcolor{red}{卷积网络}的input和output之间是稀疏连接,
    \end{column}

    \begin{column}{.5\textwidth}
        \vspace{-.9\baselineskip}

        \begin{figure}[t]

            \centering
            \begin{subfigure}{.5\textwidth}
                \centering
                \includegraphics[width=\linewidth]{example-image}
                \caption{view from below}
            \end{subfigure}
            \begin{subfigure}{.5\textwidth}
                \centering
                \includegraphics[width=\linewidth]{example-image}
                \caption{view from above}
            \end{subfigure}
            \caption{Caption here}
            \label{fig:figure1}
        \end{figure}
    \end{column}


\end{columns}

\end{frame}
\end{document}

結果: 在此輸入影像描述

答案1

您可以使用\hspace*{2em}或手動執行此操作(\setlength{\parindent}{2em}如果它會影響整個列)。

\documentclass{beamer}
%\usepackage[UTF8, 10pt]{ctex}
\usepackage{subcaption}

\setlength{\parindent}{2em}
\addtobeamertemplate{frametitle}{\setlength{\parindent}{0em}}{}


\begin{document}

\begin{frame}[t]\frametitle{Motivation}
text

\begin{columns}[T, onlytextwidth]

    \begin{column}{.45\textwidth}
            \setlength{\parindent}{2em}
        the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,the quick brown fox jumps over the lazy dog,
        \begin{itemize}
            \item a
            \item b
            \item c
        \end{itemize}

        text

        \textcolor{red}{ text}每层的 text,

        \textcolor{red}{ text} text,
    \end{column}

    \begin{column}{.45\textwidth}
        \vspace{-.9\baselineskip}

        \begin{figure}[t]

            \centering
            \begin{subfigure}{.5\textwidth}
                \centering
                \includegraphics[width=\linewidth]{example-image}
                \caption{view from below}
            \end{subfigure}
            \begin{subfigure}{.5\textwidth}
                \centering
                \includegraphics[width=\linewidth]{example-image}
                \caption{view from above}
            \end{subfigure}
            \caption{Caption here}
            \label{fig:figure1}
        \end{figure}
    \end{column}


\end{columns}

\end{frame}
\end{document}

在此輸入影像描述

相關內容