3

Here's my problem:

enter image description here

You see the black color there around my block? I don't know why this happened. I want to remove it. By the way since ths beamer requires a picture. Please use any picture and rename it "logo.png". Hope you want to help me. Thanks!

Here's my MWE:

\documentclass[]{beamer}

\beamertemplateshadingbackground{yellow!30!white}{cyan!20!white} 
\usetheme{Boadilla}
\usepackage{ragged2e}
\usepackage[none]{hyphenat}
\sloppy
\usepackage{changepage}
\usepackage{textpos}
\usepackage{tikzducks}
\usepackage{amsmath}
\usepackage{contour}


%%%%%%%%%%%%%%%%%%%%%%% SET BEAMER FONT ON BLOCK %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamerfont{block body}{size=\small}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%   SET THE INNER MARGIN OF BLOCKS %%%%%%%%%%%%%%%%%%%%%%%%%%%
\addtobeamertemplate{block begin}
{}
{\vspace{1ex plus 0.5ex minus 0.5ex} % Pads top of block
    % separates paragraphs in a block
    \setlength{\parskip}{24pt plus 1pt minus 1pt}%
    \begin{adjustwidth}{-.2cm}{.3cm}
    }
    \addtobeamertemplate{block end}
    {\end{adjustwidth}%
    \vspace{2ex plus 0.5ex minus 0.5ex}}% Pads bottom of block
{\vspace{10ex plus 1ex minus 1ex}} % Seperates blocks from each other
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


% Set Color ==============================

% Custom colors
\usepackage{xcolor}
\usepackage{tikz}
\usetikzlibrary{shadings}


\colorlet{titleleft}{red!70!white} %Ganti warna gradasi kiri pada judul section
\colorlet{titleright}{cyan!70!white} %Ganti warna gradasi kanan pada judul section

% http://www.computerhope.com/htmcolor.htm
\definecolor{gold}{HTML}{FDD017}
\definecolor{deep sky blue}{HTML}{3BB9FF}
\definecolor{light sky blue}{HTML}{82CAFA}

\definecolor{mybackground}{HTML}{82CAFA}
\definecolor{myforeground}{HTML}{0000A0}

\setbeamercolor{normal text}{fg=black,bg=white}
\setbeamercolor{alerted text}{fg=red}
\setbeamercolor{example text}{fg=black}

\setbeamercolor{background canvas}{fg=myforeground, bg=white}
\setbeamercolor{background}{fg=myforeground, bg=mybackground}

\setbeamercolor{palette primary}{fg=black, bg=gray!50!white} %Ganti warna bar pojok kanan bawah
\setbeamercolor{palette secondary}{fg=black, bg=gray!20!white}%Ganti warna bar tengah bawah
\setbeamercolor{palette tertiary}{fg=black, bg=red!70!white}%Ganti warna bar pojok kiri bawah

\setbeamercolor{frametitle}{fg=white} %Ganti warna tulisan pada frame judul
\setbeamercolor{title}{fg=white} %Ganti warna tulisan pada judul
\setbeamercolor{titlelike}{parent=structure, bg=red} %Ganti warna pada kotak judul

\setbeamertemplate{headline}
{
    \leavevmode%
    \hbox{%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,center]{section in head/foot}%
            \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}
        \end{beamercolorbox}%
        \begin{beamercolorbox}[wd=.5\paperwidth,ht=2.65ex,dp=1.5ex,center]{subsection in head/foot}%
            \usebeamerfont{subsection in head/foot}\hspace*{2ex}\insertsubsectionhead
    \end{beamercolorbox}}%
    \vskip0pt%
}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%% GLOBAL SETTING OF ITEMSEP %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\define@key{beamerframe}{wide}[5pt]{%
    \def\beamer@cramped{\itemsep #1\topsep0.5pt\relax}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\defbeamertemplate*{title page}{mydefault}[1][]
{
    \vbox{}
    \vfill
    \begin{centering}
        {\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
        \begin{beamercolorbox}[sep=8pt,center,#1]{title}
            %           \usebeamerfont{title}\inserttitle\par%
            \ifx\insertsubtitle\@empty%
            \else%
            %           \vskip0.25em%
            {\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%
            \fi%     
        \end{beamercolorbox}%
        \vskip1em\par
        \begin{beamercolorbox}[sep=8pt,center,#1]{author}
            \usebeamerfont{author}\insertauthor
        \end{beamercolorbox}
        \begin{beamercolorbox}[sep=8pt,center,#1]{institute}
            \usebeamerfont{institute}\insertinstitute
        \end{beamercolorbox}
        \begin{beamercolorbox}[sep=8pt,center,#1]{date}
            \usebeamerfont{date}\insertdate
        \end{beamercolorbox}\vskip0.5em
    \end{centering}
    \vfill
}
\setbeamertemplate{title page}[mydefault][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]
\pgfdeclarehorizontalshading[titleleft,titleright]{beamer@frametitleshade}{\paperheight}{%
    color(0pt)=(titleleft);
    color(\paperwidth)=(titleright)}

\defbeamertemplate*{frametitle}{horizontal shading}
{%
    \nointerlineskip%
    %\vskip-2pt%
    \hbox{\leavevmode
        \advance\beamer@leftmargin by -12bp%
        \advance\beamer@rightmargin by -12bp%
        \beamer@tempdim=\textwidth%
        \advance\beamer@tempdim by \beamer@leftmargin%
        \advance\beamer@tempdim by \beamer@rightmargin%
        \hskip-\Gm@lmargin\hbox{%
            \setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
                    \vbox{}\vskip-.75ex%
                    \leftskip0.3cm%
                    \rightskip0.3cm plus1fil\leavevmode
                    \insertframetitle%
                    \ifx\insertframesubtitle\@empty%
                    \strut\par%
                    \else
                    \par{\usebeamerfont*{framesubtitle}{\usebeamercolor[fg]{framesubtitle}\insertframesubtitle}\strut\par}%
                    \fi%
                    \nointerlineskip
                    \vbox{}%
            \end{minipage}}%
            \beamer@tempdim=\ht\beamer@tempbox%
            \advance\beamer@tempdim by 2pt%
            \begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
                \usebeamercolor{frametitle right}
                \pgfpathrectangle{\pgfpointorigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
                \pgfusepath{clip}
                \pgftext[left,base]{\pgfuseshading{beamer@frametitleshade}}
            \end{pgfpicture}
            \hskip-\paperwidth%
            \box\beamer@tempbox%
        }%
        \hskip-\Gm@rmargin%
    }%
    \vskip-2pt
}

\pgfdeclareimage[width=.33\paperwidth]{white-logo}{}
\pgfdeclareimage[width=.33\paperwidth]{large-corner}{large-corner}


\newcommand\DoPurpleBackground{%
    \pgfpathmoveto{\pgfpointorigin}
    \pgfpathrectanglecorners{\pgfpoint{0pt}{0pt}}{\pgfpoint{\paperwidth}{-\paperheight}}
    \pgfsetfillcolor{cyan!70!white}
    \pgfusepath{fill}
    \pgftext[at=\pgfpoint{\paperwidth}{-\paperheight},right,base]{\pgfuseimage{large-corner}}
}
\newenvironment{myfont1}{\fontfamily{pzc}\selectfont}{\par}
\newenvironment{myfont2}{\fontfamily{uncl}\selectfont}{\par}

\newcommand\ThankYouFrame{
    \begin{frame}[plain,t]
        \transboxout<1>[duration=2]
        \begin{pgfpicture}
            \pgf@relevantforpicturesizefalse
            \pgftransformxshift{-\Gm@lmargin}
            \pgftransformyshift{5.5pt}
            \DoPurpleBackground
            \pgftext[at=\pgfpoint{.5\paperwidth}{-.52\paperheight},center,center]{\pgfuseimage{white-logo}}
            \pgftext[at=\pgfpoint{.5\paperwidth}{-.23\paperheight},center,center]{
                \begin{myfont1}
                    \fontsize{50}{60}\selectfont\contour{yellow}{\color{red}Terima Kasih}
                \end{myfont1}
            }
            \pgftext[at=\pgfpoint{.5\paperwidth}{-.8\paperheight},center,center]{
                \begin{myfont2}
                    \small\structure{Universitas Jember}
                \end{myfont2}
            }
        \end{pgfpicture}
    \end{frame}
}

\makeatother

% Set Color ==============================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GANTI NAMA & JUDUL & DLL %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Title}
\subtitle{\textbf{Another Title}}
\author[Me]{My Name is Who?}
\institute[FOO]{Institue \\ Insitute \\Insitute \\ Insitute}

\date{\today}
\titlegraphic{\includegraphics[height=2cm]{logo}\vspace*{.5cm}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}
    
    %   \frame{\maketitle}
    \begin{frame}
        \maketitle
    \end{frame}
    
    \section[Outline]{}
    \addtobeamertemplate{frametitle}{}{%
        \begin{textblock*}{100mm}(.85\textwidth, -1cm)
            \includegraphics[height=1cm,width=1cm]{logo}
        \end{textblock*}
    }
    \begin{frame}{Outline}
        \transboxin<1>[duration=2]
        \tableofcontents
    \end{frame}
    
    \begin{frame}[wide]{THIS IS WHAT}
        \transpush<1>
        \setbeamercovered{transparent}
        \setbeamercolor{block title example}{use=structure,fg=white,bg=blue!80!black}
        \setbeamercolor{block body example}{use=structure,fg=black,bg=blue!10!white}
        \onslide<+->{\begin{beamercolorbox}[rounded=true]{block title example}
                LIPSUM
        \end{beamercolorbox}}
        \onslide<+->{\begin{exampleblock}{LIPSUM}
                \justifying
                LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM LIPSUM
        \end{exampleblock}}
    \end{frame}

    
\end{document}

Edit :

Since @Werner and @schoekling said they didn't have this problem, i'm assumming there's something wrong with my code that might works in one device but not in another. I say this because i still have the problem even after i use another TeX editor, TeXmaker, (Currently i'm using TeXstudio latest version). So, please can you answer my question by providing the alternative for beamorcolorbox? I want a blue block. Thank you so much!

7
  • When I compile your example I don't see a black block (output).
    – Werner
    Mar 19 at 0:31
  • @Werner hmm.. it's weird. Actually i'm pretty sure i never edited the beamer or did i? i'm not sure. And this file has been around for a few months ago. This happened after i update my TeXstudio. What's the problem.?
    – user516076
    Mar 19 at 0:39
  • I don't see a black block either, but there are some artifacts in TeXstudio's viewer, which however vary depending on zoom factor etc. Does the box in your case show the same behavior?
    – schoekling
    Mar 19 at 0:41
  • This btw is the type of artifact I mentioned
    – schoekling
    Mar 19 at 1:16
  • 2
    Check your log file. It tells you what you are using. Mar 21 at 0:28
4

Upgrade to a recent version of the beamer package. With version 2021/03/19 v3.62 (as e.g. included in TeXLive 2021) the problem vanishes. The relevant fix happens in file beamerbaseboxes.sty.

With a slightly older version, 2020/11/26 v3.60, I can reproduce the problem. It occurs under the following conditions:

  • Use of a box with rounded corners and shadows
  • The box is uncovered, e.g. with \pause
  • The color of hidden elements is set to transparent.

Here is a rather minimal example showing the problem:

\documentclass{beamer}
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercovered{transparent}
\begin{document}
\begin{frame}
Some text
\pause
\begin{block}{Block title}
  Block text.
\end{block}
\end{frame}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.