修复超额警告并进行修改

修复超额警告并进行修改

因为我想提供一个三角函数教程,所以在处理乳胶时,我收到了一个过满警告,显示“过满 \vbox”。

\documentclass{beamer}
\usepackage[utf8]{inputenc}

%tikzpicture
\usepackage{tikz}
\usepackage{scalerel}
\usepackage{pict2e}
\usepackage{tkz-euclide}
\usetikzlibrary{calc}
\usetikzlibrary{patterns,arrows.meta}
\usetikzlibrary{shadows}
\usetikzlibrary{external}

%pgfplots
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepgfplotslibrary{statistics}
\usepgfplotslibrary{fillbetween}


%colours
\usepackage{xcolor}

%layout justify text
\usepackage{ragged2e}
\apptocmd{\frame}{}{\justifying}{}

%layout
\usefonttheme{professionalfonts}
\setbeamertemplate{navigation symbols}{}
\usetheme{Darmstadt}


\title{Introduction to Trigonometric Function}
\author{}
\date{}

\begin{document}
    
    \begin{frame}
        \titlepage 
    \end{frame}
    
    \begin{frame}{Outline}
        \tableofcontents
    \end{frame}
    
    \begin{frame}
        \frametitle{Angles of Rotation}
        \begin{center}
            
            \begin{tikzpicture}[scale=4, cap = round, > = latex,
                                dot/.style = {circle, fill, minimum size=1.2mm},
                                lbl/.style = {fill=white, inner sep=2pt, near start, sloped}]
                % draw the coordinates
                \draw[->] (-1.5,0) -- (1.5,0) node[right] {$x$};
                \draw[->] (0,-1.5) -- (0,1.5) node[above] {$y$};
                % draw the unit circle
                \draw[thick] (0,0) circle[radius=1];
                % draw dots, labels
                \foreach \i/\j/\k in {
                30/\frac{\pi}{6}/{\left(\frac{\sqrt{3}}{2},\frac{1}{2}\right)},
                45/\frac{\pi}{4}/{\left(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2}\right)},
                60/\frac{\pi}{3}/{\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)},
                90/\frac{\pi}{2}/{\rotatebox{-90}{(0,1)}},
                120/\frac{2\pi}{3}/{\left(\frac{-1}{2},\frac{\sqrt{3}}{2}\right)},
                135/\frac{3\pi}{4}/{\left(\frac{-\sqrt{2}}{2},\frac{\sqrt{2}}{2}\right)},
                150/\frac{5\pi}{6}/{\left(\frac{-\sqrt{3}}{2},\frac{1}{2}\right)},
                180/\pi/{(-1,0)},
                210/\frac{7\pi}{6}/{\left(\frac{-1}{2},\frac{-\sqrt{3}}{2}\right)},
                225/\frac{5\pi}{4}/{\left(\frac{-\sqrt{2}}{2},\frac{-\sqrt{2}}{2}\right)},
                240/\frac{4\pi}{3}/{\left(\frac{-\sqrt{3}}{2},\frac{-1}{2}\right)},
                270/\frac{3\pi}{2}/{\rotatebox{90}{(0,-1)}},
                300/\frac{5\pi}{3}/{\left(\frac{1}{2},\frac{-\sqrt{3}}{2}\right)},
                315/\frac{7\pi}{4}/{\left(\frac{\sqrt{2}}{2},\frac{-\sqrt{2}}{2}\right)},
                330/\frac{11\pi}{6}/{\left(\frac{1}{2},\frac{-\sqrt{3}}{2}\right)},
                360/2\pi/{(1,0)}}
                {\path[draw=gray]    (\i:0) -- (\i:0.5) -- node[lbl] {$\i$} (\i:0.75)-- node[lbl] {$\j$} (\i:1) node[dot] {};
                \ifnum\i<270
                \ifnum\i>90
                \path   (\i:1) --  node[lbl, anchor=east] {$\k$} (\i:1.4);
                \else
                \path   (\i:1) --  node[lbl, anchor=west] {$\k$} (\i:1.4);
                \fi
                \else
                \path   (\i:1) --  node[lbl, anchor=west] {$\k$} (\i:1.3);
                \fi}
            \end{tikzpicture}
        \end{center}
    \end{frame}

\end{document}

这是屏幕截图。 在此处输入图片描述

如何修复它或者是否有任何默认设置代码可以修复此警告?

答案1

tikzpicture由于太大,您会收到此警告。通过更改scale=4为 来减小其大小scale=1.9,警告将消失:

\documentclass{beamer}
\usepackage[utf8]{inputenc}
%layout
\usetheme{Darmstadt}
\usefonttheme{professionalfonts}
\setbeamertemplate{navigation symbols}{}
%layout justify text
\usepackage{ragged2e}
\apptocmd{\frame}{}{\justifying}{}

%tikzpicture
\usepackage{tikz}
\usetikzlibrary{arrows.meta,
                calc, 
                patterns, 
                shadows}
\usetikzlibrary{external}

\begin{document}

\begin{frame}
\frametitle{Angles of Rotation}
    \begin{center}
        \begin{tikzpicture}[scale=1.9,  % <---
                            cap = round, > = latex,
                            dot/.style = {circle, fill, minimum size=2mm, inner sep=0pt}, % <---
                            lbl/.style = {fill=white, inner sep=2pt, near start, sloped}]
            % draw the coordinates
            \draw[->] (-1.5,0) -- (1.5,0) node[right] {$x$};
            \draw[->] (0,-1.5) -- (0,1.5) node[above] {$y$};
            % draw the unit circle
            \draw[thick] (0,0) circle[radius=1];
            % draw dots, labels
            \foreach \i/\j/\k in {
            30/\frac{\pi}{6}/{\left(\frac{\sqrt{3}}{2},\frac{1}{2}\right)},
            45/\frac{\pi}{4}/{\left(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2}\right)},
            60/\frac{\pi}{3}/{\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)},
            90/\frac{\pi}{2}/{\rotatebox{-90}{(0,1)}},
            120/\frac{2\pi}{3}/{\left(\frac{-1}{2},\frac{\sqrt{3}}{2}\right)},
            135/\frac{3\pi}{4}/{\left(\frac{-\sqrt{2}}{2},\frac{\sqrt{2}}{2}\right)},
            150/\frac{5\pi}{6}/{\left(\frac{-\sqrt{3}}{2},\frac{1}{2}\right)},
            180/\pi/{(-1,0)},
            210/\frac{7\pi}{6}/{\left(\frac{-1}{2},\frac{-\sqrt{3}}{2}\right)},
            225/\frac{5\pi}{4}/{\left(\frac{-\sqrt{2}}{2},\frac{-\sqrt{2}}{2}\right)},
            240/\frac{4\pi}{3}/{\left(\frac{-\sqrt{3}}{2},\frac{-1}{2}\right)},
            270/\frac{3\pi}{2}/{\rotatebox{90}{(0,-1)}},
            300/\frac{5\pi}{3}/{\left(\frac{1}{2},\frac{-\sqrt{3}}{2}\right)},
            315/\frac{7\pi}{4}/{\left(\frac{\sqrt{2}}{2},\frac{-\sqrt{2}}{2}\right)},
            330/\frac{11\pi}{6}/{\left(\frac{1}{2},\frac{-\sqrt{3}}{2}\right)},
            360/2\pi/{(1,0)}}
            {\path[draw=gray]    (\i:0) -- (\i:0.5) -- node[lbl] {$\i$} (\i:0.75)-- node[lbl] {$\j$} (\i:1) node[dot] {};
            \ifnum\i<270
            \ifnum\i>90
            \path   (\i:1) --  node[lbl, anchor=east] {$\k$} (\i:1.4);
            \else
            \path   (\i:1) --  node[lbl, anchor=west] {$\k$} (\i:1.4);
            \fi
            \else
            \path   (\i:1) --  node[lbl, anchor=west] {$\k$} (\i:1.3);
            \fi}
        \end{tikzpicture}
    \end{center}
\end{frame}

\end{document}

编译结果

在此处输入图片描述

无关: Beamer 加载了一些包,其中包括“xcolor”包,因此您不需要再次加载。

相关内容