2

I am trying to use a notification for an upcoming note page. The notification is a small box shown simultaneously with the note that precedes the note page. I would like the box to go to the very right of the page with absolutely 0mm margin with respect to its edge.

This is what I get

enter image description here

This is what I want

enter image description here

It would also be great if the box is inserted automatically and simultaneously with every instant of \note<+>, but it should still be aligned with the item that precedes the note

Another issue is that the box is not aligned with the middle of the text words. Is there a way to align both centers together?

enter image description here

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

    \setbeameroption{show notes}
    \newcommand{\itemUncoverMoreContents}{\item<+->}
    \newcommand{\presentUncoverMoreContents}{\uncover<+->}

    \usecolortheme{wolverine}
    \useoutertheme[]{split}
    \useinnertheme{inmargin}

            \newlength{\widthTextMarginLeft}
            \setlength{\widthTextMarginLeft}{1.5mm}
            \newlength{\widthTextMarginRight}
            \setlength{\widthTextMarginRight}{2mm}

            \setbeamersize{text margin left=\widthTextMarginLeft, text margin right=\widthTextMarginRight}

        \newlength{\sidebarWidth}
        \setlength{\sidebarWidth}{0.3\paperwidth}

        \setbeamersize{sidebar width left=\sidebarWidth, sidebar width right=0cm}




    % ===== Customize the note page =====
    % ===================================

% BEGIN_FOLD

        % Determine note page geometry
        \makeatletter
        \ifbeamer@notesnormals%
        \beamer@paperwidth 16.00cm%
        \beamer@paperheight 9.00cm%
        %           \beamer@leftmargin 10mm%
        %           \beamer@rightmargin 12mm%
        \geometry{papersize={\beamer@paperwidth,\beamer@paperheight}}
        \fi%
        \makeatother

        % Note page layout 2
        \usepackage{tikzpagenodes}
        \usetikzlibrary{calc}
        \newlength{\widthNotePageSlideContentClearance}
        \setlength{\widthNotePageSlideContentClearance}{5mm}
        \newlength{\notepageLeftMargin}
        \setlength{\notepageLeftMargin}{5mm}
        \newcommand{\insertNotePagePreview}{
            \adjustbox{rotate=90, max height=0.997\paperheight,  frame,valign=t}{\insertslideintonotes{1}}
                                        }
        \newcommand{\measureremainder}[1]{%
            \begin{tikzpicture}[overlay,remember picture]%
                % Measure distance to right text border
                \path let \p0 = (0,0), \p1 = (current page.east) in
                [/utils/exec={\pgfmathsetlength#1{\x1-\x0}\global#1=#1}];
            \end{tikzpicture}%
                                        }

        \newlength{\insertnoteWidth}

        \makeatletter
        \setbeamertemplate{note page}{

            % Slide preview

                \hskip-\Gm@lmargin%
                \insertNotePagePreview%
            %
            % The notes (the comments below must stay where they are)
            %
                \hspace{\widthNotePageSlideContentClearance}%
                \measureremainder{\insertnoteWidth}%
                \addtolength{\insertnoteWidth}{-\notepageLeftMargin}% this comment must stay 
                \begin{minipage}[t]{\insertnoteWidth}
                    \justifying
                    \insertnote
                \end{minipage}%
                                    }
        \makeatother

        \setbeamerfont{note page}{size=\normalsize}





% END_FOLD


\usepackage{ragged2e}
\usepackage{adjustbox}
\usepackage{blindtext}
\setbeamersize{description width=0mm}


\usepackage{efbox}          

\newcommand{\notepageUpcoming}{\setbeamercolor{note page alert}{bg=DarkOrange2}%
    \begin{beamercolorbox}[ht=3mm,wd=3mm]{note page alert}\end{beamercolorbox}}

\newcommand{\noteAlert}{%
    \hspace{\fill}\uncover<.>{\adjustbox{raise=0.03\baselineskip}{\notepageUpcoming}}
                            }



\begin{document}

\begin{frame}{Showing Contents Gradually without Alert}

    \begin{block}{Why is induction motor very common}
        %
        \presentUncoverMoreContents{Induction motors are very practical for the following reasons}

        \begin{description}
            \itemUncoverMoreContents[Rigid] Rigid
            \itemUncoverMoreContents[Cheap] Cheap
                \note<+>{\blindlistlist[1]{enumerate}}
                \noteAlert
            \itemUncoverMoreContents[Low Maintenance] Low Maintenance
            \itemUncoverMoreContents[Self-Starting] Self-starting
            \itemUncoverMoreContents[No Excitation Needed] No Excitation Needed
                \note<+>{\blindlistlist[1]{enumerate}}
                \noteAlert
            \itemUncoverMoreContents[Something goes here] Extra contents
        \end{description}

        \vspace{\fill}

        More content

    \end{block}

\end{frame}

\end{document}
2

With a little tikz-foo:

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

\setbeameroption{show notes}

\usecolortheme{rose}
\useinnertheme{inmargin}
\setbeamercovered{transparent=30}

\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{overlay-beamer-styles}

\begin{document}

\begin{frame}{Uncovering Contents with Alert}

\begin{itemize}[<+->]
    \item[Rigid] Rigid
    \item[Cheap] Cheap
    \item[Low Maintenance] Low Maintenance%    
    \note<3>{note text}%
    \begin{tikzpicture}[overlay ,remember picture]
        \node (foo) {};
        \fill<.>[orange] let \p1 = (foo),
                            \p2 = (current page.west)
        in (\x2,\y1) rectangle ++(0.2,0.2);
    \end{tikzpicture}
    \item[Self-Starting] Self-starting
    \item[No Excitation Needed] No Excitation Needed
\end{itemize}

\end{frame}

\end{document}

enter image description here

EDIT

Simplified version, thanks a lot @PaulGaborit!

\documentclass[aspectratio=169, xcolor={x11names}]{beamer}

\setbeameroption{show notes}

\usecolortheme{rose}
\useinnertheme{inmargin}
\setbeamercovered{transparent=30}

\usepackage{tikz}

\begin{document}

\begin{frame}{Uncovering Contents with Alert}

\begin{itemize}[<+->]
    \item[Rigid] Rigid
    \item[Cheap] Cheap
    \item[Low Maintenance] Low Maintenance%    
    \note<3>{note text}%
    \tikz[overlay ,remember picture]{\fill[orange] (0,0 -| current page.west) rectangle ++(0.2,0.2);}
    \item[Self-Starting] Self-starting
    \item[No Excitation Needed] No Excitation Needed
\end{itemize}

\end{frame}

\end{document}
  • Thanks for the answer, but I almost always customize the codes to In this code, what exactly do I need to modify to change the color of the notification box? – Al-Motasem Aldaoudeyeh Mar 18 at 11:30
  • @Al-MotasemAldaoudeyeh To modify the colour you can use \fill<.>[orange] – user36296 Mar 18 at 12:04
  • Good. One final thing, the original post shows that the alert box is transparent until it is uncovered but this one is entirely invisible up to the point of uncovered its adjacent item. Is there a workaround for this? – Al-Motasem Aldaoudeyeh Mar 18 at 12:29
  • @Al-MotasemAldaoudeyeh \fill[orange] – user36296 Mar 18 at 12:32
  • Without the foo node nor the let operation, you can use (0,0 -| current page.west)... – Paul Gaborit Mar 18 at 13:35

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.