重新排列外盒内的内盒并清空第一页

重新排列外盒内的内盒并清空第一页

(1)为什么第一页是空的?

(2)我希望内盒排列在外盒的顶部。因此,图 1 和图 2 应位于同一高度。

(3)有没有办法将图 8 中的直角符号替换为图 6 中的直角符号?

(4)是否可以缩放整个内容,以便它能够正确适合一页?

\documentclass{scrartcl}
\usepackage[margin=1.0cm]{geometry}

\renewcommand{\familydefault}{\sfdefault}
\usepackage{tikz}
\usetikzlibrary{angles,
                positioning,
                quotes,
                shapes.geometric,
                }
\tikzset{baseline=(current bounding box.center),
    my angle/.style = {draw, font=\small,
                       angle eccentricity=1.55, angle radius=3mm},
    base/.style = {draw, thick},
    dashline/.style = {densely dashed, thick},
    every edge quotes/.style = {auto=right, inner sep=1pt, font=\small},
    Rect/.style args = {#1/#2}{base, minimum height=#1, minimum width=#2},
    Trap/.style args = {#1/#2}{base, trapezium,
                        trapezium left angle=#1, trapezium right angle=#2,
                        minimum width=30mm},
    ANG/.style = {draw, fill=gray!10, angle radius=4mm, 
                  angle eccentricity=#1},
        }
\usepackage{tcolorbox}
\tcbset{fonttitle=\bfseries, coltitle=white, colback=white,
        colframe=black,nobeforeafter,sharp corners,
        sidebyside, sidebyside gap=3mm,
        lower separated=false
        }

\usepackage{sfmath}
\usepackage{tabularray}
 \usepackage{amsmath}
\NewTblrEnviron{mytblr} % <--- added by @Jasper Habicht
\SetTblrInner[mytblr]{
    hline{1,2,Z} = 1pt, vline{1,Z} = 1pt,
    hline{even[3-X]} = {dashed, fg=gray, 0.5pt},
    colspec = {Q[l, bg=gray!10, font=\small\bfseries]
               X[c, bg=gray!10]
               Q[c, wd=33mm]},
    colsep  = 3pt,
    cell{1}{1} = {c=3}{l},
    cell{odd[3]}{1} = {c=2}{c, fg=black, mode=math},
    row{1}  = {bg=gray!30, mode=text},
    row{2-Z}= {belowsep=4pt},
    row{odd[3-Z]} = {ht = 19mm}
                      }

\begin{document}
\subsubsection*{\large Name:\hspace*{1em}\rule[0.1em]{15em}{0.1em}}
\subsection*{Some formulas}
\noindent
\begin{tcolorbox}[title = Area{,} Circumference and more]
    \begin{mytblr}{}
    Drawing 1            &   &   \\
    Area                &   &   \\
    A=a\cdot a = a^2    &   &   
            \tikz{\node (a) [Rect=14mm/14mm] {};
                  \path (a.south west)  to["a"] (a.south east)
                        (a.south east)  to["a"] (a.north east);
                }   \\
    Circumference       &   &   \\
   u=4\cdot a           &   &   
            \tikz{\node (a) [Rect=14mm/14mm] {};
                  \path (a.south west)  to["a"] (a.south east)
                        (a.south east)  to["a"] (a.north east);
                }   \\
    \end{mytblr}
    
\medskip
    \begin{mytblr}{}
    Drawing 3             &   &   \\
    Area                &   &   \\
    A=a\cdot b          &   &   
            \tikz{\node (a) [Rect=12mm/24mm] {};
                  \path (a.south west)  to["a"] (a.south east)
                        (a.south east)  to["b"] (a.north east);
                }   \\
    Circumference       &   &   \\
    u=2\cdot a+2\cdot b &   &   
           \tikz{\node (a) [Rect=12mm/24mm] {};
                  \path (a.south west)  to["a"] (a.south east)
                        (a.south east)  to["b"] (a.north east);
                }   \\
    \end{mytblr}
\medskip
    \begin{mytblr}{}
    Drawing 5             &   &   \\
    Area                &   &   \\
    A=a\cdot b          &   &   
            \tikz{[scale=1.1, very thick, font=\footnotesize]%,cap=round,>=latex]
\coordinate [] (A) at (-0.6cm,-1.cm);
\coordinate [] (C) at (1.8cm,-1.0cm);
\coordinate [] (B) at (1cm,0.4cm);
\coordinate [label=right:h] (H) at (0.6cm,-0.4cm);
\draw[thick] (A) -- node[sloped,above] {} (B) -- node[sloped,above,] {} (C) -- node[below] {g} (A);
\draw[dashed, thick] (B) -- (A-|B) ;}   \\
    Circumference       &   &   \\
    u=a+b+c &   &   
           \tikz{[scale=1.1, very thick, font=\footnotesize]%,cap=round,>=latex]
\coordinate [] (A) at (-0.6cm,-1.cm);
\coordinate [] (C) at (1.8cm,-1.0cm);
\coordinate [] (B) at (1cm,0.4cm);
%\coordinate [label=right:h] (H) at (0.6cm,-0.4cm);
\draw[thick] (A) -- node[above,left] {b} (B) -- node[above,right] {a} (C) -- node[below] {c} (A);
%\draw[dashed, thick] (B) -- (A-|B) ;
}   \\
    \end{mytblr}
\medskip
        \begin{mytblr}{}
    Drawing 7                     &   &   \\
    Area                        &   &   \\
    A=\pi\cdot r^{2}   &   & 
  \tikz{
\def\r{1.0}
\coordinate (A) at (0,0); 
\coordinate (B) at (\r,0) ;
\coordinate (C) at (0,\r) ;
\coordinate (D) at (0,-\r) ;

\filldraw[ fill=white, very thick](A) circle (\r);
\draw[color=black] (A) node {$\scriptstyle \pmb{+}$};
%\draw[color=black] (A) node[below] {M};
\draw[color=black,dashed, thick] (A)-- (B) node[midway,below]{\scriptsize r};
%\draw[color=gray,very thick] (C)-- (D) node[midway,left,color=black]{d};
}   \\
    Circumference           &   &   \\
  \begin{aligned}
  u&=2\cdot \pi \cdot r\\
  &=\pi\cdot d
  \end{aligned}                &   &     
   \tikz{\def\a{2}
\def\r{1.0}
\coordinate (A) at (0,0); 
\coordinate (B) at (\r,0) ;
\coordinate (C) at (0,\r) ;
\coordinate (D) at (0,-\r) ;

\filldraw[ fill=white, very thick](A) circle (\r);
\draw[color=black] (A) node {$\scriptstyle \pmb{+}$};
%\draw[color=black] (A) node[below] {M};
\draw[color=black,dashed, thick] (A)-- (B) node[midway,below]{\scriptsize r};
\draw[color=black,dashed, thick] (D)-- (C) node[midway,left]{\scriptsize d};
%\draw[color=gray,very thick] (C)-- (D) node[midway,left,color=black]{d};
}
    \end{mytblr}
%---------------------------------------------------------------%
\tcblower % right side of box
%---------------------------------------------------------------%
    \begin{mytblr}{}
    Drawing 2            &   &   \\
    Area                &   &   \\
    A=g\cdot h          &   &   
            \tikz{\node (a) [Trap=50/130] {};
                  \draw [dashline] (a.north west)  to["$\text{h}$" '] (a.south west);
                  \path   (a.bottom left corner)  to["$\text{g}$"] (a.bottom right corner);
                }   \\
    Circumference       &   &   \\
   u=2\cdot a+2\cdot b  &   &   \
            \tikz{\node (a) [Trap=50/130] {};
                  \path   (a.top left corner)  to["$\text{a}$" ] (a.bottom left corner)
                          (a.bottom left corner)  to["$\text{b}$"] (a.bottom right corner);;
                }   \\
    \end{mytblr}
    
\medskip    
    \begin{mytblr}{}
    Drawing 4                   &   &   \\
    Area                        &   &   \\
    A=\frac{(a+c)\cdot h}{2}   &   & 
            \tikz{\node (a) [Trap=50/50] {};
                  \draw [dashline] (a.north west)  to["$\text{h}$" '] (a.south west);
                  \path   (a.bottom left corner)  to["$\text{a}$" ] (a.bottom right corner)
                          (a.bottom right corner)  to[""] (a.top right corner)
                          (a.top right corner)  to["$\text{c}$"] (a.top left corner)
                          (a.top left corner)  to[""] (a.bottom left corner);
                }   \\
    Circumference           &   &   \\
   u=a+b+c+d                &   &   
            \tikz{\node (a) [Trap=50/50] {};
                  \path   (a.bottom left corner)  to["$\text{a}$" ] (a.bottom right corner)
                          (a.bottom right corner)  to["$\text{b}$"] (a.top right corner)
                          (a.top right corner)  to["$\text{c}$"] (a.top left corner)
                          (a.top left corner)  to["$\text{d}$"] (a.bottom left corner);
                }   \\
    \end{mytblr}
\medskip
    \begin{mytblr}{}
    Drawing 6                    &   &   \\
    Area                        &   &   \\
    A=\frac{1}{2}\cdot a\cdot b  &   & 
            \tikz{[very thick]
\draw (-1.5,0)coordinate[](A)
    --(1.2,0)coordinate[](B)
    --(-1.5,1.2)coordinate[](C)
    --cycle;
% rechte Winkel
    \pic[draw,fill=gray!10,fill opacity=0.5,angle radius=4mm,"$\pmb{\cdot}$" opacity=1]
      {angle=B--A--C};
% Streckenbezeichnungen
\path (A) -- node [midway,below] {\scriptsize b} (B);
\path (A) -- node [midway,left] {\scriptsize a} (C);
\path (B) -- node [midway,above] {} (C);}   \\
    Circumference           &   &   \\
   u=a+b+c                &   &   
            \tikz{[very thick]
\draw (-1.5,0)coordinate[](A)
    --(1.2,0)coordinate[](B)
    --(-1.5,1.2)coordinate[](C)
    --cycle;
% rechte Winkel
    \pic[draw,fill=gray!10,fill opacity=0.5,angle radius=4mm,"$\pmb{\cdot}$" opacity=1]
      {angle=B--A--C};
% Streckenbezeichnungen
\path (A) -- node [midway,below] {\scriptsize b} (B);
\path (A) -- node [midway,left] {\scriptsize a} (C);
\path (B) -- node [midway,above] {\scriptsize c} (C);}   \\
    \end{mytblr}

\medskip
            \begin{mytblr}{}
    Drawing 8                    &   &   \\
    {In any right-angled\\
     triangle it holds that}                &   &   \\
    a^{2}+b^{2}=c^{2}  &   &
            \tikz{[very thick]
    \draw (0,0)coordinate[](A)
                -- (3,0)coordinate[](B)
                -- (0,1.5)coordinate[](C)
                -- cycle;
% rechte Winkel
    \pic[ANG=0.5, "$\pmb{\cdot}$"] {right angle=B--A--C};
% Streckenbezeichnungen
    \path   (A) edge ["$b$"] (B)
            (B) edge ["$c$"] (C)
            (C) edge ["$a$"] (A);
            }   \\
    \end{mytblr}
\end{tcolorbox}
\end{document}

相关内容