- Refine Boxouts.
- General refactoring.
This commit is contained in:
@@ -9,34 +9,58 @@
|
||||
\providelength{\boxoutpadding}[1em]
|
||||
\providelength{\boxoutrule}[1pt]
|
||||
|
||||
\colorlet{boxoutbgcolor}{PrimePaleBlue}
|
||||
\colorlet{boxoutfgcolor}{PrimeBlue}
|
||||
\colorlet{BoxoutBGColor}{PrimePaleBlue}
|
||||
\colorlet{BoxoutFGColor}{PrimeBlue}
|
||||
|
||||
\definecolor{WarningBoxBGColor}{RGB}{255, 221, 118}
|
||||
\definecolor{WarningBoxFGColor}{RGB}{255, 150, 0}
|
||||
|
||||
\NewTblrEnviron{tblrBoxout}
|
||||
\SetTblrInner[tblrBoxout]{
|
||||
%colspec = {X[1,l,h]},
|
||||
cells = {boxoutbgcolor},
|
||||
hlines = {0pt},
|
||||
hline{1,Z} = {\boxoutrule,boxoutfgcolor},
|
||||
row{1} = {font={\bfseries\sbfamily}},
|
||||
cells = {BoxoutBGColor},
|
||||
hborder{1} = {belowspace=\boxoutpadding},
|
||||
hborder{Z} = {abovespace=\boxoutpadding},
|
||||
hlines = {0pt,BoxoutBGColor},
|
||||
hline{1,Z} = {\boxoutrule,BoxoutFGColor},
|
||||
%row{1} = {font={\bfseries\sbfamily}},
|
||||
vborder{1} = {rightspace=\boxoutpadding},
|
||||
vborder{Z} = {leftspace=\boxoutpadding},
|
||||
vlines = {0pt},
|
||||
vline{1,Z} = {\boxoutrule,boxoutfgcolor},
|
||||
vlines = {0pt,BoxoutBGColor},
|
||||
vline{1,Z} = {\boxoutrule,BoxoutFGColor},
|
||||
}
|
||||
|
||||
\NewDocumentEnvironment{@boxout}{
|
||||
m m +b
|
||||
}{
|
||||
\label{box:#2}%
|
||||
\begin{tblrBoxout}{#1}%
|
||||
#3%
|
||||
\end{tblrBoxout}%
|
||||
}{}
|
||||
|
||||
\NewDocumentEnvironment{Boxout}{
|
||||
O{colspec={X[l,h]}}
|
||||
>{\TrimSpaces}m
|
||||
+m
|
||||
o
|
||||
+b
|
||||
}{%
|
||||
\label{box:#2}%
|
||||
\captionlistentry[figure]{#3}%
|
||||
\begin{tblrBoxout}{#1}%
|
||||
{\Centering{}#3}\\%
|
||||
#4\\%
|
||||
\end{tblrBoxout}%
|
||||
\ifthenelse{\equal{#4}{w}\OR\equal{#4}{W}}{%
|
||||
\colorlet{BoxoutBGColor}{WarningBoxBGColor}%
|
||||
\colorlet{BoxoutFGColor}{WarningBoxFGColor}%
|
||||
}{}%
|
||||
\IfBlankTF{#3}{%
|
||||
\begin{@boxout}{#1}{#2}{}%
|
||||
\setlength{\parskip}{\medskipamount}%
|
||||
#5\\%
|
||||
\end{@boxout}%
|
||||
}{%
|
||||
\begin{@boxout}{#1}{#2}%
|
||||
{\Centering\sbfamily\bfseries #3}\\%
|
||||
\setlength{\parskip}{\medskipamount}%
|
||||
#5\\%
|
||||
\end{@boxout}%
|
||||
}%
|
||||
}{}
|
||||
|
||||
\NewDocumentEnvironment{BigBoxout}{
|
||||
@@ -46,12 +70,13 @@
|
||||
O{X[l,h]}
|
||||
>{\TrimSpaces}m
|
||||
+m
|
||||
o
|
||||
+b
|
||||
}{
|
||||
\begin{figure}[#2]%
|
||||
\begin{adjustwidth}{-#1 * \real{#3}}{-#1 / \real{#3}}%
|
||||
\begin{Boxout}[#4]{#5}{#6}%
|
||||
#7%
|
||||
\begin{adjustwidth}{-#1}{-#1 * \real{#3}}%
|
||||
\begin{Boxout}[#4]{#5}{#6}[#7]%
|
||||
#8%
|
||||
\end{Boxout}%
|
||||
\end{adjustwidth}%
|
||||
\end{figure}%
|
||||
@@ -67,12 +92,13 @@
|
||||
O{X[l,h]}
|
||||
>{\TrimSpaces}m
|
||||
+m
|
||||
o
|
||||
+b
|
||||
}{%
|
||||
\begin{wrapfigure}{#1}[#2]%
|
||||
\begin{minipage}{#3}%
|
||||
\begin{Boxout}[#4]{#5}{#6}%
|
||||
#7%
|
||||
\begin{Boxout}[#4]{#5}{#6}[#7]%
|
||||
#8%
|
||||
\end{Boxout}%
|
||||
\end{minipage}%
|
||||
\end{wrapfigure}%
|
||||
|
||||
Reference in New Issue
Block a user