如何缩进列中的第一行?

如何缩进列中的第一行?

我尝试缩进文本的第一行。它在列外的内容中起作用。有什么方法可以在列内起作用吗?我在谷歌上找不到答案。有人能帮我吗?我的代码:

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

在此处输入图片描述

相关内容