简体   繁体   English

避免在 beamer/latex 中使用透明字幕

[英]avoiding transparent caption in beamer/latex

I am trying to insert a figure but its caption is transparent in the current page.我试图插入一个图形,但它的标题在当前页面中是透明的。 how to prevent this?如何防止这种情况? many thanks in advance.提前谢谢了。

    \documentclass{beamer}
\usetheme{Ilmenau}
\setbeamercovered{transparent}
\setbeamercolor*{item}{fg=blue}

\usepackage{caption}
\captionsetup{font=scriptsize,labelfont=scriptsize}
\usepackage{hyperref}
\hypersetup{urlcolor=blue}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\title{DNA - Computing}
\author{Aleyna Acikyol \& Alina Grahic
}
\begin{document}
    \begin{frame}[plain]
        \maketitle
    \end{frame}
    
    %5 FOTO
    \begin{frame}{Probleme heutiger Computer (3)}
        %\begin{enumerate}
        %   \item \textcolor{blue}{Transistoren:}
        \begin{itemize}
            \item \textcolor{blue}{Transistoren:}
            \begin{itemize}
                \item kleiner geht nicht
                \item Ausgleich mit Multicores /Multiprozessorsysteme
            \end{itemize}
        \end{itemize}
        \pause
        \begin{figure}  
            %\begin{itemize}
            \begin{columns}
                \column{0.50\linewidth}
                \centering
                \includegraphics[height=3cm, width=3cm]{./5.jpg}\caption{diverse Datenträger im Privatgebrauch}
                
                \column{0.50\linewidth}     
                \centering
                \includegraphics[height=3cm, width=3cm]{./5.2.jpg}\caption{Data Centre, Cloud}
            \end{columns} 
            %\end{itemize}
        \end{figure}
        %\end{enumerate}    
    \end{frame}
    
\end{document}

It looks like看起来像这个

The caption is transparent because you are using \setbeamercovered{transparent} .标题是透明的,因为您使用的是\setbeamercovered{transparent} You have two options to avoid the transparent caption:您有两种选择来避免透明标题:

  1. immediately show the images and caption by avoid the \pause in front of them通过避免在它们前面的\pause立即显示图像和标题

  2. switching to \setbeamercovered{invisible} either temporarily or for the whole presentation to delay the images and caption to the next overlay:暂时或整个演示切换到\setbeamercovered{invisible}以延迟图像和标题到下一个叠加层:

\documentclass{beamer}
\usetheme{Ilmenau}
\setbeamercovered{transparent}
\setbeamercolor*{item}{fg=blue}
\setbeamerfont{caption}{size=\scriptsize}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\title{DNA - Computing}
\author{Aleyna Acikyol \& Alina Grahic
}
\begin{document}
    \begin{frame}[plain]
        \maketitle
    \end{frame}
    
    %5 FOTO
    \begin{frame}
      \frametitle{Probleme heutiger Computer (3)}
        %\begin{enumerate}
        %   \item \textcolor{blue}{Transistoren:}
        \begin{itemize}
            \item \textcolor{blue}{Transistoren:}
            \begin{itemize}
                \item kleiner geht nicht
                \item Ausgleich mit Multicores /Multiprozessorsysteme
            \end{itemize}
        \end{itemize}
        {
        \setbeamercovered{invisible}
        \pause
        \begin{figure}  
            %\begin{itemize}
            \begin{columns}
                \column{0.50\linewidth}
                \centering
                \includegraphics[height=3cm, width=3cm]{example-image-duck}\caption{diverse Datenträger im Privatgebrauch}
                
                \column{0.50\linewidth}     
                \centering
                \includegraphics[height=3cm, width=3cm]{example-image-duck}\caption{Data Centre, Cloud}
            \end{columns} 
            %\end{itemize}
        \end{figure}
        %\end{enumerate}    
        }
    \end{frame}
    
\end{document}

Some other comments:其他一些评论:

  • you don't need \usepackage{hyperref} , beamer already loads it你不需要\usepackage{hyperref} , beamer 已经加载它

  • I'd be wary to use \hypersetup{urlcolor=blue} with beamer, this can lead to strange alternations to the carefully constructed colour themes of beamer in places one would never expect我会小心地将\hypersetup{urlcolor=blue}与 beamer 一起使用,这可能会导致 beamer 精心构建的颜色主题在人们意想不到的地方出现奇怪的变化

  • If your tex distribution was updated within the last 5 years or so, you don't need \usepackage[utf8]{inputenc} , that's now the default如果你的 tex 发行版在过去 5 年左右更新过,你不需要\usepackage[utf8]{inputenc} ,现在这是默认的

  • If you just want to change the font size of the caption, you don't actually need the caption package, beamer has its own mechanism to control the size of captions如果你只是想改变字幕的字体大小,你实际上不需要caption package,beamer有自己的机制来控制字幕的大小

  • Instead of \begin{frame}{...} I would use \frametitle{...} .而不是\begin{frame}{...}我会使用\frametitle{...} That's much more flexible and powerful这更加灵活和强大

  • If you specify both the width and height of your images, they will end up distorted.如果您同时指定图像的宽度和高度,它们最终会变形。 Please consider adding the keepaspectratio option to avoid this请考虑添加keepaspectratio选项以避免这种情况

  • to avoid manually repeating the same frame title several times ("Probleme heutiger Computer (3)") you could use overlays and add the slide in frame counter to the frametitle为避免多次手动重复相同的帧标题(“Probleme heutiger Computer (3)”),您可以使用覆盖并将帧计数器中的幻灯片添加到帧标题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM