1
0
forked from upb/FancyBeamerUPB

replace mynextcolumn by nextcolumn

This commit is contained in:
Benno2000 2024-03-06 09:54:02 +01:00
parent c907c434b2
commit 6771d82516
2 changed files with 37 additions and 37 deletions

View File

@ -49,7 +49,7 @@
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
\end{itemize} \end{itemize}
\mynextcolumn \nextcolumn
Numbered lists can be nested to a depth of three: Numbered lists can be nested to a depth of three:
\begin{enumerate} \begin{enumerate}
\item Item on the first level \item Item on the first level
@ -73,11 +73,11 @@
\begin{definition}{A Definition} \begin{definition}{A Definition}
This is a definition. This is a definition.
\end{definition} \end{definition}
\mynextcolumn \nextcolumn
\begin{example}{An {\color{blue} Example}} \begin{example}{An {\color{blue} Example}}
This is an example. This is an example.
\end{example} \end{example}
\mynextcolumn \nextcolumn
\begin{note}{A {\color{red} Note}} \begin{note}{A {\color{red} Note}}
This is a note. This is a note.
\end{note} \end{note}
@ -88,11 +88,11 @@
\begin{definition}{} \begin{definition}{}
This is a {\color{orange} definition}. This is a {\color{orange} definition}.
\end{definition} \end{definition}
\mynextcolumn \nextcolumn
\begin{example}{} \begin{example}{}
This is an {\color{blue} example}. This is an {\color{blue} example}.
\end{example} \end{example}
\mynextcolumn \nextcolumn
\begin{note}{} \begin{note}{}
This is a {\color{red} note}. This is a {\color{red} note}.
\end{note} \end{note}
@ -103,11 +103,11 @@
\begin{definitiontight}{A Definition} \begin{definitiontight}{A Definition}
\centering\includegraphics[width=.75\linewidth]{example-image} \centering\includegraphics[width=.75\linewidth]{example-image}
\end{definitiontight} \end{definitiontight}
\mynextcolumn \nextcolumn
\begin{exampletight}{An Example} \begin{exampletight}{An Example}
\centering\includegraphics[width=.75\linewidth]{example-image} \centering\includegraphics[width=.75\linewidth]{example-image}
\end{exampletight} \end{exampletight}
\mynextcolumn \nextcolumn
\begin{notetight}{A Note} \begin{notetight}{A Note}
\centering\includegraphics[width=.75\linewidth]{example-image} \centering\includegraphics[width=.75\linewidth]{example-image}
\end{notetight} \end{notetight}
@ -120,7 +120,7 @@
\begin{amazing}{An Amazing Box} \begin{amazing}{An Amazing Box}
You can create new boxes with \texttt{\textbackslash MakeNewBox\{name\}\{color\}} (which will check if any of the new box commands is already taken) or \texttt{\textbackslash DeclareBox\{name\}\{color\}} (which may overwrite existing commands). This box was created by \texttt{\textbackslash MakeNewBox\{amazing\}\{purple\}}. You can create new boxes with \texttt{\textbackslash MakeNewBox\{name\}\{color\}} (which will check if any of the new box commands is already taken) or \texttt{\textbackslash DeclareBox\{name\}\{color\}} (which may overwrite existing commands). This box was created by \texttt{\textbackslash MakeNewBox\{amazing\}\{purple\}}.
\end{amazing} \end{amazing}
\mynextcolumn \nextcolumn
{\UpdateBoxColor{definition}{teal} {\UpdateBoxColor{definition}{teal}
\begin{definition}{This is a Definition} \begin{definition}{This is a Definition}
With \texttt{\textbackslash UpdateBoxColor\{name\}\{color\}} you can change the color of a box (locally to the current group). This definition was changed with \texttt{\textbackslash UpdateBoxColor\{definition\}\{teal\}}. With \texttt{\textbackslash UpdateBoxColor\{name\}\{color\}} you can change the color of a box (locally to the current group). This definition was changed with \texttt{\textbackslash UpdateBoxColor\{definition\}\{teal\}}.
@ -163,7 +163,7 @@
\centering \centering
\pic[width=.7\textwidth]{example-image} \pic[width=.7\textwidth]{example-image}
\end{notetight} \end{notetight}
\mynextcolumn \nextcolumn
\begin{notetight}{Inverted Image with \texttt{\textbackslash picDark} (in dark-mode only)} \begin{notetight}{Inverted Image with \texttt{\textbackslash picDark} (in dark-mode only)}
\centering \centering
\picDark[width=.7\textwidth]{example-image.jpg} % does only work for bitmap images so far \picDark[width=.7\textwidth]{example-image.jpg} % does only work for bitmap images so far
@ -182,16 +182,16 @@
\begin{frame}{\insertsubsection} \begin{frame}{\insertsubsection}
\begin{fancycolumns}[columns=4] % default: 2 columns \begin{fancycolumns}[columns=4] % default: 2 columns
This is an example text that is shown in the \textbf{first column}. This is an example text that is shown in the \textbf{first column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{second column}. This is an example text that is shown in the \textbf{second column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{third column}. This is an example text that is shown in the \textbf{third column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{last column}. This is an example text that is shown in the \textbf{last column}.
\end{fancycolumns} \end{fancycolumns}
\vfill \vfill
\begin{note}{Explanation} \begin{note}{Explanation}
Columns are separated by the command \texttt{\textbackslash mynextcolumn}. Columns are separated by the command \texttt{\textbackslash nextcolumn}.
The option \texttt{columns} specifies the number of columns that should be generated. The default number of columns is two. The option \texttt{columns} specifies the number of columns that should be generated. The default number of columns is two.
\end{note} \end{note}
@ -203,11 +203,11 @@
\begin{example}{} \begin{example}{}
The \textbf{first column} takes 20\,\% of the width of the slide. The \textbf{first column} takes 20\,\% of the width of the slide.
\end{example} \end{example}
\mynextcolumn \nextcolumn
\begin{example}{} \begin{example}{}
The \textbf{second column} takes 30\,\% of the width of the slide. The \textbf{second column} takes 30\,\% of the width of the slide.
\end{example} \end{example}
\mynextcolumn \nextcolumn
\begin{example}{} \begin{example}{}
The \textbf{third column} takes the remaining 50\,\% of the width of the slide. The \textbf{third column} takes the remaining 50\,\% of the width of the slide.
\end{example} \end{example}
@ -229,7 +229,7 @@
\begin{note}{Explanation} \begin{note}{Explanation}
If the content of a column exceeds a certain height, the common centering of all columns will not work anymore because beamer does not define the height of a slide. In this case, you can set the height of the columns manually by adding the option \texttt{height=<height>}. If the content of a column exceeds a certain height, the common centering of all columns will not work anymore because beamer does not define the height of a slide. In this case, you can set the height of the columns manually by adding the option \texttt{height=<height>}.
\end{note} \end{note}
\mynextcolumn \nextcolumn
\begin{example}{} \begin{example}{}
This is the content of the second column. It is too high and would make the first column move downwards without additional options. This is the content of the second column. It is too high and would make the first column move downwards without additional options.
\vspace{80mm} \vspace{80mm}
@ -245,14 +245,14 @@
\end{example} \end{example}
\begin{fancycolumns}[columns=4] \begin{fancycolumns}[columns=4]
\mynote{}{1.1} \mynote{}{1.1}
\mynextcolumn \nextcolumn
\mynote{}{1.2} \mynote{}{1.2}
\mynextcolumn \nextcolumn
\mynote{}{1.3} \mynote{}{1.3}
\mynextcolumn \nextcolumn
\mynote{}{1.4} \mynote{}{1.4}
\end{fancycolumns} \end{fancycolumns}
\mynextcolumn \nextcolumn
\begin{example}{} \begin{example}{}
A column on the right side A column on the right side
\end{example} \end{example}
@ -260,12 +260,12 @@
\mynote{}{2.1} \mynote{}{2.1}
\begin{fancycolumns}[columns=3] \begin{fancycolumns}[columns=3]
\mynote{}{2.1.1} \mynote{}{2.1.1}
\mynextcolumn \nextcolumn
\mynote{}{2.1.2} \mynote{}{2.1.2}
\mynextcolumn \nextcolumn
\mynote{}{2.1.3} \mynote{}{2.1.3}
\end{fancycolumns} \end{fancycolumns}
\mynextcolumn \nextcolumn
\mynote{}{2.2} \mynote{}{2.2}
\end{fancycolumns} \end{fancycolumns}
\end{fancycolumns} \end{fancycolumns}
@ -275,9 +275,9 @@
\begin{frame}{\insertsubsection\ -- Option keep} \begin{frame}{\insertsubsection\ -- Option keep}
\begin{fancycolumns}[columns=3,keep] % short for animation=keep \begin{fancycolumns}[columns=3,keep] % short for animation=keep
This is an example text that is shown in the \textbf{first column}. This is an example text that is shown in the \textbf{first column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{second column}. This is an example text that is shown in the \textbf{second column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{third column}. This is an example text that is shown in the \textbf{third column}.
\end{fancycolumns} \end{fancycolumns}
\vfill \vfill
@ -293,9 +293,9 @@
\begin{frame}{\insertsubsection\ -- Option forget} \begin{frame}{\insertsubsection\ -- Option forget}
\begin{fancycolumns}[columns=3,forget] % short for animation=forget \begin{fancycolumns}[columns=3,forget] % short for animation=forget
This is an example text that is shown in the \textbf{first column}. This is an example text that is shown in the \textbf{first column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{second column}. This is an example text that is shown in the \textbf{second column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{third column}. This is an example text that is shown in the \textbf{third column}.
\end{fancycolumns} \end{fancycolumns}
\vfill \vfill
@ -311,9 +311,9 @@
\begin{frame}{\insertsubsection\ -- Option animation=none} \begin{frame}{\insertsubsection\ -- Option animation=none}
\begin{fancycolumns}[columns=3,animation=none] \begin{fancycolumns}[columns=3,animation=none]
This is an example text that is shown in the \textbf{first column}. This is an example text that is shown in the \textbf{first column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{second column}. This is an example text that is shown in the \textbf{second column}.
\mynextcolumn \nextcolumn
This is an example text that is shown in the \textbf{third column}. This is an example text that is shown in the \textbf{third column}.
\end{fancycolumns} \end{fancycolumns}
\vfill \vfill
@ -327,11 +327,11 @@
\begin{frame}[label=current]{\insertsubsection\ -- Option reverse} \begin{frame}[label=current]{\insertsubsection\ -- Option reverse}
\begin{fancycolumns}[columns=4,forget,reverse,b] \begin{fancycolumns}[columns=4,forget,reverse,b]
\pic[width=\linewidth]{example-image}\\[0mm]~ \pic[width=\linewidth]{example-image}\\[0mm]~
\mynextcolumn \nextcolumn
\pic[width=\linewidth]{example-image}\\[5mm]~ \pic[width=\linewidth]{example-image}\\[5mm]~
\mynextcolumn \nextcolumn
\pic[width=\linewidth]{example-image}\\[10mm]~ \pic[width=\linewidth]{example-image}\\[10mm]~
\mynextcolumn \nextcolumn
\pic[width=\linewidth]{example-image}\\[15mm]~ \pic[width=\linewidth]{example-image}\\[15mm]~
\end{fancycolumns} \end{fancycolumns}
\begin{note}{Explanation} \begin{note}{Explanation}

View File

@ -452,13 +452,13 @@
% due to the way beamer calculates the columns, we remove the margin from the width % due to the way beamer calculates the columns, we remove the margin from the width
% see etoolbox for an explanation of '\dimdef' (basically allows for calculations with dimensions) % see etoolbox for an explanation of '\dimdef' (basically allows for calculations with dimensions)
\dimdef{\fancy@cols@total@width}{\linewidth-\fancy@cols@margin*\fancy@cols@count+\fancy@cols@margin}% \dimdef{\fancy@cols@total@width}{\linewidth-\fancy@cols@margin*\fancy@cols@count+\fancy@cols@margin}%
% activate(/overwrite) the '\mynextcolumn' macro within the environment % activate(/overwrite) the '\nextcolumn' macro within the environment
\let\mynextcolumn\fancy@mynextcolumn \let\nextcolumn\fancy@nextcolumn
% a rather complicated macro, which sets/calculates the widths for all columns % a rather complicated macro, which sets/calculates the widths for all columns
\fancy@cols@initialize@widths \fancy@cols@initialize@widths
% issue the first column % issue the first column
% NOTE: we don't guard if 'columns' is below 1 (e.g. we always assume, there is 1 column) % NOTE: we don't guard if 'columns' is below 1 (e.g. we always assume, there is 1 column)
\mynextcolumn \nextcolumn
} }
% a temporary counter so we do not need to use low-level tex counters (like @tempcnta) % a temporary counter so we do not need to use low-level tex counters (like @tempcnta)
@ -544,8 +544,8 @@
\fi \fi
} }
% this is the macro, that will become '\mynextcolumn' within the 'fancycolumns' environment % this is the macro, that will become '\nextcolumn' within the 'fancycolumns' environment
\newcommand\fancy@mynextcolumn{% \newcommand\fancy@nextcolumn{%
% issue a warning if too many columns % issue a warning if too many columns
\ifnum\value{fancy@cols@current}<\fancy@cols@count\else \ifnum\value{fancy@cols@current}<\fancy@cols@count\else
% this mus be an error, we calculate widths etc. only for the given columns % this mus be an error, we calculate widths etc. only for the given columns