如何将插入到一行中的框移动到页面的左边缘?

如何将插入到一行中的框移动到页面的左边缘?

我正在尝试使用通知来通知即将出现的笔记页面。通知是一个与笔记同时显示在笔记页面之前的小框。我希望该框位于页面的最右侧,并且相对于页面边缘的边距绝对为 0 毫米。

这就是我得到的

在此处输入图片描述

这就是我要的

在此处输入图片描述

如果该框能够自动且同时插入,那就太好了\note<+>,但它仍应与注释之前的项目对齐

另一个问题是,方框没有与文本单词的中间对齐。有没有办法将两个中心对齐在一起?

在此处输入图片描述

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

答案1

带有小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}

在此处输入图片描述

编辑

简化版本,非常感谢@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}

相关内容